]>
Commit | Line | Data |
---|---|---|
83d290c5 | 1 | // SPDX-License-Identifier: GPL-2.0+ |
ffa4bafa KG |
2 | /* |
3 | * Copyright 2008 Freescale Semiconductor, Inc. | |
ffa4bafa KG |
4 | */ |
5 | ||
ffa4bafa KG |
6 | #include <config.h> |
7 | #include <command.h> | |
36bf446b | 8 | #include <irq_func.h> |
ffa4bafa | 9 | |
09140113 SG |
10 | static int do_interrupts(struct cmd_tbl *cmdtp, int flag, int argc, |
11 | char *const argv[]) | |
ffa4bafa KG |
12 | { |
13 | ||
47e26b1b | 14 | if (argc != 2) |
4c12eeb8 | 15 | return CMD_RET_USAGE; |
ffa4bafa KG |
16 | |
17 | /* on */ | |
47e26b1b | 18 | if (strncmp(argv[1], "on", 2) == 0) |
ffa4bafa | 19 | enable_interrupts(); |
47e26b1b | 20 | else |
ffa4bafa | 21 | disable_interrupts(); |
ffa4bafa KG |
22 | |
23 | return 0; | |
24 | } | |
25 | ||
26 | U_BOOT_CMD( | |
27 | interrupts, 5, 0, do_interrupts, | |
2fb2604d | 28 | "enable or disable interrupts", |
a89c33db | 29 | "[on, off]" |
ffa4bafa | 30 | ); |
c2531223 | 31 | |
c2531223 PT |
32 | U_BOOT_CMD( |
33 | irqinfo, 1, 1, do_irqinfo, | |
34 | "print information about IRQs", | |
35 | "" | |
36 | ); |