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

« back to all changes in this revision

Viewing changes to drivers/parisc/gsc.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:
105
105
        return NO_IRQ;
106
106
}
107
107
 
108
 
static void gsc_asic_mask_irq(unsigned int irq)
 
108
static void gsc_asic_mask_irq(struct irq_data *d)
109
109
{
110
 
        struct gsc_asic *irq_dev = get_irq_chip_data(irq);
111
 
        int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32);
 
110
        struct gsc_asic *irq_dev = irq_data_get_irq_chip_data(d);
 
111
        int local_irq = gsc_find_local_irq(d->irq, irq_dev->global_irq, 32);
112
112
        u32 imr;
113
113
 
114
 
        DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __func__, irq,
 
114
        DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __func__, d->irq,
115
115
                        irq_dev->name, imr);
116
116
 
117
117
        /* Disable the IRQ line by clearing the bit in the IMR */
120
120
        gsc_writel(imr, irq_dev->hpa + OFFSET_IMR);
121
121
}
122
122
 
123
 
static void gsc_asic_unmask_irq(unsigned int irq)
 
123
static void gsc_asic_unmask_irq(struct irq_data *d)
124
124
{
125
 
        struct gsc_asic *irq_dev = get_irq_chip_data(irq);
126
 
        int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32);
 
125
        struct gsc_asic *irq_dev = irq_data_get_irq_chip_data(d);
 
126
        int local_irq = gsc_find_local_irq(d->irq, irq_dev->global_irq, 32);
127
127
        u32 imr;
128
128
 
129
 
        DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __func__, irq,
 
129
        DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __func__, d->irq,
130
130
                        irq_dev->name, imr);
131
131
 
132
132
        /* Enable the IRQ line by setting the bit in the IMR */
140
140
}
141
141
 
142
142
static struct irq_chip gsc_asic_interrupt_type = {
143
 
        .name   =       "GSC-ASIC",
144
 
        .unmask =       gsc_asic_unmask_irq,
145
 
        .mask   =       gsc_asic_mask_irq,
 
143
        .name           =       "GSC-ASIC",
 
144
        .irq_unmask     =       gsc_asic_unmask_irq,
 
145
        .irq_mask       =       gsc_asic_mask_irq,
146
146
};
147
147
 
148
148
int gsc_assign_irq(struct irq_chip *type, void *data)
152
152
        if (irq > GSC_IRQ_MAX)
153
153
                return NO_IRQ;
154
154
 
155
 
        set_irq_chip_and_handler(irq, type, handle_simple_irq);
156
 
        set_irq_chip_data(irq, data);
 
155
        irq_set_chip_and_handler(irq, type, handle_simple_irq);
 
156
        irq_set_chip_data(irq, data);
157
157
 
158
158
        return irq++;
159
159
}