* [PATCH 2/3] mpc8349: Add linux, network-index to ethernet nodes in device tree
From: Grant Likely @ 2007-08-30 20:26 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20070830202618.9927.32588.stgit@trillian.cg.shawcable.net>
From: Grant Likely <grant.likely@secretlab.ca>
cuImage need to know the logical index of the ethernet devices in order
to assign mac addresses. This patch adds the needed properties
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
CC: Scott Wood <scottwood@freescale.com>
CC: Kumar Gala <galak@kernel.crashing.org>
CC: Timur Tabi <timur@freescale.com>
---
arch/powerpc/boot/dts/mpc8349emitx.dts | 2 ++
arch/powerpc/boot/dts/mpc8349emitxgp.dts | 1 +
arch/powerpc/boot/dts/mpc834x_mds.dts | 2 ++
3 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
index 502f47c..a4e2284 100644
--- a/arch/powerpc/boot/dts/mpc8349emitx.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -141,6 +141,7 @@
interrupts = <20 8 21 8 22 8>;
interrupt-parent = < &ipic >;
phy-handle = < &phy1c >;
+ linux,network-index = <0>;
};
ethernet@25000 {
@@ -160,6 +161,7 @@
interrupts = <23 8 24 8 25 8>;
interrupt-parent = < &ipic >;
phy-handle = < &phy1f >;
+ linux,network-index = <1>;
};
serial@4500 {
diff --git a/arch/powerpc/boot/dts/mpc8349emitxgp.dts b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
index 0b83871..004b737 100644
--- a/arch/powerpc/boot/dts/mpc8349emitxgp.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
@@ -116,6 +116,7 @@
interrupts = <20 8 21 8 22 8>;
interrupt-parent = < &ipic >;
phy-handle = < &phy1c >;
+ linux,network-index = <0>;
};
serial@4500 {
diff --git a/arch/powerpc/boot/dts/mpc834x_mds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts
index 4810997..251c233 100644
--- a/arch/powerpc/boot/dts/mpc834x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc834x_mds.dts
@@ -146,6 +146,7 @@
interrupts = <20 8 21 8 22 8>;
interrupt-parent = < &ipic >;
phy-handle = < &phy0 >;
+ linux,network-index = <0>;
};
ethernet@25000 {
@@ -165,6 +166,7 @@
interrupts = <23 8 24 8 25 8>;
interrupt-parent = < &ipic >;
phy-handle = < &phy1 >;
+ linux,network-index = <1>;
};
serial@4500 {
^ permalink raw reply related
* Re: [PATCH 2.6.23] ibmebus: Prevent bus_id collisions
From: Joel Schopp @ 2007-08-30 20:36 UTC (permalink / raw)
To: Joachim Fenkes
Cc: Thomas Q Klein, Jan-Bernd Themann, Paul Mackerras, LKML,
LinuxPPC-Dev, Christoph Raisch, Nathan Lynch, Paul Mackerras,
Stefan Roscher
In-Reply-To: <OF9D1ED44F.896DCCC5-ONC1257347.0044D256-C1257347.004CFB07@de.ibm.com>
> There are currently two GX devices, eHCA and eHEA, which both reside
> beneath the root node - this is required by architecture for those
> devices. Unless they invent a device called
> "supercalifragilisticexpialidocious", devices in the root note will have a
> full_name of less than 31 chars. Even in that case, the truncation occurs
> at the beginning, so the @xxx part that makes the nodes unique will stay
> in place.
>
OK, didn't realize it had to be beneath the root node, and that the
truncation truncated the front and not the back. I would have done it
differently, but this should work.
Acked-by: Joel Schopp <jschopp@austin.ibm.com>
^ permalink raw reply
* Re: Sleep problems with kernels >= 2.6.21 on powerpc
From: Tim Teulings @ 2007-08-30 20:42 UTC (permalink / raw)
To: Michal Piotrowski, Rogério Brito, linux-kernel, linuxppc-dev,
debian-powerpc, Rafael J. Wysocki, Linux-pm mailing list
In-Reply-To: <46D279E8.10001@edge.ping.de>
Hello!
> I don't have traces at hand and due to lack of time cannot reproduce it=
=20
> up to tomorrow. However this hint may speed up your analysis!
Sorry for the delay, but my desktop PC had an urgent hard disk problem I =
had to fix ASASP.
So here is the output from dmesg that suggested to me that firewire=20
might be a problem:
> usb_endpoint usbdev2.2_ep81: PM: suspend 0->2, parent 2-1:1.0 already 2=
> usb_device usbdev1.1: PM: suspend 0->2, parent usb1 already 2
> usb_endpoint usbdev1.1_ep81: PM: suspend 0->2, parent 1-0:1.0 already 2=
> hub 1-0:1.0: PM: suspend 2->2, parent usb1 already 2
> usb_endpoint usbdev1.1_ep00: PM: suspend 0->2, parent usb1 already 2
> eth2: Airport entering sleep mode
> eth0: suspending, WakeOnLan disabled
> pci_set_power_state(): 0002:20:0e.0: state=3D3, current state=3D5
> firewire_ohci: pci_set_power_state failed with -22<3>pci_device_suspend=
(): pci_suspend+0x0/0x9c [firewire_ohci]() returns -22
> suspend_device(): pci_device_suspend+0x0/0x98() returns -22
> Could not suspend device 0002:20:0e.0: error -22
> eth0: resuming
> PHY ID: 4061e4, addr: 0
> eth2: Airport waking up
> eth2: New link status: Connected (0001)
> hda: Enabling Ultra DMA 2
> eth0: Link is up at 100 Mbps, full-duplex.
> eth0: Pause is disabled
> ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
> hdb: Enabling Ultra DMA 2
> usb_endpoint usbdev1.1_ep00: PM: resume from 0, parent usb1 still 2
> usb_endpoint usbdev1.1_ep81: PM: resume from 0, parent 1-0:1.0 still 2
> usb_device usbdev1.1: PM: resume from 0, parent usb1 still 2
> Driver sleep failed
> Sleep rejected by devices
> adb: starting probe task...
> adb devices: [2]: 2 c4 [3]: 3 1 [7]: 7 1f
> ADB keyboard at 2, handler 1
> ADB mouse at 3, handler set to 4 (trackpad)
> adb: finished probe task...
> usb_device usbdev1.1: PM: suspend 0->2, parent usb1 already 2
> usb_endpoint usbdev1.1_ep81: PM: suspend 0->2, parent 1-0:1.0 already 2=
> hub 1-0:1.0: PM: suspend 2->2, parent usb1 already 2
> usb_endpoint usbdev1.1_ep00: PM: suspend 0->2, parent usb1 already 2
> eth2: Airport entering sleep mode
> eth0: suspending, WakeOnLan disabled
> Trying to free already-free IRQ 40
> pci_set_power_state(): 0002:20:0e.0: state=3D3, current state=3D5
> firewire_ohci: pci_set_power_state failed with -22<3>pci_device_suspend=
(): pci_suspend+0x0/0x9c [firewire_ohci]() returns -22
> suspend_device(): pci_device_suspend+0x0/0x98() returns -22
> Could not suspend device 0002:20:0e.0: error -22
> eth0: resuming
> PHY ID: 4061e4, addr: 0
> eth2: Airport waking up
> eth2: New link status: Connected (0001)
> hda: Enabling Ultra DMA 2
> hdb: Enabling Ultra DMA 2
> eth0: Link is up at 100 Mbps, full-duplex.
> eth0: Pause is disabled
The problem wa sinitiated by closing the lid. The iBook then seems to=20
permanetly try to go to sleep (I can hear the cd-rom drive get=20
periodically initialized). So above contains more than one iteration.
The kernel is:
> Linux kismet 2.6.22-1-powerpc #1 Sun Jul 29 13:58:06 CEST 2007 ppc GNU/=
Linux
The relveant debian package:
> linux-image-2.6.22-1-powerpc_2.6.22-3_powerpc.deb
I'm running a mixture of debian testing/unstable.
The firewire and the USB connector were unused, the network connector=20
was used.
If there are questions regarding other packages, or somebody wants me to =
test a fix (I would prever a debian package), don't hesitate - I would=20
like to get the bug fixed :-)
--=20
Gru=DF...
Tim
^ permalink raw reply
* [PATCH] mpc5200: add cuimage support for mpc5200 boards
From: Grant Likely @ 2007-08-30 20:57 UTC (permalink / raw)
To: tnt, scottwood, galak, linuxppc-dev
From: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/powerpc/boot/Makefile | 5 +-
arch/powerpc/boot/cuboot-52xx.c | 49 +++++++++++++++++++
arch/powerpc/boot/mpc52xx-psc.c | 89 +++++++++++++++++++++++++++++++++++
arch/powerpc/boot/ops.h | 1
arch/powerpc/boot/serial.c | 2 +
arch/powerpc/platforms/52xx/Kconfig | 1
6 files changed, 145 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index cd7c057..45be0e5 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -45,8 +45,8 @@ src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \
ns16550.c serial.c simple_alloc.c div64.S util.S \
gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \
4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.c \
- cpm-serial.c
-src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \
+ cpm-serial.c mpc52xx-psc.c
+src-plat := of.c cuboot-52xx.c cuboot-83xx.c cuboot-85xx.c holly.c \
cuboot-ebony.c treeboot-ebony.c prpmc2800.c \
ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c cuboot-pq2.c
src-boot := $(src-wlib) $(src-plat) empty.c
@@ -142,6 +142,7 @@ image-$(CONFIG_DEFAULT_UIMAGE) += uImage
ifneq ($(CONFIG_DEVICE_TREE),"")
image-$(CONFIG_PPC_8xx) += cuImage.8xx
image-$(CONFIG_8260) += cuImage.pq2
+image-$(CONFIG_PPC_MPC52xx) += cuImage.52xx
image-$(CONFIG_PPC_83xx) += cuImage.83xx
image-$(CONFIG_PPC_85xx) += cuImage.85xx
image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony
diff --git a/arch/powerpc/boot/cuboot-52xx.c b/arch/powerpc/boot/cuboot-52xx.c
new file mode 100644
index 0000000..42650b4
--- /dev/null
+++ b/arch/powerpc/boot/cuboot-52xx.c
@@ -0,0 +1,49 @@
+/*
+ * Old U-boot compatibility for 8200
+ *
+ * Author: Grant Likely <grant.likely@secretlab.ca>
+ *
+ * Copyright (c) 2007 Secret Lab Technologies Ltd.
+ * Copyright (c) 2007 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ */
+
+#include "ops.h"
+#include "stdio.h"
+#include "cuboot.h"
+
+#define TARGET_PPC_MPC52xx
+#include "ppcboot.h"
+
+static bd_t bd;
+
+static void platform_fixups(void)
+{
+ void *soc;
+
+ dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
+ dt_fixup_mac_addresses(bd.bi_enetaddr);
+ dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq);
+
+ /* Unfortunately, the specific model number is encoded in the
+ * soc node name in existing dts files -- once that is fixed,
+ * this can do a simple path lookup.
+ */
+ soc = find_node_by_devtype(NULL, "soc");
+ if (soc) {
+ setprop(soc, "bus-frequency", &bd.bi_busfreq,
+ sizeof(bd.bi_ipbfreq));
+ }
+}
+
+void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+ unsigned long r6, unsigned long r7)
+{
+ CUBOOT_INIT();
+ ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
+ serial_console_init();
+ platform_ops.fixups = platform_fixups;
+}
diff --git a/arch/powerpc/boot/mpc52xx-psc.c b/arch/powerpc/boot/mpc52xx-psc.c
new file mode 100644
index 0000000..46eecf0
--- /dev/null
+++ b/arch/powerpc/boot/mpc52xx-psc.c
@@ -0,0 +1,89 @@
+/*
+ * CPM serial console support.
+ *
+ * Copyright 2007 Freescale Semiconductor, Inc.
+ * Author: Scott Wood <scottwood@freescale.com>
+ *
+ * It is assumed that the firmware (or the platform file) has already set
+ * up the port.
+ */
+
+#include "types.h"
+#include "io.h"
+#include "ops.h"
+
+/* Programmable Serial Controller (PSC) status register bits */
+#define MPC52xx_PSC_SR 0x04
+#define MPC52xx_PSC_SR_CDE 0x0080
+#define MPC52xx_PSC_SR_RXRDY 0x0100
+#define MPC52xx_PSC_SR_RXFULL 0x0200
+#define MPC52xx_PSC_SR_TXRDY 0x0400
+#define MPC52xx_PSC_SR_TXEMP 0x0800
+#define MPC52xx_PSC_SR_OE 0x1000
+#define MPC52xx_PSC_SR_PE 0x2000
+#define MPC52xx_PSC_SR_FE 0x4000
+#define MPC52xx_PSC_SR_RB 0x8000
+
+/* PSC Command values */
+#define MPC52xx_PSC_COMMAND 0x08
+#define MPC52xx_PSC_RX_ENABLE 0x0001
+#define MPC52xx_PSC_RX_DISABLE 0x0002
+#define MPC52xx_PSC_TX_ENABLE 0x0004
+#define MPC52xx_PSC_TX_DISABLE 0x0008
+#define MPC52xx_PSC_SEL_MODE_REG_1 0x0010
+#define MPC52xx_PSC_RST_RX 0x0020
+#define MPC52xx_PSC_RST_TX 0x0030
+#define MPC52xx_PSC_RST_ERR_STAT 0x0040
+#define MPC52xx_PSC_RST_BRK_CHG_INT 0x0050
+#define MPC52xx_PSC_START_BRK 0x0060
+#define MPC52xx_PSC_STOP_BRK 0x0070
+
+#define MPC52xx_PSC_BUFFER 0x0C
+
+static void *psc;
+
+static int psc_open(void)
+{
+ out_8(psc + MPC52xx_PSC_COMMAND, MPC52xx_PSC_SEL_MODE_REG_1
+ | MPC52xx_PSC_RX_ENABLE
+ | MPC52xx_PSC_TX_ENABLE);
+
+ return 0; /* ignored */
+}
+
+static void psc_putc(unsigned char c)
+{
+ while (!(in_be16(psc + MPC52xx_PSC_SR) & MPC52xx_PSC_SR_TXRDY)) ;
+ out_8(psc + MPC52xx_PSC_BUFFER, c);
+}
+
+static unsigned char psc_tstc(void)
+{
+ return (in_be16(psc + MPC52xx_PSC_SR) & MPC52xx_PSC_SR_RXRDY) != 0;
+}
+
+static unsigned char psc_getc(void)
+{
+ while (!(in_be16(psc + MPC52xx_PSC_SR) & MPC52xx_PSC_SR_RXRDY)) ;
+
+ return in_8(psc + MPC52xx_PSC_BUFFER);
+}
+
+int mpc5200_psc_console_init(void *devp, struct serial_console_data *scdp)
+{
+ int n;
+
+ /* Get the base address of the psc registers */
+ n = getprop(devp, "virtual-reg", &psc, sizeof(psc));
+ if (n != sizeof(psc)) {
+ if (!dt_xlate_reg(devp, 0, (void *)&psc, NULL))
+ return -1;
+ }
+
+ scdp->open = psc_open;
+ scdp->putc = psc_putc;
+ scdp->getc = psc_getc;
+ scdp->tstc = psc_tstc;
+
+ return 0;
+}
diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h
index 45c2268..5ab9b51 100644
--- a/arch/powerpc/boot/ops.h
+++ b/arch/powerpc/boot/ops.h
@@ -83,6 +83,7 @@ int serial_console_init(void);
int ns16550_console_init(void *devp, struct serial_console_data *scdp);
int mpsc_console_init(void *devp, struct serial_console_data *scdp);
int cpm_console_init(void *devp, struct serial_console_data *scdp);
+int mpc5200_psc_console_init(void *devp, struct serial_console_data *scdp);
void *simple_alloc_init(char *base, unsigned long heap_size,
unsigned long granularity, unsigned long max_allocs);
extern void flush_cache(void *, unsigned long);
diff --git a/arch/powerpc/boot/serial.c b/arch/powerpc/boot/serial.c
index d47f8e0..95e08e4 100644
--- a/arch/powerpc/boot/serial.c
+++ b/arch/powerpc/boot/serial.c
@@ -126,6 +126,8 @@ int serial_console_init(void)
dt_is_compatible(devp, "fsl,cpm2-scc-uart") ||
dt_is_compatible(devp, "fsl,cpm2-smc-uart"))
rc = cpm_console_init(devp, &serial_cd);
+ else if (dt_is_compatible(devp, "mpc5200-psc-uart"))
+ rc = mpc5200_psc_console_init(devp, &serial_cd);
/* Add other serial console driver calls here */
diff --git a/arch/powerpc/platforms/52xx/Kconfig b/arch/powerpc/platforms/52xx/Kconfig
index 3ffaa06..9ddf251 100644
--- a/arch/powerpc/platforms/52xx/Kconfig
+++ b/arch/powerpc/platforms/52xx/Kconfig
@@ -30,6 +30,7 @@ config PPC_EFIKA
config PPC_LITE5200
bool "Freescale Lite5200 Eval Board"
depends on PPC_MULTIPLATFORM && PPC32
+ select WANT_DEVICE_TREE
select PPC_MPC5200
default n
^ permalink raw reply related
* Re: [PATCH] mpc5200: add cuimage support for mpc5200 boards
From: Scott Wood @ 2007-08-30 21:05 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev
In-Reply-To: <20070830205550.11315.98506.stgit@trillian.cg.shawcable.net>
On Thu, Aug 30, 2007 at 02:57:40PM -0600, Grant Likely wrote:
> diff --git a/arch/powerpc/boot/mpc52xx-psc.c b/arch/powerpc/boot/mpc52xx-psc.c
> new file mode 100644
> index 0000000..46eecf0
> --- /dev/null
> +++ b/arch/powerpc/boot/mpc52xx-psc.c
> @@ -0,0 +1,89 @@
> +/*
> + * CPM serial console support.
> + *
> + * Copyright 2007 Freescale Semiconductor, Inc.
> + * Author: Scott Wood <scottwood@freescale.com>
> + *
> + * It is assumed that the firmware (or the platform file) has already set
> + * up the port.
Might want to update that comment block... :-)
-Scott
^ permalink raw reply
* Re: [PATCH v7 3/3] [POWERPC] MPC832x_RDB: update dts to use SPI1 in QE, register mmc_spi stub
From: Timur Tabi @ 2007-08-30 21:06 UTC (permalink / raw)
To: Anton Vorontsov; +Cc: linuxppc-dev
In-Reply-To: <20070823113600.GC18080@localhost.localdomain>
Anton Vorontsov wrote:
> +static int __init mpc832x_spi_init(void)
> +{
> + if (!machine_is(mpc832x_rdb))
> + return 0;
> +
> + par_io_config_pin(3, 0, 3, 0, 1, 0); /* SPI1 MOSI, I/O */
> + par_io_config_pin(3, 1, 3, 0, 1, 0); /* SPI1 MISO, I/O */
> + par_io_config_pin(3, 2, 3, 0, 1, 0); /* SPI1 CLK, I/O */
> + par_io_config_pin(3, 3, 2, 0, 1, 0); /* SPI1 SEL, I */
> +
> + par_io_config_pin(3, 13, 1, 0, 0, 0); /* !SD_CS, O */
> + par_io_config_pin(3, 14, 2, 0, 0, 0); /* SD_INSERT, I */
> + par_io_config_pin(3, 15, 2, 0, 0, 0); /* SD_PROTECT,I */
Why are you doing this here, and not in the device tree?
--
Timur Tabi
Linux Kernel Developer @ Freescale
^ permalink raw reply
* Re: [PATCH] mpc5200: add cuimage support for mpc5200 boards
From: Grant Likely @ 2007-08-30 21:15 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20070830210507.GA7757@ld0162-tx32.am.freescale.net>
On 8/30/07, Scott Wood <scottwood@freescale.com> wrote:
> On Thu, Aug 30, 2007 at 02:57:40PM -0600, Grant Likely wrote:
> > diff --git a/arch/powerpc/boot/mpc52xx-psc.c b/arch/powerpc/boot/mpc52xx-psc.c
> > new file mode 100644
> > index 0000000..46eecf0
> > --- /dev/null
> > +++ b/arch/powerpc/boot/mpc52xx-psc.c
> > @@ -0,0 +1,89 @@
> > +/*
> > + * CPM serial console support.
> > + *
> > + * Copyright 2007 Freescale Semiconductor, Inc.
> > + * Author: Scott Wood <scottwood@freescale.com>
> > + *
> > + * It is assumed that the firmware (or the platform file) has already set
> > + * up the port.
>
> Might want to update that comment block... :-)
HAHAHAHAHAHAHA! Yeah, I'll fix that. :-)
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* Re: [PATCH] mpc5200: add cuimage support for mpc5200 boards
From: Matt Sealey @ 2007-08-30 21:20 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev
In-Reply-To: <fa686aa40708301415g15df8bf1na84f437ac8f17dcb@mail.gmail.com>
+/*
+ * Old U-boot compatibility for 8200
+ *
And this one?
--
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations
Grant Likely wrote:
> On 8/30/07, Scott Wood <scottwood@freescale.com> wrote:
>> On Thu, Aug 30, 2007 at 02:57:40PM -0600, Grant Likely wrote:
>>> diff --git a/arch/powerpc/boot/mpc52xx-psc.c b/arch/powerpc/boot/mpc52xx-psc.c
>>> new file mode 100644
>>> index 0000000..46eecf0
>>> --- /dev/null
>>> +++ b/arch/powerpc/boot/mpc52xx-psc.c
>>> @@ -0,0 +1,89 @@
>>> +/*
>>> + * CPM serial console support.
>>> + *
>>> + * Copyright 2007 Freescale Semiconductor, Inc.
>>> + * Author: Scott Wood <scottwood@freescale.com>
>>> + *
>>> + * It is assumed that the firmware (or the platform file) has already set
>>> + * up the port.
>> Might want to update that comment block... :-)
>
> HAHAHAHAHAHAHA! Yeah, I'll fix that. :-)
>
> g.
>
^ permalink raw reply
* Re: [PATCH 2.6.23] ibmebus: Prevent bus_id collisions
From: Linas Vepstas @ 2007-08-30 21:28 UTC (permalink / raw)
To: Joachim Fenkes
Cc: Thomas Q Klein, Jan-Bernd Themann, Paul Mackerras, LKML,
LinuxPPC-Dev, Christoph Raisch, Nathan Lynch, Paul Mackerras,
Stefan Roscher
In-Reply-To: <OF9D1ED44F.896DCCC5-ONC1257347.0044D256-C1257347.004CFB07@de.ibm.com>
On Thu, Aug 30, 2007 at 04:00:56PM +0200, Joachim Fenkes wrote:
>
> Plus, I rather like using
> the full_name since it also contains a descriptive name as opposed to
> being just nondescript numbers, helping the layman (ie user) to make sense
> out of a dev_id.
Yes, well, but no. The location code is useful as a geographical
location: slots and devices are physically labelled with stickers
so you can tell which is which. Handy when you have to unplug stuff.
By contrast, the device-tree full_name is mostly just gobldy-gook,
with some crazy phb numbering in there that, after four years of
staring at them, I still can't reliably do anything useful with.
Location codes are nice.
--linas
^ permalink raw reply
* Re: [PATCH 2/9] cpm2: Fix off-by-one error in setbrg().
From: Vitaly Bordug @ 2007-08-30 21:52 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20070830201311.GA5144@ld0162-tx32.am.freescale.net>
On Thu, 30 Aug 2007 15:13:12 -0500
Scott Wood wrote:
> On Thu, Aug 30, 2007 at 02:09:07AM +0400, Vitaly Bordug wrote:
> > On Tue, 28 Aug 2007 15:19:21 -0500
> > Scott Wood wrote:
> >
> > > The hardware adds one to the BRG value to get the divider, so it
> > > must be subtracted by software.
> >
> > Prolly a note why it used to work, or what exactly this is
> > resulting in the code. IIRC this was just fw-ported so arch/ppc
> > should have this as well.
>
> It *didn't* work before -- hence the fix.
>
It used to work at least at the time I did initial port, but I am not going to argue.
> The failure mode from being off by just one isn't total
> nonfunctionality, but rather a corrupted character now and then,
> which could explain why it wasn't fixed before.
Can this be added to description please? Someone may be grepping for such a weirdness in some custom code forked off
some kernel.org revision, and will be happy to know it is addressed.
>
> As for arch/ppc, I'm just trying to not break it more than it already
> is.
I mean, when powerpc/ was nearly empty, same issue in ppc/ went unnoticed for years...
--
Sincerely, Vitaly
^ permalink raw reply
* The question about the relocate_code on u-boot for MPC8360?
From: 郭劲 @ 2007-08-31 2:13 UTC (permalink / raw)
To: linuxppc-embedded
Hi, Friends,
I am debuging the u-boot on freescale MPC8360, the version of u-boot is 1.2.0, the
code on flash is OK,but the code from FLASH to DDR is broken, that is, after the
relocate_code function, the u-boot start again. I tested the DDR on u-boot, it's
OK. I was wondering that hot to deal with this problem? follow is the COM output
from u-boot. Thanks.
U-Boot 1.2.0 (Aug 29 2007 - 20:50:37) MPC83XX
Clock configuration:
Coherent System Bus: 264 MHz
Core: 528 MHz
QE: 198 MHz
Local Bus Controller: 264 MHz
Local Bus: 66 MHz
DDR: 264 MHz
DDR Secondary: 264 MHz
SEC: 88 MHz
I2C1: 264 MHz
I2C2: 264 MHz
CPU: Rev: Unknown guojing modified source code
Rev: 20 at 528 MHz
Board: Freescale MPC8360EMDS
I2C: ready
DRAM:
SDRAM on Local Bus: 64 MB
DDR RAM: 256 MB
DDR test phase 1:
DDR test phase 2:
DDR test passed.
init_sequence finished
begin set up a new stack
beginning memcpy
ended memcpy,beginning relocate_code
U-Boot 1.2.0 (Aug 29 2007 - 20:50:37) MPC83XX
Clock configuration:
Coherent System Bus: 264 MHz
Core: 528 MHz
QE: 198 MHz
Local Bus Controller: 264 MHz
Local Bus: 66 MHz
DDR: 264 MHz
DDR Secondary: 264 MHz
SEC: 88 MHz
I2C1: 264 MHz
I2C2: 264 MHz
CPU: Rev: Unknown guojing modified source code
Rev: 20 at 528 MHz
Board: Freescale MPC8360EMDS
I2C: ready
DRAM:
SDRAM on Local Bus: 64 MB
DDR RAM: 256 MB
DDR test phase 1:
DDR test phase 2:
DDR test passed.
init_sequence finished
begin set up a new stack
beginning memcpy
ended memcpy,beginning relocate_code
^ permalink raw reply
* Re: [PATCH 1/3] bootwrapper: In cuImage, print message for ENET devices not found in tree
From: David Gibson @ 2007-08-31 2:43 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev
In-Reply-To: <20070830202618.9927.32588.stgit@trillian.cg.shawcable.net>
On Thu, Aug 30, 2007 at 02:26:18PM -0600, Grant Likely wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> CC: Scott Wood <scottwood@freescale.com>
> CC: Kumar Gala <galak@kernel.crashing.org>
> CC: David Gibson <david@gibson.dropbear.id.au>
Hrm... I thought Scott had deliberately removed that message in his
patch set, to work with the way PlanetCore generates Ethernet
addresses.
> ---
>
> arch/powerpc/boot/devtree.c | 14 +++++++-------
> 1 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/arch/powerpc/boot/devtree.c b/arch/powerpc/boot/devtree.c
> index e1b8122..8451a1c 100644
> --- a/arch/powerpc/boot/devtree.c
> +++ b/arch/powerpc/boot/devtree.c
> @@ -99,14 +99,14 @@ void __dt_fixup_mac_addresses(u32 startindex, ...)
> while ((addr = va_arg(ap, const u8 *))) {
> devp = find_node_by_prop_value(NULL, "linux,network-index",
> (void*)&index, sizeof(index));
> -
> - printf("ENET%d: local-mac-address <-"
> - " %02x:%02x:%02x:%02x:%02x:%02x\n\r", index,
> - addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
> -
> - if (devp)
> + if (devp) {
> + printf("ENET%d: local-mac-address <-"
> + " %02x:%02x:%02x:%02x:%02x:%02x\n\r", index,
> + addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
> setprop(devp, "local-mac-address", addr, 6);
> -
> + } else {
> + printf("ENET%d: no device in tree\n\r", index);
> + }
> index++;
> }
> va_end(ap);
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH 2/3] mpc8349: Add linux, network-index to ethernet nodes in device tree
From: David Gibson @ 2007-08-31 2:44 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev
In-Reply-To: <20070830202624.9927.50088.stgit@trillian.cg.shawcable.net>
On Thu, Aug 30, 2007 at 02:26:24PM -0600, Grant Likely wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
>
> cuImage need to know the logical index of the ethernet devices in order
> to assign mac addresses. This patch adds the needed properties
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> CC: Scott Wood <scottwood@freescale.com>
> CC: Kumar Gala <galak@kernel.crashing.org>
> CC: Timur Tabi <timur@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH 2/3] Introduce new CPM device bindings.
From: David Gibson @ 2007-08-31 2:48 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20070830141046.GA24123@ld0162-tx32.am.freescale.net>
On Thu, Aug 30, 2007 at 09:10:46AM -0500, Scott Wood wrote:
> On Thu, Aug 30, 2007 at 03:58:12PM +1000, David Gibson wrote:
> > On Thu, Aug 30, 2007 at 12:48:54AM -0500, Scott Wood wrote:
> > > On Thu, Aug 30, 2007 at 10:55:59AM +1000, David Gibson wrote:
> > > > Am I correct in thinking that it's basically an arch/ppc versus
> > > > arch/powerpc thing. In which case couldn't you use CONFIG_PPC_MERGE
> > > > instead?
> > >
> > > The idea was to allow boards to be converted incrementally, as I don't
> > > have access to test 100% of the boards that use the CPM code.
> >
> > Hrm. Right. This is still problematical, because what happens if you
> > have both old-binding and new-binding boards configured simultaneously?
>
> Multiplatform will not be supported for old-binding boards.
Hmm, ok. Well, let's try to kill the old binding off as fast as we
can, at least the portions that still infect arch/powerpc.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: Document and implement an improved flash device binding for powerpc (v4)
From: David Gibson @ 2007-08-31 2:58 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20070830172932.GA3317@ld0162-tx32.am.freescale.net>
On Thu, Aug 30, 2007 at 12:29:33PM -0500, Scott Wood wrote:
> On Thu, Aug 30, 2007 at 11:21:18AM +1000, David Gibson wrote:
> > + For JEDEC compatible devices, the following additional properties
> > + are defined:
> > +
> > + - vendor-id : Contains the flash chip's vendor id (1 byte).
> > + - device-id : Contains the flash chip's device id (1 byte).
>
> Are these required, or recommended?
Heh.. that's an interesting question. I think they're a "SHOULD" in
rfc terminology. According to Segher, this information should be
provided for any JEDEC chip. However, it can, in practice, be probed
by the mtd code, and in fact there's no obvious way of actually
specifying these to the mtd code, so these properties aren't ever
actually used (at present, anyway).
> > + In addition to the information on the flash bank itself, the
> > + device tree may optionally contain additional information
> > + describing partitions of the flash address space. This can be
> > + used on platforms which have strong conventions about which
> > + portions of the flash are used for what purposes, but which don't
> > + use an on-flash partition table such as RedBoot.
> > +
> > + Each partition is represented as a sub-node of the flash device.
> > + Each node's name represents the name of the corresponding
> > + partition of the flash device.
>
> Hmm... I'm not thrilled with using the node name for this. For one, the
> node name usually functions more as a node type than a label. It also
> means that spaces can't be used in the name, which is fairly common for
> existing partition maps.
>
> This might be a good time to introduce a standard "label" property.
Hrm, yeah, that's not a bad idea. I'm thinking 'label' is used if
present, otherwise it falls back to the node name.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH 6/9] bootwrapper: Add a zImage.bin.<platform> target.
From: David Gibson @ 2007-08-31 3:24 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, paulus
In-Reply-To: <20070830142115.GB24123@ld0162-tx32.am.freescale.net>
On Thu, Aug 30, 2007 at 09:21:15AM -0500, Scott Wood wrote:
> On Thu, Aug 30, 2007 at 10:34:09AM +1000, David Gibson wrote:
> > Hrm.. I think the --binary option at least should be removed, and
> > subsumed into the platform id - all other binary formats are selected
> > by the platform name at present.
> >
> > And I think it's probably best to do that for --fixed-entry as well,
> > although it's a bit less clear there.
>
> I'm not particularly fond of having huge platform switch blocks in the
> wrapper script -- if it can be reasonably parameterized, why not do so?
Because I'd prefer to keep as much of the per-platform details (what
binary format is needed and so forth) concentrated in wrapper, rather
than scattered across multiple places. I agree we're not really doing
it the best way - I had some ideas for a nicer way to rewrite wrapper,
but I haven't had a chance to implement it yet.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* [PATCH -mm] pcmcia: Updates to electra_cf driver
From: Olof Johansson @ 2007-08-31 2:43 UTC (permalink / raw)
To: akpm; +Cc: linuxppc-dev, linux-pcmcia, linux-kernel
In-Reply-To: <20070705144914.GA14284@lixom.net>
Fix build of electra_cf, since the IO space setup interfaces were
changed when BenH rewrote it.
Also clean it up a bit, add 5V support, make it unloadable, remove some
dead variables, etc.
Signed-off-by: Olof Johansson <olof@lixom.net>
---
Andrew,
I did this as an incremental patch that you can just merge into the base
one that's already in -mm, but I could merge and resubmit the base patch
instead if you prefer.
(The base patch is
pcmcia-compactflash-driver-for-pa-semi-electra-boards.patch)
-Olof
Index: linux-2.6/drivers/pcmcia/electra_cf.c
===================================================================
--- linux-2.6.orig/drivers/pcmcia/electra_cf.c
+++ linux-2.6/drivers/pcmcia/electra_cf.c
@@ -28,6 +28,7 @@
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
+#include <linux/vmalloc.h>
#include <pcmcia/ss.h>
#include <asm/of_platform.h>
@@ -105,10 +106,8 @@ static int electra_cf_get_status(struct
/* NOTE CF is always 3VCARD */
if (electra_cf_present(cf)) {
- struct electra_cf_socket *cf;
-
*sp = SS_READY | SS_DETECT | SS_POWERON | SS_3VCARD;
- cf = container_of(s, struct electra_cf_socket, socket);
+
s->pci_irq = cf->irq;
} else
*sp = 0;
@@ -134,8 +133,10 @@ static int electra_cf_set_socket(struct
case 33:
gpio = (1 << cf->gpio_3v);
break;
+ case 5:
+ gpio = (1 << cf->gpio_5v);
+ break;
default:
- /* CF is 3.3V only */
return -EINVAL;
}
@@ -188,6 +189,7 @@ static int __devinit electra_cf_probe(st
int status;
const unsigned int *prop;
int err;
+ struct vm_struct *area;
err = of_address_to_resource(np, 0, &mem);
if (err)
@@ -206,22 +208,27 @@ static int __devinit electra_cf_probe(st
cf->ofdev = ofdev;
cf->mem_phys = mem.start;
- cf->mem_base = ioremap(mem.start, mem.end - mem.start);
+ cf->mem_size = PAGE_ALIGN(mem.end - mem.start);
+ cf->mem_base = ioremap(cf->mem_phys, cf->mem_size);
cf->io_size = PAGE_ALIGN(io.end - io.start);
- cf->io_virt = reserve_phb_iospace(cf->io_size);
+ area = __get_vm_area(cf->io_size, 0, PHB_IO_BASE, PHB_IO_END);
+ if (area == NULL)
+ return -ENOMEM;
+
+ cf->io_virt = (void __iomem *)(area->addr);
cf->gpio_base = ioremap(0xfc103000, 0x1000);
dev_set_drvdata(device, cf);
- if (!cf->mem_base || !cf->io_virt || !cf->gpio_base) {
+ if (!cf->mem_base || !cf->io_virt || !cf->gpio_base ||
+ (__ioremap_at(io.start, cf->io_virt, cf->io_size,
+ _PAGE_NO_CACHE | _PAGE_GUARDED) == NULL)) {
dev_err(device, "can't ioremap ranges\n");
status = -ENOMEM;
goto fail1;
}
- __ioremap_explicit(io.start, (unsigned long)cf->io_virt, cf->io_size,
- _PAGE_NO_CACHE | _PAGE_GUARDED);
cf->io_base = (unsigned long)cf->io_virt - VMALLOC_END;
@@ -263,8 +270,7 @@ static int __devinit electra_cf_probe(st
cf->socket.io_offset = cf->io_base;
/* reserve chip-select regions */
- if (!request_mem_region(mem.start, mem.end + 1 - mem.start,
- driver_name)) {
+ if (!request_mem_region(cf->mem_phys, cf->mem_size, driver_name)) {
status = -ENXIO;
dev_err(device, "Can't claim memory region\n");
goto fail1;
@@ -291,21 +297,22 @@ static int __devinit electra_cf_probe(st
}
dev_info(device, "at mem 0x%lx io 0x%lx irq %d\n",
- mem.start, io.start, cf->irq);
+ cf->mem_phys, io.start, cf->irq);
cf->active = 1;
electra_cf_timer((unsigned long)cf);
return 0;
fail3:
- release_mem_region(io.start, io.end + 1 - io.start);
+ release_region(cf->io_base, cf->io_size);
fail2:
- release_mem_region(mem.start, mem.end + 1 - mem.start);
+ release_mem_region(cf->mem_phys, cf->mem_size);
fail1:
if (cf->irq != NO_IRQ)
free_irq(cf->irq, cf);
- /* XXX No way to undo the ioremap_explicit at this time */
+ if (cf->io_virt)
+ __iounmap_at(cf->io_virt, cf->io_size);
if (cf->mem_base)
iounmap(cf->mem_base);
if (cf->gpio_base)
@@ -328,6 +335,7 @@ static int __devexit electra_cf_remove(s
free_irq(cf->irq, cf);
del_timer_sync(&cf->timer);
+ __iounmap_at(cf->io_virt, cf->io_size);
iounmap(cf->mem_base);
iounmap(cf->gpio_base);
release_mem_region(cf->mem_phys, cf->mem_size);
Index: linux-2.6/drivers/pcmcia/Kconfig
===================================================================
--- linux-2.6.orig/drivers/pcmcia/Kconfig
+++ linux-2.6/drivers/pcmcia/Kconfig
@@ -272,8 +272,8 @@ config AT91_CF
Or choose M to compile the driver as a module named "at91_cf".
config ELECTRA_CF
- bool "Electra CompactFlash Controller"
- depends on PCMCIA=y && PPC_PASEMI
+ tristate "Electra CompactFlash Controller"
+ depends on PCMCIA && PPC_PASEMI
help
Say Y here to support the CompactFlash controller on the
PA Semi Electra eval board.
^ permalink raw reply
* [PATCH] Remove unused variables in driver/ide/ppc/pmac.c
From: Tony Breeds @ 2007-08-31 3:37 UTC (permalink / raw)
To: LinuxPPC-dev, Paul Mackerras, Andrew Morton
Fixes:
CC [M] drivers/ide/ppc/pmac.o
/scratch/tony/tmp/drivers/ide/ppc/pmac.c: In function 'pmac_ide_dma_check':
/scratch/tony/tmp/drivers/ide/ppc/pmac.c:1815: warning: unused variable 'map'
/scratch/tony/tmp/drivers/ide/ppc/pmac.c:1813: warning: unused variable 'pmif'
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
drivers/ide/ppc/pmac.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index 33630ad..0f5a6b4 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -1810,9 +1810,7 @@ pmac_ide_dma_check(ide_drive_t *drive)
{
struct hd_driveid *id = drive->id;
ide_hwif_t *hwif = HWIF(drive);
- pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)hwif->hwif_data;
int enable = 1;
- int map;
drive->using_dma = 0;
if (drive->media == ide_floppy)
--
1.5.2.5
Yours Tony
linux.conf.au http://linux.conf.au/ || http://lca2008.linux.org.au/
Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!
^ permalink raw reply related
* Re: [PATCH 1/3] bootwrapper: In cuImage, print message for ENET devices not found in tree
From: Grant Likely @ 2007-08-31 4:14 UTC (permalink / raw)
To: Grant Likely, linuxppc-dev, Scott Wood
In-Reply-To: <20070831024356.GA19271@localhost.localdomain>
On 8/30/07, David Gibson <david@gibson.dropbear.id.au> wrote:
> On Thu, Aug 30, 2007 at 02:26:18PM -0600, Grant Likely wrote:
> > From: Grant Likely <grant.likely@secretlab.ca>
> >
> > Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> > CC: Scott Wood <scottwood@freescale.com>
> > CC: Kumar Gala <galak@kernel.crashing.org>
> > CC: David Gibson <david@gibson.dropbear.id.au>
>
> Hrm... I thought Scott had deliberately removed that message in his
> patch set, to work with the way PlanetCore generates Ethernet
> addresses.
I'm confused then. The code either sets the property or it doesn't.
>From what I can see, the message doesn't make any sense in the context
of *not* calling setprop(). How does PlanetCore work? Scott?
g.
>
> > ---
> >
> > arch/powerpc/boot/devtree.c | 14 +++++++-------
> > 1 files changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/arch/powerpc/boot/devtree.c b/arch/powerpc/boot/devtree.c
> > index e1b8122..8451a1c 100644
> > --- a/arch/powerpc/boot/devtree.c
> > +++ b/arch/powerpc/boot/devtree.c
> > @@ -99,14 +99,14 @@ void __dt_fixup_mac_addresses(u32 startindex, ...)
> > while ((addr = va_arg(ap, const u8 *))) {
> > devp = find_node_by_prop_value(NULL, "linux,network-index",
> > (void*)&index, sizeof(index));
> > -
> > - printf("ENET%d: local-mac-address <-"
> > - " %02x:%02x:%02x:%02x:%02x:%02x\n\r", index,
> > - addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
> > -
> > - if (devp)
> > + if (devp) {
> > + printf("ENET%d: local-mac-address <-"
> > + " %02x:%02x:%02x:%02x:%02x:%02x\n\r", index,
> > + addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
> > setprop(devp, "local-mac-address", addr, 6);
> > -
> > + } else {
> > + printf("ENET%d: no device in tree\n\r", index);
> > + }
> > index++;
> > }
> > va_end(ap);
> >
> > _______________________________________________
> > Linuxppc-dev mailing list
> > Linuxppc-dev@ozlabs.org
> > https://ozlabs.org/mailman/listinfo/linuxppc-dev
> >
>
> --
> David Gibson | I'll have my music baroque, and my code
> david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
> | _way_ _around_!
> http://www.ozlabs.org/~dgibson
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* Re: [PATCH 1/3] bootwrapper: In cuImage, print message for ENET devices not found in tree
From: David Gibson @ 2007-08-31 4:25 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev
In-Reply-To: <fa686aa40708302114g77b916bftb01c14e1b3357506@mail.gmail.com>
On Thu, Aug 30, 2007 at 10:14:41PM -0600, Grant Likely wrote:
> On 8/30/07, David Gibson <david@gibson.dropbear.id.au> wrote:
> > On Thu, Aug 30, 2007 at 02:26:18PM -0600, Grant Likely wrote:
> > > From: Grant Likely <grant.likely@secretlab.ca>
> > >
> > > Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> > > CC: Scott Wood <scottwood@freescale.com>
> > > CC: Kumar Gala <galak@kernel.crashing.org>
> > > CC: David Gibson <david@gibson.dropbear.id.au>
> >
> > Hrm... I thought Scott had deliberately removed that message in his
> > patch set, to work with the way PlanetCore generates Ethernet
> > addresses.
>
> I'm confused then. The code either sets the property or it doesn't.
> >From what I can see, the message doesn't make any sense in the context
> of *not* calling setprop(). How does PlanetCore work? Scott?
Sorry, I was misleading. Scott moved the printf() into the if (devp)
as you do, but *didn't* add the alternative warning message in the
else.
The reason for this is that Planetcore only supplies the first MAC
address, and the bootwrapper must derive the addresses for all the
ENETs from that. That in turn means it is much more convenient to
call fixup_mac_addresses() with more addresses than there are
ethernets, so we don't want a warning message when that happens.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* libfdt: Fix use of uninitialized variable in fdt_get_path()
From: David Gibson @ 2007-08-31 4:30 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev
My recent implemenetation of fdt_get_path() had a bug - the while loop
tested offset which was unitialized on the first iteration. Depending
on code surrounding the call, this could cause fdt_get_path() to
return incorrect results.
This patch corrects the problem by applying some more correct thinking
to the loop condition.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Index: dtc/libfdt/fdt_ro.c
===================================================================
--- dtc.orig/libfdt/fdt_ro.c 2007-08-31 14:26:26.000000000 +1000
+++ dtc/libfdt/fdt_ro.c 2007-08-31 14:26:31.000000000 +1000
@@ -302,7 +302,7 @@
buf[0] = '/';
p = 1;
- while (offset < nodeoffset) {
+ while (nextoffset <= nodeoffset) {
offset = nextoffset;
tag = _fdt_next_tag(fdt, offset, &nextoffset);
switch (tag) {
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* [PATCH] export new __io{re,un}map_at() symbols
From: Olof Johansson @ 2007-08-31 3:58 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
Export new __io{re,un}map_at() symbols so modules can use them.
Signed-off-by: Olof Johansson <olof@lixom.net>
Index: mainline/arch/powerpc/mm/pgtable_64.c
===================================================================
--- mainline.orig/arch/powerpc/mm/pgtable_64.c
+++ mainline/arch/powerpc/mm/pgtable_64.c
@@ -228,5 +228,7 @@ void iounmap(volatile void __iomem *toke
EXPORT_SYMBOL(ioremap);
EXPORT_SYMBOL(ioremap_flags);
EXPORT_SYMBOL(__ioremap);
+EXPORT_SYMBOL(__ioremap_at);
EXPORT_SYMBOL(iounmap);
EXPORT_SYMBOL(__iounmap);
+EXPORT_SYMBOL(__iounmap_at);
^ permalink raw reply
* RE: STK5200 pci_enable_device problem
From: Mustafa Cayir @ 2007-08-31 5:38 UTC (permalink / raw)
To: Oliver Rutsch, linuxppc-embedded
In-Reply-To: <46D68BA6.4020102@sympatec.com>
[-- Attachment #1: Type: text/plain, Size: 941 bytes --]
Hello Oliver,
My problems continue, could you summarize your steps to bring up the board?
which u-boot version is used?
how build tqm5200.dts file?
did you test pci bus?
Thanks.
-----Original Message-----
From: linuxppc-embedded-bounces+mustafa.cayir=bte.mam.gov.tr@ozlabs.org on behalf of Oliver Rutsch
Sent: Thu 8/30/2007 12:19 PM
To: linuxppc-embedded@ozlabs.org
Subject: Re: STK5200 pci_enable_device problem
Hi again,
>
> As mentioned above, with arch/powerpc you always need a device tree
> blob.
>
> Best regards,
>
> Wolfgang Denk
>
Thanks, Wolfang, now it's booting fine!
I've updated u-boot to the newest git version, builded the device tree
file and now everything's working.
Bye,
--
Dipl. Ing. Oliver Rutsch
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
[-- Attachment #2: Type: text/html, Size: 1575 bytes --]
^ permalink raw reply
* dtc: Make make print a message when linking testcases
From: David Gibson @ 2007-08-31 6:04 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev
Currently, dtc relies on make's implicit rule to build the testcases.
This means that when not making verbosely (V=0, the default) there is
no message at all while relinking the testsuites. This can be very
confusing when updating libfdt.a (upon which the testcases depend) and
make appears to do nothing.
This patch corrects the situation, borrowing the rule used to link dtc
itself to link all the testcases as well.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Index: dtc/Makefile
===================================================================
--- dtc.orig/Makefile 2007-08-31 15:58:40.000000000 +1000
+++ dtc/Makefile 2007-08-31 15:58:59.000000000 +1000
@@ -101,8 +101,6 @@
$(LEX) $<
dtc: $(DTC_OBJS)
- @$(VECHO) LD $@
- $(LINK.c) -o $@ $^
ftdump: ftdump.o
@@ -168,6 +166,10 @@
#
# Generic compile rules
#
+%: %.o
+ @$(VECHO) LD $@
+ $(LINK.c) -o $@ $^
+
%.o: %.c
@$(VECHO) CC $@
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* dtc: Optimise by default, fix warnings thus uncovered
From: David Gibson @ 2007-08-31 6:21 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev
This patch turns on optimisation in the Makefile by default. With the
optimizer on, some uninitialized variable warnings (one real, two
bogus) are now generated. This patch also squashes those again.
Index: dtc/Makefile
===================================================================
--- dtc.orig/Makefile 2007-08-31 16:00:25.000000000 +1000
+++ dtc/Makefile 2007-08-31 16:00:28.000000000 +1000
@@ -45,7 +45,7 @@
CPPFLAGS = -I libfdt
-CFLAGS = -Wall -g
+CFLAGS = -Wall -g -Os
LDFLAGS = -Llibfdt
BISON = bison
Index: dtc/tests/truncated_property.c
===================================================================
--- dtc.orig/tests/truncated_property.c 2007-08-31 16:05:27.000000000 +1000
+++ dtc/tests/truncated_property.c 2007-08-31 16:05:38.000000000 +1000
@@ -33,7 +33,6 @@
{
void *fdt = &_truncated_property;
const void *prop;
- int err;
int len;
test_init(argc, argv);
@@ -43,7 +42,7 @@
FAIL("fdt_getprop() succeeded on truncated property");
if (len != -FDT_ERR_BADSTRUCTURE)
FAIL("fdt_getprop() failed with \"%s\" instead of \"%s\"",
- fdt_strerror(err), fdt_strerror(-FDT_ERR_BADSTRUCTURE));
+ fdt_strerror(len), fdt_strerror(-FDT_ERR_BADSTRUCTURE));
PASS();
}
Index: dtc/flattree.c
===================================================================
--- dtc.orig/flattree.c 2007-08-31 16:08:06.000000000 +1000
+++ dtc/flattree.c 2007-08-31 16:09:29.000000000 +1000
@@ -909,6 +909,7 @@
fprintf(stderr, "\tboot_cpuid_phys:\t0x%x\n",
be32_to_cpu(bph->boot_cpuid_phys));
+ size_str = -1;
if (version >= 3) {
size_str = be32_to_cpu(bph->size_dt_strings);
fprintf(stderr, "\tsize_dt_strings:\t%d\n", size_str);
@@ -932,10 +933,10 @@
inbuf_init(&memresvbuf,
blob + off_mem_rsvmap, blob + totalsize);
inbuf_init(&dtbuf, blob + off_dt, blob + totalsize);
- inbuf_init(&strbuf, blob + off_str, blob + totalsize);
-
- if (version >= 3)
- strbuf.limit = strbuf.base + size_str;
+ if (size_str >= 0)
+ inbuf_init(&strbuf, blob + off_str, blob + off_str + size_str);
+ else
+ inbuf_init(&strbuf, blob + off_str, blob + totalsize);
reservelist = flat_read_mem_reserve(&memresvbuf);
Index: dtc/dtc.c
===================================================================
--- dtc.orig/dtc.c 2007-08-31 16:10:23.000000000 +1000
+++ dtc/dtc.c 2007-08-31 16:12:44.000000000 +1000
@@ -71,7 +71,7 @@
fill_fullpaths(child, tree->fullpath);
}
-static void usage(void)
+static void __attribute__ ((noreturn)) usage(void)
{
fprintf(stderr, "Usage:\n");
fprintf(stderr, "\tdtc [options] <input file>\n");
Index: dtc/dtc.h
===================================================================
--- dtc.orig/dtc.h 2007-08-31 16:13:01.000000000 +1000
+++ dtc/dtc.h 2007-08-31 16:13:07.000000000 +1000
@@ -43,7 +43,7 @@
extern int reservenum; /* Number of memory reservation slots */
extern int minsize; /* Minimum blob size */
-static inline void die(char * str, ...)
+static inline void __attribute__((noreturn)) die(char * str, ...)
{
va_list ap;
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
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