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