* Re: [PATCH 2/3] Derive ebc ranges property from EBC registers
From: David Gibson @ 2007-05-15 23:09 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev
In-Reply-To: <1179233998.3084.28.camel@zod.rchland.ibm.com>
On Tue, May 15, 2007 at 07:59:58AM -0500, Josh Boyer wrote:
> On Tue, 2007-05-15 at 14:54 +1000, David Gibson wrote:
> > void ebony_init(void *mac0, void *mac1)
> > Index: working-2.6/arch/powerpc/boot/dts/ebony.dts
> > ===================================================================
> > --- working-2.6.orig/arch/powerpc/boot/dts/ebony.dts 2007-05-14 14:38:39.000000000 +1000
> > +++ working-2.6/arch/powerpc/boot/dts/ebony.dts 2007-05-14 14:45:56.000000000 +1000
> > @@ -136,11 +136,9 @@
> > #address-cells = <2>;
> > #size-cells = <1>;
> > clock-frequency = <0>; // Filled in by zImage
> > - ranges = <0 00000000 fff00000 100000
> > - 1 00000000 48000000 100000
> > - 2 00000000 ff800000 400000
> > - 3 00000000 48200000 100000
> > - 7 00000000 48300000 100000>;
> > + // ranges property is supplied by zImage
> > + // based on firmware's configuration of the
> > + // EBC bridge
>
> Do we want a "ranges;" here as a placeholder? I don't see where it's
> absolutely required, but it makes me feel better for some reason...
Absolutely not. An empty ranges property indicates that the child bus
address space is the same as the parent bus address space. If we're
using the chip-select/offset addressing form for the EBC peripherals,
that's manifestly not the case.
> > +
> > +/* Read 4xx EBC bus bridge registers to get mappings of the peripheral
> > + * banks into the OPB address space */
> > +void ibm4xx_fixup_ebc_ranges(const char *ebc)
> > +{
> > + void *devp;
> > + u32 bxcr;
> > + u32 ranges[EBC_NUM_BANKS*4];
> > + u32 *p = ranges;
> > + int i;
> > +
> > + for (i = 0; i < EBC_NUM_BANKS; i++) {
> > + mtdcr(DCRN_EBC0_CFGADDR, EBC_BXCR(i));
> > + bxcr = mfdcr(DCRN_EBC0_CFGDATA);
> > +
> > + if ((bxcr & EBC_BXCR_BU) != EBC_BXCR_BU_OFF) {
> > + *p++ = i;
> > + *p++ = 0;
> > + *p++ = bxcr & EBC_BXCR_BAS;
> > + *p++ = EBC_BXCR_BANK_SIZE(bxcr);
> > + }
> > + }
> > +
> > + devp = finddevice(ebc);
> > + if (! devp)
> > + fatal("Couldn't locate EBC node %s\n\r", ebc);
> > +
> > + setprop(devp, "ranges", ranges, (p - ranges) * sizeof(u32));
> > +}
>
> So this sets the ranges for the EBC bus, but not the "regs" properties
> of the child nodes. Without that, the child nodes will not be mapped to
> the correct addresses...
Well, no, the child reg properties can't be deduced from the EBC
registers.
> Did you have a plan on how to fixup the child "regs" properties so that
> when the DIP switches are flipped around, the children show up
> correctly?
Well, on Ebony (AFAICT), the only child reg property that might need
adjustment is the small flash. My MTD enabling patch includes some
code in the boot wrapper to toggle the appropriate bit in it's reg
property.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH 3/3] Fixes to allow use of Ebony's flash chips through physmap_of
From: David Gibson @ 2007-05-15 23:10 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev
In-Reply-To: <1179234606.3084.34.camel@zod.rchland.ibm.com>
On Tue, May 15, 2007 at 08:10:06AM -0500, Josh Boyer wrote:
> On Tue, 2007-05-15 at 14:54 +1000, David Gibson wrote:
> > void ebony_init(void *mac0, void *mac1)
> > Index: working-2.6/arch/powerpc/boot/dts/ebony.dts
> > ===================================================================
> > --- working-2.6.orig/arch/powerpc/boot/dts/ebony.dts 2007-05-14 14:45:56.000000000 +1000
> > +++ working-2.6/arch/powerpc/boot/dts/ebony.dts 2007-05-14 14:45:58.000000000 +1000
> > @@ -176,6 +176,7 @@
> > fpga@7,0 {
> > compatible = "Ebony-FPGA";
> > reg = <7 0 10>;
> > + virtual-reg = <e8300000>;
>
> That's the mapping for OpenBios. What happens if someone is using
> U-Boot?
I think U-Boot uses the same default IO mappings.
> If the mapping isn't the same, you might want to pass the address from
> the individual firmware wrapper parts to ebony_flashsel_fixup similar to
> how you've done it for dt_fixup_mac_addresses.
>
> josh
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [viro@ftp.linux.org.uk: [PATCH] rpadlpar breakage - fallout of struct subsystem removal]
From: Michael Ellerman @ 2007-05-16 0:49 UTC (permalink / raw)
To: Al Viro; +Cc: linuxppc-dev, Greg KH
In-Reply-To: <20070515194729.GE4095@ftp.linux.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1217 bytes --]
On Tue, 2007-05-15 at 20:47 +0100, Al Viro wrote:
> [oops - typo in Cc in original posting]
>
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
> drivers/pci/hotplug/rpadlpar_sysfs.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/hotplug/rpadlpar_sysfs.c b/drivers/pci/hotplug/rpadlpar_sysfs.c
> index 6c5be3f..df07606 100644
> --- a/drivers/pci/hotplug/rpadlpar_sysfs.c
> +++ b/drivers/pci/hotplug/rpadlpar_sysfs.c
> @@ -129,8 +129,9 @@ struct kobj_type ktype_dlpar_io = {
> };
>
> struct kset dlpar_io_kset = {
> - .subsys = &pci_hotplug_slots_subsys,
> - .kobj = {.name = DLPAR_KOBJ_NAME, .ktype=&ktype_dlpar_io,},
> + .kobj = {.name = DLPAR_KOBJ_NAME,
> + .ktype = &ktype_dlpar_io,
> + .parent = &pci_hotplug_slots_subsys.kobj},
> .ktype = &ktype_dlpar_io,
> };
That seems to work, I get 'add_slot' and 'remove_slot'
under /sys/bus/pci/slots/control again.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* [PATCH] [POWERPC] remove build warnings in windfarm_core
From: Stephen Rothwell @ 2007-05-16 1:24 UTC (permalink / raw)
To: Paul Mackerras; +Cc: ppc-dev
In-Reply-To: <17993.20745.432703.238649@cargo.ozlabs.ibm.com>
drivers/macintosh/windfarm_core.c: In function 'wf_register_control':
drivers/macintosh/windfarm_core.c:219: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result
drivers/macintosh/windfarm_core.c: In function 'wf_register_sensor':
drivers/macintosh/windfarm_core.c:329: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
drivers/macintosh/windfarm_core.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
On Tue, 15 May 2007 16:19:53 +1000 Paul Mackerras <paulus@samba.org> wrote:
>
> This shows up why I hate the must_check stuff. The sysfs files are
> not essential for the operation of the windfarm subsystem. If the
> sysfs registration fails for any reason, we now have a completely
> non-functional windfarm subsystem instead of a mostly-working one. :(
This version just warns.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --git a/drivers/macintosh/windfarm_core.c b/drivers/macintosh/windfarm_core.c
index 192b26e..52a95b4 100644
--- a/drivers/macintosh/windfarm_core.c
+++ b/drivers/macintosh/windfarm_core.c
@@ -216,7 +216,10 @@ int wf_register_control(struct wf_control *new_ct)
new_ct->attr.attr.mode = 0644;
new_ct->attr.show = wf_show_control;
new_ct->attr.store = wf_store_control;
- device_create_file(&wf_platform_device.dev, &new_ct->attr);
+ if (device_create_file(&wf_platform_device.dev, &new_ct->attr))
+ printk(KERN_WARNING "windfarm: device_creat_file failed"
+ "for %s\n", new_ct->name);
+ /* the subsystem still does useful work without the file */
DBG("wf: Registered control %s\n", new_ct->name);
@@ -326,7 +329,10 @@ int wf_register_sensor(struct wf_sensor *new_sr)
new_sr->attr.attr.mode = 0444;
new_sr->attr.show = wf_show_sensor;
new_sr->attr.store = NULL;
- device_create_file(&wf_platform_device.dev, &new_sr->attr);
+ if (device_create_file(&wf_platform_device.dev, &new_sr->attr))
+ printk(KERN_WARNING "windfarm: device_create_file failed"
+ " for %s\n", new_sr->name);
+ /* the subsystem still does useful work without the file */
DBG("wf: Registered sensor %s\n", new_sr->name);
--
1.5.1.4
^ permalink raw reply related
* RE: [PATCH 2/2] powerpc: Fix Section mismatch warnings
From: Li Yang-r58472 @ 2007-05-16 2:09 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, Paul, Linux Kernel
In-Reply-To: <4575ED11-C144-49CF-9FBA-0613B61EFCE3@kernel.crashing.org>
> -----Original Message-----
> From: Kumar Gala [mailto:galak@kernel.crashing.org]
> Sent: Tuesday, May 15, 2007 10:07 PM
> To: Li Yang-r58472
> Cc: Paul; linuxppc-dev@ozlabs.org; Linux Kernel
> Subject: Re: [PATCH 2/2] powerpc: Fix Section mismatch warnings
>=20
>=20
> On May 14, 2007, at 5:59 AM, Li Yang wrote:
>=20
> > This patch fix the following Section mismatch warnings
> > in powerpc code.
> >
> > WARNING: arch/powerpc/platforms/built-in.o - Section mismatch:
> > reference to .init.data:mv643xx_eth_pd_devs from .text between
> > 'mv643xx_eth_add_pds' (at offset 0x9ed2) and 'gg2_read_config'
> > WARNING: arch/powerpc/platforms/built-in.o - Section mismatch:
> > reference to .init.data:mv643xx_eth_pd_devs from .text between
> > 'mv643xx_eth_add_pds' (at offset 0x9ed6) and 'gg2_read_config'
> > WARNING: arch/powerpc/platforms/built-in.o - Section mismatch:
> > reference to .init.text:note_scsi_host from __ksymtab between
> > '__ksymtab_note_scsi_host' (at offset 0x8) and
'__ksymtab_sys_ctrler'
> >
> > Signed-off-by: Li Yang <leoli@freescale.com>
> > ---
> > arch/powerpc/platforms/chrp/pegasos_eth.c | 2 +-
> > arch/powerpc/platforms/powermac/setup.c | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
>=20
> Did you change anything?
Nothing yet. I think it's a delay of mail system.
- Leo
^ permalink raw reply
* Re: [PATCH 2/3] Derive ebc ranges property from EBC registers
From: Josh Boyer @ 2007-05-16 2:29 UTC (permalink / raw)
To: dwg; +Cc: linuxppc-dev
In-Reply-To: <20070515230930.GB20290@localhost.localdomain>
On Wed, May 16, 2007 at 09:09:30AM +1000, David Gibson wrote:
> > Do we want a "ranges;" here as a placeholder? I don't see where it's
> > absolutely required, but it makes me feel better for some reason...
>
> Absolutely not. An empty ranges property indicates that the child bus
> address space is the same as the parent bus address space. If we're
> using the chip-select/offset addressing form for the EBC peripherals,
> that's manifestly not the case.
Ah ok. My lack of device tree experience showing through again.
> > So this sets the ranges for the EBC bus, but not the "regs" properties
> > of the child nodes. Without that, the child nodes will not be mapped to
> > the correct addresses...
>
> Well, no, the child reg properties can't be deduced from the EBC
> registers.
Right, I didn't mean to imply the could be.
> > Did you have a plan on how to fixup the child "regs" properties so that
> > when the DIP switches are flipped around, the children show up
> > correctly?
>
> Well, on Ebony (AFAICT), the only child reg property that might need
> adjustment is the small flash. My MTD enabling patch includes some
> code in the boot wrapper to toggle the appropriate bit in it's reg
> property.
Hm, ok. On Bamboo, it's more complicated. I'll have to think of something
there I suppose.
josh
^ permalink raw reply
* Re: [PATCH 2/3] Derive ebc ranges property from EBC registers
From: David Gibson @ 2007-05-16 3:13 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev
In-Reply-To: <20070516022958.GB25075@crusty.rchland.ibm.com>
On Tue, May 15, 2007 at 09:29:59PM -0500, Josh Boyer wrote:
> On Wed, May 16, 2007 at 09:09:30AM +1000, David Gibson wrote:
> > > Do we want a "ranges;" here as a placeholder? I don't see where it's
> > > absolutely required, but it makes me feel better for some reason...
> >
> > Absolutely not. An empty ranges property indicates that the child bus
> > address space is the same as the parent bus address space. If we're
> > using the chip-select/offset addressing form for the EBC peripherals,
> > that's manifestly not the case.
>
> Ah ok. My lack of device tree experience showing through again.
>
> > > So this sets the ranges for the EBC bus, but not the "regs" properties
> > > of the child nodes. Without that, the child nodes will not be mapped to
> > > the correct addresses...
> >
> > Well, no, the child reg properties can't be deduced from the EBC
> > registers.
>
> Right, I didn't mean to imply the could be.
>
> > > Did you have a plan on how to fixup the child "regs" properties so that
> > > when the DIP switches are flipped around, the children show up
> > > correctly?
> >
> > Well, on Ebony (AFAICT), the only child reg property that might need
> > adjustment is the small flash. My MTD enabling patch includes some
> > code in the boot wrapper to toggle the appropriate bit in it's reg
> > property.
>
> Hm, ok. On Bamboo, it's more complicated. I'll have to think of something
> there I suppose.
Want to send me a board manual? I can see if any approach springs to
mind.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* [PATCH] [POWERPC] fix non SMP warning
From: Stephen Rothwell @ 2007-05-16 3:21 UTC (permalink / raw)
To: paulus; +Cc: ppc-dev
arch/powerpc/platforms/pseries/pseries.h:24: warning: return type defaults to 'int'
arch/powerpc/platforms/pseries/pseries.h:25: warning: return type defaults to 'int'
arch/powerpc/platforms/pseries/pseries.h:24: warning: control reaches end of non-void function
arch/powerpc/platforms/pseries/pseries.h:25: warning: control reaches end of non-void function
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/platforms/pseries/pseries.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h
index 22bc019..2729d55 100644
--- a/arch/powerpc/platforms/pseries/pseries.h
+++ b/arch/powerpc/platforms/pseries/pseries.h
@@ -21,8 +21,8 @@ extern int pSeries_machine_check_exception(struct pt_regs *regs);
extern void smp_init_pseries_mpic(void);
extern void smp_init_pseries_xics(void);
#else
-static inline smp_init_pseries_mpic(void) { };
-static inline smp_init_pseries_xics(void) { };
+static inline void smp_init_pseries_mpic(void) { };
+static inline void smp_init_pseries_xics(void) { };
#endif
#ifdef CONFIG_KEXEC
--
1.5.1.4
^ permalink raw reply related
* New version of the device tree aware EMAC driver
From: David Gibson @ 2007-05-16 3:26 UTC (permalink / raw)
To: linuxppc-dev
I've made a few more tiny tweaks to BenH's rewritten device-tree based
4xx EMAC driver. The main change is that it now no longer requires
'device_type', just 'compatible' to be set in the ZMII and MAL device
nodes when probing. This works better with current thinking on
flattened device trees which discourages creating new device_type
values unless there is a clear use for a new device class binding.
The patch can be obtained from:
http://ozlabs.org/~dgibson/home/emac/powerpc-emac-new-20070516.patch
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH] iseries: fix CONFIG_VIOCONS/CONFIG_VT dependency
From: Michael Ellerman @ 2007-05-16 3:41 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev, paulus, sfr
In-Reply-To: <20070515190343.GA13203@lixom.net>
[-- Attachment #1: Type: text/plain, Size: 1176 bytes --]
On Tue, 2007-05-15 at 14:03 -0500, Olof Johansson wrote:
> VT already depends on !VIOCONS, but there's no restriction in the other
> direction. This makes an allyesconfig not build.
>
> Switch to a Kconfig dependency instead of a compile-time error.
>
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
>
> diff --git a/arch/powerpc/platforms/iseries/Kconfig b/arch/powerpc/platforms/iseries/Kconfig
> index 46c3a8e..e48f018 100644
> --- a/arch/powerpc/platforms/iseries/Kconfig
> +++ b/arch/powerpc/platforms/iseries/Kconfig
> @@ -8,6 +8,7 @@ menu "iSeries device drivers"
>
> config VIOCONS
> tristate "iSeries Virtual Console Support (Obsolete)"
> + depends on !VT
> help
This context doesn't match linus' or the powerpc tree, I see:
config VIOCONS
bool "iSeries Virtual Console Support (Obsolete)"
depends on !HVC_ISERIES
default n
help
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: Small fixes for the Ebony device tree
From: David Gibson @ 2007-05-16 3:47 UTC (permalink / raw)
To: Segher Boessenkool, linuxppc-dev, Paul Mackerras
In-Reply-To: <20070515054626.GB6998@localhost.localdomain>
On Tue, May 15, 2007 at 03:46:26PM +1000, David Gibson wrote:
> On Tue, May 15, 2007 at 06:59:49AM +0200, Segher Boessenkool wrote:
[snip]
> > driver as well -- can't you just *fix* the kernel driver,
> > instead?
>
> Well.. I guess, but I'd prefer to leave that to BenH, who wrote the
> driver.
On second thoughts I will alter the driver, the new version I sent out
today has the fix to only look at 'compatible'.
> > > Don't really want to change the name, since
> > > that might encourage confusion with the other (more conventional) DMA
> > > controller.
> >
> > Nah, just look at the other properties in the node and
> > you know what is what. It is quite common to have nodes
> > with the same name representing different devices (for
> > example, "ethernet" devices -- "dma-controller" would be
> > a bit more unusual, sure).
> >
> > I have no strong feelings about the name, "mcmal" is
> > generic enough a name as far as I'm concerned.
I'll leave it then.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: Small fixes for the Ebony device tree
From: David Gibson @ 2007-05-16 3:47 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: linuxppc-dev, Stefan Roese, Paul Mackerras
In-Reply-To: <e909c6361f679071300958431723d8be@kernel.crashing.org>
On Tue, May 15, 2007 at 09:07:52AM +0200, Segher Boessenkool wrote:
> > Sod it, I think I'll just drop everything except "ibm,sdram-440gp" for
> > now.
>
> Perfect plan :-) And then 440GX, GR, etc. can claim
> compatibility to 440GP, which is the nestor of the
> family.
Right, done. Same for the SRAM and DMA controller nodes.
New patch coming shortly.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Small fixes for the Ebony device tree
From: David Gibson @ 2007-05-16 3:48 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
This patch corrects a number of minor errors in the Ebony device tree:
- Missing (given as 0) cache sizes are added to the CPU node
- device_type properties are removed from nodes which don't
have a reasonably well defined device_type binding. This does require
a very small code change to locate the busses to be probed for
of_platform devices by 'compatible' instead of 'device_type'.
- A node is added for the SRAM controller
- The unit address of the small-flash node is adjusted to
correctly reflect the reg property.
- device_type values for the MAL and ZMII are updated to
reflected more up-to-date versions of the binding.
- An incorrect offset in the partition map for the large-flash
node is corrected.
- Some redundant values, already commented out are removed
entirely.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
Further revisions based on feedback.
Note that for EMAC to work with this device tree, you need the
EMAC driver patch which I posted today (20070516).
Index: working-2.6/arch/powerpc/boot/dts/ebony.dts
===================================================================
--- working-2.6.orig/arch/powerpc/boot/dts/ebony.dts 2007-05-08 15:07:45.000000000 +1000
+++ working-2.6/arch/powerpc/boot/dts/ebony.dts 2007-05-16 13:44:10.000000000 +1000
@@ -33,8 +33,8 @@
timebase-frequency = <0>; // Filled in by zImage
i-cache-line-size = <32>;
d-cache-line-size = <32>;
- i-cache-size = <0>;
- d-cache-size = <0>;
+ i-cache-size = <8000>; /* 32 kB */
+ d-cache-size = <8000>; /* 32 kB */
dcr-controller;
dcr-access-method = "native";
};
@@ -46,7 +46,6 @@
};
UIC0: interrupt-controller0 {
- device_type = "ibm,uic";
compatible = "ibm,uic-440gp", "ibm,uic";
interrupt-controller;
cell-index = <0>;
@@ -58,7 +57,6 @@
};
UIC1: interrupt-controller1 {
- device_type = "ibm,uic";
compatible = "ibm,uic-440gp", "ibm,uic";
interrupt-controller;
cell-index = <1>;
@@ -71,36 +69,36 @@
};
CPC0: cpc {
- device_type = "ibm,cpc";
compatible = "ibm,cpc-440gp";
dcr-reg = <0b0 003 0e0 010>;
// FIXME: anything else?
};
plb {
- device_type = "ibm,plb";
compatible = "ibm,plb-440gp", "ibm,plb4";
#address-cells = <2>;
#size-cells = <1>;
ranges;
clock-frequency = <0>; // Filled in by zImage
- SDRAM0: sdram {
- device_type = "memory-controller";
- compatible = "ibm,sdram-440gp", "ibm,sdram";
+ SDRAM0: memory-controller {
+ compatible = "ibm,sdram-440gp";
dcr-reg = <010 2>;
// FIXME: anything else?
};
+ SRAM0: sram {
+ compatible = "ibm,sram-440gp";
+ dcr-reg = <020 8 00a 1>;
+ };
+
DMA0: dma {
// FIXME: ???
- device_type = "ibm,dma-4xx";
- compatible = "ibm,dma-440gp", "ibm,dma-4xx";
+ compatible = "ibm,dma-440gp";
dcr-reg = <100 027>;
};
MAL0: mcmal {
- device_type = "mcmal-dma";
compatible = "ibm,mcmal-440gp", "ibm,mcmal";
dcr-reg = <180 62>;
num-tx-chans = <4>;
@@ -119,7 +117,6 @@
};
POB0: opb {
- device_type = "ibm,opb";
compatible = "ibm,opb-440gp", "ibm,opb";
#address-cells = <1>;
#size-cells = <1>;
@@ -133,8 +130,7 @@
clock-frequency = <0>; // Filled in by zImage
EBC0: ebc {
- device_type = "ibm,ebc";
- compatible = "ibm,ebc-440gp";
+ compatible = "ibm,ebc-440gp", "ibm,ebc";
dcr-reg = <012 2>;
#address-cells = <2>;
#size-cells = <1>;
@@ -147,7 +143,7 @@
interrupts = <5 4>;
interrupt-parent = <&UIC1>;
- small-flash@0,0 {
+ small-flash@0,80000 {
device_type = "rom";
compatible = "direct-mapped";
probe-type = "JEDEC";
@@ -159,7 +155,6 @@
ds1743@1,0 {
/* NVRAM & RTC */
- device_type = "nvram";
compatible = "ds1743";
reg = <1 0 2000>;
};
@@ -170,7 +165,7 @@
probe-type = "JEDEC";
bank-width = <1>;
partitions = <0 380000
- 280000 80000>;
+ 380000 80000>;
partition-names = "fs", "firmware";
reg = <2 0 400000>;
};
@@ -226,13 +221,11 @@
GPIO0: gpio@40000700 {
/* FIXME */
- device_type = "gpio";
compatible = "ibm,gpio-440gp";
reg = <40000700 20>;
};
ZMII0: emac-zmii@40000780 {
- device_type = "emac-zmii";
compatible = "ibm,zmii-440gp", "ibm,zmii";
reg = <40000780 c>;
};
@@ -299,9 +292,5 @@
chosen {
linux,stdout-path = "/plb/opb/serial@40000200";
-// linux,initrd-start = <0>; /* FIXME */
-// linux,initrd-end = <0>;
-// bootargs = "";
};
};
-
Index: working-2.6/arch/powerpc/platforms/44x/ebony.c
===================================================================
--- working-2.6.orig/arch/powerpc/platforms/44x/ebony.c 2007-05-08 15:07:45.000000000 +1000
+++ working-2.6/arch/powerpc/platforms/44x/ebony.c 2007-05-16 13:27:11.000000000 +1000
@@ -27,9 +27,9 @@
#include "44x.h"
static struct of_device_id ebony_of_bus[] = {
- { .type = "ibm,plb", },
- { .type = "ibm,opb", },
- { .type = "ibm,ebc", },
+ { .compatible = "ibm,plb4", },
+ { .compatible = "ibm,opb", },
+ { .compatible = "ibm,ebc", },
{},
};
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH] iseries: fix CONFIG_VIOCONS/CONFIG_VT dependency
From: Olof Johansson @ 2007-05-16 4:08 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev, paulus, sfr
In-Reply-To: <1179286919.4120.39.camel@concordia.ozlabs.ibm.com>
On Wed, May 16, 2007 at 01:41:59PM +1000, Michael Ellerman wrote:
> On Tue, 2007-05-15 at 14:03 -0500, Olof Johansson wrote:
> > VT already depends on !VIOCONS, but there's no restriction in the other
> > direction. This makes an allyesconfig not build.
> >
> > Switch to a Kconfig dependency instead of a compile-time error.
> >
> >
> > Signed-off-by: Olof Johansson <olof@lixom.net>
> >
> > diff --git a/arch/powerpc/platforms/iseries/Kconfig b/arch/powerpc/platforms/iseries/Kconfig
> > index 46c3a8e..e48f018 100644
> > --- a/arch/powerpc/platforms/iseries/Kconfig
> > +++ b/arch/powerpc/platforms/iseries/Kconfig
> > @@ -8,6 +8,7 @@ menu "iSeries device drivers"
> >
> > config VIOCONS
> > tristate "iSeries Virtual Console Support (Obsolete)"
> > + depends on !VT
> > help
>
> This context doesn't match linus' or the powerpc tree, I see:
>
> config VIOCONS
> bool "iSeries Virtual Console Support (Obsolete)"
> depends on !HVC_ISERIES
> default n
> help
Boggle, I thought I did the checks in paulus' tree. It must have been
in my 2.6.21 one instead. :(
So nevermind, the above is obviously enough.
-Olof
^ permalink raw reply
* Re: Help need for WindRiver EST SBC8260 Board
From: David H. Lynch Jr. @ 2007-05-16 4:58 UTC (permalink / raw)
To: techie mj, linuxppc-embedded
In-Reply-To: <9f6a4d400705151112y60d92a24l7d7bb05eb38658ed@mail.gmail.com>
techie mj wrote:
> Hi All,
>
> For my project work(Packet filter) we are planning to buy a used
> WindRiver
> EST SBC8260 board
The board you purchase should as closely as possible resemble your
actual product/target.
Alot depends on what you are actually trying to accomplish.
If you are working towards a manufacturing a custom piece of
hardware of your application,
Then similarity of hardware is of high importance.
And it may be likely that you have to create or buy a BSP for your
taget - particularly if
you are supporting multiple OS's.
If you are doing fairly generic work and the target is the OS's, not
the specific hardware,
then find a board that is already supported by all the OS's you are
after.
Before Pico had any of their boards available, I used a Mac Lombard
powerbook I purchased on
eBay as a target. It was cheap, and runs Linux surprisingly well.
> I am new to this. So i request everyone to suggest me what i should
> look for
> while buying the board.My development environment will be LINUX may be
> vxworks in future.
>
> 1) My dealer is providing only the Board. ( 4MB-SIMM flash,16MB-SDRAM
> DIMM,
> 8kb- 8 bit EEPROM, 2MB- 8 bit Flash, 4MB SDRAM (Local Bus), RS-232,
> 10/100
> Base-TX Ethernet)
> Is it enough -or whether i need any extra addon cards
Again it depends on what you are trying to accomplish.
The first "embedded" system I worked on had 256 bytes of memory, had
a 1Mhz clock,
and toggle switches.
The more minimal the hardware in resources and performance the more
difficult the
development process tends to be.
>
> 2) Do i need to buy JTAG debugger or any
> Is it possible to debug the code without JTAG/BDM
Same as hardware and resources. I do not have a BDM. Many on this
list would think I am crazy.
I have worked with very powerful debugging tools - but very very
often, all they do is overload you with data.
On occasion they can be very convenient. But most of the time the
FIRST thing I do starting with new hardware
is find some way of generating output - usually in the least number
of assembler instructions possible.
One is really really nice - give me an LED and a bit to flash it and
I can debug anything.
I needed little more than a virtual LED and printf's to get Linux
working on my target.
But I had issues with GreenHills Integrity that required both a JTAG
as well as a minimal handwritten software debugger.
>
> 3) what are the cables i need
>
> 4) Can i directly download the bootcode from my PC to the Board through
> ethernet/serial port
>
> 5) Can anyone provide me the user manual for the above board. any
> weblinks
> are also good
>
> 6) any other points
>
> Thanks
> mjose
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
--
Dave Lynch DLA Systems
Software Development: Embedded Linux
717.627.3770 dhlii@dlasys.net http://www.dlasys.net
fax: 1.253.369.9244 Cell: 1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too numerous to list.
"Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Albert Einstein
^ permalink raw reply
* Re: MPC5200 ethernet communication stops unexpected
From: Sylvain Munaut @ 2007-05-16 6:56 UTC (permalink / raw)
To: David Kanceruk; +Cc: Hans Thielemans, linuxppc-embedded
In-Reply-To: <5b525e390705150803l516a5d9x9c214e2b4b00ea0e@mail.gmail.com>
David Kanceruk wrote:
> Hello Hans,
>
> Our problem was with the FEC sending data with one or two
> incorrect bytes when we switched from the MPC5200 to the MPC5200B. The
> byte positions were always the same. The socket buffer has the correct
> data before and after the DMA engine runs but the FEC TxFIFO does not
> always match.
>
> One solution to our problem was to make the following call prior to
> starting the DMA:
>
> flush_dcache_range((unsigned long)skb->data, (unsigned long)skb->data
> + skb->len);
>
> The other solution was to set the BSDIS bit in the XLB config register
> during initialization as follows:
>
> xlb = (struct mpc52xx_xlb *)MPC5xxx_XLB;
> out_be32(&xlb->config, in_be32(&xlb->config) | MPC52xx_XLB_CFG_BSDIS);
>
> Either solution works for us. The BSDIS bit is a new feature in the
> MPC5200B. The MPC5200 did not have this bit.
>
> According to the Freescale documentation, (Application note AN3045,
> for instance) setting this bit is supposed to "disable" BestComm bus
> snooping. However, I have reason to believe the documentation is in
> error. Everything I have observed seems to indicate that in the
> MPC5200 BestComm bus snooping was always enabled or enabled via some
> other means. In the MPC5200B it appears to be "disabled" at reset (not
> "enabled" as the documentation states). This is why flushing the cache
> manually is one solution. Since setting the BSDIS bit also fixes the
> problem, it suggests that this actually "enables" BestComm bus
> snooping instead of disabling it. In my mind, it could all boil down
> to a simple documentation error.
>
That problem is _very_ weird ...
>From what I understand, Bestcomm XLB snooping means that when the
BestComm engine has some data cached internally and that it detects a write
to the address from where those data comes, he will invalidate his cache.
But when the kernel writes data to the skb buffer, they may partially
stay in cache so there won't be any transaction at all on the xlb bus.
It's when
bestcomm will read the skb, that the core will snoop the bus, detects
there is
a read request for some data he has in cache, force a retry of the
bestcomm read,
write the data to memory (via xlb), and finally let bestcomm retry the
transaction to fetch the good data.
So I guess what "could" happen is that :
- The kernel allocate a skb, but it ends up being as the same memory
location
as a "previous" one. (or maybe in a directly following position
because of
prefetch).
- You submit it to bestcomm
- When bestcomm does the read, since the skb was used "just before", the
line is still in cache but with the wrong data. Since the kernel just
wrote the
data, there was not yet a xlb transaction because the data are still in
cpu cache.
Bestcomm think he has the data (no xlb write so it's cache was not
invalidated),
so he doesn't generate a xlb read. But if there is no xlb read the core
doesn't get
a chance to snoop it and doesn't flush it's cache ...
Although that doesn't explain why setting BSDIS high solve the problem, nor
why there is only 1 byte wrong ...
Have you checked your XLB snoop window setting ? And that core snooping
is enabled ? Also that you don't use the "nap" power saving feature of the
core ? (it disables snooping altogether ...).
Sylvain
^ permalink raw reply
* [PATCH] powerpc: Make sure device node type/name is not NULL
From: Benjamin Herrenschmidt @ 2007-05-16 6:57 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
Our device-tree unflattening code makes sure the name and type
fields of a device-node are not NULL. However, the code for dynamically
adding devices nodes which is used for pSeries hotplug for example didn't
do it, potentially causing crashes in some code that assume it can
always do things like strcmp on those.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/kernel/prom.c | 5 +++++
1 file changed, 5 insertions(+)
Index: linux-cell/arch/powerpc/kernel/prom.c
===================================================================
--- linux-cell.orig/arch/powerpc/kernel/prom.c 2007-05-14 16:32:34.000000000 +1000
+++ linux-cell/arch/powerpc/kernel/prom.c 2007-05-16 16:52:08.000000000 +1000
@@ -1472,6 +1472,11 @@ static int of_finish_dynamic_node(struct
node->name = of_get_property(node, "name", NULL);
node->type = of_get_property(node, "device_type", NULL);
+ if (!node->name)
+ node->name = "<NULL>";
+ if (!node->type)
+ node->type = "<NULL>";
+
if (!parent) {
err = -ENODEV;
goto out;
^ permalink raw reply
* Re: [viro@ftp.linux.org.uk: [PATCH] rpadlpar breakage - fallout of struct subsystem removal]
From: Benjamin Herrenschmidt @ 2007-05-16 6:57 UTC (permalink / raw)
To: michael; +Cc: linuxppc-dev, Greg KH, Al Viro
In-Reply-To: <1179276588.4120.22.camel@concordia.ozlabs.ibm.com>
> That seems to work, I get 'add_slot' and 'remove_slot'
> under /sys/bus/pci/slots/control again.
I verified that PCI hotplug actually works with that patch.
Ben.
^ permalink raw reply
* Re: Slab allocators: Define common size limitations
From: Geert Uytterhoeven @ 2007-05-16 6:58 UTC (permalink / raw)
To: Christoph Lameter
Cc: linux-mm, Andrew Morton, Linux Kernel Development,
Linux/PPC Development
In-Reply-To: <Pine.LNX.4.64.0705152313490.5832@schroedinger.engr.sgi.com>
On Tue, 15 May 2007, Christoph Lameter wrote:
> So define a common maximum size for kmalloc. For conveniences sake
> we use the maximum size ever supported which is 32 MB. We limit the maximum
> size to a lower limit if MAX_ORDER does not allow such large allocations.
What are the changes a large allocation will actually succeed?
Is there an alignment rule for large allocations?
E.g. for one of the PS3 drivers I need a physically contiguous 256 KiB-aligned
block of 256 KiB. Currently I'm using __alloc_bootmem() for that, but maybe
kmalloc() becomes a suitable alternative now?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
^ permalink raw reply
* Re: Slab allocators: Define common size limitations
From: David Miller @ 2007-05-16 7:02 UTC (permalink / raw)
To: Geert.Uytterhoeven; +Cc: linuxppc-dev, linux-mm, akpm, linux-kernel, clameter
In-Reply-To: <Pine.LNX.4.62.0705160855470.24080@pademelon.sonytel.be>
From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Date: Wed, 16 May 2007 08:58:39 +0200 (CEST)
> E.g. for one of the PS3 drivers I need a physically contiguous 256
> KiB-aligned block of 256 KiB. Currently I'm using __alloc_bootmem()
> for that, but maybe kmalloc() becomes a suitable alternative now?
I'm allocating up to 1MB for per-process TLB hash tables
on sparc64. But I can gracefully handle failures and it's
just a performance tweak to use such large sized tables.
^ permalink raw reply
* Re: [Fwd: [alsa-devel] embedded sound architecture question]
From: Sylvain Munaut @ 2007-05-16 7:11 UTC (permalink / raw)
To: Joachim Förster; +Cc: linuxppc-embedded
In-Reply-To: <1179246479.3587.2.camel@localhost>
Joachim Förster wrote:
> Hi Sylvain,
>
> thank you very much for your mail,
>
> On Tue, 2007-05-15 at 09:09 +0200, Sylvain Munaut wrote:
>
>> I'm not an alsa expert but I'm working on a driver right now. And alsa
>> provide you a hook so you can allocate your memory buffer your self.
>> So as long as your control maps it's memory somewhere in the
>> cpu address space you should be fine.
>>
>
> By "hook", do you mean the prepare()/hw_params() callbacks?
>
hw_params and hw_free yes.
I personally use snd_pcm_lib_malloc_pages to allocate the buffer, but
you'll have to write your own, and in the same call back configure the
period rate for you hw to generate interrupt.
> I noticed that there is an (undocumented?) mmap() callback, too, so I
> think, I have to implement that one and call something like
> io_remap_pfn_range() to "connect" the device's memory to the VMA
> (virtual memory area) which is provided as an argument to the mmap()
> callback, right?
>
Sorry, no idea ... but it's likely that you need to handle the mapping
of this
zone in userspace by yourself ...
> In our case, we are not going to allocate any memory like a typical ALSA
> driver does (with DMA) (in prepare()/hw_params() callback), because the
> device's IO memory will "be there" - we just have to "announce"/map it
> into kernel space, right? Or is this interpretation wrong?
>
No I think that should work.
You need a quite a few BRAMs though ... buffers are often 128k at the
minimum, so that's 64 brams ....
Sylvain
^ permalink raw reply
* Re: [PATCH] fix celleb link failure
From: Ishizaki Kou @ 2007-05-16 7:14 UTC (permalink / raw)
To: hch; +Cc: linuxppc-dev, cbe-oss-dev
In-Reply-To: <20070515130940.GA11544@lst.de>
Christoph,
> txx9_serial_init calls early_serial_txx9_setup which is only available
> if CONFIG_SERIAL_TXX9_CONSOLE is define. From looking at scc_sio.c
> it seems like the whole file is only needed for
> CONFIG_SERIAL_TXX9_CONSOLE=y, so we should only build it for that
case.
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
NACK.
Thanks for pointing it out. But this fix is still wrong.
early_serial_txx9_setup is availble if CONFIG_SERIAL_TXX9=y.
> Index: linux-2.6.20/arch/powerpc/platforms/celleb/Makefile
> ===================================================================
> ---
linux-2.6.20.orig/arch/powerpc/platforms/celleb/Makefile 2007-05-
15 14:42:15.000000000 +0200
> +++
linux-2.6.20/arch/powerpc/platforms/celleb/Makefile 2007-05-15
14:42:31.000000000 +0200
> @@ -4,5 +4,5 @@ obj-y += interrupt.o iommu.o
setup.o
>
> obj-$(CONFIG_SMP) += smp.o
> obj-$(CONFIG_PPC_UDBG_BEAT) += udbg_beat.o
> -obj-$(CONFIG_HAS_TXX9_SERIAL) += scc_sio.o
> +obj-$(CONFIG_SERIAL_TXX9_CONSOLE) += scc_sio.o
> obj-$(CONFIG_SPU_BASE) += spu_priv1.o
So scc_sio.o is depend on CONFIG_SERIAL_TXX9.
> Index: linux-2.6.20/arch/powerpc/platforms/celleb/scc_sio.c
> ===================================================================
> ---
linux-2.6.20.orig/arch/powerpc/platforms/celleb/scc_sio.c 2007-05-
15 14:40:49.000000000 +0200
> +++
linux-2.6.20/arch/powerpc/platforms/celleb/scc_sio.c 2007-05-15
14:42:47.000000000 +0200
> @@ -65,9 +65,7 @@ static int txx9_serial_init(void)
> req.line = i;
> req.iotype = UPIO_MEM;
> req.mapbase = res.start + txx9_scc_tab[i].offset;
> -#ifdef CONFIG_SERIAL_TXX9_CONSOLE
> req.membase = ioremap(req.mapbase, 0x24);
> -#endif
> req.irq = irq_create_of_mapping(irq.controller,
> irq.specifier, irq.size);
> req.flags |= UPF_IOREMAP | UPF_BUGGY_UART
/*HAVE_CTS_LINE*/;
And we need these #ifdef and #endif.
Best regards,
Kou Ishizaki
^ permalink raw reply
* Re: [viro@ftp.linux.org.uk: [PATCH] rpadlpar breakage - fallout of struct subsystem removal]
From: Greg KH @ 2007-05-16 7:15 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Al Viro
In-Reply-To: <1179298629.32247.214.camel@localhost.localdomain>
On Wed, May 16, 2007 at 04:57:09PM +1000, Benjamin Herrenschmidt wrote:
>
> > That seems to work, I get 'add_slot' and 'remove_slot'
> > under /sys/bus/pci/slots/control again.
>
> I verified that PCI hotplug actually works with that patch.
Thanks for testing, and Al, thanks for the patch, the rpadlpar code was
doing something different from what I expected...
thanks,
greg k-h
^ permalink raw reply
* RE: MPC5200 ethernet communication stops unexpected
From: Hans Thielemans @ 2007-05-16 7:29 UTC (permalink / raw)
To: Sylvain Munaut, David Kanceruk; +Cc: linuxppc-embedded
Hello Sylvain and David
I think it is a more basic problem then just cache. The setup is using
the psc2 and
psc3 in codec32 mode to communicate with a DSP. Because the MPC5200 had
problems with
the frame in slave mode (anomaly list), it is used in master mode, and
sends empty packets=20
of 256 bytes to keep the link active, so the DSP can send the data. This
because the send and
receive clocks and frames are the same on the mpc5200 side.
The empty packet is a fixed packet in memory, so it is never overwritten
by the mpc5200 once
the driver is initialized. So I can not believe in a cache problem. The
problem is always in the
last 32 bit word or last 4 bytes in the package. The error rate seems to
be influenced by cpu activity
and bus priorities.=20
I have now changed the protocol to send 260 bytes and just drop the last
4 bytes at the receiver.
This way I had it running this night, transmitting 50 GB without a
single error.
I would assume it has something to do with the bastcomm engine tasks at
the end of a dma block.
And probably something with the bus access. I tried several settings for
the arbiter and bus configurations
by changing the registers from within the bdi2000 debugger. Changing
behavior but no solution.
In the full system there are 6 bestcomm tasks active: fec rx and tx,
psc2 rx and tx and psc3 rx and tx.
Regards
Hans
-----Original Message-----
From: Sylvain Munaut [mailto:tnt@246tNt.com]=20
Sent: woensdag 16 mei 2007 8:57
To: David Kanceruk
Cc: Hans Thielemans; linuxppc-embedded@ozlabs.org
Subject: Re: MPC5200 ethernet communication stops unexpected
David Kanceruk wrote:
> Hello Hans,
>
> Our problem was with the FEC sending data with one or two=20
> incorrect bytes when we switched from the MPC5200 to the MPC5200B. The
> byte positions were always the same. The socket buffer has the correct
> data before and after the DMA engine runs but the FEC TxFIFO does not=20
> always match.
>
> One solution to our problem was to make the following call prior to=20
> starting the DMA:
>
> flush_dcache_range((unsigned long)skb->data, (unsigned long)skb->data
> + skb->len);
>
> The other solution was to set the BSDIS bit in the XLB config register
> during initialization as follows:
>
> xlb =3D (struct mpc52xx_xlb *)MPC5xxx_XLB;
> out_be32(&xlb->config, in_be32(&xlb->config) |=20
> MPC52xx_XLB_CFG_BSDIS);
>
> Either solution works for us. The BSDIS bit is a new feature in the=20
> MPC5200B. The MPC5200 did not have this bit.
>
> According to the Freescale documentation, (Application note AN3045,=20
> for instance) setting this bit is supposed to "disable" BestComm bus=20
> snooping. However, I have reason to believe the documentation is in=20
> error. Everything I have observed seems to indicate that in the=20
> MPC5200 BestComm bus snooping was always enabled or enabled via some=20
> other means. In the MPC5200B it appears to be "disabled" at reset (not
> "enabled" as the documentation states). This is why flushing the cache
> manually is one solution. Since setting the BSDIS bit also fixes the=20
> problem, it suggests that this actually "enables" BestComm bus=20
> snooping instead of disabling it. In my mind, it could all boil down=20
> to a simple documentation error.
> =20
That problem is _very_ weird ...
>From what I understand, Bestcomm XLB snooping means that when the
BestComm engine has some data cached internally and that it detects a
write to the address from where those data comes, he will invalidate his
cache.
But when the kernel writes data to the skb buffer, they may partially
stay in cache so there won't be any transaction at all on the xlb bus.
It's when
bestcomm will read the skb, that the core will snoop the bus, detects
there is a read request for some data he has in cache, force a retry of
the bestcomm read, write the data to memory (via xlb), and finally let
bestcomm retry the transaction to fetch the good data.
So I guess what "could" happen is that :
- The kernel allocate a skb, but it ends up being as the same memory
location
as a "previous" one. (or maybe in a directly following position
because of
prefetch).
- You submit it to bestcomm
- When bestcomm does the read, since the skb was used "just before",
the line is still in cache but with the wrong data. Since the kernel
just wrote the data, there was not yet a xlb transaction because the
data are still in cpu cache.
Bestcomm think he has the data (no xlb write so it's cache was not
invalidated), so he doesn't generate a xlb read. But if there is no xlb
read the core doesn't get a chance to snoop it and doesn't flush it's
cache ...
Although that doesn't explain why setting BSDIS high solve the problem,
nor why there is only 1 byte wrong ...
Have you checked your XLB snoop window setting ? And that core snooping
is enabled ? Also that you don't use the "nap" power saving feature of
the core ? (it disables snooping altogether ...).
Sylvain
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
^ permalink raw reply
* [PATCH] mpc52xx_psc_spi: fix it for CONFIG_PPC_MERGE
From: Domen Puncer @ 2007-05-16 7:37 UTC (permalink / raw)
To: David Brownell; +Cc: spi-devel-general, Dragos Carp, linuxppc-embedded
Fix mpc5200 PSC SPI driver to actually work for CONFIG_PPC_MERGE
- s/mpc52xx/mpc5200/, as this was changed in device tree some time ago
- fix spi id detection
Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
---
drivers/spi/mpc52xx_psc_spi.c | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)
Index: work-powerpc.git/drivers/spi/mpc52xx_psc_spi.c
===================================================================
--- work-powerpc.git.orig/drivers/spi/mpc52xx_psc_spi.c
+++ work-powerpc.git/drivers/spi/mpc52xx_psc_spi.c
@@ -329,8 +329,8 @@ static int mpc52xx_psc_spi_port_config(i
int ret = 0;
#if defined(CONFIG_PPC_MERGE)
- cdm = mpc52xx_find_and_map("mpc52xx-cdm");
- gpio = mpc52xx_find_and_map("mpc52xx-gpio");
+ cdm = mpc52xx_find_and_map("mpc5200-cdm");
+ gpio = mpc52xx_find_and_map("mpc5200-gpio");
#else
cdm = ioremap(MPC52xx_PA(MPC52xx_CDM_OFFSET), MPC52xx_CDM_SIZE);
gpio = ioremap(MPC52xx_PA(MPC52xx_GPIO_OFFSET), MPC52xx_GPIO_SIZE);
@@ -445,9 +445,6 @@ static int __init mpc52xx_psc_spi_do_pro
struct spi_master *master;
int ret;
- if (pdata == NULL)
- return -ENODEV;
-
master = spi_alloc_master(dev, sizeof *mps);
if (master == NULL)
return -ENOMEM;
@@ -594,17 +591,17 @@ static int __init mpc52xx_psc_spi_of_pro
}
regaddr64 = of_translate_address(op->node, regaddr_p);
+ /* get PSC id (1..6, used by port_config) */
if (op->dev.platform_data == NULL) {
- struct device_node *np;
- int i = 0;
+ const u32 *psc_nump;
- for_each_node_by_type(np, "spi") {
- if (of_find_device_by_node(np) == op) {
- id = i;
- break;
- }
- i++;
+ psc_nump = of_get_property(op->node, "cell-index", NULL);
+ if (!psc_nump || *psc_nump > 5) {
+ printk(KERN_ERR "mpc52xx_psc_spi: Device node %s has invalid "
+ "cell-index property\n", op->node->full_name);
+ return -EINVAL;
}
+ id = *psc_nump + 1;
}
return mpc52xx_psc_spi_do_probe(&op->dev, (u32)regaddr64, (u32)size64,
@@ -617,7 +614,7 @@ static int __exit mpc52xx_psc_spi_of_rem
}
static struct of_device_id mpc52xx_psc_spi_of_match[] = {
- { .type = "spi", .compatible = "mpc52xx-psc-spi", },
+ { .type = "spi", .compatible = "mpc5200-psc-spi", },
{},
};
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox