[PATCH 1/1] SPI: dw_spi, fix PPC build

2011-03-18 Thread Jiri Slaby
Currently, build on PPC dies with:
In file included from drivers/spi/dw_spi_mmio.c:16:
include/linux/spi/dw_spi.h:147: error: field ‘tx_sgl’ has incomplete type
include/linux/spi/dw_spi.h:149: error: field ‘rx_sgl’ has incomplete type

Add linux/scatterlist.h include to dw_spi.h, because we need to know
the contents of the structure.

Signed-off-by: Jiri Slaby jsl...@suse.cz
Cc: David Brownell dbrown...@users.sourceforge.net
Cc: Grant Likely grant.lik...@secretlab.ca
Cc: Benjamin Herrenschmidt b...@kernel.crashing.org
Cc: Paul Mackerras pau...@samba.org
---
 include/linux/spi/dw_spi.h |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/spi/dw_spi.h b/include/linux/spi/dw_spi.h
index 6cd10f6..fb0bce5 100644
--- a/include/linux/spi/dw_spi.h
+++ b/include/linux/spi/dw_spi.h
@@ -2,6 +2,7 @@
 #define DW_SPI_HEADER_H
 
 #include linux/io.h
+#include linux/scatterlist.h
 
 /* Bit fields in CTRLR0 */
 #define SPI_DFS_OFFSET 0
-- 
1.7.4.1


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH 1/4] powerpc/mpc512x: Add initial support for TWR-MPC5125

2011-03-18 Thread vooon...@gmail.com
Hi Wolfram.
I create function for select compat string and give name for registers.

commit fe8895542d537567f43f99af8234e7326451197e
Author: Ermakov Vladimir erma...@tecon.ru
Date:   Thu Mar 17 11:10:49 2011 +0300

Adds Freescale TWR-MPC5125 device tree and platform code.

Currently following is supported:
 - NAND
 - FEC1 and FEC2
 - RTC
 - PSC UART

Signed-off-by: Vladimir Ermakov vooon...@gmail.com
---
v2:
 - add PSC compat string selection
 - add ioctl defines

diff --git a/arch/powerpc/boot/dts/mpc5125twr.dts
b/arch/powerpc/boot/dts/mpc5125twr.dts
new file mode 100644
index 000..54f568f
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc5125twr.dts
@@ -0,0 +1,394 @@
+/*
+ * STx/Freescale ADS5125 MPC5125 silicon
+ *
+ * Copyright (C) 2009 Freescale Semiconductor Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+/dts-v1/;
+
+/ {
+   model = mpc5125ads;
+   compatible = fsl,mpc5125ads;
+   #address-cells = 1;
+   #size-cells = 1;
+
+   cpus {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   PowerPC,5125@0 {
+   device_type = cpu;
+   reg = 0;
+   d-cache-line-size = 0x20; // 32 bytes
+   i-cache-line-size = 0x20; // 32 bytes
+   d-cache-size = 0x8000;// L1, 32K
+   i-cache-size = 0x8000;// L1, 32K
+   timebase-frequency = 4950;// 49.5 MHz (csb/4)
+   bus-frequency = 19800;// 198 MHz csb bus
+   clock-frequency = 39600;  // 396 MHz ppc core
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x 0x1000;  // 256MB at 0
+   };
+
+   sram@3000 {
+   compatible = fsl,mpc5121-sram;
+   reg = 0x3000 0x08000; // 32K at 0x3000
+   };
+
+   nfc@4000 {
+   compatible = fsl,mpc5125-nfc;
+   reg = 0x4000 0x10;// 1M at 0x4000
+   interrupts = 6 0x8;
+   interrupt-parent =  ipic ;
+   #address-cells = 1;
+   #size-cells = 1;
+   bank-width = 1;
+   write-size = 4096;
+   spare-size = 128;
+   chips = 1;
+   // NOTE: partition map different than in BSP
+   nand-spl@0 {
+   label = loader;
+   reg = 0x 0x0010;
+   read-only;
+   };
+   uboot@10 {
+   label = uboot;
+   reg = 0x0010 0x0010;
+   read-only;
+   };
+   uboot-env@20 {
+   label = uboot-env;
+   reg = 0x0020 0x0010;
+   read-only;
+   };
+   kernel30 {
+   label = kernel;
+   reg = 0x0030 0x0080;
+   };
+   device-tree0 {
+   label = device-tree;
+   reg = 0x00b0 0x0010;
+   };
+   ramboot-rootfs@c0 {
+   label = ramboot-rootfs;
+   reg = 0x00c0 0x0080;
+   };
+   rootfs@140 {
+   label = rootfs;
+   reg = 0x0140 0x0140;
+   };
+   user@280 {
+   label = user;
+   reg = 0x0280 0x0140;
+   };
+   SRAM@420 {
+   label = SRAM; // NVRAM emul
+   reg = 0x0420 0x0140;
+   };
+   prom@560 {
+   label = prom;
+   reg = 0x0560 0x0140;
+   };
+   //data@280 {
+   //  label = data;
+   //  reg = 0x2800 0xeac0;
+   //};
+   };
+
+   soc@8000 {
+   compatible = fsl,mpc5121-immr;
+   device_type = soc;
+   #address-cells = 1;
+   #size-cells = 1;
+   #interrupt-cells = 2;
+   ranges = 0x0 0x8000 0x40;
+   reg = 0x8000 0x40;
+   bus-frequency = 6600; // 66 MHz ips bus
+
+
+   // IPIC
+   // interrupts cell = intr #, sense
+   // sense values match linux IORESOURCE_IRQ_* defines:
+   // 

Re: [PATCH 1/4] powerpc/mpc512x: Add initial support for TWR-MPC5125

2011-03-18 Thread Wolfram Sang
On Fri, Mar 18, 2011 at 02:35:24PM +0300, vooon...@gmail.com wrote:

 diff --git a/arch/powerpc/platforms/512x/clock.c
 b/arch/powerpc/platforms/512x/clock.c
 index 3dc2a8d..5cadf8e 100644
 --- a/arch/powerpc/platforms/512x/clock.c
 +++ b/arch/powerpc/platforms/512x/clock.c
 @@ -606,6 +606,21 @@ static void rate_clks_init(void)
   */
  struct clk dev_clks[2][32];
 
 +char *mpc512x_select_psc_compat(void)
 +{
 + char *psc_compats[] = {
 + fsl,mpc5121-psc,
 + fsl,mpc5125-psc
 + };
 + int i;
 +
 + for (i = 0; i  ARRAY_SIZE(psc_compats); i++)
 + if (of_find_compatible_node(NULL, NULL, psc_compats[i]))
 + return psc_compats[i];
 +
 + return NULL;
 +}

