2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2008-08-15 13:24:33 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2008 Freescale Semiconductor, Inc.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <config.h>
|
|
|
|
#include <command.h>
|
2019-11-14 19:57:42 +00:00
|
|
|
#include <irq_func.h>
|
2008-08-15 13:24:33 +00:00
|
|
|
|
2020-05-10 17:40:03 +00:00
|
|
|
static int do_interrupts(struct cmd_tbl *cmdtp, int flag, int argc,
|
|
|
|
char *const argv[])
|
2008-08-15 13:24:33 +00:00
|
|
|
{
|
|
|
|
|
2010-07-16 23:06:04 +00:00
|
|
|
if (argc != 2)
|
2011-12-10 08:44:01 +00:00
|
|
|
return CMD_RET_USAGE;
|
2008-08-15 13:24:33 +00:00
|
|
|
|
|
|
|
/* on */
|
2010-07-16 23:06:04 +00:00
|
|
|
if (strncmp(argv[1], "on", 2) == 0)
|
2008-08-15 13:24:33 +00:00
|
|
|
enable_interrupts();
|
2010-07-16 23:06:04 +00:00
|
|
|
else
|
2008-08-15 13:24:33 +00:00
|
|
|
disable_interrupts();
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
U_BOOT_CMD(
|
|
|
|
interrupts, 5, 0, do_interrupts,
|
2009-01-28 00:03:12 +00:00
|
|
|
"enable or disable interrupts",
|
2009-05-24 15:06:54 +00:00
|
|
|
"[on, off]"
|
2008-08-15 13:24:33 +00:00
|
|
|
);
|
2009-11-11 16:36:28 +00:00
|
|
|
|
|
|
|
/* Implemented in $(CPU)/interrupts.c */
|
2020-05-10 17:40:03 +00:00
|
|
|
int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
|
2009-11-11 16:36:28 +00:00
|
|
|
|
|
|
|
U_BOOT_CMD(
|
|
|
|
irqinfo, 1, 1, do_irqinfo,
|
|
|
|
"print information about IRQs",
|
|
|
|
""
|
|
|
|
);
|