mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-11 07:24:46 +00:00

Move do_irqinfo() prototype to a header file, otherwise compiler is not happy: arch/x86/lib/interrupts.c:130:5: warning: no previous prototype for ‘do_irqinfo’ [-Wmissing-prototypes] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Add 'struct cmd_tbl;' to irq_func.h] Signed-off-by: Tom Rini <trini@konsulko.com>
36 lines
594 B
C
36 lines
594 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright 2008 Freescale Semiconductor, Inc.
|
|
*/
|
|
|
|
#include <config.h>
|
|
#include <command.h>
|
|
#include <irq_func.h>
|
|
|
|
static int do_interrupts(struct cmd_tbl *cmdtp, int flag, int argc,
|
|
char *const argv[])
|
|
{
|
|
|
|
if (argc != 2)
|
|
return CMD_RET_USAGE;
|
|
|
|
/* on */
|
|
if (strncmp(argv[1], "on", 2) == 0)
|
|
enable_interrupts();
|
|
else
|
|
disable_interrupts();
|
|
|
|
return 0;
|
|
}
|
|
|
|
U_BOOT_CMD(
|
|
interrupts, 5, 0, do_interrupts,
|
|
"enable or disable interrupts",
|
|
"[on, off]"
|
|
);
|
|
|
|
U_BOOT_CMD(
|
|
irqinfo, 1, 1, do_irqinfo,
|
|
"print information about IRQs",
|
|
""
|
|
);
|