* inflate returned FFFFFFFB
From: Alan Nishioka @ 2007-11-13 18:31 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 840 bytes --]
After adding files to initramfs, I get the following error:
Uncompressing Linux...inflate returned FFFFFFFB
This is caused by zlib_inflate returning -5 or Z_BUF_ERROR.
The attached patch fixes this problem for me.
It is also available at
http://www.nishioka.com/misc/ppc-gunzip.patch
It probably also fixes the problem at
http://ozlabs.org/pipermail/linuxppc-embedded/2006-August/023851.html
and only 15 months too late.
It moves the link/load address higher in memory and tells gunzip it has
more space to uncompress.
You need to change the address in .config
make menuconfig
Advanced setup -->
[*] Prompt for advanced configuration options
[*] Set the boot link/load address
(0x00800000) Link/load address for booting
This is my first post to this list.
Please tell me if I am missing anything.
Alan Nishioka
alan@nishioka.com
[-- Attachment #2: ppc-gunzip.patch --]
[-- Type: text/plain, Size: 1047 bytes --]
diff -ur linux-2.6.23.1-orig/arch/ppc/boot/simple/misc-embedded.c linux-2.6.23.1/arch/ppc/boot/simple/misc-embedded.c
--- linux-2.6.23.1-orig/arch/ppc/boot/simple/misc-embedded.c 2007-10-12 12:43:44.000000000 -0400
+++ linux-2.6.23.1/arch/ppc/boot/simple/misc-embedded.c 2007-11-08 12:06:12.000000000 -0500
@@ -212,7 +212,7 @@
*cp = 0;
puts("\nUncompressing Linux...");
- gunzip(0, 0x400000, zimage_start, &zimage_size);
+ gunzip(0, CONFIG_BOOT_LOAD, zimage_start, &zimage_size);
flush_instruction_cache();
puts("done.\n");
{
diff -ur linux-2.6.23.1-orig/arch/ppc/boot/simple/misc.c linux-2.6.23.1/arch/ppc/boot/simple/misc.c
--- linux-2.6.23.1-orig/arch/ppc/boot/simple/misc.c 2007-10-12 12:43:44.000000000 -0400
+++ linux-2.6.23.1/arch/ppc/boot/simple/misc.c 2007-11-08 13:08:34.000000000 -0500
@@ -216,7 +216,7 @@
puts("\n");
puts("Uncompressing Linux...");
- gunzip(NULL, 0x400000, zimage_start, &zimage_size);
+ gunzip(NULL, CONFIG_BOOT_LOAD, zimage_start, &zimage_size);
puts("done.\n");
/* get the bi_rec address */
^ permalink raw reply
* [PATCH] powerpc: Fix fs_enet module build
From: Jochen Friedrich @ 2007-11-13 18:32 UTC (permalink / raw)
To: linuxppc-embedded@ozlabs.org; +Cc: Jeff Garzik, netdev, linux-kernel, akpm
If fs_enet is build as module, on PPC_CPM_NEW_BINDING platforms
mii-fec/mii-bitbang should be build as module, as well. On other
platforms, mii-fec/mii-bitbang must be included into the main module.
Otherwise some symbols remain undefined. Additionally, fs_enet uses
libphy, so add a select PHYLIB.
Building modules, stage 2.
MODPOST 5 modules
ERROR: "fs_scc_ops" [drivers/net/fs_enet/fs_enet.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
This patch replaces powerpc-fs_enet-select-phylib-as-the-driver-needs-it.patch
from -mm.
drivers/net/fs_enet/Kconfig | 11 ++++++++++-
drivers/net/fs_enet/Makefile | 15 ++++++++++++---
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/drivers/net/fs_enet/Kconfig b/drivers/net/fs_enet/Kconfig
index 2765e49..562ea68 100644
--- a/drivers/net/fs_enet/Kconfig
+++ b/drivers/net/fs_enet/Kconfig
@@ -2,6 +2,7 @@ config FS_ENET
tristate "Freescale Ethernet Driver"
depends on CPM1 || CPM2
select MII
+ select PHYLIB
config FS_ENET_HAS_SCC
bool "Chip has an SCC usable for ethernet"
@@ -11,11 +12,19 @@ config FS_ENET_HAS_SCC
config FS_ENET_HAS_FCC
bool "Chip has an FCC usable for ethernet"
depends on FS_ENET && CPM2
- select MDIO_BITBANG
default y
config FS_ENET_HAS_FEC
bool "Chip has an FEC usable for ethernet"
depends on FS_ENET && CPM1
+ select FS_ENET_MDIO_FEC
default y
+config FS_ENET_MDIO_FEC
+ tristate "MDIO driver for FEC"
+ depends on FS_ENET && CPM1
+
+config FS_ENET_MDIO_FCC
+ tristate "MDIO driver for FCC"
+ depends on FS_ENET && CPM2
+ select MDIO_BITBANG
diff --git a/drivers/net/fs_enet/Makefile b/drivers/net/fs_enet/Makefile
index 02d4dc1..1ffbe07 100644
--- a/drivers/net/fs_enet/Makefile
+++ b/drivers/net/fs_enet/Makefile
@@ -4,7 +4,16 @@
obj-$(CONFIG_FS_ENET) += fs_enet.o
-obj-$(CONFIG_8xx) += mac-fec.o mac-scc.o mii-fec.o
-obj-$(CONFIG_CPM2) += mac-fcc.o mii-bitbang.o
+fs_enet-$(CONFIG_FS_ENET_HAS_SCC) += mac-scc.o
+fs_enet-$(CONFIG_FS_ENET_HAS_FEC) += mac-fec.o
+fs_enet-$(CONFIG_FS_ENET_HAS_FCC) += mac-fcc.o
-fs_enet-objs := fs_enet-main.o
+ifeq ($(CONFIG_PPC_CPM_NEW_BINDING),y)
+obj-$(CONFIG_FS_ENET_MDIO_FEC) += mii-fec.o
+obj-$(CONFIG_FS_ENET_MDIO_FCC) += mii-bitbang.o
+else
+fs_enet-$(CONFIG_FS_ENET_MDIO_FEC) += mii-fec.o
+fs_enet-$(CONFIG_FS_ENET_MDIO_FCC) += mii-bitbang.o
+endif
+
+fs_enet-objs := fs_enet-main.o $(fs_enet-m)
--
1.5.3.5
^ permalink raw reply related
* [PATCH] powerpc: Add support for PORTA and PORTB odr registers
From: Jochen Friedrich @ 2007-11-13 18:28 UTC (permalink / raw)
To: linuxppc-embedded@ozlabs.org; +Cc: paulus, linux-kernel
PORTA and PORTB have odr registers, as well. However, the PORTB odr
register is only 16bit.
Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
arch/powerpc/sysdev/commproc.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/sysdev/commproc.c b/arch/powerpc/sysdev/commproc.c
index d5a0dcf..3694a69 100644
--- a/arch/powerpc/sysdev/commproc.c
+++ b/arch/powerpc/sysdev/commproc.c
@@ -441,6 +441,13 @@ static void cpm1_set_pin32(int port, int pin, int flags)
else
clrbits32(&iop->par, pin);
+ if (port == CPM_PORTB) {
+ if (flags & CPM_PIN_OPENDRAIN)
+ setbits16(&mpc8xx_immr->im_cpm.cp_pbodr, pin);
+ else
+ clrbits16(&mpc8xx_immr->im_cpm.cp_pbodr, pin);
+ }
+
if (port == CPM_PORTE) {
if (flags & CPM_PIN_SECONDARY)
setbits32(&iop->sor, pin);
@@ -474,6 +481,12 @@ static void cpm1_set_pin16(int port, int pin, int flags)
else
clrbits16(&iop->par, pin);
+ if (port == CPM_PORTA) {
+ if (flags & CPM_PIN_OPENDRAIN)
+ setbits16(&iop->odr, pin);
+ else
+ clrbits16(&iop->odr, pin);
+ }
if (port == CPM_PORTC) {
if (flags & CPM_PIN_SECONDARY)
setbits16(&iop->sor, pin);
--
1.5.3.5
^ permalink raw reply related
* Re: MPC5200B - Mapping Micrel Ethernet Controller Chip
From: Grant Likely @ 2007-11-13 17:16 UTC (permalink / raw)
To: Sri nava kala devi Valteti, TLS-Chennai
Cc: Prakash Palanisamy, TLS-Chennai, linuxppc-embedded
In-Reply-To: <66E8AEE9980BB44CA5FCAD39EBA56AC602D89B6B@CHN-HCLT-EVS02.HCLT.CORP.HCL.IN>
On 11/13/07, Sri nava kala devi Valteti, TLS-Chennai
<srinavakalav@hcl.in> wrote:
>
> Hi
> Thank you for your response.
> > Are you *sure* it's mapped at physical address 0xe0000000? (ie. have
> >you verified that you can access the device registers via u-boot or a
> >debugger?)
>
> Yes, We have accessed the Micrel chip via U-boot setting (Micrel Chips
> Base addres) 0xE0000000 to the CS1 Start address Register.
> The LP_CS1 pin is configured to access the chip in U-boot.
>
>
> LINUX:
> We also probed the CS1 signal and found some noise in the signal (but
> wasn't any kind of pulse). It might not be the actual Chip Select pulse.
> But in U-Boot, we are getting proper Chip Select pulse.
Most likely, something in the board setup routine (in Linux) is
fiddling with the CS settings (which it should not do). If you u-boot
has it working, then it *should* just carry over to working in Linux.
>
> LINUX:
> The MBAR is mapped to default 0xF0000000 value. The BAT 2 settings in
> the "mpc52xx_set_bat" function, is set to map the 0xf0000000 area.
> Do we need to perform any similar BAT settings or any other settings to
> access the IO Device mapped at 0xE0000000 ?
No. u-boot should be responsible for configuring the CS pins. Once
the kernel takes over, you should only need to call ioremap() to get
access to the device.
mpc52xx_set_bat? You must be using arch/ppc (which is depreciated).
Can you move up to a more recent kernel and use arch/powerpc instead?
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* [PATCH] POWERPC: Clean out asm/of_{platform, device}.h from sysdev/.
From: Jon Loeliger @ 2007-11-13 17:13 UTC (permalink / raw)
To: linuxppc-dev@ozlabs.org
Convert #include of asm/of_{platform, device}.h into
linux/of_{platform,device}.h for remaining arch/powerpc files.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
---
arch/powerpc/sysdev/axonram.c | 5 +++--
arch/powerpc/sysdev/pmi.c | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c
index 5eaf3e3..d359d6e 100644
--- a/arch/powerpc/sysdev/axonram.c
+++ b/arch/powerpc/sysdev/axonram.c
@@ -42,8 +42,9 @@
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/types.h>
-#include <asm/of_device.h>
-#include <asm/of_platform.h>
+#include <linux/of_device.h>
+#include <linux/of_platform.h>
+
#include <asm/page.h>
#include <asm/prom.h>
diff --git a/arch/powerpc/sysdev/pmi.c b/arch/powerpc/sysdev/pmi.c
index 20edd1e..c858749 100644
--- a/arch/powerpc/sysdev/pmi.c
+++ b/arch/powerpc/sysdev/pmi.c
@@ -28,9 +28,9 @@
#include <linux/completion.h>
#include <linux/spinlock.h>
#include <linux/workqueue.h>
+#include <linux/of_device.h>
+#include <linux/of_platform.h>
-#include <asm/of_device.h>
-#include <asm/of_platform.h>
#include <asm/io.h>
#include <asm/pmi.h>
#include <asm/prom.h>
--
1.5.3
^ permalink raw reply related
* [PATCH] POWERPC: Clean out asm/of_{platform, device}.h
From: Jon Loeliger @ 2007-11-13 17:13 UTC (permalink / raw)
To: linuxppc-dev@ozlabs.org
Convert #include of asm/of_{platform, device}.h into
linux/of_{platform,device}.h for a few scattered platforms.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
---
arch/powerpc/platforms/embedded6xx/holly.c | 2 +-
arch/powerpc/platforms/pasemi/gpio_mdio.c | 2 +-
arch/powerpc/platforms/pasemi/setup.c | 2 +-
arch/powerpc/platforms/powermac/setup.c | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
index b6de2b5..ce91787 100644
--- a/arch/powerpc/platforms/embedded6xx/holly.c
+++ b/arch/powerpc/platforms/embedded6xx/holly.c
@@ -26,6 +26,7 @@
#include <linux/serial.h>
#include <linux/tty.h>
#include <linux/serial_core.h>
+#include <linux/of_platform.h>
#include <asm/system.h>
#include <asm/time.h>
@@ -39,7 +40,6 @@
#include <asm/tsi108_irq.h>
#include <asm/tsi108_pci.h>
#include <asm/mpic.h>
-#include <asm/of_platform.h>
#undef DEBUG
diff --git a/arch/powerpc/platforms/pasemi/gpio_mdio.c b/arch/powerpc/platforms/pasemi/gpio_mdio.c
index dae9f65..33409a2 100644
--- a/arch/powerpc/platforms/pasemi/gpio_mdio.c
+++ b/arch/powerpc/platforms/pasemi/gpio_mdio.c
@@ -30,7 +30,7 @@
#include <linux/interrupt.h>
#include <linux/phy.h>
#include <linux/platform_device.h>
-#include <asm/of_platform.h>
+#include <linux/of_platform.h>
#define DELAY 1
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index 3a5d112..a4e6b53 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -27,6 +27,7 @@
#include <linux/delay.h>
#include <linux/console.h>
#include <linux/pci.h>
+#include <linux/of_platform.h>
#include <asm/prom.h>
#include <asm/system.h>
@@ -35,7 +36,6 @@
#include <asm/mpic.h>
#include <asm/smp.h>
#include <asm/time.h>
-#include <asm/of_platform.h>
#include <pcmcia/ss.h>
#include <pcmcia/cistpl.h>
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 02c5330..3acb59d 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -51,6 +51,8 @@
#include <linux/root_dev.h>
#include <linux/bitops.h>
#include <linux/suspend.h>
+#include <linux/of_device.h>
+#include <linux/of_platform.h>
#include <asm/reg.h>
#include <asm/sections.h>
@@ -68,8 +70,6 @@
#include <asm/btext.h>
#include <asm/pmac_feature.h>
#include <asm/time.h>
-#include <asm/of_device.h>
-#include <asm/of_platform.h>
#include <asm/mmu_context.h>
#include <asm/iommu.h>
#include <asm/smu.h>
--
1.5.3
^ permalink raw reply related
* [PATCH v2] cell: Convert #include of asm/of_{platform, device}.h into linux/of_{platform, device}.h.
From: Jon Loeliger @ 2007-11-13 17:10 UTC (permalink / raw)
To: linuxppc-dev@ozlabs.org
>From b26c62af41b28f87ae2cdf525477670a5ac623fd Mon Sep 17 00:00:00 2001
From: Jon Loeliger <jdl@freescale.com>
Date: Mon, 12 Nov 2007 14:23:16 -0600
Subject: [PATCH] cell: Convert #include of asm/of_{platform, device}.h into linux/of_{platform, device}.h.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au> Built a ppc64_defconfig
---
This version picks up the celleb/ files too.
Stephen, notice that you tacitly ACK'ed this pickup too... :-)
arch/powerpc/platforms/cell/cbe_cpufreq.c | 3 ++-
arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c | 3 ++-
arch/powerpc/platforms/cell/cbe_regs.c | 4 ++--
arch/powerpc/platforms/cell/iommu.c | 2 +-
arch/powerpc/platforms/cell/setup.c | 2 +-
arch/powerpc/platforms/celleb/iommu.c | 3 +--
arch/powerpc/platforms/celleb/setup.c | 2 +-
7 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/platforms/cell/cbe_cpufreq.c b/arch/powerpc/platforms/cell/cbe_cpufreq.c
index 13d5a87..ec7c8f4 100644
--- a/arch/powerpc/platforms/cell/cbe_cpufreq.c
+++ b/arch/powerpc/platforms/cell/cbe_cpufreq.c
@@ -21,8 +21,9 @@
*/
#include <linux/cpufreq.h>
+#include <linux/of_platform.h>
+
#include <asm/machdep.h>
-#include <asm/of_platform.h>
#include <asm/prom.h>
#include <asm/cell-regs.h>
#include "cbe_cpufreq.h"
diff --git a/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c b/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c
index 6a2c1b0..69288f6 100644
--- a/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c
+++ b/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c
@@ -23,7 +23,8 @@
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/timer.h>
-#include <asm/of_platform.h>
+#include <linux/of_platform.h>
+
#include <asm/processor.h>
#include <asm/prom.h>
#include <asm/pmi.h>
diff --git a/arch/powerpc/platforms/cell/cbe_regs.c b/arch/powerpc/platforms/cell/cbe_regs.c
index 16a9b07..a839c6c 100644
--- a/arch/powerpc/platforms/cell/cbe_regs.c
+++ b/arch/powerpc/platforms/cell/cbe_regs.c
@@ -9,13 +9,13 @@
#include <linux/percpu.h>
#include <linux/types.h>
#include <linux/module.h>
+#include <linux/of_device.h>
+#include <linux/of_platform.h>
#include <asm/io.h>
#include <asm/pgtable.h>
#include <asm/prom.h>
#include <asm/ptrace.h>
-#include <asm/of_device.h>
-#include <asm/of_platform.h>
#include <asm/cell-regs.h>
/*
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index faabc3f..179ba2e 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -26,13 +26,13 @@
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/notifier.h>
+#include <linux/of_platform.h>
#include <asm/prom.h>
#include <asm/iommu.h>
#include <asm/machdep.h>
#include <asm/pci-bridge.h>
#include <asm/udbg.h>
-#include <asm/of_platform.h>
#include <asm/lmb.h>
#include <asm/cell-regs.h>
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index 98e7ef8..4f6347c 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -30,6 +30,7 @@
#include <linux/console.h>
#include <linux/mutex.h>
#include <linux/memory_hotplug.h>
+#include <linux/of_platform.h>
#include <asm/mmu.h>
#include <asm/processor.h>
@@ -51,7 +52,6 @@
#include <asm/spu_priv1.h>
#include <asm/udbg.h>
#include <asm/mpic.h>
-#include <asm/of_platform.h>
#include <asm/cell-regs.h>
#include "interrupt.h"
diff --git a/arch/powerpc/platforms/celleb/iommu.c b/arch/powerpc/platforms/celleb/iommu.c
index 755d869..f00396a 100644
--- a/arch/powerpc/platforms/celleb/iommu.c
+++ b/arch/powerpc/platforms/celleb/iommu.c
@@ -22,8 +22,7 @@
#include <linux/init.h>
#include <linux/dma-mapping.h>
#include <linux/pci.h>
-
-#include <asm/of_platform.h>
+#include <linux/of_platform.h>
#include "beat_wrapper.h"
diff --git a/arch/powerpc/platforms/celleb/setup.c b/arch/powerpc/platforms/celleb/setup.c
index 1769d75..116c30b 100644
--- a/arch/powerpc/platforms/celleb/setup.c
+++ b/arch/powerpc/platforms/celleb/setup.c
@@ -40,6 +40,7 @@
#include <linux/seq_file.h>
#include <linux/root_dev.h>
#include <linux/console.h>
+#include <linux/of_platform.h>
#include <asm/mmu.h>
#include <asm/processor.h>
@@ -51,7 +52,6 @@
#include <asm/irq.h>
#include <asm/spu_priv1.h>
#include <asm/firmware.h>
-#include <asm/of_platform.h>
#include "interrupt.h"
#include "beat_wrapper.h"
--
1.5.3
^ permalink raw reply related
* RE: MPC5200B - Mapping Micrel Ethernet Controller Chip
From: Sri nava kala devi Valteti, TLS-Chennai @ 2007-11-13 17:05 UTC (permalink / raw)
To: Grant Likely; +Cc: Prakash Palanisamy, TLS-Chennai, linuxppc-embedded
Hi
Thank you for your response=2E
> Are you *sure* it's mapped at physical address 0xe0000000? (ie=2E have
>you verified that you can access the device registers via u-boot or a
>debugger?) =20
Yes, We have accessed the Micrel chip via U-boot setting (Micrel Chips
Base addres) 0xE0000000 to the CS1 Start address Register=2E
The LP_CS1 pin is configured to access the chip in U-boot=2E
LINUX:
We also probed the CS1 signal and found some noise in the signal (but
wasn't any kind of pulse)=2E It might not be the actual Chip Select pulse=
=2E
But in U-Boot, we are getting proper Chip Select pulse=2E
LINUX:
The MBAR is mapped to default 0xF0000000 value=2E The BAT 2 settings in
the "mpc52xx_set_bat" function, is set to map the 0xf0000000 area=2E=20
Do we need to perform any similar BAT settings or any other settings to
access the IO Device mapped at 0xE0000000 ?
Thanks,
Kala=2E
-----Original Message-----
From: glikely@secretlab=2Eca [mailto:glikely@secretlab=2Eca] On Behalf Of
Grant Likely
Sent: Tuesday, November 13, 2007 9:21 AM
To: Sri nava kala devi Valteti, TLS-Chennai
Cc: linuxppc-embedded@ozlabs=2Eorg; Prakash Palanisamy, TLS-Chennai
Subject: Re: MPC5200B - Mapping Micrel Ethernet Controller Chip
On 11/12/07, Sri nava kala devi Valteti, TLS-Chennai
<srinavakalav@hcl=2Ein> wrote:
>
> We are using MPC5200B based custom board=2E In that we have an external
Micrel's ethernet controller mapped at 0xE0000000=2E
>
> We have taken Lite5200 code as a reference to port linux to our new
board=2E We have integrated the ethernet driver given by the vendor
(Micrel)=2E
>
> Unfortunately, we are not able to access the chip mapped at
0xE0000000=2E
Are you *sure* it's mapped at physical address 0xe0000000? (ie=2E have
you verified that you can access the device registers via u-boot or a
debugger?) The chip selects on the 5200 are programmable so you need
to make sure that the chip select wired to the Micrel device is
actually configured for base address 0xe0000000=2E
There are up to 8 CS pins on the MPC5200B; LP_CS0 through LP_CS7=2E See
section 9=2E7=2E1 in the MPC5200B user manual for details on how to
configure them=2E
> We performed the following steps to access the chip:
>
> i) We mapped this address range of the Ethernet Controller Chip in
function "mpc52xx_map_io" as
>
> "io_block_mapping(0xE0000000, 0xE0000000, 0x10000000, _PAGE_IO)"
You don't want to call this=2E ioremap is the only function you should
need to call=2E But *first*, you must make sure the CS pin is
configured correctly=2E
Cheers,
g=2E
--=20
Grant Likely, B=2ESc=2E, P=2EEng=2E
Secret Lab Technologies Ltd=2E
grant=2Elikely@secretlab=2Eca
(403) 399-0195
DISCLAIMER:
---------------------------------------------------------------------------=
--------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and=
intended for the named recipient(s) only=2E
It shall not attach any liability on the originator or HCL or its=
affiliates=2E Any views or opinions presented in=20
this email are solely those of the author and may not necessarily reflect=
the opinions of HCL or its affiliates=2E
Any form of reproduction, dissemination, copying, disclosure, modification,=
distribution and / or publication of=20
this message without the prior written consent of the author of this e-mail=
is strictly prohibited=2E If you have=20
received this email in error please delete it and notify the sender=
immediately=2E Before opening any mail and=20
attachments please check them for viruses and defect=2E
---------------------------------------------------------------------------=
--------------------------------------------
^ permalink raw reply
* [PATCH 3/3] [POWERPC] mpc832x_rdb_defconfig: enable SPI_MPC83xx and MMC-over-SPI
From: Anton Vorontsov @ 2007-11-13 17:00 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071113165825.GA23739@localhost.localdomain>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
arch/powerpc/configs/mpc832x_rdb_defconfig | 43 ++++++++++++++++++++++++----
1 files changed, 37 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/configs/mpc832x_rdb_defconfig b/arch/powerpc/configs/mpc832x_rdb_defconfig
index 16d54c0..fcda7cc 100644
--- a/arch/powerpc/configs/mpc832x_rdb_defconfig
+++ b/arch/powerpc/configs/mpc832x_rdb_defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.24-rc2
-# Tue Nov 13 19:33:24 2007
+# Tue Nov 13 19:36:27 2007
#
# CONFIG_PPC64 is not set
@@ -679,8 +679,21 @@ CONFIG_I2C_MPC=y
#
# SPI support
#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BITBANG=y
+CONFIG_SPI_MPC83xx=y
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_AT25 is not set
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
# CONFIG_W1 is not set
# CONFIG_POWER_SUPPLY is not set
CONFIG_HWMON=y
@@ -702,6 +715,7 @@ CONFIG_HWMON=y
# CONFIG_SENSORS_GL520SM is not set
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM70 is not set
# CONFIG_SENSORS_LM75 is not set
# CONFIG_SENSORS_LM77 is not set
# CONFIG_SENSORS_LM78 is not set
@@ -916,7 +930,24 @@ CONFIG_USB_MON=y
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
-# CONFIG_MMC is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MMC_WBSD is not set
+# CONFIG_MMC_TIFM_SD is not set
+CONFIG_MMC_SPI=y
# CONFIG_NEW_LEDS is not set
# CONFIG_INFINIBAND is not set
# CONFIG_EDAC is not set
@@ -1095,9 +1126,9 @@ CONFIG_UCC=y
CONFIG_BITREVERSE=y
# CONFIG_CRC_CCITT is not set
# CONFIG_CRC16 is not set
-# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC_ITU_T=y
CONFIG_CRC32=y
-# CONFIG_CRC7 is not set
+CONFIG_CRC7=y
# CONFIG_LIBCRC32C is not set
CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
--
1.5.2.2
^ permalink raw reply related
* [PATCH 2/3] [POWERPC] mpc832x_rdb_defconfig: update using silentoldconfig
From: Anton Vorontsov @ 2007-11-13 17:00 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071113165825.GA23739@localhost.localdomain>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
arch/powerpc/configs/mpc832x_rdb_defconfig | 167 ++++++++++++++--------------
1 files changed, 84 insertions(+), 83 deletions(-)
diff --git a/arch/powerpc/configs/mpc832x_rdb_defconfig b/arch/powerpc/configs/mpc832x_rdb_defconfig
index 4f39102..16d54c0 100644
--- a/arch/powerpc/configs/mpc832x_rdb_defconfig
+++ b/arch/powerpc/configs/mpc832x_rdb_defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.23-rc4
-# Tue Aug 28 21:27:19 2007
+# Linux kernel version: 2.6.24-rc2
+# Tue Nov 13 19:33:24 2007
#
# CONFIG_PPC64 is not set
@@ -21,8 +21,13 @@ CONFIG_PPC_STD_MMU_32=y
# CONFIG_PPC_MM_SLICES is not set
# CONFIG_SMP is not set
CONFIG_PPC32=y
+CONFIG_WORD_SIZE=32
CONFIG_PPC_MERGE=y
CONFIG_MMU=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_IRQ_PER_CPU=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
@@ -65,6 +70,10 @@ CONFIG_SYSVIPC_SYSCTL=y
# CONFIG_AUDIT is not set
# CONFIG_IKCONFIG is not set
CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
CONFIG_SYSFS_DEPRECATED=y
# CONFIG_RELAY is not set
CONFIG_BLK_DEV_INITRD=y
@@ -83,7 +92,6 @@ CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
# CONFIG_EPOLL is not set
CONFIG_SIGNALFD=y
-CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
@@ -123,7 +131,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
# Platform support
#
# CONFIG_PPC_MULTIPLATFORM is not set
-# CONFIG_EMBEDDED6xx is not set
# CONFIG_PPC_82xx is not set
CONFIG_PPC_83xx=y
# CONFIG_PPC_86xx is not set
@@ -157,6 +164,10 @@ CONFIG_QUICC_ENGINE=y
# Kernel options
#
# CONFIG_HIGHMEM is not set
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
@@ -178,6 +189,7 @@ CONFIG_FLATMEM_MANUAL=y
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
CONFIG_SPLIT_PTLOCK_CPUS=4
# CONFIG_RESOURCES_64BIT is not set
CONFIG_ZONE_DMA_FLAG=1
@@ -186,6 +198,8 @@ CONFIG_VIRT_TO_BUS=y
CONFIG_PROC_DEVICETREE=y
# CONFIG_CMDLINE_BOOL is not set
# CONFIG_PM is not set
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_HIBERNATION_UP_POSSIBLE=y
CONFIG_SECCOMP=y
CONFIG_WANT_DEVICE_TREE=y
CONFIG_DEVICE_TREE=""
@@ -204,10 +218,7 @@ CONFIG_PCI_SYSCALL=y
# CONFIG_PCIEPORTBUS is not set
CONFIG_ARCH_SUPPORTS_MSI=y
# CONFIG_PCI_MSI is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
+CONFIG_PCI_LEGACY=y
# CONFIG_PCCARD is not set
# CONFIG_HOTPLUG_PCI is not set
@@ -222,7 +233,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y
CONFIG_HIGHMEM_START=0xfe000000
CONFIG_LOWMEM_SIZE=0x30000000
CONFIG_KERNEL_START=0xc0000000
-CONFIG_TASK_SIZE=0x80000000
+CONFIG_TASK_SIZE=0xc0000000
CONFIG_BOOT_LOAD=0x00800000
#
@@ -262,6 +273,7 @@ CONFIG_SYN_COOKIES=y
CONFIG_INET_XFRM_MODE_TRANSPORT=y
CONFIG_INET_XFRM_MODE_TUNNEL=y
CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
# CONFIG_TCP_CONG_ADVANCED is not set
@@ -287,10 +299,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_LAPB is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
# CONFIG_NET_SCHED is not set
#
@@ -319,6 +327,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
#
# Generic Driver Options
#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_FW_LOADER is not set
@@ -388,6 +397,7 @@ CONFIG_SCSI_WAIT_SCAN=m
# CONFIG_SCSI_FC_ATTRS is not set
# CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
CONFIG_SCSI_LOWLEVEL=y
# CONFIG_ISCSI_TCP is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
@@ -399,6 +409,7 @@ CONFIG_SCSI_LOWLEVEL=y
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_AIC94XX is not set
# CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_ARCMSR is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
@@ -425,14 +436,7 @@ CONFIG_SCSI_LOWLEVEL=y
# CONFIG_SCSI_SRP is not set
# CONFIG_ATA is not set
# CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
# CONFIG_FUSION is not set
-# CONFIG_FUSION_SPI is not set
-# CONFIG_FUSION_FC is not set
-# CONFIG_FUSION_SAS is not set
#
# IEEE 1394 (FireWire) support
@@ -448,6 +452,8 @@ CONFIG_NETDEVICES=y
# CONFIG_MACVLAN is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_IP1000 is not set
# CONFIG_ARCNET is not set
CONFIG_PHYLIB=y
@@ -464,6 +470,7 @@ CONFIG_PHYLIB=y
# CONFIG_BROADCOM_PHY is not set
CONFIG_ICPLUS_PHY=y
# CONFIG_FIXED_PHY is not set
+# CONFIG_MDIO_BITBANG is not set
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
# CONFIG_HAPPYMEAL is not set
@@ -472,13 +479,19 @@ CONFIG_MII=y
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_NET_TULIP is not set
# CONFIG_HP100 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
# CONFIG_NET_PCI is not set
+# CONFIG_B44 is not set
CONFIG_NETDEV_1000=y
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
CONFIG_E1000=y
# CONFIG_E1000_NAPI is not set
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
+# CONFIG_E1000E is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
@@ -486,6 +499,7 @@ CONFIG_E1000=y
# CONFIG_SIS190 is not set
# CONFIG_SKGE is not set
# CONFIG_SKY2 is not set
+# CONFIG_SK98LIN is not set
# CONFIG_VIA_VELOCITY is not set
# CONFIG_TIGON3 is not set
# CONFIG_BNX2 is not set
@@ -500,11 +514,14 @@ CONFIG_UGETH_NAPI=y
CONFIG_NETDEV_10000=y
# CONFIG_CHELSIO_T1 is not set
# CONFIG_CHELSIO_T3 is not set
+# CONFIG_IXGBE is not set
# CONFIG_IXGB is not set
# CONFIG_S2IO is not set
# CONFIG_MYRI10GE is not set
# CONFIG_NETXEN_NIC is not set
+# CONFIG_NIU is not set
# CONFIG_MLX4_CORE is not set
+# CONFIG_TEHUTI is not set
# CONFIG_TR is not set
#
@@ -520,7 +537,6 @@ CONFIG_NETDEV_10000=y
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
-# CONFIG_USB_USBNET_MII is not set
# CONFIG_USB_USBNET is not set
# CONFIG_WAN is not set
# CONFIG_FDDI is not set
@@ -547,7 +563,6 @@ CONFIG_INPUT=y
#
# CONFIG_INPUT_MOUSEDEV is not set
# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
# CONFIG_INPUT_EVDEV is not set
# CONFIG_INPUT_EVBUG is not set
@@ -595,33 +610,12 @@ CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
# CONFIG_IPMI_HANDLER is not set
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-# CONFIG_SOFT_WATCHDOG is not set
-CONFIG_83xx_WDT=y
-
-#
-# PCI-based Watchdog Cards
-#
-# CONFIG_PCIPCWATCHDOG is not set
-# CONFIG_WDTPCI is not set
-
-#
-# USB-based Watchdog Cards
-#
-# CONFIG_USBPCWATCHDOG is not set
CONFIG_HW_RANDOM=y
# CONFIG_NVRAM is not set
CONFIG_GEN_RTC=y
# CONFIG_GEN_RTC_X is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
-# CONFIG_AGP is not set
-# CONFIG_DRM is not set
# CONFIG_RAW_DRIVER is not set
# CONFIG_TCG_TPM is not set
CONFIG_DEVPORT=y
@@ -691,8 +685,6 @@ CONFIG_I2C_MPC=y
# CONFIG_POWER_SUPPLY is not set
CONFIG_HWMON=y
# CONFIG_HWMON_VID is not set
-# CONFIG_SENSORS_ABITUGURU is not set
-# CONFIG_SENSORS_ABITUGURU3 is not set
# CONFIG_SENSORS_AD7418 is not set
# CONFIG_SENSORS_ADM1021 is not set
# CONFIG_SENSORS_ADM1025 is not set
@@ -700,12 +692,12 @@ CONFIG_HWMON=y
# CONFIG_SENSORS_ADM1029 is not set
# CONFIG_SENSORS_ADM1031 is not set
# CONFIG_SENSORS_ADM9240 is not set
-# CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_ADT7470 is not set
# CONFIG_SENSORS_ATXP1 is not set
# CONFIG_SENSORS_DS1621 is not set
# CONFIG_SENSORS_F71805F is not set
-# CONFIG_SENSORS_FSCHER is not set
-# CONFIG_SENSORS_FSCPOS is not set
+# CONFIG_SENSORS_F71882FG is not set
+# CONFIG_SENSORS_F75375S is not set
# CONFIG_SENSORS_GL518SM is not set
# CONFIG_SENSORS_GL520SM is not set
# CONFIG_SENSORS_IT87 is not set
@@ -741,6 +733,31 @@ CONFIG_HWMON=y
# CONFIG_SENSORS_W83627HF is not set
# CONFIG_SENSORS_W83627EHF is not set
# CONFIG_HWMON_DEBUG_CHIP is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_83xx_WDT=y
+
+#
+# PCI-based Watchdog Cards
+#
+# CONFIG_PCIPCWATCHDOG is not set
+# CONFIG_WDTPCI is not set
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
#
# Multifunction device drivers
@@ -758,16 +775,17 @@ CONFIG_DAB=y
#
# Graphics support
#
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+# CONFIG_FB is not set
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
#
# Display device support
#
# CONFIG_DISPLAY_SUPPORT is not set
-# CONFIG_VGASTATE is not set
-CONFIG_VIDEO_OUTPUT_CONTROL=m
-# CONFIG_FB is not set
-# CONFIG_FB_IBM_GXT4500 is not set
#
# Sound
@@ -776,6 +794,7 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
#
# USB Input Devices
@@ -839,6 +858,7 @@ CONFIG_USB_STORAGE=y
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_DPCM is not set
# CONFIG_USB_STORAGE_USBAT is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
@@ -903,19 +923,6 @@ CONFIG_USB_MON=y
# CONFIG_RTC_CLASS is not set
#
-# DMA Engine support
-#
-# CONFIG_DMA_ENGINE is not set
-
-#
-# DMA Clients
-#
-
-#
-# DMA Devices
-#
-
-#
# Userspace I/O
#
# CONFIG_UIO is not set
@@ -932,7 +939,6 @@ CONFIG_EXT3_FS_XATTR=y
# CONFIG_EXT3_FS_SECURITY is not set
# CONFIG_EXT4DEV_FS is not set
CONFIG_JBD=y
-# CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
@@ -976,7 +982,6 @@ CONFIG_SYSFS=y
CONFIG_TMPFS=y
# CONFIG_TMPFS_POSIX_ACL is not set
# CONFIG_HUGETLB_PAGE is not set
-CONFIG_RAMFS=y
# CONFIG_CONFIGFS_FS is not set
#
@@ -995,10 +1000,7 @@ CONFIG_RAMFS=y
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
+CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
@@ -1042,10 +1044,6 @@ CONFIG_LDM_PARTITION=y
# CONFIG_KARMA_PARTITION is not set
# CONFIG_EFI_PARTITION is not set
# CONFIG_SYSV68_PARTITION is not set
-
-#
-# Native Language Support
-#
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
@@ -1086,10 +1084,6 @@ CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set
-
-#
-# Distributed Lock Manager
-#
# CONFIG_DLM is not set
# CONFIG_UCC_SLOW is not set
CONFIG_UCC_FAST=y
@@ -1109,23 +1103,24 @@ CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
-
-#
-# Instrumentation Support
-#
+CONFIG_INSTRUMENTATION=y
# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
#
# Kernel hacking
#
# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
# CONFIG_MAGIC_SYSRQ is not set
# CONFIG_UNUSED_SYMBOLS is not set
# CONFIG_DEBUG_FS is not set
# CONFIG_HEADERS_CHECK is not set
# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_SLUB_DEBUG_ON is not set
# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_SAMPLES is not set
# CONFIG_PPC_EARLY_DEBUG is not set
#
@@ -1133,6 +1128,7 @@ CONFIG_ENABLE_MUST_CHECK=y
#
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
CONFIG_CRYPTO=y
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_BLKCIPHER=y
@@ -1152,6 +1148,7 @@ CONFIG_CRYPTO_ECB=m
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_PCBC=m
# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
# CONFIG_CRYPTO_CRYPTD is not set
CONFIG_CRYPTO_DES=y
# CONFIG_CRYPTO_FCRYPT is not set
@@ -1165,9 +1162,13 @@ CONFIG_CRYPTO_DES=y
# CONFIG_CRYPTO_ARC4 is not set
# CONFIG_CRYPTO_KHAZAD is not set
# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SEED is not set
# CONFIG_CRYPTO_DEFLATE is not set
# CONFIG_CRYPTO_MICHAEL_MIC is not set
# CONFIG_CRYPTO_CRC32C is not set
# CONFIG_CRYPTO_CAMELLIA is not set
# CONFIG_CRYPTO_TEST is not set
+# CONFIG_CRYPTO_AUTHENC is not set
CONFIG_CRYPTO_HW=y
+# CONFIG_PPC_CLOCK is not set
+CONFIG_PPC_LIB_RHEAP=y
--
1.5.2.2
^ permalink raw reply related
* [PATCH 1/3] [POWERPC] mpc832x_rdb: remove spidev stub, use mmc_spi
From: Anton Vorontsov @ 2007-11-13 17:00 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071113165825.GA23739@localhost.localdomain>
mmc_spi has hit the mainline, so we can start using it.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
arch/powerpc/platforms/83xx/mpc832x_rdb.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
index fbca336..d4bd040 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
@@ -15,7 +15,10 @@
*/
#include <linux/pci.h>
+#include <linux/interrupt.h>
#include <linux/spi/spi.h>
+#include <linux/spi/mmc_spi.h>
+#include <linux/mmc/host.h>
#include <asm/of_platform.h>
#include <asm/time.h>
@@ -46,15 +49,16 @@ static void mpc83xx_spi_deactivate_cs(u8 cs, u8 polarity)
par_io_data_set(3, 13, !polarity);
}
+static struct mmc_spi_platform_data mpc832x_mmc_pdata = {
+ .ocr_mask = MMC_VDD_33_34,
+};
+
static struct spi_board_info mpc832x_spi_boardinfo = {
.bus_num = 0x4c0,
.chip_select = 0,
.max_speed_hz = 50000000,
- /*
- * XXX: This is spidev (spi in userspace) stub, should
- * be replaced by "mmc_spi" when mmc_spi will hit mainline.
- */
- .modalias = "spidev",
+ .modalias = "mmc_spi",
+ .platform_data = &mpc832x_mmc_pdata,
};
static int __init mpc832x_spi_init(void)
--
1.5.2.2
^ permalink raw reply related
* [PATCH 0/3] MPC8323E-RDB now using MMC-over-SPI
From: Anton Vorontsov @ 2007-11-13 16:58 UTC (permalink / raw)
To: linuxppc-dev
Hi all,
Here are three well-split patches for the easier review. I can fold
them into one for the merge, if you like.
I've tested the functionality using SD 128MB Kingston (MMC SanDisk
16MB refused to work, but it's definitely not a powerpc issue. Also
I'm not sure that that particular card worked at all ;-).
Patches should apply cleanly on paulus/powerpc.git and/or
galak/powerpc.git, master branches.
Thanks,
--
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2
^ permalink raw reply
* Re: [PATCH] cell: Convert #include of asm/of_{platform, device}.h into linux/of_{platform, device}.h.
From: Jon Loeliger @ 2007-11-13 17:00 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev@ozlabs.org
In-Reply-To: <20071113120224.de390904.sfr@canb.auug.org.au>
On Mon, 2007-11-12 at 19:02, Stephen Rothwell wrote:
> Hi Jon,
>
> Thanks for this.
>
> On Mon, 12 Nov 2007 14:26:51 -0600 Jon Loeliger <jdl@freescale.com> wrote:
> >
> > From: Jon Loeliger <jdl@freescale.com>
> >
> > Signed-off-by: Jon Loeliger <jdl@freescale.com>
>
> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au> Built a ppc64_defconfig
Feh. I'll respin this particular patch to
include the platforms/celleb pair of files too.
Sorry,
jdl
^ permalink raw reply
* Re: [PATCH v3] fix multiple bugs in rtas_ibm_suspend_me code
From: Nathan Lynch @ 2007-11-13 16:25 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <20071113161513.GI26313@localdomain>
Nathan Lynch wrote:
>
> 3.) H_JOIN must be called with MSR[EE] off, but lazy interrupt
> disabling may cause the caller of rtas_ibm_suspend_me to call H_JOIN
> with it on; the local_irq_disable() in on_each_cpu() is not
> sufficient.
>
> Fix this by explicitly saving the MSR and clearing the EE bit before
> calling H_JOIN.
...
> + atomic_inc(&data->working);
> +
> + /* really need to ensure MSR.EE is off for H_JOIN */
> + msr_save = mfmsr();
> + mtmsr(msr_save & ~(MSR_EE));
> +
> + rc = plpar_hcall_norets(H_JOIN);
> +
> + mtmsr(msr_save);
BTW, I'm wondering if this is the right way to do this. I think
there's the possibility that we could enter this routine hard-enabled
and take take an interrupt between the mfmsr and the first mtmsr, but
I haven't worked out all the implications. Would hard_irq_disable be
better?
^ permalink raw reply
* [PATCH v2] [POWERPC] Optimize counting distinct entries in the relocation sections
From: Emil Medve @ 2007-11-13 16:24 UTC (permalink / raw)
To: paulus, rusty, ntl, sfr, behlendorf1, galak, linuxppc-dev,
linuxppc-embedded
Cc: Emil Medve
When a module has relocation sections with tens of thousands worth of entries,
counting the distinct/unique entries only (i.e. no duplicates) at load time can
take tens of seconds and up to minutes. The sore point is the count_relocs()
function which is called as part of the architecture specific module loading
processing path:
-> load_module() generic
-> module_frob_arch_sections() arch specific
-> get_plt_size() 32-bit
-> get_stubs_size() 64-bit
-> count_relocs()
(Not sure why the relocation tables could contain lots of duplicates and why
they are not trimmed at compile time by the linker. In some test cases, out of
35K relocation entries only 1.5K were distinct/unique)
The previous counting algorithm was having O(n^2) complexity. Basically two
solutions were proposed on the e-mail list: a hash based approach and a sort
based approach
The hash based approach is the fastest (O(n)) but the has it needs additional
memory and for certain corner cases it could take lots of memory due to the
degeneration of the hash. One such proposal was submitted here:
http://ozlabs.org/pipermail/linuxppc-dev/2007-June/037641.html
In this proposal, the symbol + addendum are hashed to generate a key and a
pointer to the relocation entry will be stored in it. The hash is implemented as
a linked list of memory pages with PAGE_SIZE / sizeof(Elfxx_Rela *) entries. In
case of collisions in all the existing pages, a new page is added to the list to
accommodate the new distinct relocation entry
For 32-bit PowerPCs with 4K pages, a page can accommodate 1K worth of pointers
to relocation entries. In the 35K entries scenario, as much/little of six (6)
pages could be allocated using 24K of extra memory during the module load
The sort based approach is slower (O(n * log n + n)) but if the sorting is done
"in place" it doesn't need additional memory. A proposal was submitted here:
http://ozlabs.org/pipermail/linuxppc-dev/2007-November/045854.html
(http://patchwork.ozlabs.org/linuxppc/patch?filter=default&id=14573)
In this proposal an array of pointers to the relocation entries is built and
then is sorted using the kernel sort() utility function. This is basically a heap
sort algorithm with a stable O(n * log n) complexity. With this counting the
distinct/unique entries is just linear (O(n)) complexity. The problem is the
extra memory needed in this proposal, which in the 35K relocation entries test
case it can be as much as 140K (for 32-bit PowerPCs; double for 64-bit). This is
much more then the memory needed by the hash based approach described
above/earlier but it doesn't hide potential degenerative corner cases
The current patch is a happy compromise between the two proposals above:
O(n + n * log n) performance with no additional memory requirements due to
sorting in place the relocation table itself
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
---
This patch only tries to address counting the distinct R_PPC_REL24 entries for
the purpose of sizing the PLT. This operation was/can be detected by the proper
kernel logic as a soft lockup for large relocation tables
A related optimization (that could cause rewriting the this patch) is to
optimize the PLT search from do_plt_call() but that doesn't seem to be a
problem right now
The errors below are false positives due to the fact that Elfxx_Rela are
falsely assumed to be variables/operands instead of types:
linux-2.6> scripts/checkpatch.pl 0001-POWERPC-Optimize-counting-distinct-entries-in-the.patch
ERROR: need consistent spacing around '*' (ctx:WxV)
#116: FILE: arch/powerpc/kernel/module_32.c:78:
+ const Elf32_Rela *x, *y;
^
ERROR: need consistent spacing around '*' (ctx:WxV)
#228: FILE: arch/powerpc/kernel/module_64.c:122:
+ const Elf64_Rela *x, *y;
^
total: 2 errors, 0 warnings, 218 lines checked
Your patch has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
arch/powerpc/kernel/module_32.c | 77 ++++++++++++++++++++++++++++++-------
arch/powerpc/kernel/module_64.c | 81 ++++++++++++++++++++++++++++++--------
2 files changed, 127 insertions(+), 31 deletions(-)
diff --git a/arch/powerpc/kernel/module_32.c b/arch/powerpc/kernel/module_32.c
index 07a89a3..eab3138 100644
--- a/arch/powerpc/kernel/module_32.c
+++ b/arch/powerpc/kernel/module_32.c
@@ -24,6 +24,7 @@
#include <linux/kernel.h>
#include <linux/cache.h>
#include <linux/bug.h>
+#include <linux/sort.h>
#include "setup.h"
@@ -54,22 +55,60 @@ void module_free(struct module *mod, void *module_region)
addend) */
static unsigned int count_relocs(const Elf32_Rela *rela, unsigned int num)
{
- unsigned int i, j, ret = 0;
-
- /* Sure, this is order(n^2), but it's usually short, and not
- time critical */
- for (i = 0; i < num; i++) {
- for (j = 0; j < i; j++) {
- /* If this addend appeared before, it's
- already been counted */
- if (ELF32_R_SYM(rela[i].r_info)
- == ELF32_R_SYM(rela[j].r_info)
- && rela[i].r_addend == rela[j].r_addend)
- break;
+ unsigned int i, r_info, r_addend, _count_relocs;
+
+ _count_relocs = 0;
+ r_info = 0;
+ r_addend = 0;
+ for (i = 0; i < num; i++)
+ /* Only count 24-bit relocs, others don't need stubs */
+ if (ELF32_R_TYPE(rela[i].r_info) == R_PPC_REL24 &&
+ (r_info != ELF32_R_SYM(rela[i].r_info) ||
+ r_addend != rela[i].r_addend)) {
+ _count_relocs++;
+ r_info = ELF32_R_SYM(rela[i].r_info);
+ r_addend = rela[i].r_addend;
}
- if (j == i) ret++;
+
+ return _count_relocs;
+}
+
+static int relacmp(const void *_x, const void *_y)
+{
+ const Elf32_Rela *x, *y;
+
+ y = (Elf32_Rela *)_x;
+ x = (Elf32_Rela *)_y;
+
+ /* Compare the entire r_info (as opposed to ELF32_R_SYM(r_info) only) to
+ * make the comparison cheaper/faster. It won't affect the sorting or
+ * the counting algorithms' performance
+ */
+ if (x->r_info < y->r_info)
+ return -1;
+ else if (x->r_info > y->r_info)
+ return 1;
+ else if (x->r_addend < y->r_addend)
+ return -1;
+ else if (x->r_addend > y->r_addend)
+ return 1;
+ else
+ return 0;
+}
+
+static void relaswap(void *_x, void *_y, int size)
+{
+ uint32_t *x, *y, tmp;
+ int i;
+
+ y = (uint32_t *)_x;
+ x = (uint32_t *)_y;
+
+ for (i = 0; i < sizeof(Elf32_Rela) / sizeof(uint32_t); i++) {
+ tmp = x[i];
+ x[i] = y[i];
+ y[i] = tmp;
}
- return ret;
}
/* Get the potential trampolines size required of the init and
@@ -100,6 +139,16 @@ static unsigned long get_plt_size(const Elf32_Ehdr *hdr,
DEBUGP("Ptr: %p. Number: %u\n",
(void *)hdr + sechdrs[i].sh_offset,
sechdrs[i].sh_size / sizeof(Elf32_Rela));
+
+ /* Sort the relocation information based on a symbol and
+ * addend key. This is a stable O(n*log n) complexity
+ * alogrithm but it will reduce the complexity of
+ * count_relocs() to linear complexity O(n)
+ */
+ sort((void *)hdr + sechdrs[i].sh_offset,
+ sechdrs[i].sh_size / sizeof(Elf32_Rela),
+ sizeof(Elf32_Rela), relacmp, relaswap);
+
ret += count_relocs((void *)hdr
+ sechdrs[i].sh_offset,
sechdrs[i].sh_size
diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c
index 75c7c4f..3a82b02 100644
--- a/arch/powerpc/kernel/module_64.c
+++ b/arch/powerpc/kernel/module_64.c
@@ -24,6 +24,7 @@
#include <asm/module.h>
#include <asm/uaccess.h>
#include <asm/firmware.h>
+#include <linux/sort.h>
#include "setup.h"
@@ -81,25 +82,23 @@ static struct ppc64_stub_entry ppc64_stub =
different addend) */
static unsigned int count_relocs(const Elf64_Rela *rela, unsigned int num)
{
- unsigned int i, j, ret = 0;
+ unsigned int i, r_info, r_addend, _count_relocs;
/* FIXME: Only count external ones --RR */
- /* Sure, this is order(n^2), but it's usually short, and not
- time critical */
- for (i = 0; i < num; i++) {
+ _count_relocs = 0;
+ r_info = 0;
+ r_addend = 0;
+ for (i = 0; i < num; i++)
/* Only count 24-bit relocs, others don't need stubs */
- if (ELF64_R_TYPE(rela[i].r_info) != R_PPC_REL24)
- continue;
- for (j = 0; j < i; j++) {
- /* If this addend appeared before, it's
- already been counted */
- if (rela[i].r_info == rela[j].r_info
- && rela[i].r_addend == rela[j].r_addend)
- break;
+ if (ELF64_R_TYPE(rela[i].r_info) == R_PPC_REL24 &&
+ (r_info != ELF64_R_SYM(rela[i].r_info) ||
+ r_addend != rela[i].r_addend)) {
+ _count_relocs++;
+ r_info = ELF64_R_SYM(rela[i].r_info);
+ r_addend = rela[i].r_addend;
}
- if (j == i) ret++;
- }
- return ret;
+
+ return _count_relocs;
}
void *module_alloc(unsigned long size)
@@ -118,6 +117,44 @@ void module_free(struct module *mod, void *module_region)
table entries. */
}
+static int relacmp(const void *_x, const void *_y)
+{
+ const Elf64_Rela *x, *y;
+
+ y = (Elf64_Rela *)_x;
+ x = (Elf64_Rela *)_y;
+
+ /* Compare the entire r_info (as opposed to ELF64_R_SYM(r_info) only) to
+ * make the comparison cheaper/faster. It won't affect the sorting or
+ * the counting algorithms' performance
+ */
+ if (x->r_info < y->r_info)
+ return -1;
+ else if (x->r_info > y->r_info)
+ return 1;
+ else if (x->r_addend < y->r_addend)
+ return -1;
+ else if (x->r_addend > y->r_addend)
+ return 1;
+ else
+ return 0;
+}
+
+static void relaswap(void *_x, void *_y, int size)
+{
+ uint64_t *x, *y, tmp;
+ int i;
+
+ y = (uint64_t *)_x;
+ x = (uint64_t *)_y;
+
+ for (i = 0; i < sizeof(Elf64_Rela) / sizeof(uint64_t); i++) {
+ tmp = x[i];
+ x[i] = y[i];
+ y[i] = tmp;
+ }
+}
+
/* Get size of potential trampolines required. */
static unsigned long get_stubs_size(const Elf64_Ehdr *hdr,
const Elf64_Shdr *sechdrs)
@@ -133,6 +170,16 @@ static unsigned long get_stubs_size(const Elf64_Ehdr *hdr,
DEBUGP("Ptr: %p. Number: %lu\n",
(void *)sechdrs[i].sh_addr,
sechdrs[i].sh_size / sizeof(Elf64_Rela));
+
+ /* Sort the relocation information based on a symbol and
+ * addend key. This is a stable O(n*log n) complexity
+ * alogrithm but it will reduce the complexity of
+ * count_relocs() to linear complexity O(n)
+ */
+ sort((void *)sechdrs[i].sh_addr,
+ sechdrs[i].sh_size / sizeof(Elf64_Rela),
+ sizeof(Elf64_Rela), relacmp, relaswap);
+
relocs += count_relocs((void *)sechdrs[i].sh_addr,
sechdrs[i].sh_size
/ sizeof(Elf64_Rela));
@@ -343,7 +390,7 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
/* Simply set it */
*(u32 *)location = value;
break;
-
+
case R_PPC64_ADDR64:
/* Simply set it */
*(unsigned long *)location = value;
@@ -399,7 +446,7 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
}
/* Only replace bits 2 through 26 */
- *(uint32_t *)location
+ *(uint32_t *)location
= (*(uint32_t *)location & ~0x03fffffc)
| (value & 0x03fffffc);
break;
--
1.5.3.GIT
^ permalink raw reply related
* [PATCH v3] fix multiple bugs in rtas_ibm_suspend_me code
From: Nathan Lynch @ 2007-11-13 16:15 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <18233.12821.992452.841806@cargo.ozlabs.ibm.com>
There are several issues with the rtas_ibm_suspend_me code, which
enables platform-assisted suspension of an LPAR for migration or
hibernation as covered in PAPR 2.2.
1.) rtas_ibm_suspend_me uses on_each_cpu() to invoke
rtas_percpu_suspend_me on all cpus via IPI:
if (on_each_cpu(rtas_percpu_suspend_me, &data, 1, 0))
...
'data' is on the calling task's stack, but rtas_ibm_suspend_me takes
no measures to ensure that all instances of rtas_percpu_suspend_me are
finished accessing 'data' before returning. This can result in the
IPI'd cpus accessing random stack data and getting stuck in H_JOIN.
This is addressed by using an atomic count of workers and a completion
on the stack.
2.) rtas_percpu_suspend_me is needlessly calling H_JOIN in a loop.
The only event that can cause a cpu to return from H_JOIN is an H_PROD
from another cpu or a NMI/system reset. Each cpu need call H_JOIN
only once per suspend operation.
Remove the loop and the now unnecessary 'waiting' state variable.
3.) H_JOIN must be called with MSR[EE] off, but lazy interrupt
disabling may cause the caller of rtas_ibm_suspend_me to call H_JOIN
with it on; the local_irq_disable() in on_each_cpu() is not
sufficient.
Fix this by explicitly saving the MSR and clearing the EE bit before
calling H_JOIN.
4.) H_PROD is being called with the Linux logical cpu number as the
parameter, not the platform interrupt server value. (It's also being
called for all possible cpus, which is harmless, but unnecessary.)
This is fixed by calling H_PROD for each online cpu using
get_hard_smp_processor_id(cpu) for the argument.
Signed-off-by: Nathan Lynch <ntl@pobox.com>
---
Paul Mackerras wrote:
>
> On a uniprocessor configuration, with this patch I get:
>
> CC arch/powerpc/kernel/rtas.o
> /home/paulus/kernel/powerpc/arch/powerpc/kernel/rtas.c: In function ‘rtas_percpu_suspend_me’:
> /home/paulus/kernel/powerpc/arch/powerpc/kernel/rtas.c:702: error: implicit declaration of function ‘get_hard_smp_processor_id
> make[2]: *** [arch/powerpc/kernel/rtas.o] Error 1
>
> I think you need to #include <asm/smp.h> in rtas.c.
Rather sloppy of me, sorry.
Changes since v2:
- Add appropriate #includes for APIs used, fixing SMP=n build
Changes since v1:
- the completion is adequate for ensuring that all IPIs have
completed, so there's no need for a mutex and rtas_suspend_me_data
can be on the stack as before.
- add fix for hard-disabling interrupts before H_JOIN
- remove unnecessary H_JOIN loop and state machinery
arch/powerpc/kernel/rtas.c | 99 ++++++++++++++++++++++++++------------------
1 files changed, 58 insertions(+), 41 deletions(-)
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index 2147807..52e95c2 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -19,6 +19,9 @@
#include <linux/init.h>
#include <linux/capability.h>
#include <linux/delay.h>
+#include <linux/smp.h>
+#include <linux/completion.h>
+#include <linux/cpumask.h>
#include <asm/prom.h>
#include <asm/rtas.h>
@@ -34,6 +37,8 @@
#include <asm/lmb.h>
#include <asm/udbg.h>
#include <asm/syscalls.h>
+#include <asm/smp.h>
+#include <asm/atomic.h>
struct rtas_t rtas = {
.lock = SPIN_LOCK_UNLOCKED
@@ -41,8 +46,10 @@ struct rtas_t rtas = {
EXPORT_SYMBOL(rtas);
struct rtas_suspend_me_data {
- long waiting;
- struct rtas_args *args;
+ atomic_t working; /* number of cpus accessing this struct */
+ int token; /* ibm,suspend-me */
+ int error;
+ struct completion *complete; /* wait on this until working == 0 */
};
DEFINE_SPINLOCK(rtas_data_buf_lock);
@@ -657,50 +664,62 @@ static int ibm_suspend_me_token = RTAS_UNKNOWN_SERVICE;
#ifdef CONFIG_PPC_PSERIES
static void rtas_percpu_suspend_me(void *info)
{
- int i;
long rc;
- long flags;
+ unsigned long msr_save;
+ int cpu;
struct rtas_suspend_me_data *data =
(struct rtas_suspend_me_data *)info;
- /*
- * We use "waiting" to indicate our state. As long
- * as it is >0, we are still trying to all join up.
- * If it goes to 0, we have successfully joined up and
- * one thread got H_CONTINUE. If any error happens,
- * we set it to <0.
- */
- local_irq_save(flags);
- do {
- rc = plpar_hcall_norets(H_JOIN);
- smp_rmb();
- } while (rc == H_SUCCESS && data->waiting > 0);
- if (rc == H_SUCCESS)
- goto out;
+ atomic_inc(&data->working);
+
+ /* really need to ensure MSR.EE is off for H_JOIN */
+ msr_save = mfmsr();
+ mtmsr(msr_save & ~(MSR_EE));
+
+ rc = plpar_hcall_norets(H_JOIN);
+
+ mtmsr(msr_save);
- if (rc == H_CONTINUE) {
- data->waiting = 0;
- data->args->args[data->args->nargs] =
- rtas_call(ibm_suspend_me_token, 0, 1, NULL);
- for_each_possible_cpu(i)
- plpar_hcall_norets(H_PROD,i);
+ if (rc == H_SUCCESS) {
+ /* This cpu was prodded and the suspend is complete. */
+ goto out;
+ } else if (rc == H_CONTINUE) {
+ /* All other cpus are in H_JOIN, this cpu does
+ * the suspend.
+ */
+ printk(KERN_DEBUG "calling ibm,suspend-me on cpu %i\n",
+ smp_processor_id());
+ data->error = rtas_call(data->token, 0, 1, NULL);
+
+ if (data->error)
+ printk(KERN_DEBUG "ibm,suspend-me returned %d\n",
+ data->error);
} else {
- data->waiting = -EBUSY;
- printk(KERN_ERR "Error on H_JOIN hypervisor call\n");
+ printk(KERN_ERR "H_JOIN on cpu %i failed with rc = %ld\n",
+ smp_processor_id(), rc);
+ data->error = rc;
}
-
+ /* This cpu did the suspend or got an error; in either case,
+ * we need to prod all other other cpus out of join state.
+ * Extra prods are harmless.
+ */
+ for_each_online_cpu(cpu)
+ plpar_hcall_norets(H_PROD, get_hard_smp_processor_id(cpu));
out:
- local_irq_restore(flags);
- return;
+ if (atomic_dec_return(&data->working) == 0)
+ complete(data->complete);
}
static int rtas_ibm_suspend_me(struct rtas_args *args)
{
- int i;
long state;
long rc;
unsigned long retbuf[PLPAR_HCALL_BUFSIZE];
struct rtas_suspend_me_data data;
+ DECLARE_COMPLETION_ONSTACK(done);
+
+ if (!rtas_service_present("ibm,suspend-me"))
+ return -ENOSYS;
/* Make sure the state is valid */
rc = plpar_hcall(H_VASI_STATE, retbuf,
@@ -721,25 +740,23 @@ static int rtas_ibm_suspend_me(struct rtas_args *args)
return 0;
}
- data.waiting = 1;
- data.args = args;
+ atomic_set(&data.working, 0);
+ data.token = rtas_token("ibm,suspend-me");
+ data.error = 0;
+ data.complete = &done;
/* Call function on all CPUs. One of us will make the
* rtas call
*/
if (on_each_cpu(rtas_percpu_suspend_me, &data, 1, 0))
- data.waiting = -EINVAL;
+ data.error = -EINVAL;
- if (data.waiting != 0)
- printk(KERN_ERR "Error doing global join\n");
+ wait_for_completion(&done);
- /* Prod each CPU. This won't hurt, and will wake
- * anyone we successfully put to sleep with H_JOIN.
- */
- for_each_possible_cpu(i)
- plpar_hcall_norets(H_PROD, i);
+ if (data.error != 0)
+ printk(KERN_ERR "Error doing global join\n");
- return data.waiting;
+ return data.error;
}
#else /* CONFIG_PPC_PSERIES */
static int rtas_ibm_suspend_me(struct rtas_args *args)
--
1.5.3.4.206.g58ba4
^ permalink raw reply related
* Re: SDRAM failures on MPC5200B
From: Roman Fietze @ 2007-11-13 14:40 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <4739ADDC.8010402@acdstar.com>
[-- Attachment #1: Type: text/plain, Size: 989 bytes --]
Hallo Mark,
On Tuesday 13 November 2007 14:59:56 lokowich wrote:
> A follow-up: The first version of our termination network was based
> on the Lite5200 reference design, but was confirmed by Freescale to
> be inadequate. We revised the hardware per their errata, terminating
> both ends of the data bus. This fixed the problem. Thanks for the
> helpful feedback.
If I can remember it correctly, the is no errata on the Freescale
documentation web pages specifying to terminate the SDRAM data lines
on both ends. The only document I can remember that specifies
something similar is AN3045, "A comparison of the MPC5200B (Mask Set
M62C) with prior MPC5200 Versions" on page 2, in the chapter
"1. Overview".
Could you please give me some hint about what errata or other document
we probably missed?
Maybe I have to tell our HW people that it will be necessary to fix
our design as well.
Thank you
Roman
--
Roman Fietze Telemotive AG Büro Mühlhausen
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 194 bytes --]
^ permalink raw reply
* Re: (beginner) Kernel fail during local_irq_enable()
From: fabien @ 2007-11-13 14:04 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <f8f856500711130304o5c5b6b1fwa73608fd9711fcfc@mail.gmail.com>
I respond to myself. Apparently ppcboot 1.1.5 pass binfo->bi_intfreq
in MHz (50 in my case),
so I need to pass in Hz in arch/ppc/syslib/m8xx_setup.c : fp =
(binfo->bi_intfreq * 1000000) / 16;
00127654: 30303020 20202066 7265713d 31383735 000 freq=1875
00127664: 30303030 30202044 65637265 6d656e74 00000 Decrement
00127674: 65722046 72657175 656e6379 203d2031 er Frequency = 1
00127684: 38373530 30303030 2f36300a 3c343e20 87500000/60.<4>
00127694: 4641425f 44454255 47204146 54455220 FAB_DEBUG AFTER
001276a4: 4541524c 595f424f 4f545f49 5251535f EARLY_BOOT_IRQS_
001276b4: 4f4e2829 20204641 425f4445 42554720 ON() FAB_DEBUG
=>
001276c4: 41465445 52204c4f 43414c5f 4952515f AFTER LOCAL_IRQ_
001276d4: 454e4142 4c452829 20436f6e 736f6c65 ENABLE() Console
001276e4: 3a20636f 6c6f7572 2064756d 6d792064 : colour dummy d
001276f4: 65766963 65203830 7832350a 3c343e44 evice 80x25.
...
2007/11/13, fabien <fabien.fb@gmail.com>:
> I work on a custom board based on MPC8xx.
>
> The bootloader on it is a ppcboot 1.1.5. I'm a beginner with Linux port
>
> and ppc.
> I'm trying to pass the board working with a 2.4.4 kernel to a 2.6.19 kernel
>
> from denx.
> The kernel hang when trying to enable interrupt in local_irq_enable()
>
> in init/main.c.
> Nothing happened after. Look at the printk log dumped from __log_buf
> adresse with md ppcboot command.
>
>
>
>
>
> PPCBoot 1.1.5 (May 3 2002 - 10:26:09)
>
>
>
> CPU: PPC860TZPnnE0 at 50 MHz: 4 kB I-Cache 4 kB D-Cache FEC present
>
> Board: FAST2100
> DRAM: (16 MB SDRAM) 16 MB
>
> FLASH: 4 MB
>
> In: serial
>
> Out: serial
>
> Err: serial
>
> Hit any key to stop autoboot: 0
>
> =>bdinfo
>
> memstart = 0x00000000
>
> memsize = 0x01000000
>
> flashstart = 0x02800000
>
> flashsize = 0x00400000
>
> flashoffset = 0x00020000
>
> sramstart = 0x00000000
>
> sramsize = 0x00000000
>
> immr_base = 0xFF000000
>
> bootflags = 0x00000001
>
> intfreq = 50 MHz
>
> busfreq = 50 MHz
>
> ethaddr = 00:60:4C:08:21:FF
>
> IP addr = 10.0.0.148
>
> baudrate = 9600 bps
>
> =>tftpboot 0x400000
>
> ARP broadcast 1
>
> TFTP from server 10.0.0.147; our IP address is 10.0.0.148
>
> Filename 'uImage'.
>
> Load address: 0x400000
>
> Loading: #################################################################
>
> #############################################
>
> done
>
> Bytes transferred = 561058 (88fa2 hex)
>
> =>bootm 0x400000
>
> ## Booting image at 00400000 ...
>
> Image Name: Linux-2.6.19.2
>
> Created: 2007-11-12 15:08:44 UTC
>
> Image Type: PowerPC Linux Kernel Image (gzip compressed)
>
> Data Size: 560994 Bytes = 547 kB = 0 MB
>
> Load Address: 00000000
>
> Entry Point: 00000000
>
> Verifying Checksum ... OK
>
> Uncompressing Kernel Image ... OK
>
>
>
> =>md 1273c4
>
> 001273c4: 3c353e4c 696e7578 20766572 73696f6e <5>Linux version
>
> 001273d4: 20322e36 2e31392e 32202866 61626965 2.6.19.2 (fabie
>
> 001273e4: 6e406c6f 63616c68 6f737429 20286763 n@localhost) (gc
>
> 001273f4: 63207665 7273696f 6e20342e 302e3020 c version 4.0.0
>
> 00127404: 2844454e 5820454c 444b2034 2e312034 (DENX ELDK 4.1 4
>
> 00127414: 2e302e30 29292023 3135204d 6f6e204e .0.0)) #15 Mon N
>
> 00127424: 6f762031 32203136 3a32323a 30382043 ov 12 16:22:08 C
>
> 00127434: 45542032 3030370a 3c373e45 6e746572 ET 2007.<7>Enter
>
> 00127444: 696e6720 6164645f 61637469 76655f72 ing add_active_r
>
> 00127454: 616e6765 28302c20 302c2034 30393629 ange(0, 0, 4096)
>
> 00127464: 20302065 6e747269 6573206f 66203235 0 entries of 25
>
> 00127474: 36207573 65640a3c 343e5a6f 6e652050 6 used.<4>Zone P
>
> 00127484: 464e2072 616e6765 733a0a3c 343e2020 FN ranges:.<4>
>
> 00127494: 444d4120 20202020 20202020 20202020 DMA
>
> 001274a4: 30202d3e 20202020 20343039 360a3c34 0 -> 4096.<4
>
> 001274b4: 3e20204e 6f726d61 6c202020 20202020 > Normal
>
> =>
>
> 001274c4: 34303936 202d3e20 20202020 34303936 4096 -> 4096
>
> 001274d4: 0a3c343e 6561726c 795f6e6f 64655f6d .<4>early_node_m
>
> 001274e4: 61705b31 5d206163 74697665 2050464e ap[1] active PFN
>
> 001274f4: 2072616e 6765730a 3c343e20 20202030 ranges.<4> 0
>
> 00127504: 3a202020 20202020 2030202d 3e202020 : 0 ->
>
> 00127514: 20203430 39360a3c 373e4f6e 206e6f64 4096.<7>On nod
>
> 00127524: 65203020 746f7461 6c706167 65733a20 e 0 totalpages:
>
> 00127534: 34303936 0a3c373e 2020444d 41207a6f 4096.<7> DMA zo
>
> 00127544: 6e653a20 33322070 61676573 20757365 ne: 32 pages use
>
> 00127554: 6420666f 72206d65 6d6d6170 0a3c373e d for memmap.<7>
>
> 00127564: 2020444d 41207a6f 6e653a20 30207061 DMA zone: 0 pa
>
> 00127574: 67657320 72657365 72766564 0a3c373e ges reserved.<7>
>
> 00127584: 2020444d 41207a6f 6e653a20 34303634 DMA zone: 4064
>
> 00127594: 20706167 65732c20 4c49464f 20626174 pages, LIFO bat
>
> 001275a4: 63683a30 0a3c373e 20204e6f 726d616c ch:0.<7> Normal
>
> 001275b4: 207a6f6e 653a2030 20706167 65732075 zone: 0 pages u
>
> =>
>
> 001275c4: 73656420 666f7220 6d656d6d 61700a3c sed for memmap.<
>
> 001275d4: 343e4275 696c7420 31207a6f 6e656c69 4>Built 1 zoneli
>
> 001275e4: 7374732e 2020546f 74616c20 70616765 sts. Total page
>
> 001275f4: 733a2034 3036340a 3c353e4b 65726e65 s: 4064.<5>Kerne
>
> 00127604: 6c20636f 6d6d616e 64206c69 6e653a20 l command line:
>
> 00127614: 0a3c343e 50494420 68617368 20746162 .<4>PID hash tab
>
> 00127624: 6c652065 6e747269 65733a20 36342028 le entries: 64 (
>
> 00127634: 6f726465 723a2036 2c203235 36206279 order: 6, 256 by
>
> 00127644: 74657329 0a3c343e 44656372 656d656e tes).<4>Decremen
>
> 00127654: 74657220 46726571 75656e63 79203d20 ter Frequency =
>
> 00127664: 3138302f 36300a3c 343e2046 41425f44 180/60.<4> FAB_D
>
> 00127674: 45425547 20414654 45522045 41524c59 EBUG AFTER EARLY
>
> 00127684: 5f424f4f 545f4952 51535f4f 4e282920 _BOOT_IRQS_ON()
>
> 00127694: 00000000 00000000 00000000 00000000 ................
>
> 001276a4: 00000000 00000000 00000000 00000000 ................
>
> 001276b4: 00000000 00000000 00000000 00000000 ...............
>
>
>
>
>
> Could someone give me some help about where to seek for isolate the problem ?
>
^ permalink raw reply
* Re: SDRAM failures on MPC5200B
From: lokowich @ 2007-11-13 13:59 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <46A0D76E.4030101@acdstar.com>
A follow-up: The first version of our termination network was based on
the Lite5200 reference design, but was confirmed by Freescale to be
inadequate. We revised the hardware per their errata, terminating both
ends of the data bus. This fixed the problem. Thanks for the helpful
feedback.
Mark
lokowich wrote:
> We're working on bringing up a MPC5200B version of our original
> MPC5200 board using U-Boot 1.1.4 configured for Icecube/Lite5200B.
> Other than the CPU, the board is identical. The bootloader crashes
> just after relocation to RAM, often with a Program Check Exception,
> typically a memory corruption issue. I noticed failures at different
> stages after relocation based on content, suggesting problems with
> upper SDRAM. If I force the initram to 1/2 the determined size (64MB
> instead of 128MB), then everything works well through kernel load and
> initialization. We've added termination resistors to improve AD
> signals, to no avail. Memory tests work fine too. Any help is
> appreciated.
>
> Thanks,
> Mark Lokowich
> Systems Engineer
> Advanced Communication Design
> 7901 12th Ave. So.
> Bloomington, MN 55425
> 952-854-4000
> lokowich@acdstar.com
> This email was Anti Virus checked by Astaro Security Gateway. http://www.astaro.com
> This email was Anti Virus checked by Astaro Security Gateway. http://www.astaro.com
> ------------------------------------------------------------------------
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply
* Re: [PATCH] cell: Convert #include of asm/of_{platform, device}.h into linux/of_{platform, device}.h.
From: Jon Loeliger @ 2007-11-13 13:48 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev@ozlabs.org
In-Reply-To: <20071113120224.de390904.sfr@canb.auug.org.au>
So, like, the other day Stephen Rothwell mumbled:
>
> Hi Jon,
>
> Thanks for this.
Most welcome.
I'm assuming I can chip away at _all_ of these,
including the ones in the drivers/ directories as well.
I haven't a clue who will really pick all these up.
We could arrange for Paul to grab the arch/powerpc.
But the rest? Mr Morton perhaps?
jdl
^ permalink raw reply
* Re: [2/2] dtc: Add testcase for dtc references
From: Jon Loeliger @ 2007-11-13 13:41 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev
In-Reply-To: <20071112230229.GH1219@localhost.localdomain>
So, like, the other day David Gibson mumbled:
> This patch adds a testcase for dtc's reference-to-phandle
> functionality.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Applied.
jdl
^ permalink raw reply
* Re: [1/2] libfdt: Add phandle related functions
From: Jon Loeliger @ 2007-11-13 13:41 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev
In-Reply-To: <20071112225938.GG1219@localhost.localdomain>
So, like, the other day David Gibson mumbled:
> This patch adds fdt_get_phandle() and fdt_node_offset_by_phandle()
> functions to libfdt. fdt_get_phandle() will retreive the phandle
> value of a given node, and fdt_node_offset_by_phandle() will locate a
> node given a phandle.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Applied.
jdl
^ permalink raw reply
* Re: dtc: Add missing dependencies for tests
From: Jon Loeliger @ 2007-11-13 13:34 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev
In-Reply-To: <20071112225258.GF1219@localhost.localdomain>
So, like, the other day David Gibson mumbled:
> At present, the Makefiles will not rebuild trees.o or the dtb files
> derived from it if testdata.h is updated. This is incorrect, and is
> because of missing dependency information.
>
> This patch fixes the problem by making sure that dependency
> information is generated from trees.S and dumptrees.c.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Applied.
jdl
^ permalink raw reply
* Re: [linux-pm] Re: [RFC] powermac: proper sleep management
From: Johannes Berg @ 2007-11-13 13:19 UTC (permalink / raw)
To: Alan Stern; +Cc: linux-pm, David Woodhouse, linuxppc-dev list
In-Reply-To: <Pine.LNX.4.44L0.0711121451210.1567-100000@netrider.rowland.org>
[-- Attachment #1: Type: text/plain, Size: 166 bytes --]
> Isn't it true that the freezer _already_ isn't enabled on PPC? So
> leaving it off wouldn't break anything more than it is broken now.
Indeed.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
* Re: [RFC] PMU: replace information ioctls and schedule for removal
From: Johannes Berg @ 2007-11-13 13:20 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev list
In-Reply-To: <18232.56988.723620.912943@cargo.ozlabs.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 500 bytes --]
On Tue, 2007-11-13 at 10:15 +1100, Paul Mackerras wrote:
> Johannes Berg writes:
>
> > Does anybody need that? I'm not against adding it but we never showed it
> > and I haven't seen anyone ask for it.
>
> pmud uses the PMU version, but I think it gets it by issuing a PMU
> command.
Yeah, it probably has to since I don't see us exporting it anywhere. Do
we want to change pmud to read it from elsewhere? I guess I'll just add
it to sysfs and it can use it if it wants.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ 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