Function looks good to me. Shouldn't that rather be in mpc512x_shared?

 +// IOCTL registers for USB1/FEC2

No c++-style comments, please (here and later).

 +static void mpc5125_psc_iopad_init(void __iomem *ioctl, char *name)
 +{
 + struct device_node *np;
 + const u32 *cell_index;
 + char *default_psc = fsl,mpc5125-psc;
 + char *psc_name;
 +
 + if (name)
 + psc_name = name;
 + else
 + psc_name = default_psc;

Caller sets name to NULL. Is this really used?

 +
 + for_each_compatible_node(np, NULL, psc_name) {
 + cell_index = of_get_property(np, cell-index, NULL);

I seem to recall 'cell-index' is deprecated. Grant?

 + if (cell_index) {
 + u8 __iomem *pscioctl;
 + int psc_num = *cell_index;
 + if (psc_num  1)
 + continue;
 +
 + pscioctl = ioctl + PSC_TO_IOCTL_OFFSET(psc_num);
 + out_8(pscioctl + IOCTL_PSCx_0, IOCTL_PSCx_0_MODE); // 
 NOTE maybe wrong

Why is it 'maybe wrong'? Can it be improved somehow?

 + out_8(pscioctl + IOCTL_PSCx_1, IOCTL_DEFAULT_MODE);
 + out_8(pscioctl + IOCTL_PSCx_2, IOCTL_DEFAULT_MODE);
 + out_8(pscioctl + IOCTL_PSCx_3, IOCTL_DEFAULT_MODE);
 + out_8(pscioctl + IOCTL_PSCx_4, IOCTL_DEFAULT_MODE);

The defines make it much more readable, thanks.

 + }
 + }
 +}

Is this function really board-specific or platform specific?


 +static void mpc5125_fec2_usb_io_init(void __iomem *ioctl, int isusb)
 +{
 + int i;
 + const u8 offset[12] = {
 + IOCTL_USB1_DATA0, IOCTL_USB1_DATA1,
 + IOCTL_USB1_DATA2, IOCTL_USB1_DATA3,
 + IOCTL_USB1_DATA4, IOCTL_USB1_DATA5,
 + IOCTL_USB1_DATA6, IOCTL_USB1_DATA7,
 + IOCTL_USB1_STOP, IOCTL_USB1_CLK,
 + IOCTL_USB1_NEXT, IOCTL_USB1_DIR
 + };
 + u8 mode;
 +
 + mode = (isusb) ? IOCTL_DEFAULT_MODE : IOCTL_FEC2_MODE;
 + for (i = 0; i  ARRAY_SIZE(offset); i++)
 + out_8(ioctl + offset[i], mode);
 +}

Same question here and later. If it is board specific, the function name should
have something like 'twr' in it; but a few things seem mpc5125-generic
to me, if I am not mistaken?

Regards,

   Wolfram

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH 2/4] serial: Add initial support for TWR-MPC5125

