Re: [PATCH 11/20] [POWERPC] Wire up PCI on Bamboo board
On Thu, 2007-12-20 at 23:26 +0300, Valentine Barshak wrote: > Just checked the ppc440ep user manual again. > Special cycle/IACK registers are at 0xeed0 instead of 0xeed8. > Looks like the same typo as in the internal registers. > It works because all these registers are mirrored at 0x8 offset > (though it's claimed to be a reserved region). Well, as for IACK, it also probably works because nobody uses it :-) I put it in the device-tree for completeness (and in case somebody ever uses it) but so far, nobody does and there is no proper interface to expose it in linux. Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 11/20] [POWERPC] Wire up PCI on Bamboo board
Benjamin Herrenschmidt wrote: > On Wed, 2007-12-19 at 16:34 +0300, Valentine Barshak wrote: > >>> --- linux-work.orig/arch/powerpc/boot/dts/bamboo.dts2007-12-10 >>> 15:56:59.0 +1100 >>> +++ linux-work/arch/powerpc/boot/dts/bamboo.dts 2007-12-10 >>> 16:39:51.0 +1100 >>> @@ -239,10 +239,48 @@ >>> zmii-channel = <1>; >>> }; >>> }; >>> + >>> + PCI0: [EMAIL PROTECTED] { >>> + device_type = "pci"; >>> + #interrupt-cells = <1>; >>> + #size-cells = <2>; >>> + #address-cells = <3>; >>> + compatible = "ibm,plb440ep-pci", "ibm,plb-pci"; >>> + primary; >>> + reg = <0 eec0 8 /* Config space access */ >>> + 0 eed8 4 /* IACK */ >>> + 0 eed8 4 /* Special cycle */ >>> + 0 ef48 40>; /* Internal registers */ >> Why ef48 here? IIRC, the docs say it should be ef40, while >> ef400040 - ef4f are reserved and can mirror local registers. > > Dunno... probably a typo, though it worked :-) I'll fix it up. Just checked the ppc440ep user manual again. Special cycle/IACK registers are at 0xeed0 instead of 0xeed8. Looks like the same typo as in the internal registers. It works because all these registers are mirrored at 0x8 offset (though it's claimed to be a reserved region). Thanks, Valentine. > > Ben. > > ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 11/20] [POWERPC] Wire up PCI on Bamboo board
On Wed, 2007-12-19 at 16:34 +0300, Valentine Barshak wrote: > > --- linux-work.orig/arch/powerpc/boot/dts/bamboo.dts2007-12-10 > > 15:56:59.0 +1100 > > +++ linux-work/arch/powerpc/boot/dts/bamboo.dts 2007-12-10 > > 16:39:51.0 +1100 > > @@ -239,10 +239,48 @@ > > zmii-channel = <1>; > > }; > > }; > > + > > + PCI0: [EMAIL PROTECTED] { > > + device_type = "pci"; > > + #interrupt-cells = <1>; > > + #size-cells = <2>; > > + #address-cells = <3>; > > + compatible = "ibm,plb440ep-pci", "ibm,plb-pci"; > > + primary; > > + reg = <0 eec0 8 /* Config space access */ > > + 0 eed8 4 /* IACK */ > > + 0 eed8 4 /* Special cycle */ > > + 0 ef48 40>; /* Internal registers */ > > Why ef48 here? IIRC, the docs say it should be ef40, while > ef400040 - ef4f are reserved and can mirror local registers. Dunno... probably a typo, though it worked :-) I'll fix it up. Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 11/20] [POWERPC] Wire up PCI on Bamboo board
Benjamin Herrenschmidt wrote: > This adds the device-tree bits & call to ppc4xx_pci_find_bridges() > to make PCI work on the Bamboo board > > Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]> > --- > > arch/powerpc/boot/dts/bamboo.dts | 40 > ++- > 1 file changed, 39 insertions(+), 1 deletion(-) > > --- linux-work.orig/arch/powerpc/boot/dts/bamboo.dts 2007-12-10 > 15:56:59.0 +1100 > +++ linux-work/arch/powerpc/boot/dts/bamboo.dts 2007-12-10 > 16:39:51.0 +1100 > @@ -239,10 +239,48 @@ > zmii-channel = <1>; > }; > }; > + > + PCI0: [EMAIL PROTECTED] { > + device_type = "pci"; > + #interrupt-cells = <1>; > + #size-cells = <2>; > + #address-cells = <3>; > + compatible = "ibm,plb440ep-pci", "ibm,plb-pci"; > + primary; > + reg = <0 eec0 8 /* Config space access */ > +0 eed8 4 /* IACK */ > +0 eed8 4 /* Special cycle */ > +0 ef48 40>; /* Internal registers */ Why ef48 here? IIRC, the docs say it should be ef40, while ef400040 - ef4f are reserved and can mirror local registers. Thanks, Valentine. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 11/20] [POWERPC] Wire up PCI on Bamboo board
This adds the device-tree bits & call to ppc4xx_pci_find_bridges() to make PCI work on the Bamboo board Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/bamboo.dts | 40 ++- 1 file changed, 39 insertions(+), 1 deletion(-) --- linux-work.orig/arch/powerpc/boot/dts/bamboo.dts2007-12-10 15:56:59.0 +1100 +++ linux-work/arch/powerpc/boot/dts/bamboo.dts 2007-12-10 16:39:51.0 +1100 @@ -239,10 +239,48 @@ zmii-channel = <1>; }; }; + + PCI0: [EMAIL PROTECTED] { + device_type = "pci"; + #interrupt-cells = <1>; + #size-cells = <2>; + #address-cells = <3>; + compatible = "ibm,plb440ep-pci", "ibm,plb-pci"; + primary; + reg = <0 eec0 8 /* Config space access */ + 0 eed8 4 /* IACK */ + 0 eed8 4 /* Special cycle */ + 0 ef48 40>; /* Internal registers */ + + /* Outbound ranges, one memory and one IO, +* later cannot be changed. Chip supports a second +* IO range but we don't use it for now +*/ + ranges = <0200 0 a000 0 a000 0 2000 + 0100 0 0 e800 0 0001>; + + /* Inbound 2GB range starting at 0 */ + dma-ranges = <4200 0 0 0 0 0 8000>; + + /* Bamboo has all 4 IRQ pins tied together per slot */ + interrupt-map-mask = ; + interrupt-map = < + /* IDSEL 1 */ + 0800 0 0 0 &UIC0 1c 8 + + /* IDSEL 2 */ + 1000 0 0 0 &UIC0 1b 8 + + /* IDSEL 3 */ + 1800 0 0 0 &UIC0 1a 8 + + /* IDSEL 4 */ + 2000 0 0 0 &UIC0 19 8 + >; + }; }; chosen { linux,stdout-path = "/plb/opb/[EMAIL PROTECTED]"; - bootargs = "console=ttyS0,115200"; }; }; ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev