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