2011-03-18 Thread Wolfram Sang
On Thu, Mar 17, 2011 at 02:33:47AM +0300, Vladimir Ermakov wrote:
 Adds PSC UART support for MPC5125 SoC.

Please resend the patches and make use of scripts/get_maintainer.pl
somehow. There are a lot of mailing lists and people missing in the CC.
If you haven't done yet, please also read
Documentation/SubmittingPatches.

Regards,

   Wolfram

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [git pull] Please pull powerpc.git next branch

2011-03-18 Thread Linus Torvalds
On Thu, Mar 17, 2011 at 10:44 PM, Benjamin Herrenschmidt
b...@kernel.crashing.org wrote:

 Here are the changes for this merge window for powerpc. One highlight
 is irq data conversion so we can get rid of the legacy stuff. The new
 Dynamic DMA windows for pSeries should also improve performances for
 some devices nicely on more recent machines/firmwares. Plus a little
 pack of embedded things.

Ok, I got a conflict with the of_platform_driver() removal which
looked pretty trivial, but since I don't have a ppc cross-compile
thing I couldn't even test-compile the end result. Please take a look
to see that it went ok..

  Linus
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


i2c on P2020 based boards faulty prescale selection

2011-03-18 Thread Elie De Brauwer

Hello list,

A whole bunch of dts file such a p2020ds.dts, p2020rdb.dts and probably 
lots of other variants as well (haven't checked the manuals of the 
others). Claim their i2c controller to be 'fsl-i2c'


If you then look in i2c/busses/i2c.mpc.c this will end up calling 
mpc_i2c_setup_8xxx() in fsl_i2c_probe() with a prescale value of 0 which 
goes to mpc_i2c_get_fdr_8xxx() here prescale gets set to one and the 
divider value gets calculated.


The problem is that the P2020 datasheet mentions: The serial bit clock 
frequency of SCL is equal to one half the platform (CCB) clock divided 
by the designated divider. Note that the frequency divider value can be 
changed at any point in a program. Implying that the factor two is not 
taken into account. For this to function correctly the prescale value 
should be set to a value two.


Which could be solved by adding another mpc_i2c_data for this type or by 
using the mpc_i2c_data_8543 which also has a prescaler value of two. Or 
to define an alternative structure for the p2020 alike system. However 
at this point I don't know how this varies between the different px0x0 
systems since I have only a p2020 at my disposal. So I would appreciate 
it if somebody with a broader view on this SoCs can up with a usable 
solution.


This issue will only propagate if the dts sets the clock-frequency field 
for the i2c controller in question is set.



gr
E.
--
Elie De Brauwer

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 1/4, v3] powerpc/mpc512x: Add initial support for TWR-MPC5125

2011-03-18 Thread vooon...@gmail.com
commit 3b94215206569d5c2bad20397cebfa9570c921bc
Author: Ermakov Vladimir erma...@tecon.ru
Date:   Thu Mar 17 11:10:49 2011 +0300

Adds Freescale TWR-MPC5125 device tree and platform code.

Currently following is supported:
 - NAND
 - FEC1 and FEC2
 - RTC
 - PSC UART

Signed-off-by: Vladimir Ermakov vooon...@gmail.com
---
v2:
 - add PSC compat string selection
 - add ioctl defines

v3:
 - less verbose interrupt-parent
 - move mpc512x_select_psc_compat() to mpc512x_shared.c
 - remove unneded mpc5125_psc_iopad_init()
 - fix board prefixes

