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 #include <irq_func.h>
10 
do_interrupts(struct cmd_tbl * cmdtp,int flag,int argc,char * const argv[])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 /* Implemented in $(CPU)/interrupts.c */
34 int do_irqinfo(struct cmd_tbl *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