URL
https://opencores.org/ocsvn/or1k_old/or1k_old/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 1633 |
Rev 1765 |
/*
|
/*
|
* include/asm-arm/arch-ebsa110/irq.h
|
* include/asm-arm/arch-ebsa110/irq.h
|
*
|
*
|
* Copyright (C) 1996,1997,1998 Russell King
|
* Copyright (C) 1996,1997,1998 Russell King
|
*/
|
*/
|
|
|
#define IRQ_MCLR ((volatile unsigned char *)0xf3000000)
|
#define IRQ_MCLR ((volatile unsigned char *)0xf3000000)
|
#define IRQ_MSET ((volatile unsigned char *)0xf2c00000)
|
#define IRQ_MSET ((volatile unsigned char *)0xf2c00000)
|
#define IRQ_MASK ((volatile unsigned char *)0xf2c00000)
|
#define IRQ_MASK ((volatile unsigned char *)0xf2c00000)
|
|
|
static __inline__ void mask_and_ack_irq(unsigned int irq)
|
static __inline__ void mask_and_ack_irq(unsigned int irq)
|
{
|
{
|
if (irq < 8)
|
if (irq < 8)
|
*IRQ_MCLR = 1 << irq;
|
*IRQ_MCLR = 1 << irq;
|
}
|
}
|
|
|
static __inline__ void mask_irq(unsigned int irq)
|
static __inline__ void mask_irq(unsigned int irq)
|
{
|
{
|
if (irq < 8)
|
if (irq < 8)
|
*IRQ_MCLR = 1 << irq;
|
*IRQ_MCLR = 1 << irq;
|
}
|
}
|
|
|
static __inline__ void unmask_irq(unsigned int irq)
|
static __inline__ void unmask_irq(unsigned int irq)
|
{
|
{
|
if (irq < 8)
|
if (irq < 8)
|
*IRQ_MSET = 1 << irq;
|
*IRQ_MSET = 1 << irq;
|
}
|
}
|
|
|
static __inline__ unsigned long get_enabled_irqs(void)
|
static __inline__ unsigned long get_enabled_irqs(void)
|
{
|
{
|
return 0;
|
return 0;
|
}
|
}
|
|
|
static __inline__ void irq_init_irq(void)
|
static __inline__ void irq_init_irq(void)
|
{
|
{
|
unsigned long flags;
|
unsigned long flags;
|
|
|
save_flags_cli (flags);
|
save_flags_cli (flags);
|
*IRQ_MCLR = 0xff;
|
*IRQ_MCLR = 0xff;
|
*IRQ_MSET = 0x55;
|
*IRQ_MSET = 0x55;
|
*IRQ_MSET = 0x00;
|
*IRQ_MSET = 0x00;
|
if (*IRQ_MASK != 0x55)
|
if (*IRQ_MASK != 0x55)
|
while (1);
|
while (1);
|
*IRQ_MCLR = 0xff; /* clear all interrupt enables */
|
*IRQ_MCLR = 0xff; /* clear all interrupt enables */
|
restore_flags (flags);
|
restore_flags (flags);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.