From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C06B93F4116 for ; Mon, 13 Jul 2026 16:18:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=85.215.255.83 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783959535; cv=pass; b=JRln28J8Amxh2Sd8MB4SFK9EDXzCpDk5zTpTndPiPBv9XREexizHX01g7SgCDRGbrsl8YfVO9/EMcA+AUv5AaL0g/IY/NKuDGYzebz6i9hOmTyHuKxdp2e2cHLLxjvusYMMCIBq6DzjiSi9OJQVVJ8Ee2x2PNS9YI5TfoibmnMM= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783959535; c=relaxed/simple; bh=QyI5iv1EZ8s6AwsQ2O1ESOzxI1I1fVVWXNjiZFItpOo=; h=Subject:From:To:References:Cc:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=nXh3RlJ0E5dDQ7qtOjs4+asfMeU/SIEgJL4D96RGIbGRG646U3KwPazu+8pL6NxeAe0v05vZ2yBxdfiWjJZhwbGZdUVKcq0zVLax/fIhHED8ZyY1xr4wj+628z33grcujsOUiZjWcu8E+ulvBas1WVnMSB+YytJM8tGmxP35OtA= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xenosoft.de; spf=none smtp.mailfrom=xenosoft.de; dkim=pass (2048-bit key) header.d=xenosoft.de header.i=@xenosoft.de header.b=a6MYExWD; dkim=permerror (0-bit key) header.d=xenosoft.de header.i=@xenosoft.de header.b=bXIqpEI0; arc=pass smtp.client-ip=85.215.255.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xenosoft.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=xenosoft.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=xenosoft.de header.i=@xenosoft.de header.b="a6MYExWD"; dkim=permerror (0-bit key) header.d=xenosoft.de header.i=@xenosoft.de header.b="bXIqpEI0" ARC-Seal: i=1; a=rsa-sha256; t=1783959492; cv=none; d=strato.com; s=strato-dkim-0002; b=CtMlpUhBYzo+EpETjWxkw5OvR4SvX5v+NAOEFlobsv8Y9QWK6RkmwsxOpmMmX7ZmDk uWAL7KsoGVTkCf4ooEBmeH2D3TvNX9vX1d+ZmLTVdEbzf0evTM7FFg7LL/p9RAhiA0Xd uWr9ZXgAcqu/9rCF+msiViDiO0LKtnM3Im72cI6Slf10gTJByrfzw0/U3AZC4rB0a4Z2 mU1TDN52AIR+BHeRt+WPHYcPjes55ji+OUZIYkt+EvB4NtRqycKAbwOUF0p1pW3Q7KvT amVfF0M5k9JEOaCTs2WcV43n/hyw/mFjUxiI2SAMXF56v9fagBoHrC3Mw7dwpzYFM4TD Mvog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1783959492; s=strato-dkim-0002; d=strato.com; h=In-Reply-To:Date:Message-ID:Cc:References:To:From:Subject:Cc:Date: From:Subject:Sender; bh=2+pL6giVJaq6Auts7NJhD55gTdLOvJPAtilgd0ruH84=; b=deCfU058LPoC30jBU4OQwTF1aFmtHh8FctRz7FKmC3b8ZdqwBvpZ0jcOlKjb8Rp3Nh Jx+mDR8Jqi6y65vPkFOnE7JMB2XMkHnBvlXODedcGhO8lbUUb8icEk/yOY5xCXMzGpTU JMTDOQng5zpzbVJvG1DiEXJfSzV3IL2FqV3OI1UQyhePoIgt/hNZ0ZrShvt0duaLgFos lkHbcbuJ5o4CZ4W0xtOwY4oPSF5hQUhfWD0j7ZBFDwOtej9NU9RlrmjB/aCYHKJK7I2U S4xCK6s1jOWLvDyv9ftfxThwiMB8rcYoKT3KKz7p3XUSI6a7uAuXqGRZESuCKzNRFgR4 kgNQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1783959492; s=strato-dkim-0002; d=xenosoft.de; h=In-Reply-To:Date:Message-ID:Cc:References:To:From:Subject:Cc:Date: From:Subject:Sender; bh=2+pL6giVJaq6Auts7NJhD55gTdLOvJPAtilgd0ruH84=; b=a6MYExWDpHUI48W/IzNKz6Ld0i8PoIBDF1oisX31HUW2Pn8npbjk0phuQ/8hJxq0k/ XsWTtIDLg80YpCK+eqH/JqfPjfiOf+QFYHQSX7MTDsAtT2DBBSCkMAcQF8SqYcIjYegY lysQ+NlGuF7UwTQczDDipjuVJDkGGW5AyBYTaock/6M4lAFX9xhdB4QScF8PSngVxqpi iqjai2iOEByDTjPE6eXr+qDZGy8SduIDNNUkX8/aK+5cOAIfwPAznmqEnBARjFmw0LCc gOg002cvGZ7TK+vKX9A4wmexw2BWNRdnTcJVYSiT52kqy5MkAMHNL02C3gy+eDXTQoE9 KCcQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1783959492; s=strato-dkim-0003; d=xenosoft.de; h=In-Reply-To:Date:Message-ID:Cc:References:To:From:Subject:Cc:Date: From:Subject:Sender; bh=2+pL6giVJaq6Auts7NJhD55gTdLOvJPAtilgd0ruH84=; b=bXIqpEI0ttjMyymrh75tCAfe9GHx+ENMRtSFKZxRG8+DHTf1Qr35jshkOy9DE4ZFxK iLAo18ashYAcK9mtbgBg== X-RZG-AUTH: ":L2QefEenb+UdBJSdRCXu93KJ1bmSGnhMdmOod1DhGN0rBVhd9dFr4thIFiqT9BURIi+s7Xc=" Received: from void-ppc.a-eon.tld by smtp.strato.de (RZmta 55.5.6 DYNA|AUTH) with ESMTPSA id e4c84d26DGIB6Ti (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 13 Jul 2026 18:18:11 +0200 (CEST) Subject: [PATCH] Connecting the SB600's i8259 controller rather in pasemi's pci.c than in pasemi's setup.c. From: Christian Zigotzky To: Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , "open list:LINUX FOR POWERPC (32-BIT AND 64-BIT)" , open list References: <20260701105501.2093-1-chzigotzky@xenosoft.de> <91cfa587-c555-45ad-2a34-83e5191ade7d@xenosoft.de> Cc: "R.T.Dickinson" , Damien Stewart , Darren Stevens , Christian Zigotzky Organization: A-EON Open Source Message-ID: Date: Mon, 13 Jul 2026 18:18:10 +0200 X-Mailer: BrassMonkey/34.2.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <91cfa587-c555-45ad-2a34-83e5191ade7d@xenosoft.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Is this patch OK? My P.A. Semi Nemo board boots with the patched kernel. -- Christian On 07/07/26 06:31, Christian Zigotzky wrote: > Any comments about this patch? > > Tested-by: Christian Zigotzky > > -- Christian > > > On 01/07/26 12:54, Christian Zigotzky wrote: > >  "pas_pci_init" was before "nemo_init_IRQ". > >  Now "pas_pci_init" is after "nemo_init_IRQ" in the official kernel source > >  code. > >  I think "pas_pci_init" scans (discovers) the PCI(e) devices > >  and after that, "nemo_init_IRQ" assigns interrupt numbers > >  to these devices if required. > >  It's not possible to assigns interrupt numbers to PCI(e) devices > >  which have not been discovered yet. > > > > Signed-off-by: Christian Zigotzky > > --- > >  arch/powerpc/platforms/pasemi/pci.c   | 7 +++++++ > >  arch/powerpc/platforms/pasemi/setup.c | 7 ++++--- > >  2 files changed, 11 insertions(+), 3 deletions(-) > > > > diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c > > index 2df955274652..7208c325bfc5 100644 > > --- a/arch/powerpc/platforms/pasemi/pci.c > > +++ b/arch/powerpc/platforms/pasemi/pci.c > > @@ -25,6 +25,8 @@ > > > >  #define PA_PXP_CFA(bus, devfn, off) (((bus) << 20) | ((devfn) << 12) | (off)) > > > > +extern void nemo_init_IRQ(void); > > + > >  static inline int pa_pxp_offset_valid(u8 bus, u8 devfn, int offset) > >  { > >      /* Device 0 Function 0 is special: It's config space spans function 1 as > > @@ -265,6 +267,11 @@ static int __init pas_add_bridge(struct device_node *dev) > >       */ > >      isa_bridge_find_early(hose); > > > > +    /* > > +     * ISA bridge is now active, add the i8259 cascade (if needed) > > +     */ > > +    nemo_init_IRQ(); > > + > >      return 0; > >  } > > > > diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c > > index d03b41336901..eec74611be46 100644 > > --- a/arch/powerpc/platforms/pasemi/setup.c > > +++ b/arch/powerpc/platforms/pasemi/setup.c > > @@ -214,10 +214,12 @@ static void sb600_8259_cascade(struct irq_desc *desc) > >      chip->irq_eoi(&desc->irq_data); > >  } > > > > -static void __init nemo_init_IRQ(struct mpic *mpic) > > +void nemo_init_IRQ(void) > >  { > >      struct device_node *np; > >      int gpio_virq; > > +    struct mpic *mpic; > > + > >      /* Connect the SB600's legacy i8259 controller */ > >      np = of_find_node_by_path("/pxp@0,e0000000"); > >      i8259_init(np, 0); > > @@ -228,6 +230,7 @@ static void __init nemo_init_IRQ(struct mpic *mpic) > >      irq_set_chained_handler(gpio_virq, sb600_8259_cascade); > >      mpic_unmask_irq(irq_get_irq_data(gpio_virq)); > > > > +    mpic = irq_get_chip_data(gpio_virq); > >      irq_set_default_domain(mpic->irqhost); > >  } > > > > @@ -298,8 +301,6 @@ static __init void pas_init_IRQ(void) > >          mpic_unmask_irq(irq_get_irq_data(nmi_virq)); > >      } > > > > -    nemo_init_IRQ(mpic); > > - > >      of_node_put(mpic_node); > >      of_node_put(root); > >  } > > -- Sent with BrassMonkey 34.2.2 (https://github.com/chzigotzky/Web-Browsers-and-Suites-for-Linux-PPC/releases/tag/BrassMonkey_34.2.2)