xref: /openbmc/u-boot/cmd/irq.c (revision baefb63a)
1 /*
2  * Copyright 2008 Freescale Semiconductor, Inc.
3  *
4  * SPDX-License-Identifier:	GPL-2.0+
5  */
6 
7 #include <common.h>
8 #include <config.h>
9 #include <command.h>
10 
11 static int do_interrupts(cmd_tbl_t *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 /* Implemented in $(CPU)/interrupts.c */
34 int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
35 
36 U_BOOT_CMD(
37 	irqinfo,    1,    1,     do_irqinfo,
38 	"print information about IRQs",
39 	""
40 );
41