xref: /openbmc/u-boot/cmd/irq.c (revision e3963c09)
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright 2008 Freescale Semiconductor, Inc.
4  */
5 
6 #include <common.h>
7 #include <config.h>
8 #include <command.h>
9 
10 static int do_interrupts(cmd_tbl_t *cmdtp, int flag, int argc,
11 			 char * const argv[])
12 {
13 
14 	if (argc != 2)
15 		return CMD_RET_USAGE;
16 
17 	/* on */
18 	if (strncmp(argv[1], "on", 2) == 0)
19 		enable_interrupts();
20 	else
21 		disable_interrupts();
22 
23 	return 0;
24 }
25 
26 U_BOOT_CMD(
27 	interrupts, 5, 0, do_interrupts,
28 	"enable or disable interrupts",
29 	"[on, off]"
30 );
31 
32 /* Implemented in $(CPU)/interrupts.c */
33 int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
34 
35 U_BOOT_CMD(
36 	irqinfo,    1,    1,     do_irqinfo,
37 	"print information about IRQs",
38 	""
39 );
40