irq.c (a208f37a465e222218974ab20a31b42b7b4893b2) irq.c (94a4c32939dede9328c6e4face335eb8441fc18d)
1/*
2 * Toshiba RBTX4927 specific interrupt handlers
3 *
4 * Author: MontaVista Software, Inc.
5 * source@mvista.com
6 *
7 * Copyright 2001-2002 MontaVista Software Inc.
8 *

--- 112 unchanged lines hidden (view full) ---

121#define TOSHIBA_RBTX4927_IOC_NAME "RBTX4927-IOC"
122static struct irq_chip toshiba_rbtx4927_irq_ioc_type = {
123 .name = TOSHIBA_RBTX4927_IOC_NAME,
124 .ack = toshiba_rbtx4927_irq_ioc_disable,
125 .mask = toshiba_rbtx4927_irq_ioc_disable,
126 .mask_ack = toshiba_rbtx4927_irq_ioc_disable,
127 .unmask = toshiba_rbtx4927_irq_ioc_enable,
128};
1/*
2 * Toshiba RBTX4927 specific interrupt handlers
3 *
4 * Author: MontaVista Software, Inc.
5 * source@mvista.com
6 *
7 * Copyright 2001-2002 MontaVista Software Inc.
8 *

--- 112 unchanged lines hidden (view full) ---

121#define TOSHIBA_RBTX4927_IOC_NAME "RBTX4927-IOC"
122static struct irq_chip toshiba_rbtx4927_irq_ioc_type = {
123 .name = TOSHIBA_RBTX4927_IOC_NAME,
124 .ack = toshiba_rbtx4927_irq_ioc_disable,
125 .mask = toshiba_rbtx4927_irq_ioc_disable,
126 .mask_ack = toshiba_rbtx4927_irq_ioc_disable,
127 .unmask = toshiba_rbtx4927_irq_ioc_enable,
128};
129#define TOSHIBA_RBTX4927_IOC_INTR_ENAB (void __iomem *)0xbc002000UL
130#define TOSHIBA_RBTX4927_IOC_INTR_STAT (void __iomem *)0xbc002006UL
131
132static int toshiba_rbtx4927_irq_nested(int sw_irq)
133{
134 u8 level3;
135
129
130static int toshiba_rbtx4927_irq_nested(int sw_irq)
131{
132 u8 level3;
133
136 level3 = readb(TOSHIBA_RBTX4927_IOC_INTR_STAT) & 0x1f;
134 level3 = readb(rbtx4927_imstat_addr) & 0x1f;
137 if (level3)
138 sw_irq = RBTX4927_IRQ_IOC + fls(level3) - 1;
139 return (sw_irq);
140}
141
142static void __init toshiba_rbtx4927_irq_ioc_init(void)
143{
144 int i;

--- 4 unchanged lines hidden (view full) ---

149 handle_level_irq);
150 set_irq_chained_handler(RBTX4927_IRQ_IOCINT, handle_simple_irq);
151}
152
153static void toshiba_rbtx4927_irq_ioc_enable(unsigned int irq)
154{
155 unsigned char v;
156
135 if (level3)
136 sw_irq = RBTX4927_IRQ_IOC + fls(level3) - 1;
137 return (sw_irq);
138}
139
140static void __init toshiba_rbtx4927_irq_ioc_init(void)
141{
142 int i;

--- 4 unchanged lines hidden (view full) ---

147 handle_level_irq);
148 set_irq_chained_handler(RBTX4927_IRQ_IOCINT, handle_simple_irq);
149}
150
151static void toshiba_rbtx4927_irq_ioc_enable(unsigned int irq)
152{
153 unsigned char v;
154
157 v = readb(TOSHIBA_RBTX4927_IOC_INTR_ENAB);
155 v = readb(rbtx4927_imask_addr);
158 v |= (1 << (irq - RBTX4927_IRQ_IOC));
156 v |= (1 << (irq - RBTX4927_IRQ_IOC));
159 writeb(v, TOSHIBA_RBTX4927_IOC_INTR_ENAB);
157 writeb(v, rbtx4927_imask_addr);
160}
161
162static void toshiba_rbtx4927_irq_ioc_disable(unsigned int irq)
163{
164 unsigned char v;
165
158}
159
160static void toshiba_rbtx4927_irq_ioc_disable(unsigned int irq)
161{
162 unsigned char v;
163
166 v = readb(TOSHIBA_RBTX4927_IOC_INTR_ENAB);
164 v = readb(rbtx4927_imask_addr);
167 v &= ~(1 << (irq - RBTX4927_IRQ_IOC));
165 v &= ~(1 << (irq - RBTX4927_IRQ_IOC));
168 writeb(v, TOSHIBA_RBTX4927_IOC_INTR_ENAB);
166 writeb(v, rbtx4927_imask_addr);
169 mmiowb();
170}
171
172
173static int rbtx4927_irq_dispatch(int pending)
174{
175 int irq;
176

--- 23 unchanged lines hidden ---
167 mmiowb();
168}
169
170
171static int rbtx4927_irq_dispatch(int pending)
172{
173 int irq;
174

--- 23 unchanged lines hidden ---