~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/mips/sni/pcit.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
156
156
        .io_map_base    = SNI_PORT_BASE
157
157
};
158
158
 
159
 
static void enable_pcit_irq(unsigned int irq)
 
159
static void enable_pcit_irq(struct irq_data *d)
160
160
{
161
 
        u32 mask = 1 << (irq - SNI_PCIT_INT_START + 24);
 
161
        u32 mask = 1 << (d->irq - SNI_PCIT_INT_START + 24);
162
162
 
163
163
        *(volatile u32 *)SNI_PCIT_INT_REG |= mask;
164
164
}
165
165
 
166
 
void disable_pcit_irq(unsigned int irq)
 
166
void disable_pcit_irq(struct irq_data *d)
167
167
{
168
 
        u32 mask = 1 << (irq - SNI_PCIT_INT_START + 24);
 
168
        u32 mask = 1 << (d->irq - SNI_PCIT_INT_START + 24);
169
169
 
170
170
        *(volatile u32 *)SNI_PCIT_INT_REG &= ~mask;
171
171
}
172
172
 
173
 
void end_pcit_irq(unsigned int irq)
174
 
{
175
 
        if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
176
 
                enable_pcit_irq(irq);
177
 
}
178
 
 
179
173
static struct irq_chip pcit_irq_type = {
180
174
        .name = "PCIT",
181
 
        .ack = disable_pcit_irq,
182
 
        .mask = disable_pcit_irq,
183
 
        .mask_ack = disable_pcit_irq,
184
 
        .unmask = enable_pcit_irq,
185
 
        .end = end_pcit_irq,
 
175
        .irq_mask = disable_pcit_irq,
 
176
        .irq_unmask = enable_pcit_irq,
186
177
};
187
178
 
188
179
static void pcit_hwint1(void)
247
238
 
248
239
        mips_cpu_irq_init();
249
240
        for (i = SNI_PCIT_INT_START; i <= SNI_PCIT_INT_END; i++)
250
 
                set_irq_chip_and_handler(i, &pcit_irq_type, handle_level_irq);
 
241
                irq_set_chip_and_handler(i, &pcit_irq_type, handle_level_irq);
251
242
        *(volatile u32 *)SNI_PCIT_INT_REG = 0;
252
243
        sni_hwint = sni_pcit_hwint;
253
244
        change_c0_status(ST0_IM, IE_IRQ1);
260
251
 
261
252
        mips_cpu_irq_init();
262
253
        for (i = SNI_PCIT_INT_START; i <= SNI_PCIT_INT_END; i++)
263
 
                set_irq_chip_and_handler(i, &pcit_irq_type, handle_level_irq);
 
254
                irq_set_chip_and_handler(i, &pcit_irq_type, handle_level_irq);
264
255
        *(volatile u32 *)SNI_PCIT_INT_REG = 0x40000000;
265
256
        sni_hwint = sni_pcit_hwint_cplus;
266
257
        change_c0_status(ST0_IM, IE_IRQ0);