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

Re: [RFC PATCH 11/19] powerpc: gamecube/wii: flipper interrupt controller support

From: Segher Boessenkool <hidden>
Date: 2009-11-26 21:45:08

quoted
Maybe using FLIPPER (or GAMECUBE_FLIPPER) instead of GAMECUBE_COMMON
is a good name?
I'd prefer to not use a name that implies a specific hardware to  
describe two (mostly) similar but different hardwares.
Hollywood is 100% compatible to Flipper though.
quoted
quoted
+/*
+ * Each interrupt has a corresponding bit in both
+ * the Interrupt Cause (ICR) and Interrupt Mask (IMR) registers.
+ *
+ * Enabling/disabling an interrupt line involves asserting/clearing
+ * the corresponding bit in IMR. ACK'ing a request simply involves
+ * asserting the corresponding bit in ICR.
+ */
I looked it up in YAGCD; it says that _reading_ the ICR reg already
acks all interrupts (and clears the bits), you never write this reg!
quoted
quoted
+static void flipper_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 + FLIPPER_ICR);
+}
So it should be a simple write instead of an RMW here, right?
As it is you are ACKing _all_ IRQs as far as I can see.
No, it acks just a single IRQ.
No it doesn't.  Say IRQs 1 and 3 are asserted, so the reg contains 0x0a.
Now you want to ack IRQ1; set_bit() will write 0x0a | 0x02, not just  
0x02.


Segher
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help