[PATCH] prom_init: evaluate mem kernel parameter for early allocation

2009-07-17 Thread Benjamin Krill
Evaluate mem kernel parameter for early memory allocations. If mem is set no allocation in the region above the given boundary is allowed. The current code doesn't take care about this and allocate memory above the given mem boundary. Signed-off-by: Benjamin Krill --- arch/powerpc/kernel/prom_in

Re: [PATCH 2/2 v4] MPC52xx FEC: be more conservative when setting MII_SPEED register

2009-07-17 Thread Grant Likely
On Fri, Jul 17, 2009 at 11:51 AM, Wolfgang Denk wrote: > Dear Grant Likely, > > In message you > wrote: >> >> >  drivers/net/fec_mpc52xx.c     |   25 ++--- >> >  drivers/net/fec_mpc52xx_phy.c |   23 --- >> >> Blech.  now this block of duplicated code I don'

Re: kernel2.6.30 can not boot on my mpc8260 board using u-boot2009.06

2009-07-17 Thread Scott Wood
On Fri, Jul 17, 2009 at 09:53:52AM +0800, jerry_dw wrote: > Updating property 'current-speed' = 00 00 25 80 > > Updating property 'clock-frequency' = 01 79 a7 b0 > > Updating property 'bus-frequency' = 03 ef 14 80

Re: [PATCH 2/2 v4] MPC52xx FEC: be more conservative when setting MII_SPEED register

2009-07-17 Thread Wolfgang Denk
Dear Grant Likely, In message you wrote: > > > drivers/net/fec_mpc52xx.c | 25 ++--- > > drivers/net/fec_mpc52xx_phy.c | 23 --- > > Blech. now this block of duplicated code I don't like. This is all > one device, so surely the mdio speed can be

Re: [PATCH 1/2 v5] fs_enet/mii-fec.c: fix MII speed calculation

2009-07-17 Thread David Miller
From: Grant Likely Date: Fri, 17 Jul 2009 08:41:08 -0600 > On Fri, Jul 17, 2009 at 6:27 AM, Wolfgang Denk wrote: >> The MII speed calculation was based on the CPU clock (ppc_proc_freq), >> but for MPC512x we must use the bus clock instead. >> >> This patch makes it use the correct clock and makes

Re: [PATCH 1/2 v5] fs_enet/mii-fec.c: fix MII speed calculation

2009-07-17 Thread David Miller
From: Grant Likely Date: Fri, 17 Jul 2009 08:41:08 -0600 > David, this isn't a critical bug fix or a regression, so I think it > should be merged for -next. Ok. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listin

Re: [PATCH] powerpc/cell: strncpy does not null terminate string