diff --git a/arch/powerpc/boot/dts/mpc5125twr.dts
b/arch/powerpc/boot/dts/mpc5125twr.dts
new file mode 100644
index 000..d899f92
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc5125twr.dts
@@ -0,0 +1,368 @@
+/*
+ * STx/Freescale ADS5125 MPC5125 silicon
+ *
+ * Copyright (C) 2009 Freescale Semiconductor Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+/dts-v1/;
+
+/ {
+   model = mpc5125twr; // In BSP mpc5125ads
+   compatible = fsl,mpc5125ads;
+   #address-cells = 1;
+   #size-cells = 1;
+   interrupt-parent = ipic;
+
+   cpus {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   PowerPC,5125@0 {
+   device_type = cpu;
+   reg = 0;
+   d-cache-line-size = 0x20; // 32 bytes
+   i-cache-line-size = 0x20; // 32 bytes
+   d-cache-size = 0x8000;// L1, 32K
+   i-cache-size = 0x8000;// L1, 32K
+   timebase-frequency = 4950;// 49.5 MHz (csb/4)
+   bus-frequency = 19800;// 198 MHz csb bus
+   clock-frequency = 39600;  // 396 MHz ppc core
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x 0x1000;  // 256MB at 0
+   };
+
+   sram@3000 {
+   compatible = fsl,mpc5121-sram;
+   reg = 0x3000 0x08000; // 32K at 0x3000
+   };
+
+   nfc@4000 {
+   compatible = fsl,mpc5125-nfc;
+   reg = 0x4000 0x10;// 1M at 0x4000
+   interrupts = 6 0x8;
+   #address-cells = 1;
+   #size-cells = 1;
+   bank-width = 1;
+   write-size = 4096;
+   spare-size = 128;
+   chips = 1;
+   // NOTE: partition map different than in BSP
+   // First three is the same as in BSP, other differ.
+   nand-spl@0 {
+   label = loader;
+   reg = 0x 0x0010;
+   read-only;
+   };
+   uboot@10 {
+   label = uboot;
+   reg = 0x0010 0x0010;
+   read-only;
+   };
+   uboot-env@20 {
+   label = uboot-env;
+   reg = 0x0020 0x0010;
+   read-only;
+   };
+   kernel@30 {
+   label = kernel;
+   reg = 0x0030 0x0080;
+   };
+   device-tree@b0 {
+   label = device-tree;
+   reg = 0x00b0 0x0010;
+   };
+   ramboot-rootfs@c0 {
+   label = ramboot-rootfs;
+   reg = 0x00c0 0x0080;
+   };
+   rootfs@140 {
+   label = rootfs;
+   reg = 0x0140 0x0140;
+   };
+   user@280 {
+   label = user;
+   reg = 0x0280 0x0140;
+   };
+   SRAM@420 {
+   label = SRAM; // NVRAM emul
+   reg = 0x0420 0x0140;
+   };
+   prom@560 {
+   label = prom;
+   reg = 0x0560 0x0140;
+   };
+   //data@280 {
+   //  label = data;
+   //  reg = 0x2800 0xeac0;
+   //};
+   };
+
+   soc@8000 {
+   compatible = fsl,mpc5121-immr;
+   device_type = soc;
+   #address-cells = 1;
+   #size-cells = 1;
+   #interrupt-cells = 2;
+   ranges = 0x0 0x8000 0x40;
+   reg = 0x8000 0x40;
+   bus-frequency = 6600; // 66 MHz ips 

Re: [PATCH 1/1] SPI: dw_spi, fix PPC build

2011-03-18 Thread Grant Likely
On Fri, Mar 18, 2011 at 10:41:17AM +0100, Jiri Slaby wrote:
 Currently, build on PPC dies with:
 In file included from drivers/spi/dw_spi_mmio.c:16:
 include/linux/spi/dw_spi.h:147: error: field ‘tx_sgl’ has incomplete type
 include/linux/spi/dw_spi.h:149: error: field ‘rx_sgl’ has incomplete type
 
 Add linux/scatterlist.h include to dw_spi.h, because we need to know
 the contents of the structure.
 
 Signed-off-by: Jiri Slaby jsl...@suse.cz
 Cc: David Brownell dbrown...@users.sourceforge.net
 Cc: Grant Likely grant.lik...@secretlab.ca
 Cc: Benjamin Herrenschmidt b...@kernel.crashing.org
 Cc: Paul Mackerras pau...@samba.org

Applied, thanks.

g.

 ---
  include/linux/spi/dw_spi.h |1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
 
 diff --git a/include/linux/spi/dw_spi.h b/include/linux/spi/dw_spi.h
 index 6cd10f6..fb0bce5 100644
 --- a/include/linux/spi/dw_spi.h
 +++ b/include/linux/spi/dw_spi.h
 @@ -2,6 +2,7 @@
  #define DW_SPI_HEADER_H
  
  #include linux/io.h
 +#include linux/scatterlist.h
  
  /* Bit fields in CTRLR0 */
  #define SPI_DFS_OFFSET   0
 -- 
 1.7.4.1
 
 
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: any chance to use a modern linux kernel on Pegasos1 G3 ?

