        /*
	 * $Id: int.s,v 1.2 2006/05/03 21:03:54 wheeler Exp $
	 */

#include "asm.h"

	/*
	 * Utility routines to do with handling interrupts.
	 */
	.text
	.code 32
	.align 0

	.global	irq_enable
	.global	irq_disable
	.global	fiq_enable
	.global	fiq_disable

	/*
	 * Global interrupt enable routine.   This clears the
	 * IRQ bit in the CPSR.
	 */
BEGIN_PROC(irq_enable)
	mrs	r0, cpsr
	bic	r0, r0, #0x80
	msr	cpsr, r0
	bx  lr
END_PROC(irq_enable)

	/*
	 * Global interrupt disable routine.   This sets the
	 * IRQ bit in the CPSR.
	 */
BEGIN_PROC(irq_disable)
	mrs	r0, cpsr
	orr	r0, r0, #0x80
	msr	cpsr, r0
	bx  lr
END_PROC(irq_disable)

	/*
	 * Global fast interrupt enable routine.   This clears the
	 * FIQ bit in the CPSR.
	 */
BEGIN_PROC(fiq_enable)
	mrs	r0, cpsr
	bic	r0, r0, #0x40
	msr	cpsr, r0
	bx  lr
END_PROC(fiq_enable)

	/*
	 * Global fast interrupt disable routine.   This sets the
	 * FIQ bit in the CPSR.
	 */
BEGIN_PROC(fiq_disable)
	mrs	r0, cpsr
	orr	r0, r0, #0x40
	msr	cpsr, r0
	bx  lr
END_PROC(fiq_disable)

	.end

/* eof */
