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

« back to all changes in this revision

Viewing changes to arch/mips/loongson/common/bonito-irq.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:
16
16
 
17
17
#include <loongson.h>
18
18
 
19
 
static inline void bonito_irq_enable(unsigned int irq)
 
19
static inline void bonito_irq_enable(struct irq_data *d)
20
20
{
21
 
        LOONGSON_INTENSET = (1 << (irq - LOONGSON_IRQ_BASE));
 
21
        LOONGSON_INTENSET = (1 << (d->irq - LOONGSON_IRQ_BASE));
22
22
        mmiowb();
23
23
}
24
24
 
25
 
static inline void bonito_irq_disable(unsigned int irq)
 
25
static inline void bonito_irq_disable(struct irq_data *d)
26
26
{
27
 
        LOONGSON_INTENCLR = (1 << (irq - LOONGSON_IRQ_BASE));
 
27
        LOONGSON_INTENCLR = (1 << (d->irq - LOONGSON_IRQ_BASE));
28
28
        mmiowb();
29
29
}
30
30
 
31
31
static struct irq_chip bonito_irq_type = {
32
 
        .name   = "bonito_irq",
33
 
        .ack    = bonito_irq_disable,
34
 
        .mask   = bonito_irq_disable,
35
 
        .mask_ack = bonito_irq_disable,
36
 
        .unmask = bonito_irq_enable,
 
32
        .name           = "bonito_irq",
 
33
        .irq_mask       = bonito_irq_disable,
 
34
        .irq_unmask     = bonito_irq_enable,
37
35
};
38
36
 
39
37
static struct irqaction __maybe_unused dma_timeout_irqaction = {
46
44
        u32 i;
47
45
 
48
46
        for (i = LOONGSON_IRQ_BASE; i < LOONGSON_IRQ_BASE + 32; i++)
49
 
                set_irq_chip_and_handler(i, &bonito_irq_type, handle_level_irq);
 
47
                irq_set_chip_and_handler(i, &bonito_irq_type,
 
48
                                         handle_level_irq);
50
49
 
51
50
#ifdef CONFIG_CPU_LOONGSON2E
52
51
        setup_irq(LOONGSON_IRQ_BASE + 10, &dma_timeout_irqaction);