From: Philippe De Muyter <phdm@macqel.be>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Scott Wood <scottwood@freescale.com>, linuxppc-dev@ozlabs.org
Subject: Re: ARCH=ppc -> ARCH=powerpc : help needed for dts file
Date: Wed, 5 Mar 2008 17:15:10 +0100 [thread overview]
Message-ID: <20080305161509.GA7596@netgate.macqel> (raw)
In-Reply-To: <1204693264.21545.165.camel@pasglop>
Hi Ben,
thanks for all the answers,
On Wed, Mar 05, 2008 at 04:01:04PM +1100, Benjamin Herrenschmidt wrote:
>
> > I also attach my current (not working) dts file attempt. It is actually
> > a modified mpc8540ads.dts file.
> >
> > I now thinks that the ide-cs (hda) discovery or not depends on the cold
> > or warm reboot.
> >
> > Here are the patches for my config (MEIP_8540) relative to a vanilla
> > linux-2.6.24. I hacked the MPC8540ADS config. The PCI4520 is the
> > multi-function chip from TI (dual-socket pc-card + iee1394 ohci and two-port
> > phy)
>
> .../...
>
> > +#ifdef CONFIG_MEIP_8540
> > + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), // External 0 : nINTPFO
> > + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), // External 1 : nINTRTC
> > + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), // External 2 : nINTPLD
> > + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), // External 3 : nINTSTX
> > + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), // External 4 : nINTPHY
> > +#if defined(CONFIG_PCI)
> > + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 5 : PCI4520 MFUNC 0 */
> > + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 6 : PCI4520 MFUNC 1 */
> > + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 7 : PCI4520 MFUNC 2 */
> > + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 8 : PCI4520 MFUNC 3 */
> > + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 9 : PCI4520 MFUNC 4 */
> > + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 10 : PCI4520 MFUNC 5 */
> > + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 11 : PCI4520 MFUNC 6 */
> > +#else
> > + 0x0, /* External 6: */
> > + 0x0, /* External 7: */
> > + 0x0, /* External 8: */
> > + 0x0, /* External 9: */
> > + 0x0, /* External 10: */
> > + 0x0, /* External 11: */
> > +#endif
> > +#else
> > 0x0, /* External 0: */
> > #if defined(CONFIG_PCI)
> > (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 1: PCI slot 0 */
> > @@ -77,6 +100,7 @@
> > 0x0, /* External 9: */
> > 0x0, /* External 10: */
> > 0x0, /* External 11: */
> > +#endif
> > };
>
> Ok, so based on the above, I deduce that you have 12 external interrupt
> sources:
>
> 0...4 are those nINT* things. They correspond apparently do discrete
> devices on your board. You will have to create device nodes in your .dts
> for these with the appropriate interrupts property for each of these.
>
> The rest are ... hrm... weird. You -appear- to have 5 to 8 going to PCI,
> to PIRQA...D. Do that mean that you have wired your connectors on the board
> such that the interrupt does not depend on the actual slot number ?
I asked the guy who designed the hardware, and if I understand correctly :
- the i/o and memory resources of the pci device are connected to the pci bus
- the interrupts are directly connected to the MPIC
Can I describe that in the dts file ?
Philippe
>
> Or are you doing some swizzling ?
>
> Also, I would need to know how those external IRQs are connected to the MPIC,
> I don't have the spec of that chip here. Hrm. Somebody from freescale can
> help him here ?
>
> It's also not clear to me what your interrupts 9 10 and 11 are since you
> seem to only talk about PIRQA...D which is only 4 lines ..
>
> So at this stage, that's not enough information. We need to know exactly how
> you have wired things on your board, and somebody from fsl needs to tell
> me how the ExtIrq are routed to the MPIC on that guy.
>
> Once that's done, you seem to have grasped the interrupt map... for any
> device or slot, you provide the mapping between idsel/pirq line on one side,
> and mpic interrupt & sense on the other. For PCI, sense is always 1 for an
> mpic so you mostly have to check your actual MPIC source numbers.
>
> >From your .dts, I see you've been doing some swizzling of slots using
> interrupts 1...4 ... do that correspond to EXTIRQ 5....8 ?
>
> Ben.
>
> >
> > /* ************************************************************************ */
> > --- ./arch/ppc/platforms/85xx/mpc85xx_ads_common.hbk 2008-01-24 22:58:37.000000000 +0000
> > +++ ./arch/ppc/platforms/85xx/mpc85xx_ads_common.h 2008-02-20 16:36:07.000000000 +0000
> > @@ -29,10 +29,17 @@
> > extern void mpc85xx_ads_map_io(void) __init;
> >
> > /* PCI interrupt controller */
> > +#ifdef CONFIG_MEIP_8540
> > +#define PIRQA MPC85xx_IRQ_EXT5
> > +#define PIRQB MPC85xx_IRQ_EXT6
> > +#define PIRQC MPC85xx_IRQ_EXT7
> > +#define PIRQD MPC85xx_IRQ_EXT8
> > +#else
> > #define PIRQA MPC85xx_IRQ_EXT1
> > #define PIRQB MPC85xx_IRQ_EXT2
> > #define PIRQC MPC85xx_IRQ_EXT3
> > #define PIRQD MPC85xx_IRQ_EXT4
> > +#endif
> >
> > #define MPC85XX_PCI1_LOWER_IO 0x00000000
> > #define MPC85XX_PCI1_UPPER_IO 0x00ffffff
next prev parent reply other threads:[~2008-03-05 16:15 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-03 14:47 ARCH=ppc -> ARCH=powerpc : help needed for dts file Philippe De Muyter
2008-03-03 14:54 ` Grant Likely
2008-03-03 17:07 ` Scott Wood
2008-03-03 21:05 ` Philippe De Muyter
2008-03-03 21:11 ` Scott Wood
2008-03-03 21:26 ` Philippe De Muyter
2008-03-03 21:41 ` Benjamin Herrenschmidt
2008-03-04 8:19 ` Philippe De Muyter
2008-03-03 21:55 ` Scott Wood
2008-03-04 8:08 ` Philippe De Muyter
2008-03-04 8:22 ` Benjamin Herrenschmidt
2008-03-04 9:10 ` Philippe De Muyter
2008-03-05 4:52 ` David Gibson
2008-03-05 5:01 ` Benjamin Herrenschmidt
2008-03-05 16:15 ` Philippe De Muyter [this message]
2008-03-05 20:14 ` Benjamin Herrenschmidt
2008-03-05 23:34 ` Philippe De Muyter
2008-03-05 16:32 ` Scott Wood
2008-03-05 23:46 ` Benjamin Herrenschmidt
2008-03-07 0:10 ` Philippe De Muyter
2008-03-07 0:19 ` Benjamin Herrenschmidt
2008-03-09 22:31 ` Philippe De Muyter
2008-03-09 22:36 ` Benjamin Herrenschmidt
2008-03-11 0:32 ` David Gibson
2008-03-11 11:46 ` Philippe De Muyter
2008-03-11 22:42 ` David Gibson
2008-05-06 22:54 ` Andy Fleming
2008-05-07 7:50 ` Philippe De Muyter
2008-05-07 7:54 ` Stephen Rothwell
2008-03-03 21:26 ` Benjamin Herrenschmidt
2008-03-04 8:34 ` Philippe De Muyter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080305161509.GA7596@netgate.macqel \
--to=phdm@macqel.be \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=scottwood@freescale.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).