[RFC PATCH 16/19] powerpc: wii: hollywood interrupt controller support

Albert Herranz albert_herranz at yahoo.es
Thu Nov 26 04:27:55 EST 2009


Segher Boessenkool wrote:
>> +config HLWD_PIC
> 
> Are vowels too expensive?  :-)
> 

Heh, you work/worked for IBM. Look at what they did with the CLI in the AS/400...

I thought here that hollywood is a rather large prefix and there is also a board called holly. So I came up with hlwd :)

>> +static void hlwd_pic_ack(unsigned int virq)
>> +{
>> +    int irq = virq_to_hw(virq);
>> +    void __iomem *io_base = get_irq_chip_data(virq);
>> +
>> +    set_bit(irq, io_base + HW_BROADWAY_ICR);
>> +}
> 
> Same issue as with Flipper here.
> 

See my comments on the previous message.

>> +    __asm__ __volatile__("cntlzw %0,%1" : "=r"(irq) : "r"(irq_status));
>> +    return irq_linear_revmap(h, 31 - irq);
> 
> And here.
> 

Ditto.

>> +static void __hlwd_quiesce(void __iomem *io_base)
>> +{
>> +    /* mask and ack all IRQs */
>> +    out_be32(io_base + HW_BROADWAY_IMR, 0);
>> +    out_be32(io_base + HW_BROADWAY_ICR, ~0);
>> +}
> 
> I would write 0xffffffff instead, it's clearer and slightly
> more robust.
> 

Ok.

>> +void hlwd_pic_probe(void)
>> +{
>> +    struct irq_host *host;
>> +    struct device_node *np;
>> +    const u32 *interrupts;
>> +    int cascade_virq;
>> +
>> +    for_each_compatible_node(np, NULL, "nintendo,hollywood-pic") {
>> +        interrupts = of_get_property(np, "interrupts", NULL);
>> +        if (interrupts) {
>> +            host = hlwd_pic_init(np);
>> +            BUG_ON(!host);
>> +            cascade_virq = irq_of_parse_and_map(np, 0);
>> +            set_irq_data(cascade_virq, host);
>> +            set_irq_chained_handler(cascade_virq,
>> +                        hlwd_pic_irq_cascade);
> 
> break;  here?  You do not handle more than one hollywood-pic elsewhere
> (which of course is fine).

Yup, thanks. I'll stop after the first pic.

Cheers,
Albert


More information about the Linuxppc-dev mailing list