blob: bcc718b4bc88d2c998dbc57df6e053bcf192fefa [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Kumar Galaffa4baf2008-08-15 08:24:33 -05002/*
3 * Copyright 2008 Freescale Semiconductor, Inc.
Kumar Galaffa4baf2008-08-15 08:24:33 -05004 */
5
6#include <common.h>
7#include <config.h>
8#include <command.h>
9
Kim Phillips088f1b12012-10-29 13:34:31 +000010static int do_interrupts(cmd_tbl_t *cmdtp, int flag, int argc,
11 char * const argv[])
Kumar Galaffa4baf2008-08-15 08:24:33 -050012{
13
Wolfgang Denk47e26b12010-07-17 01:06:04 +020014 if (argc != 2)
Simon Glass4c12eeb2011-12-10 08:44:01 +000015 return CMD_RET_USAGE;
Kumar Galaffa4baf2008-08-15 08:24:33 -050016
17 /* on */
Wolfgang Denk47e26b12010-07-17 01:06:04 +020018 if (strncmp(argv[1], "on", 2) == 0)
Kumar Galaffa4baf2008-08-15 08:24:33 -050019 enable_interrupts();
Wolfgang Denk47e26b12010-07-17 01:06:04 +020020 else
Kumar Galaffa4baf2008-08-15 08:24:33 -050021 disable_interrupts();
Kumar Galaffa4baf2008-08-15 08:24:33 -050022
23 return 0;
24}
25
26U_BOOT_CMD(
27 interrupts, 5, 0, do_interrupts,
Peter Tyser2fb26042009-01-27 18:03:12 -060028 "enable or disable interrupts",
Wolfgang Denka89c33d2009-05-24 17:06:54 +020029 "[on, off]"
Kumar Galaffa4baf2008-08-15 08:24:33 -050030);
Peter Tyserc2531222009-11-11 10:36:28 -060031
32/* Implemented in $(CPU)/interrupts.c */
Wolfgang Denk54841ab2010-06-28 22:00:46 +020033int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
Peter Tyserc2531222009-11-11 10:36:28 -060034
35U_BOOT_CMD(
36 irqinfo, 1, 1, do_irqinfo,
37 "print information about IRQs",
38 ""
39);