2011-03-18 Thread Gerhard Pircher
 Original-Nachricht 
 Datum: Thu, 17 Mar 2011 00:39:00 +0100
 Von: nello martuscielli ppc.ad...@gmail.com
 An: Gerhard Pircher gerhard_pirc...@gmx.net
 CC: acrux...@libero.it, linuxppc-dev@lists.ozlabs.org
 Betreff: Re: any chance to use a modern linux kernel on Pegasos1 G3 ?

 hi all,
 
 here instead the log from serial debug console booting the last
 working kernel i.e. linux-2.16.62 compiled with arch=ppc .
 
 
 [...]
 do_load: dev=/ide/disk:0 dlen=11 args=CRUX root=/dev/hdb
 video=radeonfb:800x600 alen=41
 do_load: alstr=
 try_load: dev=/ide/disk:0 dlen=11 args=CRUX root=/dev/hdb
 video=radeonfb:800x600 alen=41
 create_well_formed_chain: pkg=0xFD57D58 parent=0xFD53B90
 currpkg=0xFD53B90 inst=0xFE6EE50
 pkg=/pci@8000 parent=/ currpkg=/ currinst=/
 create_well_formed_chain: pkg=0xFD53B90 parent=0x0 currpkg=0xFD53B90
 inst=0xFE6EE50
 pkg=/ parent= currpkg=/ currinst=/
 pkg=0xFD57D58:/pci@8000 parent=0xFE6EE50:/
 inst=0xFE6EEA8:/pci@8000 instparent=0xFE6EE50
 ata_disk_open: pkg=0xFD5B870 parent=0xFD5B2C8
 ata_disk_open: CTLR=0x0 ID=0x0
 ata_disk_open: args=0
 deblocker open
 ata_disk_max_transfer: 512
 deblocker open: block-size=0x200 max-transfer=0x200
 deblocker open: return 0
 open-package: ret=0:no error r=-1
 ata_disk_open: $open-package deblocker ret=0
 ata_disk_open: deblocker=0xFE6EFC8
 disk-label open
 disk-label open: self=0xFE702B0 s-buf=0xFE71000
 disk-label open: return 0
 open-package: ret=0:no error r=-1
 ata_disk_open: $open-package disk-label ret=0
 ata_disk_open: disklabel=0xFE70258
 disk-label load: addr=0x40 loadargs=CRUX root=/dev/hdb
 video=radeonfb:800x600 args=0,CRUX root=/dev/hdb
 video=radeonfb:800x600
 file_system: e=0xFD8 disk=0xFE6EF58 loc=0x0 start=0x0
 path=0xFE703C0 buf=0xFE71000 size=512
 file_system: probing filesys dos-partition
 
 dos_partition: enter
 dos-partition: boot_sect_sig0/1=0x55.0xAA jump=0x0 boot_signature=0x0
 drive_number=0x0
 dos_partition: partition=0 size=0x32F8E start=0x3F typ=0x6
 flag=0x80 shd=0x1 ssect=0x1 scyl=0x0 ehd=0xFE esect=0x3F ecyl=0xC
 file_system: e=0xFD8 disk=0xFE6EF58 loc=0x7E00 start=0x3F
 path=0xFE703C2 buf=0xFE71000 size=512
 file_system: probing filesys dos-partition
 file_system: probing filesys dos-fat
 file_system: return end (-4089)
 file_system: return end (-4089)
 disk-label return len=1782093 ret=end (-4089)
 ata_disk_close
 disk-label close:
 checking exec type Fcode
 fcode_is_exec: load=0x40 loadlen=1782093
 checking exec type Forth
 checking exec type ELF
 f_go:
 checking exec type Fcode
 fcode_is_exec: load=0x40 loadlen=1782093
 checking exec type Forth
 checking exec type ELF
 alloc_aligned: a 0xFD548E8 align 0xFD5491C size 0xFD54918 addr 0xFD54914
 alloc_constrained: min 0x0, max 0x, align 0x1000, mask
 0x, size 0x7E, addr 0x30
 alloc_constrained: acells 0x1 scells 0x1 t1 0xC t2 0xFD5490C u1
 0xFD54910 u2 0xFD54914 u3 0xFD54918
 alloc_constrained: allocator_block 0xFD54930, next 0x0 addr 0x30
 size 0xFD0
 alloc_constrained: fsblock 0x0
 alloc_constrained: addr[] 0x30
 alloc_constrained: bsize[] 0xFD0
 alloc_constrained: passed min check
 alloc_constrained: addr 0x30, align 0xFFF, off 0x69696969
 sum 0x0
 alloc_constrained: passed align check
 alloc_constrained: passed max check
 alloc_constrained: passed mask check
 alloc_constrained: passed full size check
 alloc_constrained: passed size check
 
 
 i'm not an expert but from a quick logs comparison I saw two times the
 alloc_aligned,alloc_constrained section instead in the working one i
 see it only one time.
 Maybe it's an usefull observation.

Well, I never put my hands on an OpenFirmware machine, but I could
imagine that this is an image loading problem.
Various PPC Linux related websites suggest to set a different load base
for the kernel image on Pegasos machines:

setenv load-base 0x400

Does that work on the Pegasos1?

BTW do you get any debug output from a recent kernel on serial port
(with udbg)?

regards,
Gerhard
-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!   
Jetzt informieren: http://www.gmx.net/de/go/freephone
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH -mm] RapidIO,powerpc/85xx: Fix configuration option

2011-03-18 Thread Alexandre Bounine
Follows set of patches in -mm tree. Replaces configuration option
missed in previous patches.

Signed-off-by: Alexandre Bounine alexandre.boun...@idt.com
---
 arch/powerpc/kernel/cpu_setup_fsl_booke.S |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/cpu_setup_fsl_booke.S 
