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