blob: 02da450f6731ee1994f27bd6a30e9030373dd9b5 [file] [log] [blame]
Kumar Galaffa4baf2008-08-15 08:24:33 -05001/*
2 * Copyright 2008 Freescale Semiconductor, Inc.
3 *
Wolfgang Denk3765b3e2013-10-07 13:07:26 +02004 * SPDX-License-Identifier: GPL-2.0+
Kumar Galaffa4baf2008-08-15 08:24:33 -05005 */
6
7#include <common.h>
8#include <config.h>
9#include <command.h>
10
Kim Phillips088f1b12012-10-29 13:34:31 +000011static int do_interrupts(cmd_tbl_t *cmdtp, int flag, int argc,
12 char * const argv[])
Kumar Galaffa4baf2008-08-15 08:24:33 -050013{
14
Wolfgang Denk47e26b12010-07-17 01:06:04 +020015 if (argc != 2)
Simon Glass4c12eeb2011-12-10 08:44:01 +000016 return CMD_RET_USAGE;
Kumar Galaffa4baf2008-08-15 08:24:33 -050017
18 /* on */
Wolfgang Denk47e26b12010-07-17 01:06:04 +020019 if (strncmp(argv[1], "on", 2) == 0)
Kumar Galaffa4baf2008-08-15 08:24:33 -050020 enable_interrupts();
Wolfgang Denk47e26b12010-07-17 01:06:04 +020021 else
Kumar Galaffa4baf2008-08-15 08:24:33 -050022 disable_interrupts();
Kumar Galaffa4baf2008-08-15 08:24:33 -050023
24 return 0;
25}
26
27U_BOOT_CMD(
28 interrupts, 5, 0, do_interrupts,
Peter Tyser2fb26042009-01-27 18:03:12 -060029 "enable or disable interrupts",
Wolfgang Denka89c33d2009-05-24 17:06:54 +020030 "[on, off]"
Kumar Galaffa4baf2008-08-15 08:24:33 -050031);
Peter Tyserc2531222009-11-11 10:36:28 -060032
33/* Implemented in $(CPU)/interrupts.c */
Wolfgang Denk54841ab2010-06-28 22:00:46 +020034int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
Peter Tyserc2531222009-11-11 10:36:28 -060035
36U_BOOT_CMD(
37 irqinfo, 1, 1, do_irqinfo,
38 "print information about IRQs",
39 ""
40);