b/arch/powerpc/kernel/cpu_setup_fsl_booke.S
index 5c518ad..9136111 100644
--- a/arch/powerpc/kernel/cpu_setup_fsl_booke.S
+++ b/arch/powerpc/kernel/cpu_setup_fsl_booke.S
@@ -64,7 +64,7 @@ _GLOBAL(__setup_cpu_e500v2)
bl  __e500_icache_setup
bl  __e500_dcache_setup
bl  __setup_e500_ivors
-#ifdef CONFIG_RAPIDIO
+#ifdef CONFIG_FSL_RIO
/* Ensure that RFXE is set */
mfspr   r3,SPRN_HID1
orisr3,r3,HID1_RFXE@h
-- 
1.7.3.1

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 2/4] serial: Add initial support for TWR-MPC5125

2011-03-18 Thread Wolfram Sang
On Fri, Mar 18, 2011 at 01:56:41PM +0100, Wolfram Sang wrote:
 On Thu, Mar 17, 2011 at 02:33:47AM +0300, Vladimir Ermakov wrote:
  Adds PSC UART support for MPC5125 SoC.
 
 Please resend the patches and make use of scripts/get_maintainer.pl

I guess you noticed by now, just to make sure: This patch also prevents having
one kernel for mpc5121 and 5125. That should be handled before resubmitting.
The driver already has some register-abstractions, probably you can make use of
it again.

Regards,

   Wolfram

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [RFC][PATCH v3 10/22] mm, powerpc: add gfp flags variant of pud, pte, and pte allocations

2011-03-18 Thread Prasad Joshi

changes for 32 bit architecture
 - Added __pte_alloc_one_kernel() to allocated zeroed page using
   allocation flag passed as an argument. If the slab allocator is not
   initialized the allocation flag is not passed down the call hierarchy.
   i.e. the call to early_get_page() is not modified.

- Changed pte_alloc_one_kernel() to call __pte_alloc_one_kernel() passing
  correct gfp_t flags.

changes for 64 bit architecture
- Added __pud_alloc_one() which is similar to pud_alloc_one(). This newly
  added function accepts allocation flag as a parameter and does the PUD
  allocation using this GFP flag.

- The function pud_alloc_one() is changed to call __pud_alloc_one() passing
  GFP_KERNEL | __GFP_REPEAT allocation flags.

- Similar changes for pmd (cache) and pte (page) allocations.

- The changes for both architectures help in fixing Bug 30702

Signed-off-by: Prasad Joshi prasadjoshi...@gmail.com
Signed-off-by: Anand Mitra mi...@kqinfotech.com
---
 arch/powerpc/include/asm/pgalloc-32.h |2 ++
 arch/powerpc/include/asm/pgalloc-64.h |   27 ++-
 arch/powerpc/mm/pgtable_32.c  |   10 --
 3 files changed, 32 insertions(+), 7 deletions(-)

diff --git a/arch/powerpc/include/asm/pgalloc-32.h 
b/arch/powerpc/include/asm/pgalloc-32.h
index 580cf73..21b7a94 100644
--- a/arch/powerpc/include/asm/pgalloc-32.h
+++ b/arch/powerpc/include/asm/pgalloc-32.h
@@ -35,6 +35,8 @@ extern void pgd_free(struct mm_struct *mm, pgd_t *pgd);
 #endif
 
 extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr);
+extern pte_t *__pte_alloc_one_kernel(struct mm_struct *, unsigned long, gfp_t);
+
 extern pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addr);
 
 static inline void pgtable_free(void *table, unsigned index_size)
diff --git a/arch/powerpc/include/asm/pgalloc-64.h 
b/arch/powerpc/include/asm/pgalloc-64.h
index 292725c..e5ea650 100644
--- a/arch/powerpc/include/asm/pgalloc-64.h
+++ b/arch/powerpc/include/asm/pgalloc-64.h
@@ -51,10 +51,15 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t 
*pgd)
 
 #define pgd_populate(MM, PGD, PUD) pgd_set(PGD, PUD)
 
+static inline pud_t *
+__pud_alloc_one(struct mm_struct *mm, unsigned long addr, gfp_t gfp_mask)
+{
+   return kmem_cache_alloc(PGT_CACHE(PUD_INDEX_SIZE), gfp_mask);
+}
+
 static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
 {
-   return kmem_cache_alloc(PGT_CACHE(PUD_INDEX_SIZE),
-   GFP_KERNEL|__GFP_REPEAT);
+   return __pud_alloc_one(mm, addr, GFP_KERNEL | __GFP_REPEAT);
 }
 
 static inline void pud_free(struct mm_struct *mm, pud_t *pud)
