All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH NEXT v2 2/4] powerpc/pasemi: Add Nemo board IRQ initroutine
@ 2018-08-19 20:21 Darren Stevens
  2018-12-22  9:54 ` [NEXT,v2,2/4] " Michael Ellerman
  2018-12-22  9:54 ` [NEXT,v2,2/4] " Michael Ellerman
  0 siblings, 2 replies; 5+ messages in thread
From: Darren Stevens @ 2018-08-19 20:21 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Christian Zigotzky

[-- Attachment #1: Type: text/plain, Size: 178 bytes --]

  AmigaOS...........: http://yam.ch/
  Unix/MacOS/Windows: http://www.mozilla.com/thunderbird/

General information about MIME can be found at:
http://en.wikipedia.org/wiki/MIME

[-- Attachment #2: Type: text/plain, Size: 210 bytes --]

Add a IRQ init routine for the Nemo board which inits and attatches
the i8259 found in the SB600, and a cascade routine to dispatch the
interrupts.

Signed-off-by: Darren Stevens <Darren@stevens-zone.net>

---

[-- Attachment #3: irq.patch --]
[-- Type: text/plain, Size: 1435 bytes --]

diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index 9a6eb04..fad5280 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -34,6 +34,7 @@
 #include <asm/prom.h>
 #include <asm/iommu.h>
 #include <asm/machdep.h>
+#include <asm/i8259.h>
 #include <asm/mpic.h>
 #include <asm/smp.h>
 #include <asm/time.h>
@@ -183,6 +184,42 @@ static int __init pas_setup_mce_regs(void)
 }
 machine_device_initcall(pasemi, pas_setup_mce_regs);
 
+#ifdef CONFIG_PPC_PASEMI_NEMO
+static void sb600_8259_cascade(struct irq_desc *desc)
+{
+	struct irq_chip *chip = irq_desc_get_chip(desc);
+	unsigned int cascade_irq = i8259_irq();
+
+	if (cascade_irq)
+               generic_handle_irq(cascade_irq);
+
+	chip->irq_eoi(&desc->irq_data);
+}
+
+static void nemo_init_IRQ(struct mpic *mpic)
+{
+	struct device_node *np;
+	int gpio_virq;
+	/* Connect the SB600's legacy i8259 controller */
+	np = of_find_node_by_path("/pxp@0,e0000000");
+	i8259_init(np, 0);
+	of_node_put(np);
+
+	gpio_virq = irq_create_mapping(NULL, 3);
+	irq_set_irq_type(gpio_virq, IRQ_TYPE_LEVEL_HIGH);
+	irq_set_chained_handler(gpio_virq, sb600_8259_cascade);
+	mpic_unmask_irq(irq_get_irq_data(gpio_virq));
+
+	irq_set_default_host(mpic->irqhost);
+}
+
+#else
+
+static inline void nemo_init_IRQ(struct mpic *mpic)
+{
+}
+#endif
+
 static __init void pas_init_IRQ(void)
 {
 	struct device_node *np;

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [NEXT,v2,2/4] powerpc/pasemi: Add Nemo board IRQ initroutine
  2018-08-19 20:21 [PATCH NEXT v2 2/4] powerpc/pasemi: Add Nemo board IRQ initroutine Darren Stevens
@ 2018-12-22  9:54 ` Michael Ellerman
  2019-01-02 21:46   ` Darren Stevens
  2018-12-22  9:54 ` [NEXT,v2,2/4] " Michael Ellerman
  1 sibling, 1 reply; 5+ messages in thread
From: Michael Ellerman @ 2018-12-22  9:54 UTC (permalink / raw)
  To: Darren Stevens, linuxppc-dev; +Cc: Christian Zigotzky

On Sun, 2018-08-19 at 20:21:47 UTC, Darren Stevens wrote:
> Add a IRQ init routine for the Nemo board which inits and attatches
> the i8259 found in the SB600, and a cascade routine to dispatch the
> interrupts.
> 
> Signed-off-by: Darren Stevens <Darren@stevens-zone.net>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/51f4cc2047a4b7e9bf1b49acf06c11

cheers

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [NEXT,v2,2/4] powerpc/pasemi: Add Nemo board IRQ initroutine
  2018-08-19 20:21 [PATCH NEXT v2 2/4] powerpc/pasemi: Add Nemo board IRQ initroutine Darren Stevens
  2018-12-22  9:54 ` [NEXT,v2,2/4] " Michael Ellerman
@ 2018-12-22  9:54 ` Michael Ellerman
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2018-12-22  9:54 UTC (permalink / raw)
  To: Darren Stevens, linuxppc-dev; +Cc: Christian Zigotzky

On Sun, 2018-08-19 at 20:21:47 UTC, Darren Stevens wrote:
> Add a IRQ init routine for the Nemo board which inits and attatches
> the i8259 found in the SB600, and a cascade routine to dispatch the
> interrupts.
> 
> Signed-off-by: Darren Stevens <Darren@stevens-zone.net>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/0428a5f494a003c98c1d1fc98aae60

cheers

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: powerpc/pasemi: Add Nemo board IRQ initroutine
  2018-12-22  9:54 ` [NEXT,v2,2/4] " Michael Ellerman
@ 2019-01-02 21:46   ` Darren Stevens
  2019-01-08 10:17     ` Michael Ellerman
  0 siblings, 1 reply; 5+ messages in thread
From: Darren Stevens @ 2019-01-02 21:46 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev, Christian Zigotzky

Hello Michael

On 22/12/2018, Michael Ellerman wrote:
> On Sun, 2018-08-19 at 20:21:47 UTC, Darren Stevens wrote:
>> Add a IRQ init routine for the Nemo board which inits and attatches
>> the i8259 found in the SB600, and a cascade routine to dispatch the
>> interrupts.
>> 
>> Signed-off-by: Darren Stevens <Darren@stevens-zone.net>
>
> Applied to powerpc next, thanks.

Thankyou very much! We can now build a X1000 kernel without an out-of-tree patch, which is good.

> https://git.kernel.org/powerpc/c/51f4cc2047a4b7e9bf1b49acf06c11

Sorry for not mentioning this earlier(holidays etc..), but this commit has my 4th patch, but the commit message from the 2nd patch. I don't know how, and it is not a major problem, but can we get it updated?

Regards
Darren


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: powerpc/pasemi: Add Nemo board IRQ initroutine
  2019-01-02 21:46   ` Darren Stevens
@ 2019-01-08 10:17     ` Michael Ellerman
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2019-01-08 10:17 UTC (permalink / raw)
  To: Darren Stevens, Michael Ellerman; +Cc: linuxppc-dev, Christian Zigotzky

Darren Stevens <darren@stevens-zone.net> writes:
> Hello Michael
>
> On 22/12/2018, Michael Ellerman wrote:
>> On Sun, 2018-08-19 at 20:21:47 UTC, Darren Stevens wrote:
>>> Add a IRQ init routine for the Nemo board which inits and attatches
>>> the i8259 found in the SB600, and a cascade routine to dispatch the
>>> interrupts.
>>> 
>>> Signed-off-by: Darren Stevens <Darren@stevens-zone.net>
>>
>> Applied to powerpc next, thanks.
>
> Thankyou very much! We can now build a X1000 kernel without an out-of-tree patch, which is good.

Yay!

>> https://git.kernel.org/powerpc/c/51f4cc2047a4b7e9bf1b49acf06c11
>
> Sorry for not mentioning this earlier(holidays etc..), but this commit
> has my 4th patch, but the commit message from the 2nd patch. I don't
> know how, and it is not a major problem, but can we get it updated?

Urgh, cr#p. Not sure how I messed that up. I did have to edit all the
patches a bit to get them to apply so presumably somewhere along the
line the commit message got messed up to.

Unfortunately there's no way to fix it.

This email will have to suffice as documentation that it was me that
screwed it up and not you.

cheers

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-01-08 10:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-19 20:21 [PATCH NEXT v2 2/4] powerpc/pasemi: Add Nemo board IRQ initroutine Darren Stevens
2018-12-22  9:54 ` [NEXT,v2,2/4] " Michael Ellerman
2019-01-02 21:46   ` Darren Stevens
2019-01-08 10:17     ` Michael Ellerman
2018-12-22  9:54 ` [NEXT,v2,2/4] " Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.