Thread (181 messages) 181 messages, 8 authors, 2009-11-28

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

From: Albert Herranz <hidden>
Date: 2009-11-25 17:27:57

Segher Boessenkool wrote:
quoted
+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 :)
quoted
+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.
quoted
+    __asm__ __volatile__("cntlzw %0,%1" : "=r"(irq) : "r"(irq_status));
+    return irq_linear_revmap(h, 31 - irq);
And here.
Ditto.
quoted
+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.
quoted
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help