@@ -89,10 +94,15 @@ static inline void pmd_populate_kernel(struct mm_struct 
*mm, pmd_t *pmd,
 
 #endif /* CONFIG_PPC_64K_PAGES */
 
+static inline pmd_t *
+__pmd_alloc_one(struct mm_struct *mm, unsigned long addr, gfp_t gfp_mask)
+{
+   return kmem_cache_alloc(PGT_CACHE(PMD_INDEX_SIZE), gfp_mask);
+}
+
 static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr)
 {
-   return kmem_cache_alloc(PGT_CACHE(PMD_INDEX_SIZE),
-   GFP_KERNEL|__GFP_REPEAT);
+   return __pmd_alloc_one(mm, addr, GFP_KERNEL | __GFP_REPEAT);
 }
 
 static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
@@ -100,10 +110,17 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t 
*pmd)
kmem_cache_free(PGT_CACHE(PMD_INDEX_SIZE), pmd);
 }
 
+static inline pte_t *
+__pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address, 
+   gfp_t gfp_mask)
+{
+return (pte_t *)__get_free_page(gfp_mask | __GFP_ZERO);
+}
+
 static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
  unsigned long address)
 {
-return (pte_t *)__get_free_page(GFP_KERNEL | __GFP_REPEAT | 
__GFP_ZERO);
+   return __pte_alloc_one_kernel(mm, address, GFP_KERNEL | __GFP_REPEAT);
 }
 
 static inline pgtable_t pte_alloc_one(struct mm_struct *mm,
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index 8dc41c0..736593f 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -95,14 +95,15 @@ void pgd_free(struct mm_struct *mm, pgd_t *pgd)
 #endif
 }
 
