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