22 #include <linux/pci.h>
28 #define IOP13XX_NUM_MSI_IRQS 128
33 static u32 read_imipr_0(
void)
36 asm volatile(
"mrc p6, 0, %0, c8, c1, 0":
"=r" (
val));
39 static void write_imipr_0(
u32 val)
41 asm volatile(
"mcr p6, 0, %0, c8, c1, 0"::
"r" (
val));
46 static u32 read_imipr_1(
void)
49 asm volatile(
"mrc p6, 0, %0, c9, c1, 0":
"=r" (
val));
52 static void write_imipr_1(
u32 val)
54 asm volatile(
"mcr p6, 0, %0, c9, c1, 0"::
"r" (
val));
59 static u32 read_imipr_2(
void)
62 asm volatile(
"mrc p6, 0, %0, c10, c1, 0":
"=r" (
val));
65 static void write_imipr_2(
u32 val)
67 asm volatile(
"mcr p6, 0, %0, c10, c1, 0"::
"r" (
val));
72 static u32 read_imipr_3(
void)
75 asm volatile(
"mrc p6, 0, %0, c11, c1, 0":
"=r" (
val));
78 static void write_imipr_3(
u32 val)
80 asm volatile(
"mcr p6, 0, %0, c11, c1, 0"::
"r" (
val));
83 static u32 (*read_imipr[])(
void) = {
90 static void (*write_imipr[])(
u32) = {
97 static void iop13xx_msi_handler(
unsigned int irq,
struct irq_desc *
desc)
105 for (i = 0; i <
ARRAY_SIZE(read_imipr); i++) {
106 status = (read_imipr[
i])();
112 (write_imipr[
i])(1 << j);
114 status = (read_imipr[
i])();
133 irq = IRQ_IOP13XX_MSI_0 +
pos;
140 dynamic_irq_init(irq);
147 int pos = irq - IRQ_IOP13XX_MSI_0;
159 static void iop13xx_msi_nop(
struct irq_data *
d)
164 static struct irq_chip iop13xx_msi_chip = {
166 .irq_ack = iop13xx_msi_nop,
186 id = iop13xx_cpu_id();