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