117680Spst// SPDX-License-Identifier: GPL-2.0+
217680Spst/*
317680Spst * Copyright 2008 Freescale Semiconductor, Inc.
417680Spst */
517680Spst
617680Spst#include <common.h>
717680Spst#include <config.h>
817680Spst#include <command.h>
917680Spst#include <irq_func.h>
1017680Spst
1117680Spststatic int do_interrupts(struct cmd_tbl *cmdtp, int flag, int argc,
1217680Spst			 char *const argv[])
1317680Spst{
1417680Spst
1517680Spst	if (argc != 2)
1617680Spst		return CMD_RET_USAGE;
1717680Spst
1817680Spst	/* on */
1917680Spst	if (strncmp(argv[1], "on", 2) == 0)
2017680Spst		enable_interrupts();
2117680Spst	else
2217680Spst		disable_interrupts();
2317680Spst
2417680Spst	return 0;
2517680Spst}
2617680Spst
2717680SpstU_BOOT_CMD(
2817680Spst	interrupts, 5, 0, do_interrupts,
2917680Spst	"enable or disable interrupts",
3017680Spst	"[on, off]"
3117680Spst);
3217680Spst
3317680Spst/* Implemented in $(CPU)/interrupts.c */
3417680Spstint do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
3517680Spst
3617680SpstU_BOOT_CMD(
3717680Spst	irqinfo,    1,    1,     do_irqinfo,
3817680Spst	"print information about IRQs",
3917680Spst	""
4017680Spst);
4117680Spst