-__init_refok pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long 
address)
+__init_refok pte_t *
+__pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address, gfp_t 
gfp_mask)
 {
pte_t *pte;
extern int mem_init_done;
extern void *early_get_page(void);
 
if (mem_init_done) {
-   pte = (pte_t 
*)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
+   pte = (pte_t *)__get_free_page(gfp_mask | __GFP_ZERO);
} else {
pte = (pte_t *)early_get_page();
if (pte)
@@ -111,6 +112,11 @@ __init_refok pte_t *pte_alloc_one_kernel(struct mm_struct 
*mm, unsigned long add
return pte;
 }
 
+__init_refok pte_t 

Re: [PATCH -mm] RapidIO,powerpc/85xx: Fix configuration option

2011-03-18 Thread Kumar Gala

On Mar 18, 2011, at 12:18 PM, Alexandre Bounine wrote:

 Follows set of patches in -mm tree. Replaces configuration option
 missed in previous patches.
 
 Signed-off-by: Alexandre Bounine alexandre.boun...@idt.com
 ---
 arch/powerpc/kernel/cpu_setup_fsl_booke.S |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Acked-by: Kumar Gala ga...@kernel.crashing.org

Alex, I can push this via the powerpc.git tree route if you want.

- k
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


RE: [PATCH -mm] RapidIO,powerpc/85xx: Fix configuration option

2011-03-18 Thread Bounine, Alexandre
This patch has to be applied to -mm tree. Andrew already has set of
patches that change RapidIO configuration.
I think it will be better if it goes into -mm to keep things aligned
properly.

Alex.

-Original Message-
From: Kumar Gala [mailto:ga...@kernel.crashing.org] 
Sent: Friday, March 18, 2011 4:49 PM
To: Bounine, Alexandre
Cc: a...@linux-foundation.org; linux-ker...@vger.kernel.org;
linuxppc-dev@lists.ozlabs.org; Matt Porter; Li Yang; Thomas Moll
Subject: Re: [PATCH -mm] RapidIO,powerpc/85xx: Fix configuration option


On Mar 18, 2011, at 12:18 PM, Alexandre Bounine wrote:

 Follows set of patches in -mm tree. Replaces configuration option
 missed in previous patches.
 
 Signed-off-by: Alexandre Bounine alexandre.boun...@idt.com
 ---
 arch/powerpc/kernel/cpu_setup_fsl_booke.S |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Acked-by: Kumar Gala ga...@kernel.crashing.org

Alex, I can push this via the powerpc.git tree route if you want.

- k
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [git pull] Please pull powerpc.git next branch

2011-03-18 Thread Benjamin Herrenschmidt
On Fri, 2011-03-18 at 06:34 -0700, Linus Torvalds wrote:
  Here are the changes for this merge window for powerpc. One highlight
  is irq data conversion so we can get rid of the legacy stuff. The new
  Dynamic DMA windows for pSeries should also improve performances for
  some devices nicely on more recent machines/firmwares. Plus a little
  pack of embedded things.
 
 Ok, I got a conflict with the of_platform_driver() removal which
 looked pretty trivial, but since I don't have a ppc cross-compile
 thing I couldn't even test-compile the end result. Please take a look
 to see that it went ok..

Ok, I'll have a look later today.

Thanks,
Ben.


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v2] gianfar: Fall back to software tcp/udp checksum on older controllers

2011-03-18 Thread David Miller
From: Alex Dubov oa...@yahoo.com
Date: Wed, 16 Mar 2011 20:57:13 -0700 (PDT)

 As specified by errata eTSEC49 of MPC8548 and errata eTSEC12 of MPC83xx,
 older revisions of gianfar controllers will be unable to calculate a TCP/UDP
 packet checksum for some alignments of the appropriate FCB. This patch checks
 for FCB alignment on such controllers and falls back to software checksumming
 if the alignment is known to be bad.
 
 Signed-off-by: Alex Dubov oa...@yahoo.com

Applied.
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [git pull] Please pull powerpc.git next branch

2011-03-18 Thread Hollis Blanchard
On Thu, Mar 17, 2011 at 10:44 PM, Benjamin Herrenschmidt
b...@kernel.crashing.org wrote:
 Hi Linus !

 Here are the changes for this merge window for powerpc. One highlight
 is irq data conversion so we can get rid of the legacy stuff. The new
 Dynamic DMA windows for pSeries should also improve performances for
 some devices nicely on more recent machines/firmwares. Plus a little
 pack of embedded things.

Ben, you missed the patches from Meador:

http://patchwork.ozlabs.org/patch/86804/
http://patchwork.ozlabs.org/patch/86805/
http://patchwork.ozlabs.org/patch/86806/

Please commit.

-Hollis
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[RFC][PATCH v3 00/22] __vmalloc: Propagating GFP allocation flag inside __vmalloc()

2011-03-18 Thread Prasad Joshi
A filesystem might run into a problem while calling __vmalloc(GFP_NOFS)
inside a lock.

It is expected than __vmalloc when called with GFP_NOFS should not
callback the filesystem code even incase of the increased memory
pressure. But the problem is that even if we pass this flag, __vmalloc
itself allocates memory with GFP_KERNEL.

Using GFP_KERNEL allocations may go into the memory reclaim path and try
to free memory by calling file system evict_inode function. Which might
lead into deadlock.

For further details
http://marc.info/?l=linux-mmm=128942194520631w=4
https://bugzilla.kernel.org/show_bug.cgi?id=30702

The patch passes the gfp allocation flag all the way down to those
allocating functions.

 arch/arm/include/asm/pgalloc.h   |   11 +-
 arch/avr32/include/asm/pgalloc.h |8 -
 arch/cris/include/asm/pgalloc.h  |   10 -
 arch/frv/include/asm/pgalloc.h   |3 ++
 arch/frv/include/asm/pgtable.h   |1 +
 arch/frv/mm/pgalloc.c|9 -
 arch/ia64/include/asm/pgalloc.h  |   24 +++--
 arch/m32r/include/asm/pgalloc.h  |   11 --
 arch/m68k/include/asm/motorola_pgalloc.h |   20 +--
 arch/m68k/include/asm/sun3_pgalloc.h |   14 ++--
 arch/m68k/mm/memory.c|9 -
 arch/microblaze/include/asm/pgalloc.h|3 ++
 arch/microblaze/mm/pgtable.c |   13 +--
 arch/mips/include/asm/pgalloc.h  |   22 
 arch/mn10300/include/asm/pgalloc.h   |2 +
 arch/mn10300/mm/pgtable.c|   10 -
 arch/parisc/include/asm/pgalloc.h|   21 ---
 arch/powerpc/include/asm/pgalloc-32.h|2 +
 arch/powerpc/include/asm/pgalloc-64.h|   27 +++---
 arch/powerpc/mm/pgtable_32.c |   10 -
 arch/s390/include/asm/pgalloc.h  |   30 +---
 arch/s390/mm/pgtable.c   |   22 +---
 arch/score/include/asm/pgalloc.h |   13 ---
 arch/sh/include/asm/pgalloc.h|8 -
 arch/sh/mm/pgtable.c |8 -
 arch/sparc/include/asm/pgalloc_32.h  |5 +++
 arch/sparc/include/asm/pgalloc_64.h  |   17 -
 arch/tile/include/asm/pgalloc.h  |   13 ++-
 arch/tile/mm/pgtable.c   |   10 -
 arch/um/include/asm/pgalloc.h|1 +
 arch/um/kernel/mem.c |   21 ---
 arch/x86/include/asm/pgalloc.h   |   17 -
 arch/x86/mm/pgtable.c|8 -
 arch/xtensa/include/asm/pgalloc.h|9 -
 arch/xtensa/mm/pgtable.c |   11 +-
 include/asm-generic/4level-fixup.h   |8 +++-
 include/asm-generic/pgtable-nopmd.h  |3 +-
 include/asm-generic/pgtable-nopud.h  |1 +
 include/linux/mm.h   |   40 -
 mm/memory.c  |   14 ---
 mm/vmalloc.c |   57 --
 41 files changed, 427 insertions(+), 119 deletions(-)

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev