1/* 2 * linux/arch/arm/mach-ebsa110/irq.c 3 * 4 * Copyright (C) 1996-1998 Russell King 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. 9 * 10 * Changelog: 11 * 22-08-1998 RMK Restructured IRQ routines 12 */ 13#include <linux/init.h> 14 15#include <asm/mach/irq.h> 16#include <asm/hardware.h> 17#include <asm/io.h> 18#include <asm/irq.h> 19#include <asm/system.h> 20 21#include "hardware.h" 22 23static void ebsa110_mask_irq(unsigned int irq) 24{ 25 __raw_writeb(1 << irq, IRQ_MCLR); 26} 27 28static void ebsa110_unmask_irq(unsigned int irq) 29{ 30 __raw_writeb(1 << irq, IRQ_MSET); 31} 32 33void __init ebsa110_init_irq(void) 34{ 35 unsigned long flags; 36 int irq; 37 38 save_flags_cli (flags); 39 __raw_writeb(0xff, IRQ_MCLR); 40 __raw_writeb(0x55, IRQ_MSET); 41 __raw_writeb(0x00, IRQ_MSET); 42 if (__raw_readb(IRQ_MASK) != 0x55) 43 while (1); 44 __raw_writeb(0xff, IRQ_MCLR); /* clear all interrupt enables */ 45 restore_flags (flags); 46 47 for (irq = 0; irq < NR_IRQS; irq++) { 48 irq_desc[irq].valid = 1; 49 irq_desc[irq].probe_ok = 1; 50 irq_desc[irq].mask_ack = ebsa110_mask_irq; 51 irq_desc[irq].mask = ebsa110_mask_irq; 52 irq_desc[irq].unmask = ebsa110_unmask_irq; 53 } 54} 55 56