2009-07-17 Thread Arnd Bergmann
On Friday 17 July 2009, Roel Kluin wrote: > > static int __init celleb_machine_type_hack(char *ptr) > { > - strncpy(celleb_machine_type, ptr, sizeof(celleb_machine_type)); > + strlcpy(celleb_machine_type, ptr, sizeof(celleb_machine_type)); > celleb_machine_type[sizeof(celleb_

Re: [PATCH] powerpc/cell: strncpy does not null terminate string

2009-07-17 Thread roel kluin
>> With `sizeof(string) - 1` strncpy() will null terminate the string. > > No, it won't. > See the line after the strncpy. This is still required for proper > zero-termination. You're right, sorry for the noise. Roel ___ Linuxppc-dev mailing list Linu

Re: [PATCH] powerpc/cell: strncpy does not null terminate string

2009-07-17 Thread Arnd Bergmann
On Friday 17 July 2009, Roel Kluin wrote: > With `sizeof(string) - 1` strncpy() will null terminate the string. No, it won't. See the 'Warning' part of the strncpy man page. > Signed-off-by: Roel Kluin > --- > To test this: > > #include > #include > > char a[10]; > char b[10]; > > int main(

Re: [PATCH 2/2 v4] MPC52xx FEC: be more conservative when setting MII_SPEED register

2009-07-17 Thread Grant Likely
On Fri, Jul 17, 2009 at 6:59 AM, Wolfgang Denk wrote: > This patch adds error checking and prevents clobbering unrelated bits > (reserved bits or the DIS_PREAMBLE bit) when writing the MII_SPEED > register on MPC52xx systems. > > Signed-off-by: Wolfgang Denk > Cc: Grant Likely > Cc: Kumar Gala >

Re: [PATCH 1/2 v5] fs_enet/mii-fec.c: fix MII speed calculation

2009-07-17 Thread Grant Likely
On Fri, Jul 17, 2009 at 6:27 AM, Wolfgang Denk wrote: > The MII speed calculation was based on the CPU clock (ppc_proc_freq), > but for MPC512x we must use the bus clock instead. > > This patch makes it use the correct clock and makes sure we don't > clobber reserved bits in the MII_SPEED register.

Re: [PATCH] powerpc/cell: strncpy does not null terminate string

2009-07-17 Thread Roel Kluin
strlcpy() will always null terminate the string. Signed-off-by: Roel Kluin --- Please use this one instead diff --git a/arch/powerpc/platforms/cell/celleb_setup.c b/arch/powerpc/platforms/cell/celleb_setup.c index 07c234f..1896cd8 100644 --- a/arch/powerpc/platforms/cell/celleb_setup.c +++ b/ar

[PATCH 2/2 v4] MPC52xx FEC: be more conservative when setting MII_SPEED register

2009-07-17 Thread Wolfgang Denk
This patch adds error checking and prevents clobbering unrelated bits (reserved bits or the DIS_PREAMBLE bit) when writing the MII_SPEED register on MPC52xx systems. Signed-off-by: Wolfgang Denk Cc: Grant Likely Cc: Kumar Gala Cc: --- v3: - use maximum divider in case MPC512x IPS clock is unkn

[PATCH] powerpc/cell: strncpy does not null terminate string

2009-07-17 Thread Roel Kluin
With `sizeof(string) - 1` strncpy() will null terminate the string. Signed-off-by: Roel Kluin --- To test this: #include #include char a[10]; char b[10]; int main() { const char* str = "0123456789012"; strncpy(a, str, sizeof(a)); strncpy(b, str, sizeof(b) - 1);

[PATCH] mtd/maps: add mtd-ram support to physmap_of

2009-07-17 Thread Wolfram Sang
Use physmap_of to access RAMs as mtd and add documenation for it. This approach is a lot less intrusive as adding an of-wrapper around plat-ram.c. As most extensions of plat-ram.c (e.g. custom map-functions) can't be mapped to the device tree anyhow, extending physmap_of seems to be the cleanest ap

Re: [PATCH 2/2 v2] MPC52xx FEC: be more conservative when setting MII_SPEED register

2009-07-17 Thread Wolfgang Denk
Dear Wolfram Sang, In message <20090717094725.gc3...@pengutronix.de> you wrote: > > In the probe-function when mdio_speed is set, there is still the old formula > used. Wouldn't that be better in sync? Good point. Next version of patch following soon. Best regards, Wolfgang Denk -- DENX Soft

Re: [PATCH 1/2 v4] fs_enet/mii-fec.c: fix MII speed calculation

2009-07-17 Thread Wolfgang Denk
Dear Wolfram Sang, In message <20090717093307.gb3...@pengutronix.de> you wrote: > ... > > @@ -188,6 +209,12 @@ static struct of_device_id fs_enet_mdio_fec_match[] = { > > { > > .compatible = "fsl,pq1-fec-mdio", > > }, > > +#if defined(CONFIG_PPC_MPC512x) > > + { > > +

[PATCH 1/2 v5] fs_enet/mii-fec.c: fix MII speed calculation

2009-07-17 Thread Wolfgang Denk
The MII speed calculation was based on the CPU clock (ppc_proc_freq), but for MPC512x we must use the bus clock instead. This patch makes it use the correct clock and makes sure we don't clobber reserved bits in the MII_SPEED register. Signed-off-by: Wolfgang Denk Cc: Grant Likely Cc: Kumar Gal

[PATCH 2/2 v3] MPC52xx FEC: be more conservative when setting MII_SPEED register

2009-07-17 Thread Wolfgang Denk
This patch adds error checking and prevents clobbering unrelated bits (reserved bits or the DIS_PREAMBLE bit) when writing the MII_SPEED register on MPC52xx systems. Signed-off-by: Wolfgang Denk Cc: Grant Likely Cc: Kumar Gala Cc: --- v3: - use maximum divider in case MPC512x IPS clock is unkn

Re: [PATCH 2/2 v2] MPC52xx FEC: be more conservative when setting MII_SPEED register

2009-07-17 Thread Wolfgang Denk
Dear Grant Likely, In message you wrote: > > Mostly good. One comment below. When it's resolved, feel free to add > my acked-by line. Thanks for getting this done. ... > Just thought of something. If it cannot find the clock, then wouldn't > it be better to just use the maximum divider and

Re: [PATCH 1/2 v4] fs_enet/mii-fec.c: fix MII speed calculation

2009-07-17 Thread Wolfgang Denk
Dear Grant Likely, In message you wrote: > > I assume this is tested. I have not tested this on my board, and I've It was tested, but as it turns out not quite well :-( > got one question below, but otherwise I think I can say ... > The calculation has changed here for non mpc5121 users.

USB Device not working in MPC8280 PowerPC

2009-07-17 Thread Gurumurthy Gowdar
Dear LinuxPPC members, am facing problem on writing USB device port driver for MPC8280,when i connect it to the host PC through USB cable .device descriptor is happening host is setting the address but device configuration is not happening properly...it hangs t

RE::New dma-noncoherent code, looking for comment and people to test

2009-07-17 Thread Zaahir Khan
Hi Remi Machet, I am using sequoia PPC440EPx. with CONFIG_NOT_COHERENT_CACHE=y I applied your patch file -->arch/powerpc/lib/dma-noncoherent.c After applying my board is not booting up on NFS. If I use the old file its booting up normal. Is this a bug or I missed something. Error

Re: [PATCH 2/2 v2] MPC52xx FEC: be more conservative when setting MII_SPEED register

2009-07-17 Thread Wolfram Sang
Hi Wolfgang, On Thu, Jul 16, 2009 at 11:42:26PM +0200, Wolfgang Denk wrote: > This patch adds error checking and prevents clobbering unrelated bits > (reserved bits or the DIS_PREAMBLE bit) when writing the MII_SPEED > register on MPC52xx systems. > > Signed-off-by: Wolfgang Denk > Cc: Grant Li

Re: [PATCH 1/2 v4] fs_enet/mii-fec.c: fix MII speed calculation

2009-07-17 Thread Wolfram Sang
Hi, On Thu, Jul 16, 2009 at 11:42:25PM +0200, Wolfgang Denk wrote: > The MII speed calculation was based on the CPU clock (ppc_proc_freq), > but for MPC512x we must use the bus clock instead. > > This patch makes it use the correct clock and makes sure we don't > clobber reserved bits in the MII_

Re: [PATCH] kmemleak: Allow kmemleak to be built on powerpc

2009-07-17 Thread Catalin Marinas
On Fri, 2009-07-17 at 18:32 +1000, Michael Ellerman wrote: > On Fri, 2009-07-17 at 09:26 +0100, Catalin Marinas wrote: > > On Fri, 2009-07-17 at 10:29 +1000, Michael Ellerman wrote: > > > The wrinkle is that lmb never frees, so by definition it can't leak :) > > > > You can pass min_count = 0 to k

Re: [PATCH] kmemleak: Allow kmemleak to be built on powerpc

2009-07-17 Thread Michael Ellerman
On Fri, 2009-07-17 at 09:26 +0100, Catalin Marinas wrote: > On Fri, 2009-07-17 at 10:29 +1000, Michael Ellerman wrote: > > On Thu, 2009-07-16 at 18:52 +0100, Catalin Marinas wrote: > > > On Thu, 2009-07-16 at 17:43 +1000, Michael Ellerman wrote: > > > > On Thu, 2009-07-16 at 11:25 +1000, Michael El

Re: [PATCH] kmemleak: Allow kmemleak to be built on powerpc

2009-07-17 Thread Catalin Marinas
On Fri, 2009-07-17 at 10:29 +1000, Michael Ellerman wrote: > On Thu, 2009-07-16 at 18:52 +0100, Catalin Marinas wrote: > > On Thu, 2009-07-16 at 17:43 +1000, Michael Ellerman wrote: > > > On Thu, 2009-07-16 at 11:25 +1000, Michael Ellerman wrote: > > > > Very lightly tested, doesn't crash the kerne

Re: rtas instantiation when commandline contains mem

2009-07-17 Thread Michael Ellerman
On Fri, 2009-07-17 at 08:36 +0200, Benjamin Krill wrote: > >> the rtas instantiation (prom_init.c) doesn't work correctly if the > >> kernel parameter "mem=" is used. The current code doesn't evaluate > >> the kernel parameter which causes the issue that alloc_down > >> allocates somewhere in the "

[PATCH v2 4/4] ucc_geth: Revive fixed link support

2009-07-17 Thread Grant Likely
From: Anton Vorontsov Since commit 0b9da337dca972e7a4144e298ec3adb8f244d4a4 ("Rework ucc_geth driver to use of_mdio infrastructure") the fixed-link support is broken. This patch fixes the support by removing !ug_info->phy_node check, and adds a call to of_phy_connect_fixed_link() if a phy is not

[PATCH v2 0/4] net: Revive fixed link support

2009-07-17 Thread Grant Likely
This series is based on the "Net: Revive fixed link support" series posted by Anton Vorontsov on June 26. On June 26, Anton Vorontsov wrote: > The fixed link support is broken since The Big OF MDIO Rework, > the rework simply removed most of the code that was needed for > fixed links. > > Too bad

[PATCH v2 3/4] gianfar: Revive fixed link support

2009-07-17 Thread Grant Likely
From: Anton Vorontsov Since commit fe192a49118f5b1272317d60c7930ece4e13ae49 ("Rework gianfar driver to use of_mdio infrastructure") the fixed-link support is broken, the driver oopses at init_phy(): Unable to handle kernel paging request for data at address 0x00e4 Faulting instruction ad

[PATCH v2 2/4] fs_enet: Revive fixed link support

2009-07-17 Thread Grant Likely
From: Anton Vorontsov Since commit aa73832c5a80d6c52c69b18af858d88fa595dd3c ("Rework fs_enet driver to use of_mdio infrastructure") the fixed-link support is broken in the fs_enet driver. This patch fixes the support by removing a check for phy_node, and adding a call to of_phy_connect_fixed_lin

[PATCH v2 1/4] of/mdio: Add support function for Ethernet fixed-link property

2009-07-17 Thread Grant Likely
From: Anton Vorontsov Fixed-link support is broken for the ucc_eth, gianfar, and fs_enet device drivers. The "OF MDIO rework" patches removed most of the support. Instead of re-adding fixed-link stuff to the drivers, this patch adds a support function for parsing the fixed-link property and obta