* [PATCH 2/3]: of_i2c: Add sparc support.
From: David Miller @ 2008-08-21 7:10 UTC (permalink / raw)
To: linuxppc-dev; +Cc: sparclinux, paulus
of_i2c: Add sparc support.
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/of/Kconfig | 2 +-
drivers/of/of_i2c.c | 58 ++++++++++++++++++++++++++++++++++++++++++++------
2 files changed, 52 insertions(+), 8 deletions(-)
diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig
index f821dbc..67dea24 100644
--- a/drivers/of/Kconfig
+++ b/drivers/of/Kconfig
@@ -10,7 +10,7 @@ config OF_GPIO
config OF_I2C
def_tristate I2C
- depends on PPC_OF && I2C
+ depends on OF && I2C
help
OpenFirmware I2C accessors
diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
index 6a98dc8..beb4102 100644
--- a/drivers/of/of_i2c.c
+++ b/drivers/of/of_i2c.c
@@ -19,8 +19,20 @@
void of_register_i2c_devices(struct i2c_adapter *adap,
struct device_node *adap_node)
{
- void *result;
struct device_node *node;
+ int num_addr_cells = 1;
+ const int *prop;
+ void *result;
+
+ prop = of_get_property(adap_node, "#address-cells", NULL);
+ if (prop)
+ num_addr_cells = *prop;
+
+ if (num_addr_cells != 1 && num_addr_cells != 2) {
+ printk(KERN_ERR "of-i2c: invalid address cells %d\n",
+ num_addr_cells);
+ return;
+ }
for_each_child_of_node(adap_node, node) {
struct i2c_board_info info = {};
@@ -31,16 +43,48 @@ void of_register_i2c_devices(struct i2c_adapter *adap,
continue;
addr = of_get_property(node, "reg", &len);
- if (!addr || len < sizeof(int) || *addr > (1 << 10) - 1) {
- printk(KERN_ERR
- "of-i2c: invalid i2c device entry\n");
+ if (!addr || len < (num_addr_cells * sizeof(int))) {
+ printk(KERN_ERR "of-i2c: invalid i2c device entry\n");
continue;
}
+ switch (num_addr_cells) {
+ case 1:
+ info.addr = addr[0];
+ break;
+ case 2:
+ /* XXX addr[0], the first cell, is bus number XXX */
+ info.addr = addr[1];
+ break;
+ }
+#ifdef CONFIG_SPARC
+ /* In my copy of the I2C bindings for IEEE1275 the
+ * register value is encoded as a 2-cell value:
+ *
+ * Bit # 33222222 22221111 11111100 00000000
+ * 10987654 32109876 54321098 76543210
+ *
+ * bus: 00000000 00000000 00000000 bbbbbbbb
+ * address: 00000000 00000000 00000sss sssssss0
+ *
+ * where:
+ * bbbbbbbb 8-bit unsigned number representing
+ * the I2C bus address within this I2C bus
+ * controller node
+ * ssssssssss 10-bit unsigned number representing the
+ * slave address
+ *
+ * When doing I2C transfers to a device the low bit of
+ * the address indicates whether the transfer is a read or
+ * a write, and the upper bits indicate the device address.
+ *
+ * The Linux I2C layer wants device addresses which elide this
+ * direction bit. Thus we should shift the OF provided reg
+ * property address down by one bit.
+ */
+ info.addr >>= 1;
+#endif
info.irq = irq_of_parse_and_map(node, 0);
-
- info.addr = *addr;
-
request_module(info.type);
result = i2c_new_device(adap, &info);
--
1.5.6.5.GIT
^ permalink raw reply related
* [PATCH 1/3]: sparc: Implement irq_of_parse_and_map() and irq_dispose_mapping().
From: David Miller @ 2008-08-21 7:10 UTC (permalink / raw)
To: linuxppc-dev; +Cc: sparclinux, paulus
sparc: Implement irq_of_parse_and_map() and irq_dispose_mapping().
This allows more OF layer code to be shared between powerpc and
sparc.
Signed-off-by: David S. Miller <davem@davemloft.net>
---
arch/sparc/include/asm/prom.h | 8 ++++++++
arch/sparc/kernel/of_device.c | 11 +++++++++++
arch/sparc64/kernel/of_device.c | 11 +++++++++++
3 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index b5efc4d..58b85fa 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -96,6 +96,14 @@ static inline void of_node_put(struct device_node *node)
{
}
+/* These routines are here to provide compatibility with how powerpc
+ * handles IRQ mapping for OF device nodes. We precompute and permanently
+ * register them in the of_device objects, whereas powerpc computes them
+ * on request.
+ */
+extern int irq_of_parse_and_map(struct device_node *node, int index);
+#define irq_dispose_mapping(irq) do { } while (0)
+
/*
* NB: This is here while we transition from using asm/prom.h
* to linux/of.h
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c
index cc4c235..56e9a71 100644
--- a/arch/sparc/kernel/of_device.c
+++ b/arch/sparc/kernel/of_device.c
@@ -29,6 +29,17 @@ struct of_device *of_find_device_by_node(struct device_node *dp)
}
EXPORT_SYMBOL(of_find_device_by_node);
+int irq_of_parse_and_map(struct device_node *node, int index)
+{
+ struct of_device *op = of_find_device_by_node(node);
+
+ if (!op || index >= op->num_irqs)
+ return 0xffffffff;
+
+ return op->irqs[index];
+}
+EXPORT_SYMBOL(irq_of_parse_and_map);
+
#ifdef CONFIG_PCI
struct bus_type ebus_bus_type;
EXPORT_SYMBOL(ebus_bus_type);
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c
index f8b50cb..8a0d823 100644
--- a/arch/sparc64/kernel/of_device.c
+++ b/arch/sparc64/kernel/of_device.c
@@ -55,6 +55,17 @@ struct of_device *of_find_device_by_node(struct device_node *dp)
}
EXPORT_SYMBOL(of_find_device_by_node);
+int irq_of_parse_and_map(struct device_node *node, int index)
+{
+ struct of_device *op = of_find_device_by_node(node);
+
+ if (!op || index >= op->num_irqs)
+ return 0xffffffff;
+
+ return op->irqs[index];
+}
+EXPORT_SYMBOL(irq_of_parse_and_map);
+
#ifdef CONFIG_PCI
struct bus_type ebus_bus_type;
EXPORT_SYMBOL(ebus_bus_type);
--
1.5.6.5.GIT
^ permalink raw reply related
* [PATCH 0/3]: Sparc OF I2C support.
From: David Miller @ 2008-08-21 7:10 UTC (permalink / raw)
To: linuxppc-dev; +Cc: sparclinux, paulus
I'm working on some drivers for I2C bus support on some of my sparc64
workstations (for lm-sensor and eeprom type devices sitting behind
them) so I went back to trying to get of_i2c.c usable on sparc.
Mostly straightforward stuff _except_ for the I2C address encoding.
What I2C IEEE1275 device binding was used to write that code in
of_i2c.c? Is it some PowerPC specific thing? Was it "invented"
by the embedded folks (I hope not)?
On sparc, the encoding is either 1 cell or 2 cell.
If it's one cell, it's just the device address.
If it's two cells, it's a bus number (for I2C controllers that
can manage multiple I2C bus segments, think PCI domains) in the
first cell and the device address in the second cell.
And, furthermore, the device address is shifted up 1 bit higher
than the Linux I2C layer expects. It includes the low direction
bit, bit 0, so we have to shift it down by 1 bit before we give
it to the Linux I2C layer.
Does PowerPC really encode these things differently? And if so what
IEEE1275 I2C device binding specification covers that?
If PowerPC really does encode the device address in the same format as
the Linux I2C layer expects, that's OK and I used some property tests
and ifdefs to make it all work out. What I did in these patches is:
1) Check the #address-cells property. If not present, assume the value
is "1". Only accept values of "1" and "2".
2) When CONFIG_SPARC, shift the device address down by one bit before
giving it to the Linux I2C layer.
I haven't added support to the I2C layer for the bus number yet, that
will come later.
The first patch in this series add the powerpc-compat IRQ probing
interfaces, mostly straightforward stuff as we precompute these
IRQs in of_device objects so we just search for the of_device corresponding
to the device node and return the interrupt, if any. Dispost is a NOP.
The second patch deals with the addressing issues described above and
lets it be compiled on non-ppc systems.
The third patch adds device modaliases for a couple of I2C chip devices
I've seen on my SunBlade2500 workstation. More will come later as I
flesh out my I2C sparc64 drivers which are not being posted here yet.
I have a fully functional Sun pcf8584 I2C bus driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply
* [Initrd] Initialization
From: Sébastien Chrétien @ 2008-08-21 7:06 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 80 bytes --]
Hello,
When Linux is booting, when does it verify if a initrd exists ?
Thanks
[-- Attachment #2: Type: text/html, Size: 100 bytes --]
^ permalink raw reply
* (no subject)
From: Schmid Alexander @ 2008-08-21 6:21 UTC (permalink / raw)
To: linuxppc-embedded
Hello,
I use U-Boot 1.2.0 on MPC5200B. Console over serial works fine. I have a
Grafic controller at LPB Bus and U-Boot shows his console output at VGa too.
But I would need a keyboard. I compiled U-Boot with USB and if i type "usb
reset" the ohci controller scans the USB devices and finds a keyboard. But
nothing happens if i push the buttons on the keyboard!
Can anyone help me please?
Thanks
Alexander Schmid
Dipl. Ing. (FH)
-Entwicklung-
Systeme & Steuerungen GmbH
Josef-Buchinger-Strasse 8
DE-94481 Grafenau
Amtsgericht Passau; HRB-Nr.: 1248
Geschäftsführer: Wolfgang Biewald
Tel.: +49 85 52 96 39 37
Fax.: +49 85 52 96 39 40
Email: a.schmid@systeme-steuerungen.de
Der Inhalt dieser E-Mail ist vertraulich. Wenn Sie nicht der berechtigte
Empfänger sind, bitten wir Sie, uns umgehend zu informieren und den Inhalt
weder für eigene Zwecke zu nutzen noch an Dritte weiterzugeben.
This e-mail is confidential. If you are not the intended recipient, please
notify us immediately. You should not disclose its contents to any other
person nor use it for any purposes.
^ permalink raw reply
* Re: [2.6 patch] Add cuImage.mpc866ads to the bootwrapper as a cuboot-8xx target
From: Kumar Gala @ 2008-08-21 5:37 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Scott Wood, paulus, linuxppc-dev
In-Reply-To: <20080731161020.GD20212@cs181140183.pp.htv.fi>
On Jul 31, 2008, at 11:10 AM, Adrian Bunk wrote:
> From: Scott Wood <scottwood@freescale.com>
>
> This patch fixes the following build error with mpc866_ads_defconfig:
>
> <-- snip -->
>
> ...
> WRAP arch/powerpc/boot/cuImage.mpc866ads
> powerpc64-linux-ld: arch/powerpc/boot/cuboot-mpc866ads.o: No such
> file: No such file or directory
> make[2]: *** [arch/powerpc/boot/cuImage.mpc866ads] Error 1
>
> <-- snip -->
>
> Reported-by: Adrian Bunk <bunk@kernel.org>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
>
> ---
applied.
- k
^ permalink raw reply
* Re: [2.6 patch] Add cuImage.mpc866ads to the bootwrapper as a cuboot-8xx target
From: Kumar Gala @ 2008-08-21 5:34 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Scott Wood, linuxppc-dev, Adrian Bunk, paulus
In-Reply-To: <20080821151612.4bdf0692.sfr@canb.auug.org.au>
On Aug 21, 2008, at 12:16 AM, Stephen Rothwell wrote:
> Hi all,
>
> Anyone going to add this patch to some tree (I have had it in linux-
> next
> for a while).
>
> http://patchwork.ozlabs.org/linuxppc/patch?id=19962
I'll grab it for 2.6.27 as it address a build failure.
- k
^ permalink raw reply
* Re: [PATCH] powerpc/83xx: mpc836x_mds: add support for the nor flash
From: Kumar Gala @ 2008-08-21 5:16 UTC (permalink / raw)
To: Anton Vorontsov; +Cc: linuxppc-dev
In-Reply-To: <20080814171342.GA20693@oksana.dev.rtsoft.ru>
On Aug 14, 2008, at 12:13 PM, Anton Vorontsov wrote:
> This patch adds the localbus node, moves the bcsr node into the
> localbus node, and adds the flash node.
>
> Also enable MTD support in the defconfig.
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
> arch/powerpc/boot/dts/mpc836x_mds.dts | 23 ++++++-
> arch/powerpc/configs/83xx/mpc836x_mds_defconfig | 79 ++++++++++++++
> ++++++++-
> 2 files changed, 98 insertions(+), 4 deletions(-)
applied to powerpc-next.
- k
^ permalink raw reply
* Re: [2.6 patch] Add cuImage.mpc866ads to the bootwrapper as a cuboot-8xx target
From: Stephen Rothwell @ 2008-08-21 5:16 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Scott Wood, paulus, linuxppc-dev
In-Reply-To: <20080731161020.GD20212@cs181140183.pp.htv.fi>
[-- Attachment #1: Type: text/plain, Size: 1505 bytes --]
Hi all,
Anyone going to add this patch to some tree (I have had it in linux-next
for a while).
http://patchwork.ozlabs.org/linuxppc/patch?id=19962
On Thu, 31 Jul 2008 19:10:22 +0300 Adrian Bunk <bunk@kernel.org> wrote:
>
> From: Scott Wood <scottwood@freescale.com>
>
> This patch fixes the following build error with mpc866_ads_defconfig:
>
> <-- snip -->
>
> ...
> WRAP arch/powerpc/boot/cuImage.mpc866ads
> powerpc64-linux-ld: arch/powerpc/boot/cuboot-mpc866ads.o: No such file: No such file or directory
> make[2]: *** [arch/powerpc/boot/cuImage.mpc866ads] Error 1
>
> <-- snip -->
>
> Reported-by: Adrian Bunk <bunk@kernel.org>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
>
> ---
>
> This patch was sent by Scott Wood on:
> - 21 May 2008
>
> arch/powerpc/boot/wrapper | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
> index d6c96d9..3b59e33 100755
> --- a/arch/powerpc/boot/wrapper
> +++ b/arch/powerpc/boot/wrapper
> @@ -159,7 +159,7 @@ cuboot*)
> binary=y
> gzip=
> case "$platform" in
> - *-mpc885ads|*-adder875*|*-ep88xc)
> + *-mpc866ads|*-mpc885ads|*-adder875*|*-ep88xc)
> platformo=$object/cuboot-8xx.o
> ;;
> *5200*|*-motionpro)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply
* Re: cpm2: Fix race condition in CPM2 GPIO library.
From: Kumar Gala @ 2008-08-21 5:16 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linuxppc-dev
In-Reply-To: <200808191420.24837.laurentp@cse-semaphore.com>
On Aug 19, 2008, at 7:20 AM, Laurent Pinchart wrote:
> The CPM2 GPIO library code uses the non thread-safe clrbits32/
> setbits32
> macros. This patch protects them with a spinlock.
>
> Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
> ---
> arch/powerpc/sysdev/cpm_common.c | 37 +++++++++++++++++++++++++
> +-----------
> 1 files changed, 26 insertions(+), 11 deletions(-)
applied.
- k
^ permalink raw reply
* Re: powerpc allmodconfig in current -mm
From: Paul Mackerras @ 2008-08-21 5:01 UTC (permalink / raw)
To: Andrew Morton; +Cc: linuxppc-dev
In-Reply-To: <20080820181626.0347c270.akpm@linux-foundation.org>
Andrew Morton writes:
> /opt/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc64-unknown-linux-gnu/bin/powerpc64-unknown-linux-gnu-ld: .tmp_vmlinux1: section .data.gcov lma 0xc000000002c2bb78 overlaps previous sections
I suspect your binutils are too old, and the stress that the gcov
stuff puts on the toolchain is showing up a bug in ld.
> powerpc allmodconfig:
>
> ERROR: "CMO_PageSize" [arch/powerpc/platforms/pseries/cmm.ko] undefined!
>
> (needed for 2.6.27)
OK. I think we need to export CMO_PrPSP and CMO_SecPSP as well.
(Lovely names. :()
Paul.
^ permalink raw reply
* Re: [PATCH v2] powerpc: fix memory leaks in QE library
From: Kumar Gala @ 2008-08-21 4:49 UTC (permalink / raw)
To: Timur Tabi; +Cc: linuxppc-dev
In-Reply-To: <1219246149-23812-1-git-send-email-timur@freescale.com>
On Aug 20, 2008, at 10:29 AM, Timur Tabi wrote:
> Fix two memory leaks in the Freescale QE library: add a missing
> kfree() in
> ucc_fast_init() and ucc_slow_init() if the ioremap() fails, and update
> ucc_fast_free() and ucc_slow_free() to call iounmap() if necessary.
>
> Based on a patch from Tony Breeds <tony@bakeyournoodle.com>.
>
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> arch/powerpc/sysdev/qe_lib/ucc_fast.c | 4 ++++
> arch/powerpc/sysdev/qe_lib/ucc_slow.c | 8 +++++---
> 2 files changed, 9 insertions(+), 3 deletions(-)
applied. (this just became ucc_slow since I had already applied v1).
- k
^ permalink raw reply
* Re: [patch 1/4] powerpc: Fix typo in pgtable-ppc64.h
From: Paul Mackerras @ 2008-08-21 4:45 UTC (permalink / raw)
To: Geoff Levand; +Cc: linuxppc-dev
In-Reply-To: <48AC7C1D.5070509@am.sony.com>
Geoff Levand writes:
> Fix a minor comment typo in pgtable-ppc64.h.
I don't see why this needs to go in 2.6.27. See Linus' recent
comments on what should go in outside the merge window:
http://lkml.org/lkml/2008/8/20/251
I'll queue it for 2.6.28.
Paul.
^ permalink raw reply
* Please pull from 'for-2.6.27' branch
From: Kumar Gala @ 2008-08-21 4:27 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
Please pull from 'for-2.6.27' branch of
master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git for-2.6.27
to receive the following updates:
arch/powerpc/boot/dts/mpc8641_hpcn.dts | 2 -
arch/powerpc/boot/dts/tqm8548-bigflash.dts | 8 +++++-
arch/powerpc/boot/dts/tqm8548.dts | 3 +-
arch/powerpc/sysdev/qe_lib/ucc_fast.c | 4 +++
drivers/serial/Kconfig | 36 -----------------------------
5 files changed, 14 insertions(+), 39 deletions(-)
Kumar Gala (2):
powerpc: Fix whitespace merge in mpc8641 hpcn device tree
serial/cpm_uart: Remove dead Kconfig options
Timur Tabi (1):
powerpc: fix memory leaks in QE library
Wolfgang Grandegger (1):
powerpc/85xx: TQM8548: DTS file fixes and cleanup
^ permalink raw reply
* Re: [PATCH] powerpc: fix memory leaks in QE library
From: Kumar Gala @ 2008-08-21 4:24 UTC (permalink / raw)
To: Timur Tabi; +Cc: linuxppc-dev
In-Reply-To: <1219093928-5349-1-git-send-email-timur@freescale.com>
On Aug 18, 2008, at 4:12 PM, Timur Tabi wrote:
> Fix two memory leaks in the Freescale QE library: add a missing
> kfree() in
> ucc_fast_init() if the ioremap() fails, and update ucc_fast_free()
> to call
> iounmap() on uf_regs.
>
> Based on a patch from Tony Breeds <tony@bakeyournoodle.com>.
>
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> arch/powerpc/sysdev/qe_lib/ucc_fast.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
applied.
- k
^ permalink raw reply
* Re: powerpc/cell/oprofile: fix mutex locking for spu-oprofile
From: Paul Mackerras @ 2008-08-21 4:21 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Robert Richter, linux-kernel, linuxppc-dev, oprofile-list, cel,
cbe-oss-dev
In-Reply-To: <200808201519.19453.arnd@arndb.de>
Arnd Bergmann writes:
> Paul, any chance we can still get this into 2.6.27?
Possibly. We'll need a really good explanation for Linus as to why
this is needed (what regression or serious bug this fixes) and why it
is late. Can you send me something explaining that?
> I've added the Ack and uploaded it again for you to
> pull from
>
> master.kernel.org:/pub/scm/linux/kernel/git/arnd/cell-2.6.git merge
Are you sure you actually managed to update that?
$ git ls-remote master.kernel.org:/pub/scm/linux/kernel/git/arnd/cell-2.6.git merge
f90a87b5f5fa46dc6c556e9267a6f25a95fbef14 refs/heads/merge
and f90a87b5f5fa46dc6c556e9267a6f25a95fbef14 is the same commit from
2008-08-09 that you asked me to pull previously.
Paul.
^ permalink raw reply
* Re: Strange behavior with I2C on Sequoia board
From: Sean MacLennan @ 2008-08-21 3:18 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev
In-Reply-To: <1219279463.26429.35.camel@jdub.homelinux.org>
On Wed, 20 Aug 2008 20:44:23 -0400
"Josh Boyer" <jwboyer@gmail.com> wrote:
> That's all output from the wrapper, not the kernel. And the kernel
> config doesn't make a difference at all to the wrapper. I wonder if
> there is some weird size issue going on there or if whatever U-Boot
> version you are using is doing odd things...
Any chance something in the DTS could affect it? Maybe try commenting
out the second IIC controller?
Cheers,
Sean
^ permalink raw reply
* Re: [RFC] mtd: add OF2PDEV convertor for the NDFC driver
From: Sean MacLennan @ 2008-08-21 3:10 UTC (permalink / raw)
To: Josh Boyer
Cc: linuxppc-dev, Sebastian Siewior, linux-mtd, tglx, Arnd Bergmann
In-Reply-To: <20080820203719.5224dc78@zod.rchland.ibm.com>
On Wed, 20 Aug 2008 20:37:19 -0400
"Josh Boyer" <jwboyer@linux.vnet.ibm.com> wrote:
> On Thu, 21 Aug 2008 00:40:58 +0200
> Arnd Bergmann <arnd@arndb.de> wrote:
>
> > On Wednesday 20 August 2008, Sebastian Siewior wrote:
> > > I didn't convert the NDFC driver to support OF because there are
> > > non-OF-aware platforms with the ndfc chip.
> > > All settings are mandatory except the oob layout.
> >
> > Are you aware of Sean's patch from
> > http://patchwork.ozlabs.org/linuxppc/patch?id=20183 ?
>
> I need to look at that hard for .28 still.
Please do, I know it works, but I am not sure it is correct.
I haven't had a chance to really look at the new driver from Sebastian,
but it is more complete than mine. It has to be decided if that is a
good thing. I modeled my driver after the existing nand of drivers. They
also limit, even more than mine, what can be configured.
My gut feel is that it is better to let the upper level nand drivers
default correctly based on the chip. For example, on the warp we need to
let the ecc layout default since then it can handle the differences
between 64M and 256M nand chips without a fixup at boot time. (I
believe Sebastian's driver *does* allow this)
I also believe that some fields are now obsolete when going to an of
platform driver. For example, chip select is part of the reg entry.
So my goal was to configure as little as possible and then add as
needed.
Cheers,
Sean
^ permalink raw reply
* powerpc allmodconfig in current -mm
From: Andrew Morton @ 2008-08-21 1:16 UTC (permalink / raw)
To: linuxppc-dev
/opt/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc64-unknown-linux-gnu/bin/powerpc64-unknown-linux-gnu-ld: .tmp_vmlinux1: section .data.gcov lma 0xc000000002c2bb78 overlaps previous sections
/opt/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc64-unknown-linux-gnu/bin/powerpc64-unknown-linux-gnu-ld: .tmp_vmlinux2: section .data.gcov lma 0xc000000002cdbb78 overlaps previous sections
/opt/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc64-unknown-linux-gnu/bin/powerpc64-unknown-linux-gnu-ld: .tmp_vmlinux3: section .data.gcov lma 0xc000000002cdbb78 overlaps previous sections
/opt/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc64-unknown-linux-gnu/bin/powerpc64-unknown-linux-gnu-ld: vmlinux: section .data.gcov lma 0xc000000002cdbb78 overlaps previous sections
that probably happens in linux-next and maybe mainline too.
Also....
From: Andrew Morton <akpm@linux-foundation.org>
powerpc allmodconfig:
ERROR: "CMO_PageSize" [arch/powerpc/platforms/pseries/cmm.ko] undefined!
(needed for 2.6.27)
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/powerpc/platforms/pseries/setup.c | 1 +
1 file changed, 1 insertion(+)
diff -puN arch/powerpc/platforms/pseries/setup.c~powerpc-export-cmo_pagesize arch/powerpc/platforms/pseries/setup.c
--- a/arch/powerpc/platforms/pseries/setup.c~powerpc-export-cmo_pagesize
+++ a/arch/powerpc/platforms/pseries/setup.c
@@ -71,6 +71,7 @@
int CMO_PrPSP = -1;
int CMO_SecPSP = -1;
unsigned long CMO_PageSize = (ASM_CONST(1) << IOMMU_PAGE_SHIFT);
+EXPORT_SYMBOL(CMO_PageSize);
int fwnmi_active; /* TRUE if an FWNMI handler is present */
_
^ permalink raw reply
* Re: Strange behavior with I2C on Sequoia board
From: Josh Boyer @ 2008-08-21 0:44 UTC (permalink / raw)
To: Steven A. Falco; +Cc: linuxppc-dev
In-Reply-To: <48AC84D9.8050809@harris.com>
On Wed, 2008-08-20 at 16:55 -0400, Steven A. Falco wrote:
> I have just tried enabling I2C on a Sequoia board (kernel is DENX 2.6.26) and
> doing that appears to corrupt the u-boot / kernel communications.
>
> Prior to turning on I2C, I see the ethernet mac and kernel command line
> correctly passed, but once I turn on I2C, the ethernet mac becomes 0 and the
> kernel command line is missing many parameters. I'll paste in a good log, then
> a bad one. The only configuration difference is that the bad one has
> CONFIG_I2C_CHARDEV=y and CONFIG_I2C_IBM_IIC=y in the configuration.
>
> I'll start digging into it, but if anyone has any experience or ideas regarding
> I2C on PPC440, I'd appreciate your thoughts on this.
>
> Steve
>
> Good log:
> =========
>
> ## Booting kernel from Legacy Image at fd400000 ...
> Image Name: Linux-2.6.26.1-00033-g088efe4-di
> Image Type: PowerPC Linux Kernel Image (gzip compressed)
> Data Size: 1801234 Bytes = 1.7 MB
> Load Address: 00400000
> Entry Point: 00400454
> Verifying Checksum ... OK
> Uncompressing Kernel Image ... OK
> ## Loading init Ramdisk from Legacy Image at fd900000 ...
> Image Name: initramfs
> Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
> Data Size: 2442283 Bytes = 2.3 MB
> Load Address: 00000000
> Entry Point: 00000000
> Verifying Checksum ... OK
> Loading Ramdisk to 0fcb8000, end 0ff0c42b ... OK
> CPU clock-frequency <- 0x27bc86a4 (667MHz)
> CPU timebase-frequency <- 0x27bc86a4 (667MHz)
> /plb: clock-frequency <- 9ef21a9 (167MHz)
> /plb/opb: clock-frequency <- 4f790d4 (83MHz)
> /plb/opb/ebc: clock-frequency <- 34fb5e3 (56MHz)
> /plb/opb/serial@ef600300: clock-frequency <- a8c000 (11MHz)
> /plb/opb/serial@ef600400: clock-frequency <- a8c000 (11MHz)
> /plb/opb/serial@ef600500: clock-frequency <- a8c000 (11MHz)
> /plb/opb/serial@ef600600: clock-frequency <- a8c000 (11MHz)
> Memory <- <0x0 0x0 0xffff000> (255MB)
> ENET0: local-mac-address <- 00:10:ec:01:04:d0
> ENET1: local-mac-address <- 00:10:ec:01:04:d1
>
> zImage starting: loaded at 0x00400000 (sp: 0x0ff0d220)
> Allocating 0x3dbc2c bytes for kernel ...
> gunzipping (0x00000000 <- 0x0040e000:0x007ed9c8)...done 0x39c1c4 bytes
> Using loader supplied ramdisk at 0xfcb8000-0xff0c42b
> initrd head: 0x1f8b0808
>
> Linux/PowerPC load: root=/dev/sda3 rw
> ip=137.237.178.105:137.237.179.31:137.237.178.1:255.255.255.0:hydra_temp:eth0:off
> panic=1 console=ttyS0,115200
>
> Bad log:
> ========
> ## Booting kernel from Legacy Image at fd400000 ...
> Image Name: Linux-2.6.26.1-00034-gf084326-di
> Image Type: PowerPC Linux Kernel Image (gzip compressed)
> Data Size: 1811651 Bytes = 1.7 MB
> Load Address: 00400000
> Entry Point: 00400454
> Verifying Checksum ... OK
> Uncompressing Kernel Image ... OK
> ## Loading init Ramdisk from Legacy Image at fd900000 ...
> Image Name: initramfs
> Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
> Data Size: 2442283 Bytes = 2.3 MB
> Load Address: 00000000
> Entry Point: 00000000
> Verifying Checksum ... OK
> Loading Ramdisk to 0fcb8000, end 0ff0c42b ... OK
> CPU clock-frequency <- 0x27bc86a4 (667MHz)
> CPU timebase-frequency <- 0x27bc86a4 (667MHz)
> /plb: clock-frequency <- 9ef21a9 (167MHz)
> /plb/opb: clock-frequency <- 4f790d4 (83MHz)
> /plb/opb/ebc: clock-frequency <- 34fb5e3 (56MHz)
> /plb/opb/serial@ef600300: clock-frequency <- a8c000 (11MHz)
> /plb/opb/serial@ef600400: clock-frequency <- a8c000 (11MHz)
> /plb/opb/serial@ef600500: clock-frequency <- a8c000 (11MHz)
> /plb/opb/serial@ef600600: clock-frequency <- a8c000 (11MHz)
> Memory <- <0x0 0x0 0xffff000> (255MB)
> ENET0: local-mac-address <- 00:00:00:00:00:00
> ENET1: local-mac-address <- 00:00:00:00:00:00
>
> zImage starting: loaded at 0x00400000 (sp: 0x0ff0d220)
> Allocating 0x3e1c48 bytes for kernel ...
> gunzipping (0x00000000 <- 0x0040e000:0x007f3a24)...done 0x3a21c4 bytes
> Using loader supplied ramdisk at 0xfcb8000-0xff0c42b
> initrd head: 0x1f8b0808
>
> Linux/PowerPC load: console=ttyS0,115200
That's all output from the wrapper, not the kernel. And the kernel
config doesn't make a difference at all to the wrapper. I wonder if
there is some weird size issue going on there or if whatever U-Boot
version you are using is doing odd things...
josh
^ permalink raw reply
* Patches pushed to powerpc.git master & powerpc-next branches
From: Paul Mackerras @ 2008-08-21 0:44 UTC (permalink / raw)
To: linuxppc-dev
I have committed the following patches to the master and powerpc-next
branches of the powerpc.git repository. These will be going upstream
in the 2.6.28 merge window.
Paul.
Adrian Bunk (1):
powerpc: Use bcd2bin/bin2bcd
Benjamin Herrenschmidt (2):
powerpc: Turn get/set_hard_smp_proccessor_id into inlines
powerpc: Expose PMCs & cache topology in sysfs on 32-bit
David Gibson (1):
powerpc: Update in-kernel dtc and libfdt to version 1.2.0
Harvey Harrison (2):
powerpc: Use the common ascii hex helpers
powerpc: Replace __FUNCTION__ with __func__
Michael Ellerman (5):
powerpc: Streamline ret_from_except_lite for non-iSeries platforms
powerpc: fsl_msi doesn't need it's own of_node
powerpc: Split-out common MSI bitmap logic into msi_bitmap.c
powerpc: Convert the FSL MSI code to use msi_bitmap
powerpc: Convert the MPIC MSI code to use msi_bitmap
Nathan Lynch (1):
powerpc: Remove redundant sysfs_remove_file calls for cache info
Stephen Rothwell (4):
powerpc: Remove include of linux/of_platform.h from asm/of_platform.h
hotplug/rpaphp: Remove unused error path code
powerpc/drivers: Use linux/of_device.h instead of asm/of_device.h
powerpc: Remove include of linux/of_device.h from asm/of_device.h
Tony Breeds (3):
powerpc: Guard htab_dt_scan_hugepage_blocks appropriately
powerpc: Guard from_rtc_time() in platforms/powermac/time.c
powerpc: Guard print_device_node_tree() with #if 0
^ permalink raw reply
* Re: [RFC] mtd: add OF2PDEV convertor for the NDFC driver
From: Josh Boyer @ 2008-08-21 0:37 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linuxppc-dev, Sebastian Siewior, linux-mtd, tglx, Sean MacLennan
In-Reply-To: <200808210040.58809.arnd@arndb.de>
On Thu, 21 Aug 2008 00:40:58 +0200
Arnd Bergmann <arnd@arndb.de> wrote:
> On Wednesday 20 August 2008, Sebastian Siewior wrote:
> > I didn't convert the NDFC driver to support OF because there are
> > non-OF-aware platforms with the ndfc chip.
> > All settings are mandatory except the oob layout.
>
> Are you aware of Sean's patch from
> http://patchwork.ozlabs.org/linuxppc/patch?id=20183 ?
I need to look at that hard for .28 still.
> What are the other platforms using it?
There should be none. It was an arch/ppc driver originally, and
arch/ppc is dead. Since it's only found on 4xx SoCs, there's no reason
that I'm aware of to keep it as a platform driver.
Other than the fact that the whole of_platform thing might be replaced
with shims to convert them to platform devices. There was talk of that
at one time and it made sense to me.
josh
^ permalink raw reply
* Re: facing problem with io_p2v() function
From: Sergey Temerkhanov @ 2008-08-20 23:47 UTC (permalink / raw)
To: Misbah khan; +Cc: linuxppc-embedded
In-Reply-To: <18965524.post@talk.nabble.com>
Misbah khan wrote:
> Hi all,
>
> I am using io_p2v() function in my driver to get the virtual address mapping
> timer control registers
>
> i am passing address as 0x48304024 as base and after getting the virtual
> address of it i am reading and writing to it but my any attempt to read the
> location or write is giving segmentation fault
>
> If i use __pa() to read the corresponding location it returning as
> 0x98304024 insted of 0x48304024
>
> I dont know where the mapping is going wrong
>
> Even when i tried using ioremap() i got the same kernel panic
>
> Below is the error message
>
>
> -------------------------------------------------------------------------------------------------------
>
> In init function
> Read reg address virt 0xd8304024 and phy 0x98304024 are
> Unhandled fault: external abort on non-linefetch (0x1028) at 0xd8304024
> Internal error: : 1028 [#1]
> Modules linked in: omap_timer
> CPU: 0 Not tainted (2.6.22.1-omap3 #1)
> PC is at omap_timer_read_register+0x30/0x3c [omap_timer]
> LR is at release_console_sem+0x1c0/0x1d4
> pc : [<bf000160>] lr : [<c005f650>] psr: 60000013
> sp : c7f1bea0 ip : c7f1bdd8 fp : c7f1beb4
> r10: c8858000 r9 : 00000026 r8 : 00000027
> r7 : c06dfdf0 r6 : 00000000 r5 : bf001018 r4 : 00000024
> r3 : d8304000 r2 : 00000000 r1 : 60000013 r0 : 0000003d
> Flags: nZCv IRQs on FIQs on Mode SVC_32 Segment user
> Control: 00c5387f Table: 80694018 DAC: 00000015
> Process insmod (pid: 306, stack limit = 0xc7f1a2d0)
> Stack: (0xc7f1bea0 to 0xc7f1c000)
> bea0: 00000000 bf001018 c7f1bed4 c7f1beb8 bf0001c4 bf00013c 00000000
> bf001280
> bec0: bf001100 c06dfdf0 c7f1bef4 c7f1bed8 bf0030c4 bf0001b0 00000000
> c006b5c4
> bee0: c06dfdc4 c06dfc00 c7f1bfa4 c7f1bef8 c007f514 bf00300c 00000000
> c0024380
> bf00: 000ce008 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000
> bf20: 00000000 00000000 00000000 00000000 00000000 00000000 c886ca30
> c07fc200
> bf40: 00000000 c8867c88 c88678f0 00000000 00000054 00000054 0000000a
> c886758f
> bf60: c8867cd8 bf00110c c8867cb0 00000024 00000000 c035da98 c0030184
> 000a81fc
> bf80: bebf5d74 00014cdd 00000080 c0029f68 c7f1a000 00000000 00000000
> c7f1bfa8
> bfa0: c0029dc0 c007e1d8 000a81fc bebf5d74 000ce018 00014cdd 000ce008
> 00000001
> bfc0: 000a81fc bebf5d74 00014cdd 00000080 00000000 bebf5d74 bebf5e54
> 00000061
> bfe0: bebf5a20 bebf5a10 0001e1c0 401d2ec0 60000010 000ce018 00000017
> 0011b8d8
> Backtrace:
> [<bf000130>] (omap_timer_read_register+0x0/0x3c [omap_timer]) from
> [<bf0001c4>] (omap_dm_timer_set_l
> oad+0x20/0x5c [omap_timer])
> r5:bf001018 r4:00000000
> [<bf0001a4>] (omap_dm_timer_set_load+0x0/0x5c [omap_timer]) from
> [<bf0030c4>] (omap_gp_timer_init_mo
> de+0xc4/0xf0 [omap_timer])
> r7:c06dfdf0 r6:bf001100 r5:bf001280 r4:00000000
> [<bf003000>] (omap_gp_timer_init_mode+0x0/0xf0 [omap_timer]) from
> [<c007f514>] (sys_init_module+0x13
> 48/0x1400)
> r5:c06dfc00 r4:c06dfdc4
> [<c007e1cc>] (sys_init_module+0x0/0x1400) from [<c0029dc0>]
> (ret_fast_syscall+0x0/0x2c)
> Code: e1a01003 e59f000c eb417e8b e5953010 (e7930004)
> Segmentation fault
>
> -----------------------------------------------------------------------------------------------------------
>
> Looking forward for the suggestion for the above problem
>
>
> ----- Misbah <><
>
Did you try the ioremap() function for this?
^ permalink raw reply
* ELDK Fedora Core 9
From: Russell McGuire @ 2008-08-20 23:49 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <mailman.1.1217383202.19379.linuxppc-embedded@ozlabs.org>
Guys,
I know that DENX doesn't list ELDK 4.1 with FC9 as officially supported, but
has anyone tried to install it with FC9?
Attempts last night resulted in the install script freezing during install,
and no apparent error messages.
1) Has anyone tried this? Success?
2) Does anyone have suggestion on how turn on debugging with the install
script?
Thanks
-Russ
^ permalink raw reply
* porting linux 2.6.27 to embedded powerpc board
From: Laxmikant Rashinkar @ 2008-08-20 23:24 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]
Hi,
I have an embedded PowerPC (MPC8347) board that works fine with uboot and Linux 2.6.15.
I am trying to upgrade the kernel so that it runs on the latest release - Linux 2.6.27.
So far, I have gotten the kernel to compile on my platform, but of course it does not boot.
Things have changed drastically since 2.6.15 and the porting methodology used back then is obsolete now. Progress is a good thing :-) I have googled for info on how to accomplish this port but have found nothing so far. In particular, the fact that I am using uboot instead of open firmware makes the task a bit more daunting.
The file Documentation/powerpc/booting-without-of.txt gives some info on the flattened device tree and and at the end of the "board support" section it states "I will describe later the boot process and various callbacks that your platform should implement." but that description is not part of the document.
I am wondering where I can find more info that will help me accomplish this port.
thanks a lot for your help.
L.K
[-- Attachment #2: Type: text/html, Size: 1293 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