Re: 2.6.24-rc8-mm1 build failure on headers_check

2008-01-17 Thread Andrew Morton
On Fri, 18 Jan 2008 12:39:51 +0530 Kamalesh Babulal <[EMAIL PROTECTED]> wrote:

> Hi Andrew,
> 
> The kernel build fails during the headers_check on power box
> 
>   CHECK   include/asm/nvram.h
> /usr/local/autobench/autotest/tmp/build/linux/usr/include/asm/nvram.h 
> requires linux/list.h, which does not exist in exported headers
> make[3]: *** 
> [/usr/local/autobench/autotest/tmp/build/linux/usr/include/asm/.check.nvram.h]
>  Error 1

doh.

--- a/include/asm-powerpc/nvram.h~include-asm-powerpc-nvramh-needs-listh-fix
+++ a/include/asm-powerpc/nvram.h
@@ -11,7 +11,6 @@
 #define _ASM_POWERPC_NVRAM_H
 
 #include 
-#include 
 
 #define NVRW_CNT 0x20
 #define NVRAM_HEADER_LEN 16 /* sizeof(struct nvram_header) */
@@ -59,6 +58,9 @@ struct nvram_header {
 };
 
 #ifdef __KERNEL__
+
+#include 
+
 struct nvram_partition {
struct list_head partition;
struct nvram_header header;
_

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


Re: 2.6.24-rc8-mm1 build failure on headers_check

2008-01-17 Thread Kamalesh Babulal
Hi Andrew,

The kernel build fails during the headers_check on power box

  CHECK   include/asm/nvram.h
/usr/local/autobench/autotest/tmp/build/linux/usr/include/asm/nvram.h requires 
linux/list.h, which does not exist in exported headers
make[3]: *** 
[/usr/local/autobench/autotest/tmp/build/linux/usr/include/asm/.check.nvram.h] 
Error 1
make[2]: *** [asm-powerpc] Error 2
make[1]: *** [headers_check] Error 2
make: *** [vmlinux] Error 2

-- 
Thanks & Regards,
Kamalesh Babulal,
Linux Technology Center,
IBM, ISTL.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: crash in kmem_cache_init

2008-01-17 Thread Olaf Hering
On Thu, Jan 17, Olaf Hering wrote:

> On Thu, Jan 17, Christoph Lameter wrote:
> 
> > On Thu, 17 Jan 2008, Olaf Hering wrote:
> > 
> > > The patch does not help.
> > 
> > Duh. We need to know more about the problem.
> 
> cache_grow is called from 3 places. The third call has cleared l3 for
> some reason.

Typo in debug patch.

calls cache_grow with nodeid 0
> [c075bbd0] [c00f82d0] .cache_alloc_refill+0x234/0x2c0
calls cache_grow with nodeid 0
> [c075bbe0] [c00f7f38] .cache_alloc_node+0x17c/0x1e8

calls cache_grow with nodeid 1
> [c075bbe0] [c00f7d68] .fallback_alloc+0x1a0/0x1f4

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


Re: [PATCH] mpc85xx_ads: add in missing of_node_put()

2008-01-17 Thread Kumar Gala
> From: Paul Gortmaker <[EMAIL PROTECTED]>
> Date: Fri, 21 Dec 2007 10:12:38 -0500
> Subject: [PATCH] mpc85xx_ads: add in missing of_node_put()
>
> Add in missing of_node_put() after cpm2_pic_init(). This and other coding
> style cleanups as suggested by Stephen Rothwell.
>
> Signed-off-by: Paul Gortmaker <[EMAIL PROTECTED]>
> ---
>  arch/powerpc/platforms/85xx/mpc85xx_ads.c |   12 ++--
>  1 files changed, 6 insertions(+), 6 deletions(-)

applied.

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


Re: [PATCH] Fix carry bug in 128-bit unsigned integer adding

2008-01-17 Thread Kumar Gala
On Fri, 18 Jan 2008, Liu Yu wrote:

> Synchronize it to the definition in include/math-emu/op-4.h for short term.
>
> Signed-off-by: Liu Yu <[EMAIL PROTECTED]>
> ---
>  arch/powerpc/math-emu/op-4.h |   40 ++--
>  1 files changed, 30 insertions(+), 10 deletions(-)

applied.

- k

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


Re: [Add mpc5121 support PATCH v3 2/8] Add mpc512x ipic support

2008-01-17 Thread Kumar Gala
On Thu, 17 Jan 2008, John Rigby wrote:

> Added ipic_info entries for vectors used by 512x that
> were previously unused by 83xx.
>
> Signed-off-by: John Rigby <[EMAIL PROTECTED]>
> ---
>  arch/powerpc/sysdev/ipic.c |   62 
> 
>  1 files changed, 62 insertions(+), 0 deletions(-)
>

applied.

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


Re: [Add mpc5121 support PATCH v3 1/8] Add IPIC config option

2008-01-17 Thread Kumar Gala
On Thu, 17 Jan 2008, John Rigby wrote:

> IPIC is not just for 83xx anymore so make it a separate
> config option.
>
> Signed-off-by: John Rigby <[EMAIL PROTECTED]>
> ---
>  arch/powerpc/platforms/Kconfig |5 +
>  arch/powerpc/sysdev/Makefile   |2 +-
>  2 files changed, 6 insertions(+), 1 deletions(-)

applied.

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


Re: [PATCH v3] [POWERPC] Update MPC8610 HPCD to support audio drivers

2008-01-17 Thread Kumar Gala
On Thu, 10 Jan 2008, Timur Tabi wrote:

> Update the MPC8610 HPCD files to support the audio driver.  Update
> booting-without-of.txt with information on the SSI device.
>
> Signed-off-by: Timur Tabi <[EMAIL PROTECTED]>
> ---

Can you respin this.  It doesn't apply cleanly to my tree.

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


Re: [PATCH] [POWERPC] qe: add support for Freescale QUICCEngine UART

2008-01-17 Thread Kumar Gala
On Wed, 9 Jan 2008, Timur Tabi wrote:

> Add support for UART serial ports using a Freescale QUICCEngine. Update
> booting-without-of.txt to define new properties for a QE UART node.  Update
> the MPC8323E-MDS device tree to add UCC5 as a UART.  Update the QE library
> to support slow UCC devices and modules.
>
> Signed-off-by: Timur Tabi <[EMAIL PROTECTED]>
> ---
>  Documentation/powerpc/booting-without-of.txt |9 -
>  arch/powerpc/boot/dts/mpc832x_mds.dts|   50 
> ++
>  arch/powerpc/sysdev/qe_lib/Kconfig   |2 +-
>  arch/powerpc/sysdev/qe_lib/ucc_slow.c|   10 +-
>  4 files changed, 68 insertions(+), 3 deletions(-)
>

applied.

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


Re: [PATCH v2] [SERIAL] qe-uart: add support for Freescale QUICCEngine UART

2008-01-17 Thread Kumar Gala
On Tue, 15 Jan 2008, Timur Tabi wrote:

> Add file ucc_uart.c, a serial device driver for the Freescale QUICCEngine.
> Update the Kconfig and Makefile accordingly.
>
> Signed-off-by: Timur Tabi <[EMAIL PROTECTED]>
> ---
>
> Updated to reflect comments from Kumar.
>
>  drivers/serial/Kconfig|   10 +
>  drivers/serial/Makefile   |1 +
>  drivers/serial/ucc_uart.c | 1514 
> +
>  3 files changed, 1525 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/serial/ucc_uart.c
>

applied.

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


Re: [PATCH v7] qe: add ability to upload QE firmware

2008-01-17 Thread Kumar Gala
On Tue, 8 Jan 2008, Timur Tabi wrote:

> Define the layout of a binary blob that contains a QE firmware and 
> instructions
> on how to upload it.  Add function qe_upload_firmware() to parse the blob
> and perform the actual upload.  Fully define 'struct rsp' in immap_qe.h to
> include the actual RISC Special Registers.  Added description of a new
> QE firmware node to booting-without-of.txt.
>
> Signed-off-by: Timur Tabi <[EMAIL PROTECTED]>
> ---
>
> Updated w.r.t. comments from Stephen R.
>
> This patch is for Kumar's for-2.6.25 branch.  This code is necessary for
> my QE UART driver.
>
>  Documentation/powerpc/00-INDEX   |3 +
>  Documentation/powerpc/booting-without-of.txt |   33 +++-
>  Documentation/powerpc/qe_firmware.txt|  295 
> ++
>  arch/powerpc/platforms/Kconfig   |1 +
>  arch/powerpc/sysdev/qe_lib/qe.c  |  247 +
>  include/asm-powerpc/immap_qe.h   |   34 +++-
>  include/asm-powerpc/qe.h |   61 ++
>  7 files changed, 670 insertions(+), 4 deletions(-)
>  create mode 100644 Documentation/powerpc/qe_firmware.txt
>

applied.

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


Re: [PATCH 2/3] [POWERPC] fsl_soc: add support for gianfar for fixed-link property

2008-01-17 Thread Kumar Gala
On Fri, 7 Dec 2007, Vitaly Bordug wrote:

>
> fixed-link says: register new "Fixed/emulated PHY", i.e. PHY that
> not connected to the real MDIO bus.
>
> Signed-off-by: Vitaly Bordug <[EMAIL PROTECTED]>
> Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]>
>
> ---
>
>  Documentation/powerpc/booting-without-of.txt |4 +
>  arch/powerpc/sysdev/fsl_soc.c|   79 
> --
>  2 files changed, 66 insertions(+), 17 deletions(-)
>

applied.

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


Re: [PATCH 3/3] [POWERPC] MPC8349E-mITX: Vitesse 7385 PHY is not connected to the MDIO bus

2008-01-17 Thread Kumar Gala
On Fri, 7 Dec 2007, Vitaly Bordug wrote:

>
> ...thus use fixed-link to register proper "Fixed PHY"
>
> Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]>
> Signed-off-by: Vitaly Bordug <[EMAIL PROTECTED]>
>

applied.

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


Re: [PATCH 1/3] [NET] phy/fixed.c: rework to not duplicate PHY layer functionality

2008-01-17 Thread Kumar Gala
On Fri, 7 Dec 2007, Vitaly Bordug wrote:

>
> With that patch fixed.c now fully emulates MDIO bus, thus no need
> to duplicate PHY layer functionality. That, in turn, drastically
> simplifies the code, and drops down line count.
>
> As an additional bonus, now there is no need to register MDIO bus
> for each PHY, all emulated PHYs placed on the platform fixed MDIO bus.
> There is also no more need to pre-allocate PHYs via .config option,
> this is all now handled dynamically.
>
>
> Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]>
> Signed-off-by: Vitaly Bordug <[EMAIL PROTECTED]>
> Acked-by: Jeff Garzik <[EMAIL PROTECTED]>
>
> ---
>
>  drivers/net/phy/Kconfig   |   32 +--
>  drivers/net/phy/fixed.c   |  445 
> +
>  include/linux/phy_fixed.h |   51 ++---
>  3 files changed, 195 insertions(+), 333 deletions(-)
>

applied.

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


Re: [PATCH] Convert MPC837x device trees to dts-v1

2008-01-17 Thread Kumar Gala

On Jan 18, 2008, at 12:31 AM, Kumar Gala wrote:

>
> On Jan 8, 2008, at 5:32 AM, Li Yang wrote:
>
>> Signed-off-by: Li Yang <[EMAIL PROTECTED]>
>> ---
>> arch/powerpc/boot/dts/mpc8377_mds.dts |  148 +++
>> +---
>> arch/powerpc/boot/dts/mpc8378_mds.dts |  140 ++
>> +---
>> arch/powerpc/boot/dts/mpc8379_mds.dts |  156 
>> +
>> 3 files changed, 225 insertions(+), 219 deletions(-)
>
> applied.

I dropped the "fsl,pq2pro-sata" compat prop.  We need to come up with  
something a bit more generic.

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


Re: [PATCH 3/3 v2] USB device tree cleanups

2008-01-17 Thread Kumar Gala

On Jan 8, 2008, at 1:18 AM, Li Yang wrote:

> Remove device_type = "usb"
>
> Signed-off-by: Li Yang <[EMAIL PROTECTED]>
> ---
> Documentation/powerpc/booting-without-of.txt |4 
> arch/powerpc/boot/dts/mpc8313erdb.dts|1 -
> arch/powerpc/boot/dts/mpc832x_mds.dts|1 -
> arch/powerpc/boot/dts/mpc8349emitx.dts   |2 --
> arch/powerpc/boot/dts/mpc8349emitxgp.dts |1 -
> arch/powerpc/boot/dts/mpc834x_mds.dts|2 --
> arch/powerpc/boot/dts/mpc836x_mds.dts|1 -
> arch/powerpc/platforms/83xx/usb.c|8 
> arch/powerpc/sysdev/fsl_soc.c|   12 +---
> 9 files changed, 9 insertions(+), 23 deletions(-)

applied.

- k

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


Re: [PATCH 2/3 v2] add MPC837x USB platform support

2008-01-17 Thread Kumar Gala

On Jan 8, 2008, at 1:18 AM, Li Yang wrote:

> Add chip specific and board specific initialization for MPC837x USB.
>
> Signed-off-by: Li Yang <[EMAIL PROTECTED]>
> ---
> arch/powerpc/platforms/83xx/mpc837x_mds.c |   51  
> +
> arch/powerpc/platforms/83xx/mpc83xx.h |3 ++
> arch/powerpc/platforms/83xx/usb.c |   40  
> ++
> 3 files changed, 94 insertions(+), 0 deletions(-)

applied.

- k

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


Re: [PATCH 1/3] add default device trees for MPC837x MDS board

2008-01-17 Thread Kumar Gala

On Jan 7, 2008, at 6:03 AM, Li Yang wrote:

> Signed-off-by: Li Yang <[EMAIL PROTECTED]>
> ---
> address comments and use new dts spec.
>
> arch/powerpc/boot/dts/mpc8377_mds.dts |  277  
> +++
> arch/powerpc/boot/dts/mpc8378_mds.dts |  263  
> +
> arch/powerpc/boot/dts/mpc8379_mds.dts |  291  
> +
> 3 files changed, 831 insertions(+), 0 deletions(-)

applied.

- k

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


Re: [PATCH] Convert MPC837x device trees to dts-v1

2008-01-17 Thread Kumar Gala

On Jan 8, 2008, at 5:32 AM, Li Yang wrote:

> Signed-off-by: Li Yang <[EMAIL PROTECTED]>
> ---
> arch/powerpc/boot/dts/mpc8377_mds.dts |  148 +++ 
> +---
> arch/powerpc/boot/dts/mpc8378_mds.dts |  140 ++ 
> +---
> arch/powerpc/boot/dts/mpc8379_mds.dts |  156  
> +
> 3 files changed, 225 insertions(+), 219 deletions(-)

applied.

- k

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


Re: [PATCH v5] [POWERPC] Add LED driver for Promess Motion-PRO board.

2008-01-17 Thread Stephen Rothwell
Hi Marian,

On Thu, 17 Jan 2008 19:09:17 +0100 Marian Balakowicz <[EMAIL PROTECTED]> wrote:
>
> +static int __devinit mpled_probe(struct of_device *op,
> +  const struct of_device_id *match)
> +{
> + struct motionpro_led *mpled;
> + const unsigned int *of_blink_delay;
> + const char *label;
> + int err;
> +
> + dev_dbg(&op->dev, "mpled_probe: node=%s (op=%p, match=%p)\n",
> + op->node->name, op, match);
> +
> + mpled = kzalloc(sizeof(*mpled), GFP_KERNEL);
> + if (!mpled)
> + return -ENOMEM;
> +
> + mpled->gpt = of_iomap(op->node, 0);
> + if (!mpled->gpt) {
> + printk(KERN_ERR __FILE__ ": "
> + "Error mapping GPT registers for LED %s\n",
> + op->node->full_name);
> + err = -EIO;
> + goto err_free;
> + }
> +
> + /* initialize GPT for LED use */
> + mpled_init_led(&mpled->gpt->mode);
> +
> + spin_lock_init(&mpled->led_lock);
> + mpled->mode = LED_MODE_KERNEL;
> +
> + /* get LED label, used to register led classdev */
> + label = of_get_property(op->node, "label", NULL);
> + if (label == NULL) {
> + printk(KERN_ERR __FILE__ ": "
> + "No label property provided for LED %s\n",
> + op->node->full_name);
> + err = -EINVAL;
> + goto err_free;

goto err;

> +static struct of_device_id mpled_match[] = {

Make this const, please.

-- 
Cheers,
Stephen Rothwell[EMAIL PROTECTED]
http://www.canb.auug.org.au/~sfr/


pgp6ZzAezIn6s.pgp
Description: PGP signature
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2008-01-17 Thread Michael Ellerman
On Sat, 2007-12-08 at 04:07 +0530, Balbir Singh wrote:
> Here's a dumb simple implementation of fake NUMA nodes for PowerPC. Fake
> NUMA nodes can be specified using the following command line option
> 

> 
> Comments are as always welcome!

Here's some :)

> diff -puN arch/powerpc/mm/numa.c~ppc-fake-numa-easy arch/powerpc/mm/numa.c
> --- linux-2.6.24-rc4-mm1/arch/powerpc/mm/numa.c~ppc-fake-numa-easy
> 2007-12-07 21:25:55.0 +0530
> +++ linux-2.6.24-rc4-mm1-balbir/arch/powerpc/mm/numa.c2007-12-08 
> 03:19:46.0 +0530
> @@ -24,6 +24,8 @@
>  
>  static int numa_enabled = 1;
>  
> +static char *cmdline __initdata;

Can you call this fake_numa_args or something, cmdline is a bit generic.


> @@ -39,6 +41,43 @@ static bootmem_data_t __initdata plat_no
>  static int min_common_depth;
>  static int n_mem_addr_cells, n_mem_size_cells;
>  
> +static int __cpuinit fake_numa_create_new_node(unsigned long end_pfn,
> + unsigned int *nid)
> +{
> + unsigned long long mem;
> + char *p = cmdline;
> + static unsigned int fake_nid = 0;
> + static unsigned long long curr_boundary = 0;
> +
> + *nid = fake_nid;

As I mentioned in my other email I think this is broken, you
unconditionally overwrite *nid, even if no fake numa was specified?

> + if (!p)
> + return 0;
> +
> + mem = memparse(p, &p);
> + if (!mem)
> + return 0;
> +
> + if (mem < curr_boundary)
> + return 0;
> +
> + curr_boundary = mem;
> +
> + if ((end_pfn << PAGE_SHIFT) > mem) {
> + /*
> +  * Skip commas and spaces
> +  */
> + while (*p == ',' || *p == ' ' || *p == '\t')
> + p++;
> +
> + cmdline = p;
> + fake_nid++;
> + *nid = fake_nid;
> + dbg("created new fake_node with id %d\n", fake_nid);
> + return 1;
> + }
> + return 0;
> +}
> +
>  static void __cpuinit map_cpu_to_node(int cpu, int node)
>  {
>   numa_cpu_lookup_table[cpu] = node;
> @@ -344,12 +383,14 @@ static void __init parse_drconf_memory(s
>   if (nid == 0x || nid >= MAX_NUMNODES)
>   nid = default_nid;
>   }
> - node_set_online(nid);
>  
>   size = numa_enforce_memory_limit(start, lmb_size);
>   if (!size)
>   continue;
>  
> + fake_numa_create_new_node(((start + size) >> PAGE_SHIFT), &nid);
> + node_set_online(nid);

I can't convince myself that this is 100% ok, the moving of
node_set_online(). At the very least it's a change in behaviour,
previously we would online the node regardless of the memory limit.

>   add_active_range(nid, start >> PAGE_SHIFT,
>(start >> PAGE_SHIFT) + (size >> PAGE_SHIFT));
>   }
> @@ -429,7 +470,6 @@ new_range:
>   nid = of_node_to_nid_single(memory);
>   if (nid < 0)
>   nid = default_nid;
> - node_set_online(nid);
>  
>   if (!(size = numa_enforce_memory_limit(start, size))) {
>   if (--ranges)
> @@ -438,6 +478,9 @@ new_range:
>   continue;
>   }
>  
> + fake_numa_create_new_node(((start + size) >> PAGE_SHIFT), &nid);
> + node_set_online(nid);

Ditto previous comment.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person


signature.asc
Description: This is a digitally signed message part
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: Patches added to master/for-2.6.25 branch of powerpc.git

2008-01-17 Thread Grant Likely
On 1/17/08, Paul Mackerras <[EMAIL PROTECTED]> wrote:
> Grant Likely writes:
>
> > Paul, can you also please pull the following 52xx changes?
>
> Could you please re-do your tree and make sure the headline for each
> commit starts with "[POWERPC]" (unless it isn't powerpc-specific, in
> which case it probably shouldn't be in your tree...).

Oops, I thought I had done that.  Sorry, I'll get that respun ASAP.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2008-01-17 Thread Michael Ellerman
On Fri, 2008-01-18 at 16:34 +1100, Michael Ellerman wrote:
> On Sat, 2007-12-08 at 04:07 +0530, Balbir Singh wrote:
> > Changelog
> > 
> > 1. Get rid of the constant 5 (based on comments from
> > [EMAIL PROTECTED])
> > 2. Implement suggestions from Olof Johannson
> > 3. Check if cmdline is NULL in fake_numa_create_new_node()
> > 
> > Tested with additional parameters from Olof
> > 
> > numa=debug,fake=
> > numa=foo,fake=bar
> 
> 
> I'm not sure why yet, but git bisect tells me it's this patch that's
> causing the for-2.6.25 tree to explode on boot on cell machines.

This fixes it, although I'm a little worried about some of the
removals/movings of node_set_online() in the patch.


diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 1666e7d..dcedc26 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -49,7 +49,6 @@ static int __cpuinit fake_numa_create_new_node(unsigned long 
end_pfn,
static unsigned int fake_nid = 0;
static unsigned long long curr_boundary = 0;
 
-   *nid = fake_nid;
if (!p)
return 0;
 
@@ -60,6 +59,7 @@ static int __cpuinit fake_numa_create_new_node(unsigned long 
end_pfn,
if (mem < curr_boundary)
return 0;
 
+   *nid = fake_nid;
curr_boundary = mem;
 
if ((end_pfn << PAGE_SHIFT) > mem) {



signature.asc
Description: This is a digitally signed message part
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2008-01-17 Thread Michael Ellerman
On Sat, 2007-12-08 at 04:07 +0530, Balbir Singh wrote:
> Changelog
> 
> 1. Get rid of the constant 5 (based on comments from
> [EMAIL PROTECTED])
> 2. Implement suggestions from Olof Johannson
> 3. Check if cmdline is NULL in fake_numa_create_new_node()
> 
> Tested with additional parameters from Olof
> 
> numa=debug,fake=
> numa=foo,fake=bar


I'm not sure why yet, but git bisect tells me it's this patch that's
causing the for-2.6.25 tree to explode on boot on cell machines.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person


signature.asc
Description: This is a digitally signed message part
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

[PATCH 2/2] kdump shutdown hook support

2008-01-17 Thread Michael Neuling
This adds hooks into the default_machine_crash_shutdown so drivers can
register a function to be run in the first kernel before we hand off
to the second kernel.  This should only be used in exceptional
circumstances, like where the device can't be reset in the second
kernel alone (as is the case with eHEA).  To emphasize this, the
number of handles allowed to be registered is currently #def to 1.

This uses the setjmp/longjmp code to call out to the registered hooks,
so any bogus exceptions we encounter will hopefully be recoverable.  

Tested with bogus data and instruction exceptions.

Signed-off-by: Michael Neuling <[EMAIL PROTECTED]>
---

 arch/powerpc/kernel/crash.c |  106 +---
 include/asm-powerpc/kexec.h |3 +
 2 files changed, 104 insertions(+), 5 deletions(-)

Index: linux-2.6-ozlabs/arch/powerpc/kernel/crash.c
===
--- linux-2.6-ozlabs.orig/arch/powerpc/kernel/crash.c
+++ linux-2.6-ozlabs/arch/powerpc/kernel/crash.c
@@ -32,6 +32,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #ifdef DEBUG
 #include 
@@ -45,6 +47,11 @@ int crashing_cpu = -1;
 static cpumask_t cpus_in_crash = CPU_MASK_NONE;
 cpumask_t cpus_in_sr = CPU_MASK_NONE;
 
+#define CRASH_HANDLER_MAX 1
+/* NULL terminated list of shutdown handles */
+static crash_shutdown_t crash_shutdown_handles[CRASH_HANDLER_MAX+1];
+static DEFINE_SPINLOCK(crash_handlers_lock);
+
 #ifdef CONFIG_SMP
 static atomic_t enter_on_soft_reset = ATOMIC_INIT(0);
 
@@ -285,9 +292,72 @@ static inline void crash_kexec_stop_spus
 }
 #endif /* CONFIG_SPU_BASE */
 
+/*
+ * Register a function to be called on shutdown.  Only use this if you
+ * can't reset your device in the second kernel.
+ */
+int crash_shutdown_register(crash_shutdown_t handler)
+{
+   unsigned int i, rc;
+
+   spin_lock(&crash_handlers_lock);
+   for (i = 0 ; i < CRASH_HANDLER_MAX; i++)
+   if (!crash_shutdown_handles[i]) {
+   /* Insert handle at first empty entry */
+   crash_shutdown_handles[i] = handler;
+   rc = 0;
+   break;
+   }
+
+   if (i == CRASH_HANDLER_MAX) {
+   printk(KERN_ERR "Crash shutdown handles full, "
+  "not registered.\n");
+   rc = 1;
+   }
+
+   spin_unlock(&crash_handlers_lock);
+   return rc;
+}
+EXPORT_SYMBOL(crash_shutdown_register);
+
+int crash_shutdown_unregister(crash_shutdown_t handler)
+{
+   unsigned int i, rc;
+
+   spin_lock(&crash_handlers_lock);
+   for (i = 0 ; i < CRASH_HANDLER_MAX; i++)
+   if (crash_shutdown_handles[i] == handler)
+   break;
+
+   if (i == CRASH_HANDLER_MAX) {
+   printk(KERN_ERR "Crash shutdown handle not found\n");
+   rc = 1;
+   } else {
+   /* Shift handles down */
+   for (; crash_shutdown_handles[i]; i++)
+   crash_shutdown_handles[i] =
+   crash_shutdown_handles[i+1];
+   rc = 0;
+   }
+
+   spin_unlock(&crash_handlers_lock);
+   return rc;
+}
+EXPORT_SYMBOL(crash_shutdown_unregister);
+
+static unsigned long crash_shutdown_buf[JMP_BUF_LEN];
+
+static int handle_fault(struct pt_regs *regs)
+{
+   longjmp(crash_shutdown_buf, 1);
+   return 0;
+}
+
 void default_machine_crash_shutdown(struct pt_regs *regs)
 {
-   unsigned int irq;
+   unsigned int i;
+   int (*old_handler)(struct pt_regs *regs);
+
 
/*
 * This function is only called after the system
@@ -301,15 +371,41 @@ void default_machine_crash_shutdown(stru
 */
hard_irq_disable();
 
-   for_each_irq(irq) {
-   struct irq_desc *desc = irq_desc + irq;
+   for_each_irq(i) {
+   struct irq_desc *desc = irq_desc + i;
 
if (desc->status & IRQ_INPROGRESS)
-   desc->chip->eoi(irq);
+   desc->chip->eoi(i);
 
if (!(desc->status & IRQ_DISABLED))
-   desc->chip->disable(irq);
+   desc->chip->disable(i);
+   }
+
+   /*
+* Call registered shutdown routines savely.  Swap out
+* __debugger_fault_handler, and replace on exit.
+*/
+   old_handler = __debugger_fault_handler;
+   __debugger_fault_handler = handle_fault;
+   for (i = 0; crash_shutdown_handles[i]; i++) {
+   if (setjmp(crash_shutdown_buf) == 0) {
+   /*
+* Insert syncs and delay to ensure
+* instructions in the dangerous region don't
+* leak away from this protected region.
+*/
+   asm volatile("sync; isync");
+   /* dangerous region */
+   crash_shutdown

[PATCH 1/2] Make setjmp/longjmp code generic

2008-01-17 Thread Michael Neuling
This makes the setjmp/longjmp code used by xmon, generically available
to other code.  It also removes the requirement for debugger hooks to
be only called on 0x300 (data storage) exception.

Signed-off-by: Michael Neuling <[EMAIL PROTECTED]>
---

 arch/powerpc/kernel/misc.S   |   65 +++
 arch/powerpc/mm/fault.c  |6 +--
 arch/powerpc/xmon/setjmp.S   |   61 
 arch/powerpc/xmon/xmon.c |6 ---
 include/asm-powerpc/setjmp.h |   18 +++
 5 files changed, 86 insertions(+), 70 deletions(-)

Index: linux-2.6-ozlabs/arch/powerpc/kernel/misc.S
===
--- linux-2.6-ozlabs.orig/arch/powerpc/kernel/misc.S
+++ linux-2.6-ozlabs/arch/powerpc/kernel/misc.S
@@ -8,6 +8,8 @@
  * Adapted for iSeries by Mike Corrigan ([EMAIL PROTECTED])
  * PPC64 updates by Dave Engebretsen ([EMAIL PROTECTED])
  *
+ * setjmp/longjmp code by Paul Mackerras.
+ *
  * 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
@@ -15,6 +17,8 @@
  */
 #include 
 #include 
+#include 
+#include 
 
.text
 
@@ -51,3 +55,64 @@ _GLOBAL(kernel_execve)
bnslr
neg r3,r3
blr
+
+_GLOBAL(setjmp)
+   mflrr0
+   PPC_STL r0,0(r3)
+   PPC_STL r1,SZL(r3)
+   PPC_STL r2,2*SZL(r3)
+   mfcrr0
+   PPC_STL r0,3*SZL(r3)
+   PPC_STL r13,4*SZL(r3)
+   PPC_STL r14,5*SZL(r3)
+   PPC_STL r15,6*SZL(r3)
+   PPC_STL r16,7*SZL(r3)
+   PPC_STL r17,8*SZL(r3)
+   PPC_STL r18,9*SZL(r3)
+   PPC_STL r19,10*SZL(r3)
+   PPC_STL r20,11*SZL(r3)
+   PPC_STL r21,12*SZL(r3)
+   PPC_STL r22,13*SZL(r3)
+   PPC_STL r23,14*SZL(r3)
+   PPC_STL r24,15*SZL(r3)
+   PPC_STL r25,16*SZL(r3)
+   PPC_STL r26,17*SZL(r3)
+   PPC_STL r27,18*SZL(r3)
+   PPC_STL r28,19*SZL(r3)
+   PPC_STL r29,20*SZL(r3)
+   PPC_STL r30,21*SZL(r3)
+   PPC_STL r31,22*SZL(r3)
+   li  r3,0
+   blr
+
+_GLOBAL(longjmp)
+   PPC_LCMPI r4,0
+   bne 1f
+   li  r4,1
+1: PPC_LL  r13,4*SZL(r3)
+   PPC_LL  r14,5*SZL(r3)
+   PPC_LL  r15,6*SZL(r3)
+   PPC_LL  r16,7*SZL(r3)
+   PPC_LL  r17,8*SZL(r3)
+   PPC_LL  r18,9*SZL(r3)
+   PPC_LL  r19,10*SZL(r3)
+   PPC_LL  r20,11*SZL(r3)
+   PPC_LL  r21,12*SZL(r3)
+   PPC_LL  r22,13*SZL(r3)
+   PPC_LL  r23,14*SZL(r3)
+   PPC_LL  r24,15*SZL(r3)
+   PPC_LL  r25,16*SZL(r3)
+   PPC_LL  r26,17*SZL(r3)
+   PPC_LL  r27,18*SZL(r3)
+   PPC_LL  r28,19*SZL(r3)
+   PPC_LL  r29,20*SZL(r3)
+   PPC_LL  r30,21*SZL(r3)
+   PPC_LL  r31,22*SZL(r3)
+   PPC_LL  r0,3*SZL(r3)
+   mtcrf   0x38,r0
+   PPC_LL  r0,0(r3)
+   PPC_LL  r1,SZL(r3)
+   PPC_LL  r2,2*SZL(r3)
+   mtlrr0
+   mr  r3,r4
+   blr
Index: linux-2.6-ozlabs/arch/powerpc/mm/fault.c
===
--- linux-2.6-ozlabs.orig/arch/powerpc/mm/fault.c
+++ linux-2.6-ozlabs/arch/powerpc/mm/fault.c
@@ -167,10 +167,8 @@ int __kprobes do_page_fault(struct pt_re
if (notify_page_fault(regs))
return 0;
 
-   if (trap == 0x300) {
-   if (debugger_fault_handler(regs))
-   return 0;
-   }
+   if (unlikely(debugger_fault_handler(regs)))
+   return 0;
 
/* On a kernel SLB miss we can only check for a valid exception entry */
if (!user_mode(regs) && (address >= TASK_SIZE))
Index: linux-2.6-ozlabs/arch/powerpc/xmon/setjmp.S
===
--- linux-2.6-ozlabs.orig/arch/powerpc/xmon/setjmp.S
+++ linux-2.6-ozlabs/arch/powerpc/xmon/setjmp.S
@@ -12,67 +12,6 @@
 #include 
 #include 
 
-_GLOBAL(xmon_setjmp)
-   mflrr0
-   PPC_STL r0,0(r3)
-   PPC_STL r1,SZL(r3)
-   PPC_STL r2,2*SZL(r3)
-   mfcrr0
-   PPC_STL r0,3*SZL(r3)
-   PPC_STL r13,4*SZL(r3)
-   PPC_STL r14,5*SZL(r3)
-   PPC_STL r15,6*SZL(r3)
-   PPC_STL r16,7*SZL(r3)
-   PPC_STL r17,8*SZL(r3)
-   PPC_STL r18,9*SZL(r3)
-   PPC_STL r19,10*SZL(r3)
-   PPC_STL r20,11*SZL(r3)
-   PPC_STL r21,12*SZL(r3)
-   PPC_STL r22,13*SZL(r3)
-   PPC_STL r23,14*SZL(r3)
-   PPC_STL r24,15*SZL(r3)
-   PPC_STL r25,16*SZL(r3)
-   PPC_STL r26,17*SZL(r3)
-   PPC_STL r27,18*SZL(r3)
-   PPC_STL r28,19*SZL(r3)
-   PPC_STL r29,20*SZL(r3)
-   PPC_STL r30,21*SZL(r3)
-   PPC_STL r31,22*SZL(r3)
-   li  r3,0
-   blr
-
-_GLOBAL(xmon_longjmp)
-   PPC_LCMPI r4,0
-   bne 1f
-   li  r4,1
-1: PPC_LL  r13,4*SZL(r3)
-   PPC_LL  r14,5*SZL(r3)
-   PPC_LL  r15,6*SZL(r3)
-   PPC_LL  r16,7*SZL(r3)
-   PPC_LL  r17,8*SZL(r3)
-   PPC_LL  r18,9*SZL(r3)
-

[PATCH 0/2] Add crashdump shutdown hooks

2008-01-17 Thread Michael Neuling
The following patches add crashdump shutdown hooks for POWERPC.

Signed-off-by: Michael Neuling <[EMAIL PROTECTED]>
---
Sorry, last update didn't include both patches.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: Patches added to master/for-2.6.25 branch of powerpc.git

2008-01-17 Thread Paul Mackerras
Grant Likely writes:

> Paul, can you also please pull the following 52xx changes?

Could you please re-do your tree and make sure the headline for each
commit starts with "[POWERPC]" (unless it isn't powerpc-specific, in
which case it probably shouldn't be in your tree...).

Thanks,
Paul.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] [POWERPC] Fix incorrect interrupt map on FSL reference boards

2008-01-17 Thread Kumar Gala
The ULI based boards had the interrupt maps for USB on the ULI incorrectly
set.

Also, the MPC8572DS was missing the interrupt-map-mask for the 3rd PCIe
controller.

---
 arch/powerpc/boot/dts/mpc8544ds.dts|6 +++---
 arch/powerpc/boot/dts/mpc8572ds.dts|7 ---
 arch/powerpc/boot/dts/mpc8641_hpcn.dts |6 +++---
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts 
b/arch/powerpc/boot/dts/mpc8544ds.dts
index 54b3bdf..688af9d 100644
--- a/arch/powerpc/boot/dts/mpc8544ds.dts
+++ b/arch/powerpc/boot/dts/mpc8544ds.dts
@@ -304,9 +304,9 @@
interrupt-map = <
// IDSEL 0x1c  USB
e000 0 0 1 &i8259 c 2
-   e100 0 0 1 &i8259 9 2
-   e200 0 0 1 &i8259 a 2
-   e300 0 0 1 &i8259 b 2
+   e100 0 0 2 &i8259 9 2
+   e200 0 0 3 &i8259 a 2
+   e300 0 0 4 &i8259 b 2

// IDSEL 0x1d  Audio
e800 0 0 1 &i8259 6 2
diff --git a/arch/powerpc/boot/dts/mpc8572ds.dts 
b/arch/powerpc/boot/dts/mpc8572ds.dts
index 233e0d5..813c259 100644
--- a/arch/powerpc/boot/dts/mpc8572ds.dts
+++ b/arch/powerpc/boot/dts/mpc8572ds.dts
@@ -334,9 +334,9 @@

// IDSEL 0x1c  USB
e000 0 0 1 &i8259 c 2
-   e100 0 0 1 &i8259 9 2
-   e200 0 0 1 &i8259 a 2
-   e300 0 0 1 &i8259 b 2
+   e100 0 0 2 &i8259 9 2
+   e200 0 0 3 &i8259 a 2
+   e300 0 0 4 &i8259 b 2

// IDSEL 0x1d  Audio
e800 0 0 1 &i8259 6 2
@@ -481,6 +481,7 @@
clock-frequency = <1fca055>;
interrupt-parent = <&mpic>;
interrupts = <1b 2>;
+   interrupt-map-mask = ;
interrupt-map = <
/* IDSEL 0x0 */
 0 0 1 &mpic 0 1
diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts 
b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
index 86fc228..a719179 100644
--- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts
+++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
@@ -326,9 +326,9 @@

// IDSEL 0x1c  USB
e000 0 0 1 &i8259 c 2
-   e100 0 0 1 &i8259 9 2
-   e200 0 0 1 &i8259 a 2
-   e300 0 0 1 &i8259 b 2
+   e100 0 0 2 &i8259 9 2
+   e200 0 0 3 &i8259 a 2
+   e300 0 0 4 &i8259 b 2

// IDSEL 0x1d  Audio
e800 0 0 1 &i8259 6 2
-- 
1.5.3.7

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


Re: L3CR

2008-01-17 Thread Kumar Gala

On Jan 17, 2008, at 4:26 PM, [EMAIL PROTECTED] wrote:

> It there a l3cr parameter? It's not in the kernel documentation. I'm
> trying to enable L2 and L3 cache on a G4 cpu upgrade board in a  
> powermac.
>
>> From OSX I was able to get the values of:
> l2cr = 0x8000
> and
> l3cr = 0x9F020300
>
> from a cache config utility. I've seen references to l3cr setting on
> bsd lists but not for linux.
>
> Thanks...

have you looked in /proc/sys/kernel/l[2,3]cr?

(can't remember if we had a l3cr as well)

- k

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


Re: [PATCH] [POWERPC] Update TQM5200, CM5200 and Motion-PRO _defconfig and .dts files

2008-01-17 Thread Olof Johansson
On Thu, Jan 17, 2008 at 11:05:12PM +0100, Marian Balakowicz wrote:
> Grant Likely wrote:
> > On 1/17/08, Marian Balakowicz <[EMAIL PROTECTED]> wrote:
> >> Grant Likely wrote:
> >>> On 1/17/08, Marian Balakowicz <[EMAIL PROTECTED]> wrote:
> ...
> >>> Can you split the defconfig changes into a separate patch...  That
> >>> being said, how do you feel about merging all the 5200 defconfigs into
> >>> a single defconfig?  They are all multiplatform after all and it would
> >>> make maintenance easier.
> >> Ok, I'll split it into two patches.
> >>
> >> But merging defconfigs won't be a good option, boards differ in which
> >> devices they use, some have PCI, some have USB, etc. Having one
> >> defconfig, it would be necessary to manually customize kernel
> >> configuration and remember which options are to be set/disabled.
> > 
> > That doesn't matter for defconfigs.  That needs to be done when you're
> > tailoring a product regardless.  defconfigs are simply a known good
> > configuration; they are not intended to be the deployed config.  If
> > the defconfig enables all features used by any of the boards then it
> > should be okay.
> 
> That's true, defconfigs are only reference configurations, but still,
> I would opt for a separate defconfigs as it is more clear which target
> given defconfig is meant for and it is more convenient for development
> and customer to have it separate. And IMHO it's actually easier to
> maintain, as you don't need to consider all three boards each time you
> update defconfig and don't need to test each defconfig change on three
> (right now) boards, etc.

I disagree, I have one defconfig for all our boards to date. It means I
only have one kernel to build to test on all boards, instead of having
to build a number of different kernels. Keeping it fairly generic also
means a customer can start out using the generic kernel in case they
want to, and later on add their own drivers and prune out what is not
needed.


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


[PATCH] Fix carry bug in 128-bit unsigned integer adding

2008-01-17 Thread Liu Yu
Synchronize it to the definition in include/math-emu/op-4.h for short term.

Signed-off-by: Liu Yu <[EMAIL PROTECTED]>
---
 arch/powerpc/math-emu/op-4.h |   40 ++--
 1 files changed, 30 insertions(+), 10 deletions(-)

diff --git a/arch/powerpc/math-emu/op-4.h b/arch/powerpc/math-emu/op-4.h
index fcdd6d0..c9ae626 100644
--- a/arch/powerpc/math-emu/op-4.h
+++ b/arch/powerpc/math-emu/op-4.h
@@ -194,19 +194,39 @@
   (X##_f[3] = I3, X##_f[2] = I2, X##_f[1] = I1, X##_f[0] = I0)
 
 #ifndef __FP_FRAC_ADD_4
-#define __FP_FRAC_ADD_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0)   \
-  (r0 = x0 + y0,   \
-   r1 = x1 + y1 + (r0 < x0),   \
-   r2 = x2 + y2 + (r1 < x1),   \
-   r3 = x3 + y3 + (r2 < x2))
+#define __FP_FRAC_ADD_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0)   \
+  do { \
+int _c1, _c2, _c3; \
+r0 = x0 + y0;  \
+_c1 = r0 < x0; \
+r1 = x1 + y1;  \
+_c2 = r1 < x1; \
+r1 += _c1; \
+_c2 |= r1 < _c1;   \
+r2 = x2 + y2;  \
+_c3 = r2 < x2; \
+r2 += _c2; \
+_c3 |= r2 < _c2;   \
+r3 = x3 + y3 + _c3;\
+  } while (0)
 #endif
 
 #ifndef __FP_FRAC_SUB_4
-#define __FP_FRAC_SUB_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0)   \
-  (r0 = x0 - y0,\
-   r1 = x1 - y1 - (r0 > x0),\
-   r2 = x2 - y2 - (r1 > x1),\
-   r3 = x3 - y3 - (r2 > x2))
+#define __FP_FRAC_SUB_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0)   \
+  do { \
+int _c1, _c2, _c3; \
+r0 = x0 - y0;  \
+_c1 = r0 > x0; \
+r1 = x1 - y1;  \
+_c2 = r1 > x1; \
+r1 -= _c1; \
+_c2 |= r1 > _c1;   \
+r2 = x2 - y2;  \
+_c3 = r2 > x2; \
+r2 -= _c2; \
+_c3 |= r2 > _c2;   \
+r3 = x3 - y3 - _c3;\
+  } while (0)
 #endif
 
 #ifndef __FP_FRAC_ADDI_4
-- 
1.5.2

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


Re: 2.6.24-rc8-mm1: powerpc oopses

2008-01-17 Thread Matt Mackall

On Thu, 2008-01-17 at 17:07 -0800, Andrew Morton wrote:
> That worked out nicely.

Cool, feel free to add:

Signed-off-by: Matt Mackall <[EMAIL PROTECTED]>

> Wasn't the old code potentially pte_unmap()ping the wrong address?  If we
> enter with addr==end?

Yes, that was busted.

-- 
Mathematics is the supreme nostalgia of our time.

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


Re: 2.6.24-rc8-mm1: powerpc oopses

2008-01-17 Thread Andrew Morton
On Thu, 17 Jan 2008 18:47:17 -0600
Matt Mackall <[EMAIL PROTECTED]> wrote:

> 
> On Thu, 2008-01-17 at 16:29 -0800, Andrew Morton wrote:
> > Do we need `offset' at all?
> 
> Looks like no.
> 
> I wonder if there's a good argument for adding a pte_offset_val() which
> would let us do:
> 
> pteval = pte_offset_val(pmd, addr);
> 
> and shrink the map/unmap window and overhead here and possibly
> elsewhere?
> 
> Anyway, updated but still untested patch now with revealing comment:
> 
> diff -r 5595adaea70f fs/proc/task_mmu.c
> --- a/fs/proc/task_mmu.c  Thu Jan 17 13:26:54 2008 -0600
> +++ b/fs/proc/task_mmu.c  Thu Jan 17 18:45:57 2008 -0600
> @@ -584,18 +585,19 @@
>   pte_t *pte;
>   int err = 0;
>  
> - pte = pte_offset_map(pmd, addr);
> - for (; addr != end; pte++, addr += PAGE_SIZE) {
> + for (; addr != end; addr += PAGE_SIZE) {
>   u64 pfn = PM_NOT_PRESENT;
> + pte = pte_offset_map(pmd, addr);
>   if (is_swap_pte(*pte))
>   pfn = swap_pte_to_pagemap_entry(*pte);
>   else if (pte_present(*pte))
>   pfn = pte_pfn(*pte);
> + /* unmap so we're not in atomic when we copy to userspace */
> + pte_unmap(pte);
>   err = add_to_pagemap(addr, pfn, pm);
>   if (err)
>   return err;
>   }
> - pte_unmap(pte - 1);
>  
>   cond_resched();

That worked out nicely.

Wasn't the old code potentially pte_unmap()ping the wrong address?  If we
enter with addr==end?

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


[PATCH] [POWERPC] Fix a couple of copyright symbols

2008-01-17 Thread Stephen Rothwell

Signed-off-by: Stephen Rothwell <[EMAIL PROTECTED]>
---
 arch/powerpc/kernel/systbl_chk.c  |2 +-
 arch/powerpc/kernel/systbl_chk.sh |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Patchwork strikes again. :-(

diff --git a/arch/powerpc/kernel/systbl_chk.c b/arch/powerpc/kernel/systbl_chk.c
index 77824d1..238aa63 100644
--- a/arch/powerpc/kernel/systbl_chk.c
+++ b/arch/powerpc/kernel/systbl_chk.c
@@ -6,7 +6,7 @@
  * Unfortunately, we cannot check for the correct ordering of entries
  * using SYSX().
  *
- * Copyright © IBM Corporation
+ * Copyright © IBM Corporation
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
diff --git a/arch/powerpc/kernel/systbl_chk.sh 
b/arch/powerpc/kernel/systbl_chk.sh
index 367d208..19415e7 100644
--- a/arch/powerpc/kernel/systbl_chk.sh
+++ b/arch/powerpc/kernel/systbl_chk.sh
@@ -3,7 +3,7 @@
 # Just process the CPP output from systbl_chk.c and complain
 # if anything is out of order.
 #
-# Copyright © 2008 IBM Corporation
+# Copyright © 2008 IBM Corporation
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
-- 
1.5.3.8

-- 
Cheers,
Stephen Rothwell[EMAIL PROTECTED]
http://www.canb.auug.org.au/~sfr/
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: Patches added to master/for-2.6.25 branch of powerpc.git

2008-01-17 Thread Stephen Rothwell
How about "[POWERPC] make ibmebus use of_(un)register_driver"
(http://patchwork.ozlabs.org/linuxppc/patch?id=16128)? It was acked by
Joachim.

-- 
Cheers,
Stephen Rothwell[EMAIL PROTECTED]
http://www.canb.auug.org.au/~sfr/


pgpjwxUAFOBBV.pgp
Description: PGP signature
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: 2.6.24-rc8-mm1: powerpc oopses

2008-01-17 Thread Matt Mackall

On Thu, 2008-01-17 at 16:29 -0800, Andrew Morton wrote:
> Do we need `offset' at all?

Looks like no.

I wonder if there's a good argument for adding a pte_offset_val() which
would let us do:

pteval = pte_offset_val(pmd, addr);

and shrink the map/unmap window and overhead here and possibly
elsewhere?

Anyway, updated but still untested patch now with revealing comment:

diff -r 5595adaea70f fs/proc/task_mmu.c
--- a/fs/proc/task_mmu.cThu Jan 17 13:26:54 2008 -0600
+++ b/fs/proc/task_mmu.cThu Jan 17 18:45:57 2008 -0600
@@ -584,18 +585,19 @@
pte_t *pte;
int err = 0;
 
-   pte = pte_offset_map(pmd, addr);
-   for (; addr != end; pte++, addr += PAGE_SIZE) {
+   for (; addr != end; addr += PAGE_SIZE) {
u64 pfn = PM_NOT_PRESENT;
+   pte = pte_offset_map(pmd, addr);
if (is_swap_pte(*pte))
pfn = swap_pte_to_pagemap_entry(*pte);
else if (pte_present(*pte))
pfn = pte_pfn(*pte);
+   /* unmap so we're not in atomic when we copy to userspace */
+   pte_unmap(pte);
err = add_to_pagemap(addr, pfn, pm);
if (err)
return err;
}
-   pte_unmap(pte - 1);
 
cond_resched();
 


-- 
Mathematics is the supreme nostalgia of our time.

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


Re: [PATCH/RFCv2] [POWERPC] Add support for freescale watchdog to CPM serial driver.

2008-01-17 Thread Stephen Rothwell
On Thu, 17 Jan 2008 13:32:35 +0100 Jochen Friedrich <[EMAIL PROTECTED]> wrote:
>
> If a freescale watchdog device node is present, reset the watchdog
> while waiting for serial input.
> 
> Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]>
> ---
>  arch/powerpc/boot/Makefile |2 +-
>  arch/powerpc/boot/cpm-serial.c |6 
>  arch/powerpc/boot/cuboot-8xx.c |1 +
>  arch/powerpc/boot/ops.h|2 +
>  arch/powerpc/boot/watchdog.c   |   65 
> 

I am just wondering if maybe that file name is to generic.

-- 
Cheers,
Stephen Rothwell[EMAIL PROTECTED]
http://www.canb.auug.org.au/~sfr/


pgpxlJ6NZW4BK.pgp
Description: PGP signature
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: [Add mpc5121 support PATCHES v3 0/8]

2008-01-17 Thread Grant Likely
On 1/17/08, John Rigby <[EMAIL PROTECTED]> wrote:
> This is a new improved set of patches based on the
> comments that I received in response to the previous set.
>
> Changes since v2:
>
> 1/8 Add-IPIC-config-option.patch
> 2/8 Add-mpc512x-ipic-support.patch
> No changes.  These two are in galak's queue for submission.
>
> 3/8 Basic-Freescale-MPC512x-support.patch
> Added missing of_put_node as pointed out by Stephen Rothwell
> Added Acked-by: Grant Likely <[EMAIL PROTECTED]>
>
> 4/8 Device-tree-for-MPC5121-ADS.patch
> Made changes suggested by Grant Likely
>
> 5/8 Separate-MPC52xx-PSC-FIFO-registers-from-rest-of-PSC.patch
> 6/8 Cleanup-checkpatch.pl-problems-in-mpc52xx_uart.c.patch
> No changes.  Grant is picking up these patches
>
> 7/8 Factor-out-52xx-dependencies-from-52xx-psc-driver.patch
> No changes.  No comments received.  Too ugly to comment?

No; I'm just percolating on these two.  I'll probably pick these up,
but I need to look at them in greater detail first.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


RE: Problems with PCI on 8280

2008-01-17 Thread Rune Torgersen
From: Scott Wood

>Hmm...  that suggests that something in u-boot's setup is either 
>incorrect, or (more likely in this case) doesn't match the device tree.

Turns out u-boot was not setting u the inbound window size correctly.
It was hardcoded to 512MB and we have a gig of ram. Set it correctly, and CPI 
now works fully even without fixup_pci()

>Ah.  Yes, I was assuming both windows would be the same size.  The code 
>should be changed to check that, and if any conditions for setting 
>PCIBRx/PCIMSKx fail, check to see if the firmware-provided values work 
>(and if not, bail without touching anything).

yup. In our case we only need one window.

BTW. there is a bug in the inbound window size calculation.
The mem_log2 variable sould be the shift value, not 1<< shift.
and on the next line the window size mask sould be anded with 0x000f_ 
before or'ed with 0xa000_

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

Re: 2.6.24-rc8-mm1: powerpc oopses

2008-01-17 Thread Andrew Morton
On Thu, 17 Jan 2008 18:12:48 -0600
Matt Mackall <[EMAIL PROTECTED]> wrote:

> 
> > Do we need the ifdef?  pte_offset_map/pte_unmap should be super-cheap on
> > !CONFIG_HIGHPTE builds.
> 
> In that case, pte_unmap is free, pte_offset_map is just a bit of math.
> So yeah, we can simplify this. How about:
> 
> diff -r 5595adaea70f fs/proc/task_mmu.c
> --- a/fs/proc/task_mmu.c  Thu Jan 17 13:26:54 2008 -0600
> +++ b/fs/proc/task_mmu.c  Thu Jan 17 18:11:13 2008 -0600
> @@ -582,20 +583,20 @@
>  {
>   struct pagemapread *pm = private;
>   pte_t *pte;
> - int err = 0;
> + int offset = 0, err = 0;
>  
> - pte = pte_offset_map(pmd, addr);
> - for (; addr != end; pte++, addr += PAGE_SIZE) {
> + for (; addr != end; offset++, addr += PAGE_SIZE) {
>   u64 pfn = PM_NOT_PRESENT;
> - if (is_swap_pte(*pte))
> - pfn = swap_pte_to_pagemap_entry(*pte);
> - else if (pte_present(*pte))
> - pfn = pte_pfn(*pte);
> + pte = pte_offset_map(pmd, addr);
> + if (is_swap_pte(pte[offset]))
> + pfn = swap_pte_to_pagemap_entry(pte[offset]);
> + else if (pte_present(pte[offset]))
> + pfn = pte_pfn(pte[offset]);
> + pte_unmap(pte);
>   err = add_to_pagemap(addr, pfn, pm);
>   if (err)
>   return err;
>   }
> - pte_unmap(pte - 1);
>  
>   cond_resched();
> 

Do we need `offset' at all?

You have

static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
 void *private)
{
struct pagemapread *pm = private;
pte_t *pte;
int offset = 0, err = 0;

for (; addr != end; offset++, addr += PAGE_SIZE) {
u64 pfn = PM_NOT_PRESENT;
pte = pte_offset_map(pmd, addr);
if (is_swap_pte(pte[offset]))
pfn = swap_pte_to_pagemap_entry(pte[offset]);
else if (pte_present(pte[offset]))
pfn = pte_pfn(pte[offset]);
pte_unmap(pte);
err = add_to_pagemap(addr, pfn, pm);
if (err)
return err;
}

cond_resched();

return err;
}

but I think we just do s/pte[offset]/*pte/.  The virtual address should be
the only thing we need to increment as we walk across the addresses here?


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


Re: 2.6.24-rc8-mm1: powerpc oopses

2008-01-17 Thread Matt Mackall

On Thu, 2008-01-17 at 16:05 -0800, Andrew Morton wrote:
> On Thu, 17 Jan 2008 17:39:54 -0600
> Matt Mackall <[EMAIL PROTECTED]> wrote:
> 
> > 
> > On Thu, 2008-01-17 at 14:51 -0800, Andrew Morton wrote:
> > > > proc_loop: /proc/3731/task/3731/pagemap
> > > > kernel: BUG: sleeping function called from invalid context at 
> > > > fs/proc/task_mmu.c:554
> > > > kernel: in_atomic():1, irqs_disabled():0
> > > > kernel: Call Trace:
> > > > kernel: [cf1cddf0] [c000840c] show_stack+0x3c/0x194 (unreliable)
> > > > kernel: [cf1cde20] [c002b2ec] __might_sleep+0xf4/0x108
> > > > kernel: [cf1cde30] [c00d2d54] add_to_pagemap+0x40/0x11c
> > > > kernel: [cf1cde50] [c00d2f44] pagemap_pte_range+0xa8/0x10c
> > > > kernel: [cf1cde70] [c0081b30] walk_page_range+0x148/0x23c
> > > > kernel: [cf1cdeb0] [c00d3104] pagemap_read+0x15c/0x244
> > > > kernel: [cf1cdef0] [c0092144] vfs_read+0xc4/0x16c
> > > > kernel: [cf1cdf10] [c009261c] sys_read+0x4c/0x90
> > > > kernel: [cf1cdf40] [c001328c] ret_from_syscall+0x0/0x40
> > > 
> > > It's not really an oops - it's a warning.  add_to_pagemap() is doing a
> > > put_user() inside pagemap_pte_range->pte_offset_map->kmap_atomic.
> > > 
> > > A known bug, I'm afraid.
> > > 
> > > How to fix?
> > > 
> > > - double-buffer the data to be copied to userspace or
> > > 
> > > - take a local copy of the pte page then work on that instead or
> > > 
> > > - play copy_to_user_inatomic() tricks.
> > 
> > Hmm, this fell off my radar. How about something like this as a minimal
> > fix (untested as -mm is a complete doorstop for me at the moment)?
> > 
> > diff -r 5595adaea70f fs/proc/task_mmu.c
> > --- a/fs/proc/task_mmu.cThu Jan 17 13:26:54 2008 -0600
> > +++ b/fs/proc/task_mmu.cThu Jan 17 17:29:21 2008 -0600
> > @@ -582,20 +583,26 @@
> >  {
> > struct pagemapread *pm = private;
> > pte_t *pte;
> > -   int err = 0;
> > +   int offset = 0, err = 0;
> >  
> > pte = pte_offset_map(pmd, addr);
> > -   for (; addr != end; pte++, addr += PAGE_SIZE) {
> > +   for (; addr != end; offset++, addr += PAGE_SIZE) {
> > u64 pfn = PM_NOT_PRESENT;
> > -   if (is_swap_pte(*pte))
> > -   pfn = swap_pte_to_pagemap_entry(*pte);
> > -   else if (pte_present(*pte))
> > -   pfn = pte_pfn(*pte);
> > +   if (is_swap_pte(pte[offset]))
> > +   pfn = swap_pte_to_pagemap_entry(pte[offset]);
> > +   else if (pte_present(pte[offset]))
> > +   pfn = pte_pfn(pte[offset]);
> > +#ifdef CONFIG_HIGHPTE
> > +   pte_unmap(pte);
> > err = add_to_pagemap(addr, pfn, pm);
> > +   pte = pte_offset_map(pmd, addr);
> > +#else
> > +   err = add_to_pagemap(addr, pfn, pm);
> > +#endif
> > if (err)
> > return err;
> > }
> > -   pte_unmap(pte - 1);
> > +   pte_unmap(pte);
> >  
> > cond_resched();
> >  
> 
> Good point, it really can be taht simple.
> 
> Do we need the ifdef?  pte_offset_map/pte_unmap should be super-cheap on
> !CONFIG_HIGHPTE builds.

In that case, pte_unmap is free, pte_offset_map is just a bit of math.
So yeah, we can simplify this. How about:

diff -r 5595adaea70f fs/proc/task_mmu.c
--- a/fs/proc/task_mmu.cThu Jan 17 13:26:54 2008 -0600
+++ b/fs/proc/task_mmu.cThu Jan 17 18:11:13 2008 -0600
@@ -582,20 +583,20 @@
 {
struct pagemapread *pm = private;
pte_t *pte;
-   int err = 0;
+   int offset = 0, err = 0;
 
-   pte = pte_offset_map(pmd, addr);
-   for (; addr != end; pte++, addr += PAGE_SIZE) {
+   for (; addr != end; offset++, addr += PAGE_SIZE) {
u64 pfn = PM_NOT_PRESENT;
-   if (is_swap_pte(*pte))
-   pfn = swap_pte_to_pagemap_entry(*pte);
-   else if (pte_present(*pte))
-   pfn = pte_pfn(*pte);
+   pte = pte_offset_map(pmd, addr);
+   if (is_swap_pte(pte[offset]))
+   pfn = swap_pte_to_pagemap_entry(pte[offset]);
+   else if (pte_present(pte[offset]))
+   pfn = pte_pfn(pte[offset]);
+   pte_unmap(pte);
err = add_to_pagemap(addr, pfn, pm);
if (err)
return err;
}
-   pte_unmap(pte - 1);
 
cond_resched();

-- 
Mathematics is the supreme nostalgia of our time.

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


[Add mpc5121 support PATCH v3 5/8] Separate MPC52xx PSC FIFO registers from rest of PSC

2008-01-17 Thread John Rigby
This is in preparation for the addition of MPC512x
PSC support.  The main difference in the 512x is
in the fifo registers.

Signed-off-by: John Rigby <[EMAIL PROTECTED]>
---
 drivers/serial/mpc52xx_uart.c |   10 ++
 include/asm-powerpc/mpc52xx_psc.h |3 +++
 include/asm-ppc/mpc52xx_psc.h |3 +++
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index ec36ad7..25a91c9 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -111,6 +111,7 @@ static void mpc52xx_uart_of_enumerate(void);
 #endif
 
 #define PSC(port) ((struct mpc52xx_psc __iomem *)((port)->membase))
+#define FIFO(port) ((struct mpc52xx_psc_fifo __iomem *)(PSC(port)+1))
 
 
 /* Forward declaration of the interruption handling routine */
@@ -222,6 +223,7 @@ static int
 mpc52xx_uart_startup(struct uart_port *port)
 {
struct mpc52xx_psc __iomem *psc = PSC(port);
+   struct mpc52xx_psc_fifo __iomem *fifo = FIFO(port);
int ret;
 
/* Request IRQ */
@@ -238,10 +240,10 @@ mpc52xx_uart_startup(struct uart_port *port)
 
out_be16(&psc->mpc52xx_psc_clock_select, 0xdd00); /* /16 prescaler on */
 
-   out_8(&psc->rfcntl, 0x00);
-   out_be16(&psc->rfalarm, 0x1ff);
-   out_8(&psc->tfcntl, 0x07);
-   out_be16(&psc->tfalarm, 0x80);
+   out_8(&fifo->rfcntl, 0x00);
+   out_be16(&fifo->rfalarm, 0x1ff);
+   out_8(&fifo->tfcntl, 0x07);
+   out_be16(&fifo->tfalarm, 0x80);
 
port->read_status_mask |= MPC52xx_PSC_IMR_RXRDY | MPC52xx_PSC_IMR_TXRDY;
out_be16(&psc->mpc52xx_psc_imr,port->read_status_mask);
diff --git a/include/asm-powerpc/mpc52xx_psc.h 
b/include/asm-powerpc/mpc52xx_psc.h
index 26690d2..bea42b9 100644
--- a/include/asm-powerpc/mpc52xx_psc.h
+++ b/include/asm-powerpc/mpc52xx_psc.h
@@ -153,6 +153,9 @@ struct mpc52xx_psc {
u8  reserved16[3];
u8  irfdr;  /* PSC + 0x54 */
u8  reserved17[3];
+};
+
+struct mpc52xx_psc_fifo {
u16 rfnum;  /* PSC + 0x58 */
u16 reserved18;
u16 tfnum;  /* PSC + 0x5c */
diff --git a/include/asm-ppc/mpc52xx_psc.h b/include/asm-ppc/mpc52xx_psc.h
index c82b8d4..39fcd02 100644
--- a/include/asm-ppc/mpc52xx_psc.h
+++ b/include/asm-ppc/mpc52xx_psc.h
@@ -159,6 +159,9 @@ struct mpc52xx_psc {
u8  reserved16[3];
u8  irfdr;  /* PSC + 0x54 */
u8  reserved17[3];
+};
+
+struct mpc52xx_psc_fifo {
u16 rfnum;  /* PSC + 0x58 */
u16 reserved18;
u16 tfnum;  /* PSC + 0x5c */
-- 
1.5.3.5.726.g41a7a

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


[Add mpc5121 support PATCH v3 6/8] Cleanup checkpatch.pl problems in mpc52xx_uart.c

2008-01-17 Thread John Rigby
In preparation of adding MPC5121 support
cleanup some things that checkpatch.pl complains
about also some minor fixes suggested by
Stephen Rothwell.

Signed-off-by: John Rigby <[EMAIL PROTECTED]>
---
 drivers/serial/mpc52xx_uart.c |  204 ++---
 1 files changed, 109 insertions(+), 95 deletions(-)

diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index 25a91c9..9bf4521 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -36,7 +36,7 @@
  * DCD. However, the pin multiplexing aren't changed and should be set either
  * by the bootloader or in the platform init code.
  *
- * The idx field must be equal to the PSC index ( e.g. 0 for PSC1, 1 for PSC2,
+ * The idx field must be equal to the PSC index (e.g. 0 for PSC1, 1 for PSC2,
  * and so on). So the PSC1 is mapped to /dev/ttyPSC0, PSC2 to /dev/ttyPSC1 and
  * so on. But be warned, it's an ABSOLUTE REQUIREMENT ! This is needed mainly
  * fpr the console code : without this 1:1 mapping, at early boot time, when we
@@ -68,11 +68,11 @@
 #include 
 #include 
 
-#include 
-#include 
+#include 
+#include 
 
 #if defined(CONFIG_PPC_MERGE)
-#include 
+#include 
 #else
 #include 
 #endif
@@ -115,19 +115,20 @@ static void mpc52xx_uart_of_enumerate(void);
 
 
 /* Forward declaration of the interruption handling routine */
-static irqreturn_t mpc52xx_uart_int(int irq,void *dev_id);
+static irqreturn_t mpc52xx_uart_int(int irq, void *dev_id);
 
 
 /* Simple macro to test if a port is console or not. This one is taken
  * for serial_core.c and maybe should be moved to serial_core.h ? */
 #ifdef CONFIG_SERIAL_CORE_CONSOLE
-#define uart_console(port) ((port)->cons && (port)->cons->index == 
(port)->line)
+#define uart_console(port) \
+   ((port)->cons && (port)->cons->index == (port)->line)
 #else
 #define uart_console(port) (0)
 #endif
 
 #if defined(CONFIG_PPC_MERGE)
-static struct of_device_id mpc52xx_uart_of_match[] = {
+static const struct of_device_id mpc52xx_uart_of_match[] = {
{ .type = "serial", .compatible = "mpc5200-psc-uart", },
{},
 };
@@ -163,7 +164,7 @@ mpc52xx_uart_stop_tx(struct uart_port *port)
 {
/* port->lock taken by caller */
port->read_status_mask &= ~MPC52xx_PSC_IMR_TXRDY;
-   out_be16(&PSC(port)->mpc52xx_psc_imr,port->read_status_mask);
+   out_be16(&PSC(port)->mpc52xx_psc_imr, port->read_status_mask);
 }
 
 static void
@@ -171,7 +172,7 @@ mpc52xx_uart_start_tx(struct uart_port *port)
 {
/* port->lock taken by caller */
port->read_status_mask |= MPC52xx_PSC_IMR_TXRDY;
-   out_be16(&PSC(port)->mpc52xx_psc_imr,port->read_status_mask);
+   out_be16(&PSC(port)->mpc52xx_psc_imr, port->read_status_mask);
 }
 
 static void
@@ -185,7 +186,7 @@ mpc52xx_uart_send_xchar(struct uart_port *port, char ch)
/* Make sure tx interrupts are on */
/* Truly necessary ??? They should be anyway */
port->read_status_mask |= MPC52xx_PSC_IMR_TXRDY;
-   out_be16(&PSC(port)->mpc52xx_psc_imr,port->read_status_mask);
+   out_be16(&PSC(port)->mpc52xx_psc_imr, port->read_status_mask);
}
 
spin_unlock_irqrestore(&port->lock, flags);
@@ -196,7 +197,7 @@ mpc52xx_uart_stop_rx(struct uart_port *port)
 {
/* port->lock taken by caller */
port->read_status_mask &= ~MPC52xx_PSC_IMR_RXRDY;
-   out_be16(&PSC(port)->mpc52xx_psc_imr,port->read_status_mask);
+   out_be16(&PSC(port)->mpc52xx_psc_imr, port->read_status_mask);
 }
 
 static void
@@ -211,10 +212,10 @@ mpc52xx_uart_break_ctl(struct uart_port *port, int ctl)
unsigned long flags;
spin_lock_irqsave(&port->lock, flags);
 
-   if ( ctl == -1 )
-   out_8(&PSC(port)->command,MPC52xx_PSC_START_BRK);
+   if (ctl == -1)
+   out_8(&PSC(port)->command, MPC52xx_PSC_START_BRK);
else
-   out_8(&PSC(port)->command,MPC52xx_PSC_STOP_BRK);
+   out_8(&PSC(port)->command, MPC52xx_PSC_STOP_BRK);
 
spin_unlock_irqrestore(&port->lock, flags);
 }
@@ -233,10 +234,10 @@ mpc52xx_uart_startup(struct uart_port *port)
return ret;
 
/* Reset/activate the port, clear and enable interrupts */
-   out_8(&psc->command,MPC52xx_PSC_RST_RX);
-   out_8(&psc->command,MPC52xx_PSC_RST_TX);
+   out_8(&psc->command, MPC52xx_PSC_RST_RX);
+   out_8(&psc->command, MPC52xx_PSC_RST_TX);
 
-   out_be32(&psc->sicr,0); /* UART mode DCD ignored */
+   out_be32(&psc->sicr, 0);/* UART mode DCD ignored */
 
out_be16(&psc->mpc52xx_psc_clock_select, 0xdd00); /* /16 prescaler on */
 
@@ -246,10 +247,10 @@ mpc52xx_uart_startup(struct uart_port *port)
out_be16(&fifo->tfalarm, 0x80);
 
port->read_status_mask |= MPC52xx_PSC_IMR_RXRDY | MPC52xx_PSC_IMR_TXRDY;
-   out_be16(&psc->mpc52xx_psc_imr,port->read_status_mask);
+   out_be16(&psc->mpc52xx_psc_imr, p

[Add mpc5121 support PATCH v3 8/8] Add MPC512x support to MPC52xx psc driver

2008-01-17 Thread John Rigby
Add 512x support using the psc_ops framework established
with the previous patch.

All 512x PSCs share the same interrupt so add
IRQF_SHARED to irq flags.

Signed-off-by: John Rigby <[EMAIL PROTECTED]>
---
 drivers/serial/Kconfig|   12 ++--
 drivers/serial/mpc52xx_uart.c |  177 +++--
 include/asm-powerpc/mpc52xx_psc.h |   48 ++
 3 files changed, 222 insertions(+), 15 deletions(-)

diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index d7e1996..c7a4ba9 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -1114,17 +1114,17 @@ config SERIAL_SGI_L1_CONSOLE
say Y.  Otherwise, say N.
 
 config SERIAL_MPC52xx
-   tristate "Freescale MPC52xx family PSC serial support"
-   depends on PPC_MPC52xx
+   tristate "Freescale MPC52xx/MPC512x family PSC serial support"
+   depends on PPC_MPC52xx || PPC_MPC512x
select SERIAL_CORE
help
- This drivers support the MPC52xx PSC serial ports. If you would
- like to use them, you must answer Y or M to this option. Not that
+ This driver supports MPC52xx and MPC512x PSC serial ports. If you 
would
+ like to use them, you must answer Y or M to this option. Note that
  for use as console, it must be included in kernel and not as a
  module.
 
 config SERIAL_MPC52xx_CONSOLE
-   bool "Console on a Freescale MPC52xx family PSC serial port"
+   bool "Console on a Freescale MPC52xx/MPC512x family PSC serial port"
depends on SERIAL_MPC52xx=y
select SERIAL_CORE_CONSOLE
help
@@ -1132,7 +1132,7 @@ config SERIAL_MPC52xx_CONSOLE
  of the Freescale MPC52xx family as a console.
 
 config SERIAL_MPC52xx_CONSOLE_BAUD
-   int "Freescale MPC52xx family PSC serial port baud"
+   int "Freescale MPC52xx/MPC512x family PSC serial port baud"
depends on SERIAL_MPC52xx_CONSOLE=y
default "9600"
help
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index 0f6036b..fd1afcc 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -16,6 +16,9 @@
  * Some of the code has been inspired/copied from the 2.4 code written
  * by Dale Farnsworth <[EMAIL PROTECTED]>.
  *
+ * Copyright (C) 2008 Freescale Semiconductor Inc.
+ *John Rigby <[EMAIL PROTECTED]>
+ * Added support for MPC5121
  * Copyright (C) 2006 Secret Lab Technologies Ltd.
  *Grant Likely <[EMAIL PROTECTED]>
  * Copyright (C) 2004-2006 Sylvain Munaut <[EMAIL PROTECTED]>
@@ -77,6 +80,7 @@
 #endif
 
 #include 
+#include 
 #include 
 
 #if defined(CONFIG_SERIAL_MPC52xx_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
@@ -126,12 +130,6 @@ static irqreturn_t mpc52xx_uart_int(int irq, void *dev_id);
 #define uart_console(port) (0)
 #endif
 
-#if defined(CONFIG_PPC_MERGE)
-static const struct of_device_id mpc52xx_uart_of_match[] = {
-   { .type = "serial", .compatible = "mpc5200-psc-uart", },
-   {},
-};
-#endif
 
 /*  */
 /* PSC fifo operations for isolating differences between 52xx and 512x  */
@@ -156,6 +154,7 @@ struct psc_ops {
unsigned long   (*getuartclk)(void *p);
 };
 
+#ifdef CONFIG_PPC_MPC52xx
 #define FIFO_52xx(port) ((struct mpc52xx_psc_fifo __iomem *)(PSC(port)+1))
 static void mpc52xx_psc_fifo_init(struct uart_port *port)
 {
@@ -288,7 +287,161 @@ static struct psc_ops mpc52xx_psc_ops = {
.getuartclk = mpc52xx_getuartclk,
 };
 
-static struct psc_ops *psc_ops = &mpc52xx_psc_ops;
+#endif /* CONFIG_MPC52xx */
+
+#ifdef CONFIG_PPC_MPC512x
+#define FIFO_512x(port) ((struct mpc512x_psc_fifo __iomem *)(PSC(port)+1))
+static void mpc512x_psc_fifo_init(struct uart_port *port)
+{
+   out_be32(&FIFO_512x(port)->txcmd, MPC512x_PSC_FIFO_RESET_SLICE);
+   out_be32(&FIFO_512x(port)->txcmd, MPC512x_PSC_FIFO_ENABLE_SLICE);
+   out_be32(&FIFO_512x(port)->txalarm, 1);
+   out_be32(&FIFO_512x(port)->tximr, 0);
+
+   out_be32(&FIFO_512x(port)->rxcmd, MPC512x_PSC_FIFO_RESET_SLICE);
+   out_be32(&FIFO_512x(port)->rxcmd, MPC512x_PSC_FIFO_ENABLE_SLICE);
+   out_be32(&FIFO_512x(port)->rxalarm, 1);
+   out_be32(&FIFO_512x(port)->rximr, 0);
+
+   out_be32(&FIFO_512x(port)->tximr, MPC512x_PSC_FIFO_ALARM);
+   out_be32(&FIFO_512x(port)->rximr, MPC512x_PSC_FIFO_ALARM);
+}
+
+static int mpc512x_psc_raw_rx_rdy(struct uart_port *port)
+{
+   return !(in_be32(&FIFO_512x(port)->rxsr) & MPC512x_PSC_FIFO_EMPTY);
+}
+
+static int mpc512x_psc_raw_tx_rdy(struct uart_port *port)
+{
+   return !(in_be32(&FIFO_512x(port)->txsr) & MPC512x_PSC_FIFO_FULL);
+}
+
+static int mpc512x_psc_rx_rdy(struct uart_port *port)
+{
+   return in_be32(&FIFO_512x(port)->rxsr)
+   & in_be32(&FIFO_512x(port)->rximr)
+   & MPC512x_PSC_FIFO_ALARM;
+}
+
+static int mpc512x_psc_tx_rdy(struct uart_port *port)
+{
+   ret

[Add mpc5121 support PATCH v3 7/8] Factor out 52xx dependencies from 52xx psc driver

2008-01-17 Thread John Rigby
PSCs change from 5200 to 5121
this patch localizes the differences in
preparation for adding 5121 support

Signed-off-by: John Rigby <[EMAIL PROTECTED]>
---
 drivers/serial/mpc52xx_uart.c |  256 ++--
 1 files changed, 192 insertions(+), 64 deletions(-)

diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index 9bf4521..0f6036b 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -67,7 +67,6 @@
 #include 
 #include 
 #include 
-
 #include 
 #include 
 
@@ -110,8 +109,8 @@ static struct device_node 
*mpc52xx_uart_nodes[MPC52xx_PSC_MAXNUM];
 static void mpc52xx_uart_of_enumerate(void);
 #endif
 
+
 #define PSC(port) ((struct mpc52xx_psc __iomem *)((port)->membase))
-#define FIFO(port) ((struct mpc52xx_psc_fifo __iomem *)(PSC(port)+1))
 
 
 /* Forward declaration of the interruption handling routine */
@@ -134,6 +133,162 @@ static const struct of_device_id mpc52xx_uart_of_match[] 
= {
 };
 #endif
 
+/*  */
+/* PSC fifo operations for isolating differences between 52xx and 512x  */
+/*  */
+
+struct psc_ops {
+   void(*fifo_init)(struct uart_port *port);
+   int (*raw_rx_rdy)(struct uart_port *port);
+   int (*raw_tx_rdy)(struct uart_port *port);
+   int (*rx_rdy)(struct uart_port *port);
+   int (*tx_rdy)(struct uart_port *port);
+   int (*tx_empty)(struct uart_port *port);
+   void(*stop_rx)(struct uart_port *port);
+   void(*start_tx)(struct uart_port *port);
+   void(*stop_tx)(struct uart_port *port);
+   void(*rx_clr_irq)(struct uart_port *port);
+   void(*tx_clr_irq)(struct uart_port *port);
+   void(*write_char)(struct uart_port *port, unsigned char c);
+   unsigned char   (*read_char)(struct uart_port *port);
+   void(*cw_disable_ints)(struct uart_port *port);
+   void(*cw_restore_ints)(struct uart_port *port);
+   unsigned long   (*getuartclk)(void *p);
+};
+
+#define FIFO_52xx(port) ((struct mpc52xx_psc_fifo __iomem *)(PSC(port)+1))
+static void mpc52xx_psc_fifo_init(struct uart_port *port)
+{
+   struct mpc52xx_psc __iomem *psc = PSC(port);
+   struct mpc52xx_psc_fifo __iomem *fifo = FIFO_52xx(port);
+
+   /* /32 prescaler */
+   out_be16(&psc->mpc52xx_psc_clock_select, 0xdd00);
+
+   out_8(&fifo->rfcntl, 0x00);
+   out_be16(&fifo->rfalarm, 0x1ff);
+   out_8(&fifo->tfcntl, 0x07);
+   out_be16(&fifo->tfalarm, 0x80);
+
+   port->read_status_mask |= MPC52xx_PSC_IMR_RXRDY | MPC52xx_PSC_IMR_TXRDY;
+   out_be16(&psc->mpc52xx_psc_imr, port->read_status_mask);
+}
+
+static int mpc52xx_psc_raw_rx_rdy(struct uart_port *port)
+{
+   return in_be16(&PSC(port)->mpc52xx_psc_status)
+   & MPC52xx_PSC_SR_RXRDY;
+}
+
+static int mpc52xx_psc_raw_tx_rdy(struct uart_port *port)
+{
+   return in_be16(&PSC(port)->mpc52xx_psc_status)
+   & MPC52xx_PSC_SR_TXRDY;
+}
+
+
+static int mpc52xx_psc_rx_rdy(struct uart_port *port)
+{
+   return in_be16(&PSC(port)->mpc52xx_psc_status)
+   & port->read_status_mask
+   & MPC52xx_PSC_SR_RXRDY;
+}
+
+static int mpc52xx_psc_tx_rdy(struct uart_port *port)
+{
+   return in_be16(&PSC(port)->mpc52xx_psc_status)
+   & port->read_status_mask
+   & MPC52xx_PSC_SR_TXRDY;
+}
+
+static int mpc52xx_psc_tx_empty(struct uart_port *port)
+{
+   return in_be16(&PSC(port)->mpc52xx_psc_status)
+   & MPC52xx_PSC_SR_TXEMP;
+}
+
+static void mpc52xx_psc_start_tx(struct uart_port *port)
+{
+   port->read_status_mask |= MPC52xx_PSC_IMR_TXRDY;
+   out_be16(&PSC(port)->mpc52xx_psc_imr, port->read_status_mask);
+}
+
+static void mpc52xx_psc_stop_tx(struct uart_port *port)
+{
+   port->read_status_mask &= ~MPC52xx_PSC_IMR_TXRDY;
+   out_be16(&PSC(port)->mpc52xx_psc_imr, port->read_status_mask);
+}
+
+static void mpc52xx_psc_stop_rx(struct uart_port *port)
+{
+   port->read_status_mask &= ~MPC52xx_PSC_IMR_RXRDY;
+   out_be16(&PSC(port)->mpc52xx_psc_imr, port->read_status_mask);
+}
+
+static void mpc52xx_psc_rx_clr_irq(struct uart_port *port)
+{
+}
+
+static void mpc52xx_psc_tx_clr_irq(struct uart_port *port)
+{
+}
+
+static void mpc52xx_psc_write_char(struct uart_port *port, unsigned char c)
+{
+   out_8(&PSC(port)->mpc52xx_psc_buffer_8, c);
+}
+
+static unsigned char mpc52xx_psc_read_char(struct uart_port *port)
+{
+   return in_8(&PSC(port)->mpc52xx_psc_buffer_8);
+}
+
+static void mpc52xx_psc_cw_disable_ints(struct uart_port *port)
+{
+   out_be16(&PSC(port)->mpc52xx_psc_imr, 0);
+}
+
+static void mpc52xx_psc_cw_restore_ints(struct uart_port *port)
+{
+   out_be16(&PSC(port)->mpc52xx_psc_imr, port->

[Add mpc5121 support PATCH v3 3/8] Basic Freescale MPC512x support

2008-01-17 Thread John Rigby
512x is very similar to 83xx and most
of this is patterned after code from 83xx.

New platform:
changed:
arch/powerpc/Kconfig
arch/powerpc/platforms/Kconfig
arch/powerpc/platforms/Kconfig.cputype
arch/powerpc/platforms/Makefile
new:
arch/powerpc/platforms/512x/*
include/asm-powerpc/mpc512x.h

Signed-off-by: John Rigby <[EMAIL PROTECTED]>
Acked-by: Grant Likely <[EMAIL PROTECTED]>
---
 arch/powerpc/Kconfig  |2 +-
 arch/powerpc/platforms/512x/Kconfig   |   20 ++
 arch/powerpc/platforms/512x/Makefile  |4 +
 arch/powerpc/platforms/512x/mpc5121_ads.c |  104 +
 arch/powerpc/platforms/Kconfig|1 +
 arch/powerpc/platforms/Kconfig.cputype|6 +-
 arch/powerpc/platforms/Makefile   |1 +
 include/asm-powerpc/mpc512x.h |   22 ++
 8 files changed, 156 insertions(+), 4 deletions(-)
 create mode 100644 arch/powerpc/platforms/512x/Kconfig
 create mode 100644 arch/powerpc/platforms/512x/Makefile
 create mode 100644 arch/powerpc/platforms/512x/mpc5121_ads.c
 create mode 100644 include/asm-powerpc/mpc512x.h

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 66a3d8c..e4efd0c 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -470,7 +470,7 @@ config PCI
bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \
|| PPC_MPC52xx || (EMBEDDED && (PPC_PSERIES || PPC_ISERIES)) \
|| PPC_PS3
-   default y if !40x && !CPM2 && !8xx && !PPC_83xx \
+   default y if !40x && !CPM2 && !8xx && !PPC_MPC512x && !PPC_83xx \
&& !PPC_85xx && !PPC_86xx
default PCI_PERMEDIA if !4xx && !CPM2 && !8xx
default PCI_QSPAN if !4xx && !CPM2 && 8xx
diff --git a/arch/powerpc/platforms/512x/Kconfig 
b/arch/powerpc/platforms/512x/Kconfig
new file mode 100644
index 000..c6fa49e
--- /dev/null
+++ b/arch/powerpc/platforms/512x/Kconfig
@@ -0,0 +1,20 @@
+config PPC_MPC512x
+   bool
+   select FSL_SOC
+   select IPIC
+   default n
+
+config PPC_MPC5121
+   bool
+   select PPC_MPC512x
+   default n
+
+config MPC5121_ADS
+   bool "Freescale MPC5121E ADS"
+   depends on PPC_MULTIPLATFORM && PPC32
+   select DEFAULT_UIMAGE
+   select WANT_DEVICE_TREE
+   select PPC_MPC5121
+   help
+ This option enables support for the MPC5121E ADS board.
+   default n
diff --git a/arch/powerpc/platforms/512x/Makefile 
b/arch/powerpc/platforms/512x/Makefile
new file mode 100644
index 000..232c89f
--- /dev/null
+++ b/arch/powerpc/platforms/512x/Makefile
@@ -0,0 +1,4 @@
+#
+# Makefile for the Freescale PowerPC 512x linux kernel.
+#
+obj-$(CONFIG_MPC5121_ADS)  += mpc5121_ads.o
diff --git a/arch/powerpc/platforms/512x/mpc5121_ads.c 
b/arch/powerpc/platforms/512x/mpc5121_ads.c
new file mode 100644
index 000..50bd3a3
--- /dev/null
+++ b/arch/powerpc/platforms/512x/mpc5121_ads.c
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved.
+ *
+ * Author: John Rigby, <[EMAIL PROTECTED]>, Thur Mar 29 2007
+ *
+ * Description:
+ * MPC5121 ADS board setup
+ *
+ * This 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.
+ *
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+/**
+ * mpc512x_find_ips_freq - Find the IPS bus frequency for a device
+ * @node:  device node
+ *
+ * Returns IPS bus frequency, or 0 if the bus frequency cannot be found.
+ */
+unsigned long
+mpc512x_find_ips_freq(struct device_node *node)
+{
+   struct device_node *np;
+   const unsigned int *p_ips_freq = NULL;
+
+   of_node_get(node);
+   while (node) {
+   p_ips_freq = of_get_property(node, "bus-frequency", NULL);
+   if (p_ips_freq)
+   break;
+
+   np = of_get_parent(node);
+   of_node_put(node);
+   node = np;
+   }
+   if (node)
+   of_node_put(node);
+
+   return p_ips_freq ? *p_ips_freq : 0;
+}
+EXPORT_SYMBOL(mpc512x_find_ips_freq);
+
+static struct of_device_id __initdata of_bus_ids[] = {
+   { .name = "soc", },
+   { .name = "localbus", },
+   {},
+};
+
+static void __init mpc5121_ads_declare_of_platform_devices(void)
+{
+   /* Find every child of the SOC node and add it to of_platform */
+   if (of_platform_bus_probe(NULL, of_bus_ids, NULL))
+   printk(KERN_ERR __FILE__ ": "
+   "Error while probing of_platform bus\n");
+}
+
+static void __init mpc5121_ads_init_IRQ(void)
+{
+   struct device_node *np;
+
+   np = of_find_compatible_node(NULL, NULL, "fsl,ipic");
+   if (!np)
+   retu

[Add mpc5121 support PATCH v3 4/8] Device tree for MPC5121 ADS

2008-01-17 Thread John Rigby
Minimal tree for mpc5121 ads.

port-number property in uart nodes
will go away after the driver learns to use aliases

Signed-off-by: John Rigby <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/dts/mpc5121ads.dts |  120 ++
 1 files changed, 120 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/mpc5121ads.dts

diff --git a/arch/powerpc/boot/dts/mpc5121ads.dts 
b/arch/powerpc/boot/dts/mpc5121ads.dts
new file mode 100644
index 000..d3f678f
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc5121ads.dts
@@ -0,0 +1,120 @@
+/*
+ * MPC5121E MDS Device Tree Source
+ *
+ * Copyright 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 as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+/ {
+   model = "mpc5121ads";
+   compatible = "fsl,mpc5121ads";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   PowerPC,[EMAIL PROTECTED] {
+   device_type = "cpu";
+   reg = <0>;
+   d-cache-line-size = <20>;   // 32 bytes
+   i-cache-line-size = <20>;   // 32 bytes
+   d-cache-size = <8000>;  // L1, 32K
+   i-cache-size = <8000>;  // L1, 32K
+   timebase-frequency = ; // 49.5 MHz (csb/4)
+   bus-frequency = ;  // 198 MHz csb bus
+   clock-frequency = ;// 396 MHz ppc core
+   };
+   };
+
+   memory {
+   device_type = "memory";
+   reg = < 1000>;  // 256MB at 0
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,mpc5121ads-localbus";
+   #address-cells = <2>;
+   #size-cells = <1>;
+   reg = <8020 40>;
+
+   ranges = <0 0 fc00 0400
+ 2 0 8200 8000>;
+
+   [EMAIL PROTECTED],0 {
+   compatible = "cfi-flash";
+   reg = <0 0 400>;
+   bank-width = <4>;
+   device-width = <1>;
+   };
+
+   [EMAIL PROTECTED],0 {
+   compatible = "fsl,mpc5121ads-cpld";
+   reg = <2 0 8000>;
+   };
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,mpc5121-immr";
+   #address-cells = <1>;
+   #size-cells = <1>;
+   #interrupt-cells = <2>;
+   ranges = <0 8000 40>;
+   reg = <8000 40>;
+   bus-frequency = ;   // 66 MHz ips bus
+
+
+   // IPIC
+   // interrupts cell = 
+   // sense values match linux IORESOURCE_IRQ_* defines:
+   // sense == 8: Level, low assertion
+   // sense == 2: Edge, high-to-low change
+   //
+   ipic: [EMAIL PROTECTED] {
+   compatible = "fsl,mpc5121-ipic", "fsl,ipic";
+   interrupt-controller;
+   #address-cells = <0>;
+   #interrupt-cells = <2>;
+   reg = ;
+   };
+
+   // 512x PSCs are not 52xx PSCs compatible
+   // PSC3 serial port A aka ttyPSC0
+   [EMAIL PROTECTED] {
+   device_type = "serial";
+   compatible = "fsl,mpc5121-psc-uart";
+   // Logical port assignment needed until driver
+   // learns to use aliases
+   port-number = <0>;
+   cell-index = <3>;
+   reg = <11300 100>;
+   interrupts = <28 8>; // actually the fifo irq
+   interrupt-parent = < &ipic >;
+   };
+
+   // PSC4 serial port B aka ttyPSC1
+   [EMAIL PROTECTED] {
+   device_type = "serial";
+   compatible = "fsl,mpc5121-psc-uart";
+   // Logical port assignment needed until driver
+   // learns to use aliases
+   port-number = <1>;
+   cell-index = <4>;
+   reg = <11400 100>;
+   interrupts = <28 8>; // actually the fifo irq
+   interrupt-parent = < &ipic >;
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,mpc5121-psc-fifo";
+   reg = <11f00 100>;
+   interrupts = <28 8>;
+   interrupt-parent = < &ipic >;
+ 

[Add mpc5121 support PATCH v3 2/8] Add mpc512x ipic support

2008-01-17 Thread John Rigby
Added ipic_info entries for vectors used by 512x that
were previously unused by 83xx.

Signed-off-by: John Rigby <[EMAIL PROTECTED]>
---
 arch/powerpc/sysdev/ipic.c |   62 
 1 files changed, 62 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c
index 7274750..4c016da 100644
--- a/arch/powerpc/sysdev/ipic.c
+++ b/arch/powerpc/sysdev/ipic.c
@@ -48,6 +48,13 @@ static struct ipic_info ipic_info[] = {
.bit= 17,
.prio_mask = 1,
},
+   [3] = {
+   .mask   = IPIC_SIMSR_H,
+   .prio   = IPIC_SIPRR_C,
+   .force  = IPIC_SIFCR_H,
+   .bit= 18,
+   .prio_mask = 2,
+   },
[4] = {
.mask   = IPIC_SIMSR_H,
.prio   = IPIC_SIPRR_C,
@@ -55,6 +62,34 @@ static struct ipic_info ipic_info[] = {
.bit= 19,
.prio_mask = 3,
},
+   [5] = {
+   .mask   = IPIC_SIMSR_H,
+   .prio   = IPIC_SIPRR_C,
+   .force  = IPIC_SIFCR_H,
+   .bit= 20,
+   .prio_mask = 4,
+   },
+   [6] = {
+   .mask   = IPIC_SIMSR_H,
+   .prio   = IPIC_SIPRR_C,
+   .force  = IPIC_SIFCR_H,
+   .bit= 21,
+   .prio_mask = 5,
+   },
+   [7] = {
+   .mask   = IPIC_SIMSR_H,
+   .prio   = IPIC_SIPRR_C,
+   .force  = IPIC_SIFCR_H,
+   .bit= 22,
+   .prio_mask = 6,
+   },
+   [8] = {
+   .mask   = IPIC_SIMSR_H,
+   .prio   = IPIC_SIPRR_C,
+   .force  = IPIC_SIFCR_H,
+   .bit= 23,
+   .prio_mask = 7,
+   },
[9] = {
.mask   = IPIC_SIMSR_H,
.prio   = IPIC_SIPRR_D,
@@ -223,6 +258,20 @@ static struct ipic_info ipic_info[] = {
.bit= 7,
.prio_mask = 7,
},
+   [40] = {
+   .mask   = IPIC_SIMSR_H,
+   .prio   = IPIC_SIPRR_B,
+   .force  = IPIC_SIFCR_H,
+   .bit= 8,
+   .prio_mask = 0,
+   },
+   [41] = {
+   .mask   = IPIC_SIMSR_H,
+   .prio   = IPIC_SIPRR_B,
+   .force  = IPIC_SIFCR_H,
+   .bit= 9,
+   .prio_mask = 1,
+   },
[42] = {
.mask   = IPIC_SIMSR_H,
.prio   = IPIC_SIPRR_B,
@@ -230,6 +279,13 @@ static struct ipic_info ipic_info[] = {
.bit= 10,
.prio_mask = 2,
},
+   [43] = {
+   .mask   = IPIC_SIMSR_H,
+   .prio   = IPIC_SIPRR_B,
+   .force  = IPIC_SIFCR_H,
+   .bit= 11,
+   .prio_mask = 3,
+   },
[44] = {
.mask   = IPIC_SIMSR_H,
.prio   = IPIC_SIPRR_B,
@@ -387,6 +443,12 @@ static struct ipic_info ipic_info[] = {
.force  = IPIC_SIFCR_L,
.bit= 18,
},
+   [83] = {
+   .mask   = IPIC_SIMSR_L,
+   .prio   = 0,
+   .force  = IPIC_SIFCR_L,
+   .bit= 19,
+   },
[84] = {
.mask   = IPIC_SIMSR_L,
.prio   = 0,
-- 
1.5.3.5.726.g41a7a

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


[Add mpc5121 support PATCH v3 1/8] Add IPIC config option

2008-01-17 Thread John Rigby
IPIC is not just for 83xx anymore so make it a separate
config option.

Signed-off-by: John Rigby <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/Kconfig |5 +
 arch/powerpc/sysdev/Makefile   |2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index ea22cad..ad9b1c0 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -22,6 +22,7 @@ config PPC_83xx
depends on 6xx
select FSL_SOC
select 83xx
+   select IPIC
select WANT_DEVICE_TREE
 
 config PPC_86xx
@@ -80,6 +81,10 @@ config XICS
bool
default y
 
+config IPIC
+   bool
+   default n
+
 config MPIC
bool
default n
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index 9a20ef4..66fe39c 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -24,7 +24,7 @@ obj-$(CONFIG_AXON_RAM)+= axonram.o
 ifeq ($(CONFIG_PPC_MERGE),y)
 obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o
 obj-$(CONFIG_PPC_I8259)+= i8259.o
-obj-$(CONFIG_PPC_83xx) += ipic.o
+obj-$(CONFIG_IPIC) += ipic.o
 obj-$(CONFIG_4xx)  += uic.o
 obj-$(CONFIG_XILINX_VIRTEX)+= xilinx_intc.o
 ifeq ($(CONFIG_PCI),y)
-- 
1.5.3.5.726.g41a7a

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


Re: 2.6.24-rc8-mm1: powerpc oopses

2008-01-17 Thread Andrew Morton
On Thu, 17 Jan 2008 17:39:54 -0600
Matt Mackall <[EMAIL PROTECTED]> wrote:

> 
> On Thu, 2008-01-17 at 14:51 -0800, Andrew Morton wrote:
> > > proc_loop: /proc/3731/task/3731/pagemap
> > > kernel: BUG: sleeping function called from invalid context at 
> > > fs/proc/task_mmu.c:554
> > > kernel: in_atomic():1, irqs_disabled():0
> > > kernel: Call Trace:
> > > kernel: [cf1cddf0] [c000840c] show_stack+0x3c/0x194 (unreliable)
> > > kernel: [cf1cde20] [c002b2ec] __might_sleep+0xf4/0x108
> > > kernel: [cf1cde30] [c00d2d54] add_to_pagemap+0x40/0x11c
> > > kernel: [cf1cde50] [c00d2f44] pagemap_pte_range+0xa8/0x10c
> > > kernel: [cf1cde70] [c0081b30] walk_page_range+0x148/0x23c
> > > kernel: [cf1cdeb0] [c00d3104] pagemap_read+0x15c/0x244
> > > kernel: [cf1cdef0] [c0092144] vfs_read+0xc4/0x16c
> > > kernel: [cf1cdf10] [c009261c] sys_read+0x4c/0x90
> > > kernel: [cf1cdf40] [c001328c] ret_from_syscall+0x0/0x40
> > 
> > It's not really an oops - it's a warning.  add_to_pagemap() is doing a
> > put_user() inside pagemap_pte_range->pte_offset_map->kmap_atomic.
> > 
> > A known bug, I'm afraid.
> > 
> > How to fix?
> > 
> > - double-buffer the data to be copied to userspace or
> > 
> > - take a local copy of the pte page then work on that instead or
> > 
> > - play copy_to_user_inatomic() tricks.
> 
> Hmm, this fell off my radar. How about something like this as a minimal
> fix (untested as -mm is a complete doorstop for me at the moment)?
> 
> diff -r 5595adaea70f fs/proc/task_mmu.c
> --- a/fs/proc/task_mmu.c  Thu Jan 17 13:26:54 2008 -0600
> +++ b/fs/proc/task_mmu.c  Thu Jan 17 17:29:21 2008 -0600
> @@ -582,20 +583,26 @@
>  {
>   struct pagemapread *pm = private;
>   pte_t *pte;
> - int err = 0;
> + int offset = 0, err = 0;
>  
>   pte = pte_offset_map(pmd, addr);
> - for (; addr != end; pte++, addr += PAGE_SIZE) {
> + for (; addr != end; offset++, addr += PAGE_SIZE) {
>   u64 pfn = PM_NOT_PRESENT;
> - if (is_swap_pte(*pte))
> - pfn = swap_pte_to_pagemap_entry(*pte);
> - else if (pte_present(*pte))
> - pfn = pte_pfn(*pte);
> + if (is_swap_pte(pte[offset]))
> + pfn = swap_pte_to_pagemap_entry(pte[offset]);
> + else if (pte_present(pte[offset]))
> + pfn = pte_pfn(pte[offset]);
> +#ifdef CONFIG_HIGHPTE
> + pte_unmap(pte);
>   err = add_to_pagemap(addr, pfn, pm);
> + pte = pte_offset_map(pmd, addr);
> +#else
> + err = add_to_pagemap(addr, pfn, pm);
> +#endif
>   if (err)
>   return err;
>   }
> - pte_unmap(pte - 1);
> + pte_unmap(pte);
>  
>   cond_resched();
>  

Good point, it really can be taht simple.

Do we need the ifdef?  pte_offset_map/pte_unmap should be super-cheap on
!CONFIG_HIGHPTE builds.

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


[Add mpc5121 support PATCHES v3 0/8]

2008-01-17 Thread John Rigby
This is a new improved set of patches based on the
comments that I received in response to the previous set.

Changes since v2:

1/8 Add-IPIC-config-option.patch
2/8 Add-mpc512x-ipic-support.patch
No changes.  These two are in galak's queue for submission.

3/8 Basic-Freescale-MPC512x-support.patch
Added missing of_put_node as pointed out by Stephen Rothwell
Added Acked-by: Grant Likely <[EMAIL PROTECTED]>

4/8 Device-tree-for-MPC5121-ADS.patch
Made changes suggested by Grant Likely

5/8 Separate-MPC52xx-PSC-FIFO-registers-from-rest-of-PSC.patch
6/8 Cleanup-checkpatch.pl-problems-in-mpc52xx_uart.c.patch
No changes.  Grant is picking up these patches

7/8 Factor-out-52xx-dependencies-from-52xx-psc-driver.patch
No changes.  No comments received.  Too ugly to comment?

8/8 Add-MPC512x-support-to-MPC52xx-psc-driver.patch
Added IRQF_SHARED to flags passed to request_irq because
on 5121 all PSCs use the same irq.  This should not break
anything on 5200.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: 2.6.24-rc8-mm1: powerpc oopses

2008-01-17 Thread Matt Mackall

On Thu, 2008-01-17 at 14:51 -0800, Andrew Morton wrote:
> > proc_loop: /proc/3731/task/3731/pagemap
> > kernel: BUG: sleeping function called from invalid context at 
> > fs/proc/task_mmu.c:554
> > kernel: in_atomic():1, irqs_disabled():0
> > kernel: Call Trace:
> > kernel: [cf1cddf0] [c000840c] show_stack+0x3c/0x194 (unreliable)
> > kernel: [cf1cde20] [c002b2ec] __might_sleep+0xf4/0x108
> > kernel: [cf1cde30] [c00d2d54] add_to_pagemap+0x40/0x11c
> > kernel: [cf1cde50] [c00d2f44] pagemap_pte_range+0xa8/0x10c
> > kernel: [cf1cde70] [c0081b30] walk_page_range+0x148/0x23c
> > kernel: [cf1cdeb0] [c00d3104] pagemap_read+0x15c/0x244
> > kernel: [cf1cdef0] [c0092144] vfs_read+0xc4/0x16c
> > kernel: [cf1cdf10] [c009261c] sys_read+0x4c/0x90
> > kernel: [cf1cdf40] [c001328c] ret_from_syscall+0x0/0x40
> 
> It's not really an oops - it's a warning.  add_to_pagemap() is doing a
> put_user() inside pagemap_pte_range->pte_offset_map->kmap_atomic.
> 
> A known bug, I'm afraid.
> 
> How to fix?
> 
> - double-buffer the data to be copied to userspace or
> 
> - take a local copy of the pte page then work on that instead or
> 
> - play copy_to_user_inatomic() tricks.

Hmm, this fell off my radar. How about something like this as a minimal
fix (untested as -mm is a complete doorstop for me at the moment)?

diff -r 5595adaea70f fs/proc/task_mmu.c
--- a/fs/proc/task_mmu.cThu Jan 17 13:26:54 2008 -0600
+++ b/fs/proc/task_mmu.cThu Jan 17 17:29:21 2008 -0600
@@ -582,20 +583,26 @@
 {
struct pagemapread *pm = private;
pte_t *pte;
-   int err = 0;
+   int offset = 0, err = 0;
 
pte = pte_offset_map(pmd, addr);
-   for (; addr != end; pte++, addr += PAGE_SIZE) {
+   for (; addr != end; offset++, addr += PAGE_SIZE) {
u64 pfn = PM_NOT_PRESENT;
-   if (is_swap_pte(*pte))
-   pfn = swap_pte_to_pagemap_entry(*pte);
-   else if (pte_present(*pte))
-   pfn = pte_pfn(*pte);
+   if (is_swap_pte(pte[offset]))
+   pfn = swap_pte_to_pagemap_entry(pte[offset]);
+   else if (pte_present(pte[offset]))
+   pfn = pte_pfn(pte[offset]);
+#ifdef CONFIG_HIGHPTE
+   pte_unmap(pte);
err = add_to_pagemap(addr, pfn, pm);
+   pte = pte_offset_map(pmd, addr);
+#else
+   err = add_to_pagemap(addr, pfn, pm);
+#endif
if (err)
return err;
}
-   pte_unmap(pte - 1);
+   pte_unmap(pte);
 
cond_resched();
 

-- 
Mathematics is the supreme nostalgia of our time.

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


Re: Problems with PCI on 8280

2008-01-17 Thread Scott Wood
Rune Torgersen wrote:
>  >From: Scott Wood
>  >Are you using cuImage, or a regular uImage with a device-tree-aware u-boot
> 
> cuImage for now.
> 
>  >If the former, try commenting out the call to fixup_pci() in
>  >arch/powerpc/boot/cuboot-pq2.c and let me know if that changes anything.
> 
> Did that, That made our PCI bus fail completely

Hmm...  that suggests that something in u-boot's setup is either 
incorrect, or (more likely in this case) doesn't match the device tree.

Or maybe it's the bus parking/arbiter tweaking at the end that u-boot is 
missing.

> We have our PCI set up to ONE 512MB outbound range doing all three.
> (I can see where you'd save on mem usage by doing two)
> 
> I do see a bug tho.
> In our case prefetch is 256MB, memio is 128MB.
> the calculation for outbound wiondow 1 sets the size to ~(pref+mmio-1). 
> That only works if the resulting size is a power of 2.

Ah.  Yes, I was assuming both windows would be the same size.  The code 
should be changed to check that, and if any conditions for setting 
PCIBRx/PCIMSKx fail, check to see if the firmware-provided values work 
(and if not, bail without touching anything).

> If we comment out the rewrite of the outbound windows, we get PCI to work.
> But since our u-boot sets everything up correctly (Including prefecable 
> memory) we should not need this? or is it rewriting the device tree in 
> some way?

You shouldn't need it...  I'd compare the register values u-boot sets 
with the values the corrected fixup_pci() sets (including the soc regs 
at the end).  Something must be different.

There is no device tree re-writing; it tries to program the hardware to 
match what's in the device tree.

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


RE: Problems with PCI on 8280

2008-01-17 Thread Rune Torgersen
>From: Scott Wood 
>Are you using cuImage, or a regular uImage with a device-tree-aware u-boot

cuImage for now.

>If the former, try commenting out the call to fixup_pci() in 
>arch/powerpc/boot/cuboot-pq2.c and let me know if that changes anything.

Did that, That made our PCI bus fail completely

Looking in fixup_pci, I see it sets up one outbound window to the size of 
prefechable and non-prefetcabe memory
and anoter one to the size of the IO.

We have our PCI set up to ONE 512MB outbound range doing all three. 
(I can see where you'd save on mem usage by doing two)

I do see a bug tho.
In our case prefetch is 256MB, memio is 128MB.
the calculation for outbound wiondow 1 sets the size to ~(pref+mmio-1). That 
only works if the resulting size is a power of 2.

If we comment out the rewrite of the outbound windows, we get PCI to work.
But since our u-boot sets everything up correctly (Including prefecable memory) 
we should not need this? or is it rewriting the device tree in some way?



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

Re: 2.6.24-rc8-mm1: powerpc oopses

2008-01-17 Thread Andrew Morton
On Thu, 17 Jan 2008 23:15:27 +0100
Mariusz Kozlowski <[EMAIL PROTECTED]> wrote:

> Hello,
> 
> The script below kills powerpc. oopses get longer and more
> wonderful with every next 'cated' file.

ppc32.

> /proc//task//pagemap seems to be the cause of oops. The
> important thing is that it oopses for random (that is not first in a row)
> process from /proc. So not every 'cat /proc//task//pagemap'
> causes an oops.
> 
> I could try to bisect this but this powerpc box is iMac G3 (cpu at 400MHz)
> and this will take time. So any hints appreciated.
> 
> Regards,
> 
>   Mariusz
> 
> script:
> -
> #!/bin/bash
> 
> for i in `find /proc/*/ -readable -type f`; do
> echo -n "cat $i > /dev/null ... ";
> logger -t proc_loop $i;
> sync;
> cat $i > /dev/null;
> echo "done";
> done
> --
> syslog:
> proc_loop: /proc/3731/task/3731/pagemap
> kernel: BUG: sleeping function called from invalid context at 
> fs/proc/task_mmu.c:554
> kernel: in_atomic():1, irqs_disabled():0
> kernel: Call Trace:
> kernel: [cf1cddf0] [c000840c] show_stack+0x3c/0x194 (unreliable)
> kernel: [cf1cde20] [c002b2ec] __might_sleep+0xf4/0x108
> kernel: [cf1cde30] [c00d2d54] add_to_pagemap+0x40/0x11c
> kernel: [cf1cde50] [c00d2f44] pagemap_pte_range+0xa8/0x10c
> kernel: [cf1cde70] [c0081b30] walk_page_range+0x148/0x23c
> kernel: [cf1cdeb0] [c00d3104] pagemap_read+0x15c/0x244
> kernel: [cf1cdef0] [c0092144] vfs_read+0xc4/0x16c
> kernel: [cf1cdf10] [c009261c] sys_read+0x4c/0x90
> kernel: [cf1cdf40] [c001328c] ret_from_syscall+0x0/0x40

It's not really an oops - it's a warning.  add_to_pagemap() is doing a
put_user() inside pagemap_pte_range->pte_offset_map->kmap_atomic.

A known bug, I'm afraid.

How to fix?

- double-buffer the data to be copied to userspace or

- take a local copy of the pte page then work on that instead or

- play copy_to_user_inatomic() tricks.

It would be really nice to get the maps4 stuff merged this time around but
it is looking unlikely.

> kernel: --- Exception: c01 at 0xff5a364
> kernel: LR = 0x10002f60
> kernel: BUG: scheduling while atomic: cat/8929/0x0002
> kernel: Call Trace:
> kernel: [cf1cde90] [c000840c] show_stack+0x3c/0x194 (unreliable)
> kernel: [cf1cdec0] [c002db24] __schedule_bug+0x64/0x78
> kernel: [cf1cdee0] [c027207c] schedule+0x304/0x32c
> kernel: [cf1cdf40] [c0013a5c] recheck+0x0/0x28
> kernel: --- Exception: c01 at 0xff5a364
> kernel: LR = 0x10002f60
> kernel: BUG: scheduling while atomic: cat/8929/0x0007
> kernel: Call Trace:
> kernel: [cf1cde90] [c000840c] show_stack+0x3c/0x194 (unreliable)
> kernel: [cf1cdec0] [c002db24] __schedule_bug+0x64/0x78
> kernel: [cf1cdee0] [c027207c] schedule+0x304/0x32c
> kernel: [cf1cdf40] [c0013a5c] recheck+0x0/0x28
> kernel: --- Exception: c01 at 0xff5a364
> kernel: LR = 0x10002f60
> kernel: BUG: scheduling while atomic: cat/8929/0x0009
> kernel: Call Trace:
> kernel: [cf1cde90] [c000840c] show_stack+0x3c/0x194 (unreliable)
> kernel: [cf1cdec0] [c002db24] __schedule_bug+0x64/0x78
> kernel: [cf1cdee0] [c027207c] schedule+0x304/0x32c
> kernel: [cf1cdf40] [c0013a5c] recheck+0x0/0x28
> kernel: --- Exception: c01 at 0xff5a364
> kernel: LR = 0x10002f60
> kernel: Page fault in user mode with in_atomic() = 1 mm = cf2765a0
> kernel: NIP = ff0cbc8  MSR = 4000f932
> kernel: Oops: Weird page fault, sig: 11 [#3]

hm.  Not sure how that happened.  The arch code thinks we're running in
user mode.

> kernel: PREEMPT PowerMac
> kernel: Modules linked in: usbhid ide_cd_mod ohci_hcd usbcore uninorth_agp 
> agpgart
> kernel: NIP: 0ff0cbc8 LR: 0ff0d398 CTR: 0ff0d2d0
> kernel: REGS: cf1cdf50 TRAP: 0401   Tainted: G  D  (2.6.24-rc8-mm1)
> kernel: MSR: 4000f932   CR: 28022442  XER: 
> kernel: TASK = cf8d74f0[8929] 'cat' THREAD: cf1cc000
> kernel: GPR00: 0001 bf93e330 48029bf0 0ffed488 10016038 28022442  
> 0ff5a364 
> kernel: GPR08: f932  1032  28022442 
> kernel: NIP [0ff0cbc8] 0xff0cbc8
> kernel: LR [0ff0d398] 0xff0d398
> proc_loop: /proc/3731/task/3731/wchan
> kernel: Call Trace:
> kernel: ---[ end trace 54bd1ed4883922c9 ]---
> kernel: note: cat[8929] exited with preempt_count 10
> proc_loop: /proc/3731/task/3731/oom_score
> proc_loop: /proc/3731/task/3731/oom_adj
> proc_loop: /proc/3731/fdinfo/0
> [... snip ...]
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH 3/3] Update mpc8313erdb defconfig for MTD, NAND, JFFS2.

2008-01-17 Thread Scott Wood
Signed-off-by: Scott Wood <[EMAIL PROTECTED]>
---
 arch/powerpc/configs/mpc8313_rdb_defconfig |   46 
 1 files changed, 33 insertions(+), 13 deletions(-)

diff --git a/arch/powerpc/configs/mpc8313_rdb_defconfig 
b/arch/powerpc/configs/mpc8313_rdb_defconfig
index c9af905..db08e73 100644
--- a/arch/powerpc/configs/mpc8313_rdb_defconfig
+++ b/arch/powerpc/configs/mpc8313_rdb_defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.24-rc4
-# Thu Dec  6 16:48:31 2007
+# Linux kernel version: 2.6.24-rc6
+# Thu Jan 17 16:35:55 2008
 #
 # CONFIG_PPC64 is not set
 
@@ -144,6 +144,7 @@ CONFIG_MPC8313_RDB=y
 # CONFIG_MPC834x_MDS is not set
 # CONFIG_MPC834x_ITX is not set
 # CONFIG_MPC836x_MDS is not set
+# CONFIG_MPC837x_MDS is not set
 CONFIG_PPC_MPC831x=y
 # CONFIG_MPIC is not set
 # CONFIG_MPIC_WEIRD is not set
@@ -336,15 +337,16 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_MTD=y
 # CONFIG_MTD_DEBUG is not set
 # CONFIG_MTD_CONCAT is not set
-# CONFIG_MTD_PARTITIONS is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
 
 #
 # User Modules And Translation Layers
 #
 CONFIG_MTD_CHAR=y
-# CONFIG_MTD_BLKDEVS is not set
-# CONFIG_MTD_BLOCK is not set
-# CONFIG_MTD_BLOCK_RO is not set
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
 # CONFIG_FTL is not set
 # CONFIG_NFTL is not set
 # CONFIG_INFTL is not set
@@ -381,11 +383,8 @@ CONFIG_MTD_CFI_UTIL=y
 # Mapping drivers for chip access
 #
 # CONFIG_MTD_COMPLEX_MAPPINGS is not set
-CONFIG_MTD_PHYSMAP=y
-CONFIG_MTD_PHYSMAP_START=0xfe00
-CONFIG_MTD_PHYSMAP_LEN=0x100
-CONFIG_MTD_PHYSMAP_BANKWIDTH=2
-# CONFIG_MTD_PHYSMAP_OF is not set
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_PHYSMAP_OF=y
 # CONFIG_MTD_INTEL_VR_NOR is not set
 # CONFIG_MTD_PLATRAM is not set
 
@@ -406,7 +405,16 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
 # CONFIG_MTD_DOC2000 is not set
 # CONFIG_MTD_DOC2001 is not set
 # CONFIG_MTD_DOC2001PLUS is not set
-# CONFIG_MTD_NAND is not set
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_CAFE is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
 # CONFIG_MTD_ONENAND is not set
 
 #
@@ -1178,7 +1186,17 @@ CONFIG_TMPFS=y
 # CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS2_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_HPFS_FS is not set
@@ -1242,6 +1260,8 @@ CONFIG_BITREVERSE=y
 CONFIG_CRC32=y
 # CONFIG_CRC7 is not set
 # CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
 CONFIG_PLIST=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
-- 
1.5.3.8
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH 2/3] mpc8313erdb: Add NOR flash to the device tree.

2008-01-17 Thread Scott Wood
Signed-off-by: Scott Wood <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/dts/mpc8313erdb.dts |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts 
b/arch/powerpc/boot/dts/mpc8313erdb.dts
index 63955a1..e4142e8 100644
--- a/arch/powerpc/boot/dts/mpc8313erdb.dts
+++ b/arch/powerpc/boot/dts/mpc8313erdb.dts
@@ -61,6 +61,15 @@
  2 0 f000 0002
  3 0 fa00 8000>;
 
+   [EMAIL PROTECTED],0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "cfi-flash";
+   reg = <0 0 80>;
+   bank-width = <2>;
+   device-width = <1>;
+   };
+
[EMAIL PROTECTED],0 {
#address-cells = <1>;
#size-cells = <1>;
-- 
1.5.3.8

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


[PATCH 1/3] mpc8313erdb: Add NAND to device tree, and call of_platform_bus_probe().

2008-01-17 Thread Scott Wood
Signed-off-by: Scott Wood <[EMAIL PROTECTED]>
---
Please apply this series for 2.6.25.

 arch/powerpc/boot/dts/mpc8313erdb.dts |   39 +
 arch/powerpc/platforms/83xx/mpc8313_rdb.c |   13 +
 2 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts 
b/arch/powerpc/boot/dts/mpc8313erdb.dts
index c5b6665..63955a1 100644
--- a/arch/powerpc/boot/dts/mpc8313erdb.dts
+++ b/arch/powerpc/boot/dts/mpc8313erdb.dts
@@ -45,10 +45,49 @@
reg = < 0800>;  // 128MB at 0
};
 
+   [EMAIL PROTECTED] {
+   #address-cells = <2>;
+   #size-cells = <1>;
+   compatible = "fsl,mpc8313-elbc", "fsl,elbc", "simple-bus";
+   reg = ;
+   interrupts = ;
+   interrupt-parent = <&ipic>;
+
+   // CS0 and CS1 are swapped when
+   // booting from nand, but the
+   // addresses are the same.
+   ranges = <0 0 fe00 0080
+ 1 0 e280 8000
+ 2 0 f000 0002
+ 3 0 fa00 8000>;
+
+   [EMAIL PROTECTED],0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "fsl,mpc8313-fcm-nand",
+"fsl,elbc-fcm-nand";
+   reg = <1 0 2000>;
+
+   [EMAIL PROTECTED] {
+   reg = <0 10>;
+   read-only;
+   };
+
+   [EMAIL PROTECTED] {
+   reg = <10 30>;
+   };
+
+   [EMAIL PROTECTED] {
+   reg = <40 1c0>;
+   };
+   };
+   };
+
[EMAIL PROTECTED] {
#address-cells = <1>;
#size-cells = <1>;
device_type = "soc";
+   compatible = "simple-bus";
ranges = <0 e000 0010>;
reg = ;
bus-frequency = <0>;
diff --git a/arch/powerpc/platforms/83xx/mpc8313_rdb.c 
b/arch/powerpc/platforms/83xx/mpc8313_rdb.c
index 6fb8299..4996b7d 100644
--- a/arch/powerpc/platforms/83xx/mpc8313_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc8313_rdb.c
@@ -14,6 +14,7 @@
  */
 
 #include 
+#include 
 
 #include 
 #include 
@@ -75,6 +76,18 @@ static int __init mpc8313_rdb_probe(void)
return of_flat_dt_is_compatible(root, "MPC8313ERDB");
 }
 
+static struct of_device_id __initdata of_bus_ids[] = {
+   { .compatible = "simple-bus" },
+   {},
+};
+
+static int __init declare_of_platform_devices(void)
+{
+   of_platform_bus_probe(NULL, of_bus_ids, NULL);
+   return 0;
+}
+machine_device_initcall(mpc8313_rdb, declare_of_platform_devices);
+
 define_machine(mpc8313_rdb) {
.name   = "MPC8313 RDB",
.probe  = mpc8313_rdb_probe,
-- 
1.5.3.8

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


Re: [PATCH 2/7] powerpc: allow localbus compatible serial ports for console device

2008-01-17 Thread Arnd Bergmann
On Thursday 17 January 2008, Paul Gortmaker wrote:
> +struct serial_parent {
> +   char *type;
> +   char *compat;
> +};
> +
> +static struct __init serial_parent parents[] = {
> +   {"soc", NULL},
> +   {"tsi-bridge", NULL},
> +   {"opb", "ibm,opb"},
> +   {NULL, "wrs,epld-localbus"},
> +};
> +
> +#define NUM_PARENTS sizeof(parents)/sizeof(struct serial_parent)

> +   for (sp = parents; sp != end; sp++) {
> +   for_each_compatible_node(np, "serial", "ns16550") {
> +   struct device_node *parent = of_get_parent(np);
> +   int p_type_ok = 0, p_is_compat = 0;
> +   if (!parent)
> +   continue;
> +   if (sp->type && !strcmp(parent->type, sp->type))
> +   p_type_ok = 1;
> +   if (sp->compat && of_device_is_compatible(parent,
> sp->compat)) +   p_is_compat = 1;
> +   if (p_type_ok || p_is_compat) {
> +   index = add_legacy_soc_port(np, np);
> +   if (index >= 0 && np == stdout)
> +   legacy_serial_console = index;
> +   }
> +   of_node_put(parent);

I think you can express that more densely using struct of_device_id
and of_match_node(). Otherwise, it looks good to me, thanks a lot
for following up on my suggestion!

Arnd <><
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


L3CR

2008-01-17 Thread linuxppcdev
It there a l3cr parameter? It's not in the kernel documentation. I'm
trying to enable L2 and L3 cache on a G4 cpu upgrade board in a powermac.

>From OSX I was able to get the values of:
l2cr = 0x8000
and
l3cr = 0x9F020300

from a cache config utility. I've seen references to l3cr setting on
bsd lists but not for linux.

Thanks...

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


[PATCH 2/2] mpc82xx: Embedded Planet EP8248E support

2008-01-17 Thread Scott Wood
This board is also resold by Freescale under the names
"QUICCStart MPC8248 Evaluation System" and "CWH-PPC-8248N-VE".

Signed-off-by: Scott Wood <[EMAIL PROTECTED]>
---
Removed const/initdata combo, and used simple-bus for probing.

Please apply for 2.6.25.

 arch/powerpc/boot/Makefile |3 +-
 arch/powerpc/boot/dts/ep8248e.dts  |  207 
 arch/powerpc/boot/ep8248e.c|   55 +++
 arch/powerpc/boot/wrapper  |2 +-
 arch/powerpc/configs/ep8248e_defconfig |  821 
 arch/powerpc/platforms/82xx/Kconfig|   13 +
 arch/powerpc/platforms/82xx/Makefile   |1 +
 arch/powerpc/platforms/82xx/ep8248e.c  |  324 +
 include/asm-powerpc/mpc8260.h  |1 +
 9 files changed, 1425 insertions(+), 2 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/ep8248e.dts
 create mode 100644 arch/powerpc/boot/ep8248e.c
 create mode 100644 arch/powerpc/configs/ep8248e_defconfig
 create mode 100644 arch/powerpc/platforms/82xx/ep8248e.c

diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 08bf7aa..fcca455 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -62,7 +62,7 @@ src-plat := of.c cuboot-52xx.c cuboot-83xx.c cuboot-85xx.c 
holly.c \
ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \
cuboot-pq2.c cuboot-sequoia.c treeboot-walnut.c cuboot-bamboo.c 
\
fixed-head.S ep88xc.c cuboot-hpc2.c ep405.c cuboot-taishan.c \
-   cuboot-katmai.c cuboot-rainier.c redboot-8xx.c
+   cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c
 src-boot := $(src-wlib) $(src-plat) empty.c
 
 src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -195,6 +195,7 @@ image-$(CONFIG_PPC_8xx) += cuImage.8xx
 image-$(CONFIG_PPC_EP88XC) += zImage.ep88xc
 image-$(CONFIG_EP405)  += zImage.ep405
 image-$(CONFIG_8260)   += cuImage.pq2
+image-$(CONFIG_EP8248E)+= zImage.ep8248e
 image-$(CONFIG_PPC_MPC52xx)+= cuImage.52xx
 image-$(CONFIG_PPC_83xx)   += cuImage.83xx
 image-$(CONFIG_PPC_85xx)   += cuImage.85xx
diff --git a/arch/powerpc/boot/dts/ep8248e.dts 
b/arch/powerpc/boot/dts/ep8248e.dts
new file mode 100644
index 000..5d2fb76
--- /dev/null
+++ b/arch/powerpc/boot/dts/ep8248e.dts
@@ -0,0 +1,207 @@
+/*
+ * Device Tree for the Embedded Planet EP8248E board running PlanetCore.
+ *
+ * Copyright 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 as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+/dts-v1/;
+/ {
+   model = "EP8248E";
+   compatible = "fsl,ep8248e";
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   aliases {
+   planetcore-SMC1 = &smc1;
+   planetcore-SCC1 = &scc1;
+   ethernet0 = ð0;
+   ethernet1 = ð1;
+   serial0 = &smc1;
+   serial1 = &scc1;
+   };
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   PowerPC,[EMAIL PROTECTED] {
+   device_type = "cpu";
+   reg = <0>;
+   d-cache-line-size = <32>;
+   i-cache-line-size = <32>;
+   d-cache-size = <16384>;
+   i-cache-size = <16384>;
+   timebase-frequency = <0>;
+   clock-frequency = <0>;
+   };
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = "fsl,mpc8248-localbus",
+"fsl,pq2-localbus",
+"simple-bus";
+   #address-cells = <2>;
+   #size-cells = <1>;
+   reg = <0xf0010100 0x40>;
+
+   ranges = <0 0 0xfc00 0x0400
+ 1 0 0xfa00 0x8000>;
+
+   [EMAIL PROTECTED],380 {
+   compatible = "cfi-flash";
+   reg = <0 0x380 0x80>;
+   bank-width = <4>;
+   device-width = <2>;
+   };
+
+   [EMAIL PROTECTED],0 {
+   #address-cells = <2>;
+   #size-cells = <1>;
+   reg = <1 0 0x10>;
+   compatible = "fsl,ep8248e-bcsr";
+   ranges;
+
+   mdio {
+   device_type = "mdio";
+   compatible = "fsl,ep8248e-mdio-bitbang";
+   #address-cells = <1>;
+   #size-cells = <0>;
+   reg = <1 8 1>;
+
+   

[PATCH] Make setjmp/longjmp code generic

2008-01-17 Thread Michael Neuling
This makes the setjmp/longjmp code used by xmon, generically available
to other code.  It also removes the requirement for debugger hooks to
be only called on 0x300 (data storage) exception.

Signed-off-by: Michael Neuling <[EMAIL PROTECTED]>
---

 arch/powerpc/kernel/misc.S   |   65 +++
 arch/powerpc/mm/fault.c  |6 +--
 arch/powerpc/xmon/setjmp.S   |   61 
 arch/powerpc/xmon/xmon.c |6 ---
 include/asm-powerpc/setjmp.h |   18 +++
 5 files changed, 86 insertions(+), 70 deletions(-)

Index: linux-2.6-ozlabs/arch/powerpc/kernel/misc.S
===
--- linux-2.6-ozlabs.orig/arch/powerpc/kernel/misc.S
+++ linux-2.6-ozlabs/arch/powerpc/kernel/misc.S
@@ -8,6 +8,8 @@
  * Adapted for iSeries by Mike Corrigan ([EMAIL PROTECTED])
  * PPC64 updates by Dave Engebretsen ([EMAIL PROTECTED])
  *
+ * setjmp/longjmp code by Paul Mackerras.
+ *
  * 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
@@ -15,6 +17,8 @@
  */
 #include 
 #include 
+#include 
+#include 
 
.text
 
@@ -51,3 +55,64 @@ _GLOBAL(kernel_execve)
bnslr
neg r3,r3
blr
+
+_GLOBAL(setjmp)
+   mflrr0
+   PPC_STL r0,0(r3)
+   PPC_STL r1,SZL(r3)
+   PPC_STL r2,2*SZL(r3)
+   mfcrr0
+   PPC_STL r0,3*SZL(r3)
+   PPC_STL r13,4*SZL(r3)
+   PPC_STL r14,5*SZL(r3)
+   PPC_STL r15,6*SZL(r3)
+   PPC_STL r16,7*SZL(r3)
+   PPC_STL r17,8*SZL(r3)
+   PPC_STL r18,9*SZL(r3)
+   PPC_STL r19,10*SZL(r3)
+   PPC_STL r20,11*SZL(r3)
+   PPC_STL r21,12*SZL(r3)
+   PPC_STL r22,13*SZL(r3)
+   PPC_STL r23,14*SZL(r3)
+   PPC_STL r24,15*SZL(r3)
+   PPC_STL r25,16*SZL(r3)
+   PPC_STL r26,17*SZL(r3)
+   PPC_STL r27,18*SZL(r3)
+   PPC_STL r28,19*SZL(r3)
+   PPC_STL r29,20*SZL(r3)
+   PPC_STL r30,21*SZL(r3)
+   PPC_STL r31,22*SZL(r3)
+   li  r3,0
+   blr
+
+_GLOBAL(longjmp)
+   PPC_LCMPI r4,0
+   bne 1f
+   li  r4,1
+1: PPC_LL  r13,4*SZL(r3)
+   PPC_LL  r14,5*SZL(r3)
+   PPC_LL  r15,6*SZL(r3)
+   PPC_LL  r16,7*SZL(r3)
+   PPC_LL  r17,8*SZL(r3)
+   PPC_LL  r18,9*SZL(r3)
+   PPC_LL  r19,10*SZL(r3)
+   PPC_LL  r20,11*SZL(r3)
+   PPC_LL  r21,12*SZL(r3)
+   PPC_LL  r22,13*SZL(r3)
+   PPC_LL  r23,14*SZL(r3)
+   PPC_LL  r24,15*SZL(r3)
+   PPC_LL  r25,16*SZL(r3)
+   PPC_LL  r26,17*SZL(r3)
+   PPC_LL  r27,18*SZL(r3)
+   PPC_LL  r28,19*SZL(r3)
+   PPC_LL  r29,20*SZL(r3)
+   PPC_LL  r30,21*SZL(r3)
+   PPC_LL  r31,22*SZL(r3)
+   PPC_LL  r0,3*SZL(r3)
+   mtcrf   0x38,r0
+   PPC_LL  r0,0(r3)
+   PPC_LL  r1,SZL(r3)
+   PPC_LL  r2,2*SZL(r3)
+   mtlrr0
+   mr  r3,r4
+   blr
Index: linux-2.6-ozlabs/arch/powerpc/mm/fault.c
===
--- linux-2.6-ozlabs.orig/arch/powerpc/mm/fault.c
+++ linux-2.6-ozlabs/arch/powerpc/mm/fault.c
@@ -167,10 +167,8 @@ int __kprobes do_page_fault(struct pt_re
if (notify_page_fault(regs))
return 0;
 
-   if (trap == 0x300) {
-   if (debugger_fault_handler(regs))
-   return 0;
-   }
+   if (unlikely(debugger_fault_handler(regs)))
+   return 0;
 
/* On a kernel SLB miss we can only check for a valid exception entry */
if (!user_mode(regs) && (address >= TASK_SIZE))
Index: linux-2.6-ozlabs/arch/powerpc/xmon/setjmp.S
===
--- linux-2.6-ozlabs.orig/arch/powerpc/xmon/setjmp.S
+++ linux-2.6-ozlabs/arch/powerpc/xmon/setjmp.S
@@ -12,67 +12,6 @@
 #include 
 #include 
 
-_GLOBAL(xmon_setjmp)
-   mflrr0
-   PPC_STL r0,0(r3)
-   PPC_STL r1,SZL(r3)
-   PPC_STL r2,2*SZL(r3)
-   mfcrr0
-   PPC_STL r0,3*SZL(r3)
-   PPC_STL r13,4*SZL(r3)
-   PPC_STL r14,5*SZL(r3)
-   PPC_STL r15,6*SZL(r3)
-   PPC_STL r16,7*SZL(r3)
-   PPC_STL r17,8*SZL(r3)
-   PPC_STL r18,9*SZL(r3)
-   PPC_STL r19,10*SZL(r3)
-   PPC_STL r20,11*SZL(r3)
-   PPC_STL r21,12*SZL(r3)
-   PPC_STL r22,13*SZL(r3)
-   PPC_STL r23,14*SZL(r3)
-   PPC_STL r24,15*SZL(r3)
-   PPC_STL r25,16*SZL(r3)
-   PPC_STL r26,17*SZL(r3)
-   PPC_STL r27,18*SZL(r3)
-   PPC_STL r28,19*SZL(r3)
-   PPC_STL r29,20*SZL(r3)
-   PPC_STL r30,21*SZL(r3)
-   PPC_STL r31,22*SZL(r3)
-   li  r3,0
-   blr
-
-_GLOBAL(xmon_longjmp)
-   PPC_LCMPI r4,0
-   bne 1f
-   li  r4,1
-1: PPC_LL  r13,4*SZL(r3)
-   PPC_LL  r14,5*SZL(r3)
-   PPC_LL  r15,6*SZL(r3)
-   PPC_LL  r16,7*SZL(r3)
-   PPC_LL  r17,8*SZL(r3)
-   PPC_LL  r18,9*SZL(r3)
-

[PATCH] Add crashdump shutdown hooks

2008-01-17 Thread Michael Neuling
The following patches add crashdump shutdown hooks for POWERPC.

Signed-off-by: Michael Neuling <[EMAIL PROTECTED]>
---
Updated some comments in the code, as noticed by sfr, Josh Boyer and a
dirty car owner.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: 2.6.24-rc8-mm1: powerpc oopses

2008-01-17 Thread Mariusz Kozlowski
Hello,

The script below kills powerpc. oopses get longer and more
wonderful with every next 'cated' file.

/proc//task//pagemap seems to be the cause of oops. The
important thing is that it oopses for random (that is not first in a row)
process from /proc. So not every 'cat /proc//task//pagemap'
causes an oops.

I could try to bisect this but this powerpc box is iMac G3 (cpu at 400MHz)
and this will take time. So any hints appreciated.

Regards,

Mariusz

script:
-
#!/bin/bash

for i in `find /proc/*/ -readable -type f`; do
echo -n "cat $i > /dev/null ... ";
logger -t proc_loop $i;
sync;
cat $i > /dev/null;
echo "done";
done
--
syslog:
proc_loop: /proc/3731/task/3731/pagemap
kernel: BUG: sleeping function called from invalid context at 
fs/proc/task_mmu.c:554
kernel: in_atomic():1, irqs_disabled():0
kernel: Call Trace:
kernel: [cf1cddf0] [c000840c] show_stack+0x3c/0x194 (unreliable)
kernel: [cf1cde20] [c002b2ec] __might_sleep+0xf4/0x108
kernel: [cf1cde30] [c00d2d54] add_to_pagemap+0x40/0x11c
kernel: [cf1cde50] [c00d2f44] pagemap_pte_range+0xa8/0x10c
kernel: [cf1cde70] [c0081b30] walk_page_range+0x148/0x23c
kernel: [cf1cdeb0] [c00d3104] pagemap_read+0x15c/0x244
kernel: [cf1cdef0] [c0092144] vfs_read+0xc4/0x16c
kernel: [cf1cdf10] [c009261c] sys_read+0x4c/0x90
kernel: [cf1cdf40] [c001328c] ret_from_syscall+0x0/0x40
kernel: --- Exception: c01 at 0xff5a364
kernel: LR = 0x10002f60
kernel: BUG: scheduling while atomic: cat/8929/0x0002
kernel: Call Trace:
kernel: [cf1cde90] [c000840c] show_stack+0x3c/0x194 (unreliable)
kernel: [cf1cdec0] [c002db24] __schedule_bug+0x64/0x78
kernel: [cf1cdee0] [c027207c] schedule+0x304/0x32c
kernel: [cf1cdf40] [c0013a5c] recheck+0x0/0x28
kernel: --- Exception: c01 at 0xff5a364
kernel: LR = 0x10002f60
kernel: BUG: scheduling while atomic: cat/8929/0x0007
kernel: Call Trace:
kernel: [cf1cde90] [c000840c] show_stack+0x3c/0x194 (unreliable)
kernel: [cf1cdec0] [c002db24] __schedule_bug+0x64/0x78
kernel: [cf1cdee0] [c027207c] schedule+0x304/0x32c
kernel: [cf1cdf40] [c0013a5c] recheck+0x0/0x28
kernel: --- Exception: c01 at 0xff5a364
kernel: LR = 0x10002f60
kernel: BUG: scheduling while atomic: cat/8929/0x0009
kernel: Call Trace:
kernel: [cf1cde90] [c000840c] show_stack+0x3c/0x194 (unreliable)
kernel: [cf1cdec0] [c002db24] __schedule_bug+0x64/0x78
kernel: [cf1cdee0] [c027207c] schedule+0x304/0x32c
kernel: [cf1cdf40] [c0013a5c] recheck+0x0/0x28
kernel: --- Exception: c01 at 0xff5a364
kernel: LR = 0x10002f60
kernel: Page fault in user mode with in_atomic() = 1 mm = cf2765a0
kernel: NIP = ff0cbc8  MSR = 4000f932
kernel: Oops: Weird page fault, sig: 11 [#3]
kernel: PREEMPT PowerMac
kernel: Modules linked in: usbhid ide_cd_mod ohci_hcd usbcore uninorth_agp 
agpgart
kernel: NIP: 0ff0cbc8 LR: 0ff0d398 CTR: 0ff0d2d0
kernel: REGS: cf1cdf50 TRAP: 0401   Tainted: G  D  (2.6.24-rc8-mm1)
kernel: MSR: 4000f932   CR: 28022442  XER: 
kernel: TASK = cf8d74f0[8929] 'cat' THREAD: cf1cc000
kernel: GPR00: 0001 bf93e330 48029bf0 0ffed488 10016038 28022442  
0ff5a364 
kernel: GPR08: f932  1032  28022442 
kernel: NIP [0ff0cbc8] 0xff0cbc8
kernel: LR [0ff0d398] 0xff0d398
proc_loop: /proc/3731/task/3731/wchan
kernel: Call Trace:
kernel: ---[ end trace 54bd1ed4883922c9 ]---
kernel: note: cat[8929] exited with preempt_count 10
proc_loop: /proc/3731/task/3731/oom_score
proc_loop: /proc/3731/task/3731/oom_adj
proc_loop: /proc/3731/fdinfo/0
[... snip ...]

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


Re: [PATCH 2/7] powerpc: allow localbus compatible serial ports for console device

2008-01-17 Thread Scott Wood
Paul Gortmaker wrote:
> +static struct __init serial_parent parents[] = {
> + {"soc", NULL},
> + {"tsi-bridge", NULL},
> + {"opb", "ibm,opb"},
> + {NULL, "wrs,epld-localbus"},
> +};

can we add {NULL, "simple-bus"} to this list?

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


Re: [PATCH] [POWERPC] Update TQM5200, CM5200 and Motion-PRO _defconfig and .dts files

2008-01-17 Thread Marian Balakowicz
Grant Likely wrote:
> On 1/17/08, Marian Balakowicz <[EMAIL PROTECTED]> wrote:
>> Grant Likely wrote:
>>> On 1/17/08, Marian Balakowicz <[EMAIL PROTECTED]> wrote:
...
>>> Can you split the defconfig changes into a separate patch...  That
>>> being said, how do you feel about merging all the 5200 defconfigs into
>>> a single defconfig?  They are all multiplatform after all and it would
>>> make maintenance easier.
>> Ok, I'll split it into two patches.
>>
>> But merging defconfigs won't be a good option, boards differ in which
>> devices they use, some have PCI, some have USB, etc. Having one
>> defconfig, it would be necessary to manually customize kernel
>> configuration and remember which options are to be set/disabled.
> 
> That doesn't matter for defconfigs.  That needs to be done when you're
> tailoring a product regardless.  defconfigs are simply a known good
> configuration; they are not intended to be the deployed config.  If
> the defconfig enables all features used by any of the boards then it
> should be okay.

That's true, defconfigs are only reference configurations, but still,
I would opt for a separate defconfigs as it is more clear which target
given defconfig is meant for and it is more convenient for development
and customer to have it separate. And IMHO it's actually easier to
maintain, as you don't need to consider all three boards each time you
update defconfig and don't need to test each defconfig change on three
(right now) boards, etc.

Best Regards,
m.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 2/7] powerpc: allow localbus compatible serial ports for console device

2008-01-17 Thread Paul Gortmaker
In message: Re: [PATCH 2/7] powerpc: allow localbus compatible serial ports for 
console device
on 07/01/2008 Arnd Bergmann wrote:

> On Monday 07 January 2008, Paul Gortmaker wrote:
> > 
> > I'd thought about doing that, but there are slight differences
> > in each test.  To remain 100% faithful to the original implementation
> > you'd have to have a table or similar that had these various fields
> > and loop over that -- something like:
> > 
> > compat      parent   pnt-compat  pnt-type   add-fcn
> > ---
> > ns16550     NULL     NULL        soc        add_legacy_soc_port
> > NULL        isa      NULL        NULL       add_legacy_isa_port
> > ns16550     NULL     NULL        tsi-bridge add_legacy_soc_port
> > ns16550     NULL     ibm,opb     opb        add_legacy_soc_port
> > ns16550     NULL     localbus    NULL       add_legacy_soc_port
> > 
> > But, if we were willing to move away from checks based on
> > the parent->type and stick with parent->compat, then the
> > unification would be a lot cleaner and easier to implement.
> 
> Unfortunately, some of our cell blades don't have the right
> 'compatible' property, so you still need to check the type for
> the opb case.
> 
> > (we could also leave the ISA one out as an oddball, and then
> > not have to carry an add-fcn either).
> 
> yes, that seems reasonable.

Have a look at this and see if it seems OK to you. It collapses the soc,
tsi-bridge, opb and localbus code blocks into one.  The patch is layered
on my previous patch that did the for_each cleanup on the np's but if folks
are OK with the general implementation, I'll spin an equivalent patch
for direct application to the origin/for-2.6.25 branch with signed off etc.

Thanks,
Paul.

---

diff --git a/arch/powerpc/kernel/legacy_serial.c 
b/arch/powerpc/kernel/legacy_serial.c
index d0b8e35..16a4ef1 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -31,6 +31,21 @@ static struct legacy_serial_info {
int irq_check_parent;
phys_addr_t taddr;
 } legacy_serial_infos[MAX_LEGACY_SERIAL_PORTS];
+
+struct serial_parent {
+   char *type;
+   char *compat;
+};
+
+static struct __init serial_parent parents[] = {
+   {"soc", NULL},
+   {"tsi-bridge", NULL},
+   {"opb", "ibm,opb"},
+   {NULL, "wrs,epld-localbus"},
+};
+
+#define NUM_PARENTS sizeof(parents)/sizeof(struct serial_parent)
+
 static unsigned int legacy_serial_count;
 static int legacy_serial_console = -1;
 
@@ -292,6 +307,7 @@ void __init find_legacy_serial_ports(void)
 {
struct device_node *np, *stdout = NULL;
const char *path;
+   struct serial_parent *sp, *end = parents + NUM_PARENTS;
int index;
 
DBG(" -> find_legacy_serial_port()\n");
@@ -306,15 +322,24 @@ void __init find_legacy_serial_ports(void)
DBG(" no linux,stdout-path !\n");
}
 
-   /* First fill our array with SOC ports */
-   for_each_compatible_node(np, "serial", "ns16550") {
-   struct device_node *soc = of_get_parent(np);
-   if (soc && !strcmp(soc->type, "soc")) {
-   index = add_legacy_soc_port(np, np);
-   if (index >= 0 && np == stdout)
-   legacy_serial_console = index;
+   for (sp = parents; sp != end; sp++) {
+   for_each_compatible_node(np, "serial", "ns16550") {
+   struct device_node *parent = of_get_parent(np);
+   int p_type_ok = 0, p_is_compat = 0;
+   if (!parent)
+   continue;
+   if (sp->type && !strcmp(parent->type, sp->type))
+   p_type_ok = 1;
+   if (sp->compat && of_device_is_compatible(parent, 
sp->compat))
+   p_is_compat = 1;
+   if (p_type_ok || p_is_compat) {
+   index = add_legacy_soc_port(np, np);
+   if (index >= 0 && np == stdout)
+   legacy_serial_console = index;
+   }
+   of_node_put(parent);
}
-   of_node_put(soc);
+   
}
 
/* Next, fill our array with ISA ports */
@@ -328,40 +353,6 @@ void __init find_legacy_serial_ports(void)
of_node_put(isa);
}
 
-   /* Next, fill our array with tsi-bridge ports */
-   for_each_compatible_node(np, "serial", "ns16550") {
-   struct device_node *tsi = of_get_parent(np);
-   if (tsi && !strcmp(tsi->type, "tsi-bridge")) {
-   index = add_legacy_soc_port(np, np);
-   if (index >= 0 && np == stdout)
-   legacy_serial_console = index;
-   }
- 

Re: Problems with PCI on 8280

2008-01-17 Thread Scott Wood
Rune Torgersen wrote:
> Our problem is that we can only access the first 128MB of the 
> prefetchable area.
> an access to 0x87ff_ works (after ioremap), while an access to 
> 0x8800_ causes an bus error.
> 
> trying to access 0x87FC -> 0x
> trying to access 0x8800 ->Machine check in kernel mode.
> Caused by (from SRR1=49030): Transfer error ack signal
> 
> It is like the prefetch area is not set up correctly for ioremap.
> 
> The PCI registers are set up correctly in u-boot, and we can access the 
> whole prefetch area in u-boot without any problems.

Are you using cuImage, or a regular uImage with a device-tree-aware 
u-boot?  If the former, try commenting out the call to fixup_pci() in 
arch/powerpc/boot/cuboot-pq2.c and let me know if that changes anything.

Otherwise, are you sure the kernel didn't move BARs around such that 
there's no longer a PCI device mapped at 0x8800 (or that the device 
that is there has been disabled)?

Can you show the contents of the following big endian registers:
TESCR1 (0x10040), TESCR2 (0x10044), PCIBRx (0x101ac, 0x101b0), and 
PCIMSKx (0x101c4, 0x101c8)

and the following little endian registers:
POTARx (0x10800, 0x10818, 0x10830), POBARx (0x10808, 0x10820, 0x10838), 
POCMRx (0x10810, 0x10828, 0x10840), POESR (0x10084), PCI_EACR (0x10890), 
and PCI_ECCR (0x108a0)

after the machine check happens?

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


Re: 2.6.24-rc8-mm1 powerpc build errors

2008-01-17 Thread Greg KH
On Thu, Jan 17, 2008 at 11:35:23AM -0800, Andrew Morton wrote:
> On Thu, 17 Jan 2008 13:06:39 -0600 Olof Johansson <[EMAIL PROTECTED]> wrote:
> > powerpc_allyesconfig:
> > 
> > drivers/net/ehea/ehea_main.c: In function 'ehea_driver_sysfs_add':
> > drivers/net/ehea/ehea_main.c:2812: error: 'struct device_driver' has no 
> > member named 'kobj'
> > drivers/net/ehea/ehea_main.c:2815: error: 'struct device_driver' has no 
> > member named 'kobj'
> > drivers/net/ehea/ehea_main.c:2818: error: 'struct device_driver' has no 
> > member named 'kobj'
> > drivers/net/ehea/ehea_main.c: In function 'ehea_driver_sysfs_remove':
> > drivers/net/ehea/ehea_main.c:2830: error: 'struct device_driver' has no 
> > member named 'kobj'
> 
> Looks like the driver tree wrecking ball failed to visit that driver.

Crap, I thought I fixed that one, but the patch never made it out...
I'll fix that tomorrow, sorry about that.

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


Re: [PATCH 1/2] Make setjmp/longjmp code generic

2008-01-17 Thread Michael Ellerman
On Thu, 2008-01-17 at 06:45 -0600, Josh Boyer wrote:
> On Thu, 17 Jan 2008 16:36:49 +1100
> Michael Neuling <[EMAIL PROTECTED]> wrote:
> > In message <[EMAIL PROTECTED]> you wrote:
> > > Hi,
> > > 
> > > On Thu, Jan 17, 2008 at 03:45:42PM +1100, Michael Neuling wrote:
> > > 
> > > > Index: linux-2.6-ozlabs/include/asm-powerpc/setjmp.h
> > > > ===
> > > > --- /dev/null
> > > > +++ linux-2.6-ozlabs/include/asm-powerpc/setjmp.h
> > > > @@ -0,0 +1,18 @@
> > > > +/*
> > > > + * Copyright (C) 2007 Michael Neuling
> >  ^^
> > 
> > > > + *
> > > > + *  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.
> > > > + *
> > > > + */
> > > > +#ifndef _ASM_POWERPC_SETJMP_H
> > > > +#define _ASM_POWERPC_SETJMP_H
> > > > +
> > > > +#define JMP_BUF_LEN23
> > > > +
> > > > +extern long setjmp(long *);
> > > > +extern void longjmp(long *, long);
> > > > +
> > > > +#endif /* _ASM_POWERPC_SETJMP_H */
> > > 
> > > Should the above be inside #ifdef __KERNEL__?
> > 
> > Yep... _and_ it's 2008 now!
> > 
> > I'll update.
> 
> While you're off updating it, remove the (C).  It's bogus and shouldn't
> be there.

And it should say IBM corp too.

Oh and my car needs a wash when you're free ..

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person


signature.asc
Description: This is a digitally signed message part
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Problems with PCI on 8280

2008-01-17 Thread Rune Torgersen
Hi.
 We have e 8280 bioard with PCI. We have three memory ranges set up;
0x8000_ to 0x8fff_ is prefetchable memory
0x9000_ to 0x97ff_ is non-prefetchable memory
0x9800_ to 0x9800_ is IO.

our device tree has
ranges = <4200 0 8000 8000 0 1000// Pre-fetch memory
  0200 0 9000 9000 0 0800// Normal Memory
  0100 0 9800 9800 0 0001>;  // I/O

for the memory ranges in the PCI node (full node at the end)

Our problem is that we can only access the first 128MB of the prefetchable area.
an access to 0x87ff_ works (after ioremap), while an access to 0x8800_ 
causes an bus error.

trying to access 0x87FC -> 0x
trying to access 0x8800 ->Machine check in kernel mode.
Caused by (from SRR1=49030): Transfer error ack signal

It is like the prefetch area is not set up correctly for ioremap.

The PCI registers are set up correctly in u-boot, and we can access the whole 
prefetch area in u-boot without any problems.

pci node in device tree:

[EMAIL PROTECTED] {
device_type = "pci";
reg = ;
compatible = "fsl,mpc8280-pci", "apmax-pci", "fsl,pq2-pci";
#interrupt-cells = <1>;
#size-cells = <2>;
#address-cells = <3>;
clock-frequency = ;   // For our board.
interrupt-map-mask = ;// Anded with the 
interrupt-map values
interrupt-map = <
/* IDSEL 0x11 */
8800 0 0 1 &PCI_INT 5>;   // 3 first 
numbers pci device specifier are: (buss << 16 | id_sel << 11) 0 0
  //buss = 0, 
id_sel = 11
  // Next number is 
interrupt 1-4 mapped A-D (interrupt A for us)
  // Last two 
numbers are host interrupt specifier (external interrupt 5)

//interrupt-parent = <&PIC>;
interrupt-parent = <&PCI_INT>; 
// interrupts = <12 8>;
   // Mem type 0 Bus Add  Loc. Add 0 Length  <<--- Remember the 
mem type is little endian
ranges = <4200 0 8000 8000 0 1000// 
Pre-fetch memory
  0200 0 9000 9000 0 0800// Normal 
Memory
  0100 0 9800 9800 0 0001>;  // I/O
  
bus-range = <0 ff>;
[EMAIL PROTECTED] {
device_type = "pci";
reg = <9000 0 0 0 0>;
#interrupt-cells = <1>;
#size-cells = <2>;
#address-cells = <3>;
interrupt-parent = <&PCI_INT>; 
interrupt-map-mask = <0f800 0 0 7>;
interrupt-map = <
/* IDSEL 0x10 */
 0 0 1 &PCI_INT 1

/* IDSEL 0x11 */
0800 0 0 1 &PCI_INT 2

/* IDSEL 0x12 */
1000 0 0 1 &PCI_INT 3

/* IDSEL 0x13 */
1800 0 0 1 &PCI_INT 4 >;
};
};




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

Re: crash in kmem_cache_init

2008-01-17 Thread Olaf Hering
On Thu, Jan 17, Christoph Lameter wrote:

> On Thu, 17 Jan 2008, Olaf Hering wrote:
> 
> > The patch does not help.
> 
> Duh. We need to know more about the problem.

cache_grow is called from 3 places. The third call has cleared l3 for
some reason.



Allocated 00a0 bytes for kernel @ 0020
   Elf64 kernel loaded...
OF stdout device is: /vdevice/[EMAIL PROTECTED]
Hypertas detected, assuming LPAR !
command line:  xmon=on sysrq=1 debug panic=1 
memory layout at init:
  alloc_bottom : 00ac1000
  alloc_top: 1000
  alloc_top_hi : da00
  rmo_top  : 1000
  ram_top  : da00
Looking for displays
found display   : /[EMAIL PROTECTED]/[EMAIL PROTECTED]/[EMAIL PROTECTED]/[EMAIL 
PROTECTED], opening ... done
instantiating rtas at 0x0f6a1000 ... done
 : boot cpu 
0002 : starting cpu hw idx 0002... done
0004 : starting cpu hw idx 0004... done
0006 : starting cpu hw idx 0006... done
copying OF device tree ...
Building dt strings...
Building dt structure...
Device tree strings 0x00cc2000 -> 0x00cc34e4
Device tree struct  0x00cc4000 -> 0x00cd6000
Calling quiesce ...
returning from prom_init
Partition configured for 8 cpus.
Starting Linux PPC64 #34 SMP Thu Jan 17 22:06:41 CET 2008
-
ppc64_pft_size= 0x1c
physicalMemorySize= 0xda00
htab_hash_mask= 0x1f
-
Linux version 2.6.24-rc8-ppc64 ([EMAIL PROTECTED]) (gcc version 4.1.2 20070115 
(prerelease) (SUSE Linux)) #34 SMP Thu Jan 17 22:06:41 CET 2008
[boot]0012 Setup Arch
EEH: PCI Enhanced I/O Error Handling Enabled
PPC64 nvram contains 8192 bytes
Zone PFN ranges:
  DMA 0 ->   892928
  Normal 892928 ->   892928
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
1:0 ->   892928
Could not find start_pfn for node 0
[boot]0015 Setup Done
Built 2 zonelists in Node order, mobility grouping on.  Total pages: 880720
Policy zone: DMA
Kernel command line:  xmon=on sysrq=1 debug panic=1 
[boot]0020 XICS Init
xics: no ISA interrupt controller
[boot]0021 XICS Done
PID hash table entries: 4096 (order: 12, 32768 bytes)
time_init: decrementer frequency = 275.07 MHz
time_init: processor frequency   = 2197.80 MHz
clocksource: timebase mult[e8ab05] shift[22] registered
clockevent: decrementer mult[466a] shift[16] cpu[0]
Console: colour dummy device 80x25
console handover: boot [udbg-1] -> real [hvc0]
Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
freeing bootmem node 1
Memory: 3496633k/3571712k available (6188k kernel code, 75080k reserved, 1324k 
data, 1220k bss, 304k init)
cache_grow(2778) swapper(0):c0,j4294937299 cachep c06a4fb8 nodeid 0 l3 
c05fddf0
cache_grow(2778) swapper(0):c0,j4294937299 cachep c06a4fb8 nodeid 1 l3 
c05fddf0
cache_grow(2778) swapper(0):c0,j4294937299 cachep c06a4fb8 nodeid 2 l3 
c05fddf0
cache_grow(2778) swapper(0):c0,j4294937299 cachep c06a4fb8 nodeid 3 l3 
c05fddf0
[ cut here ]
Badness at /home/olaf/kernel/git/linux-2.6.24-rc8/mm/slab.c:2779
NIP: c00f78f4 LR: c00f78e0 CTR: 801af404
REGS: c075b880 TRAP: 0700   Not tainted  (2.6.24-rc8-ppc64)
MSR: 80029032   CR: 2422  XER: 0001
TASK = c0665a50[0] 'swapper' THREAD: c0758000 CPU: 0
GPR00: 0004 c075bb00 c07544c0 0063 
GPR04: 0001 0001   
GPR08:  c06a19a0 c07a84b0 c07a84a8 
GPR12: 4000 c0666380   
GPR16:    4020 
GPR20:  007fbd70 c054f6c8 000492d0 
GPR24:  c06a4fb8 c06a4fb8 c05fdc80 
GPR28:  000412d0 c06e5b80 0004 
NIP [c00f78f4] .cache_grow+0xc8/0x39c
LR [c00f78e0] .cache_grow+0xb4/0x39c
Call Trace:
[c075bb00] [c00f78e0] .cache_grow+0xb4/0x39c (unreliable)
[c075bbd0] [c00f82d0] .cache_alloc_refill+0x234/0x2c0
[c075bc90] [c00f842c] .kmem_cache_alloc+0xd0/0x294
[c075bd40] [c00fb4e8] .kmem_cache_create+0x208/0x478
[c075be20] [c05e670c] .kmem_cache_init+0x218/0x4f4
[c075bee0] [c05bf8ec] .start_kernel+0x2f8/0x3fc
[c075bf90] [c0008590] .start_here_common+0x60/0xd0
Instruction dump:
e89e80e0 e92a e80b0468 7f4ad378 fbe10070 f8010078 4bf85f01 6000 
381f0001 7c1f07b4 2f9f0004

Re: [PATCH] net: NEWEMAC: Remove "rgmii-interface" from rgmii matching table

2008-01-17 Thread Benjamin Herrenschmidt

On Wed, 2008-01-16 at 10:37 +0100, Stefan Roese wrote:
> With the removal the the "rgmii-interface" device_type property from the
> dts files, the newemac driver needs an update to only rely on compatible
> property.
> 
> Signed-off-by: Stefan Roese <[EMAIL PROTECTED]>
> ---

Acked-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]>

Jeff, please stick that into your queue for 2.6.25, thanks !

Ben.

>  drivers/net/ibm_newemac/rgmii.c |1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/ibm_newemac/rgmii.c b/drivers/net/ibm_newemac/rgmii.c
> index 9bc1132..5757788 100644
> --- a/drivers/net/ibm_newemac/rgmii.c
> +++ b/drivers/net/ibm_newemac/rgmii.c
> @@ -302,7 +302,6 @@ static int __devexit rgmii_remove(struct of_device *ofdev)
>  static struct of_device_id rgmii_match[] =
>  {
>   {
> - .type   = "rgmii-interface",
>   .compatible = "ibm,rgmii",
>   },
>   {

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


Re: [PATCH 4/7] sbc8560: Add device tree source for Wind River SBC8560 board

2008-01-17 Thread Paul Gortmaker
In message: Re: [PATCH 4/7] sbc8560: Add device tree source for Wind River 
SBC8560 board
on 10/01/2008 David Gibson wrote:

> > +   [EMAIL PROTECTED] {
> > +   #address-cells = <1>;
> > +   #size-cells = <1>;
> > +   compatible = "localbus";
> 
> This compatible doesn't look specific enough.  It should at least have
> a vendor prefix.

Sorry for the delayed reply.  I've gone with "wrs,epld-localbus" based on
the format of all the existing localbus entries.

> 
> > +   ranges = <0 fc00 00c0>;
> 
> Typically, we've been doing these external bust controller type
> gadgets with address-cells = <2>, the first cell explicitly encoding
> the chipselect.  This gets us closer to the ideal of the device tree
> encoding only hardware information, not how the bridge controller is
> configured (although "ranges" will still have to contain configuration
> dependent information).

OK, I think I've captured the intent of what you mean here.  It makes
the dts appear a lot more complex to a non-dts person (IMHO), but it
does capture the full details of the board this way.

I've put in a 2 address cell localbus entry, put in all the devices
listed in TFM for each CS#, of which the EPLD is on CS5, and since
the EPLD sub-decodes off of CS5, it too is a bus with 2 address cells
and the equivalent of a CS# for each sub-device.  It takes a bit to get
your head around the various ranges = <...> with varying #s of parameters
(or at least it did for me) but I think I have it mapped out properly.
The UARTs still work, and since they are out in the weeds now, some three
nodes deep, it has to be at least partially correct...

[All the good stuff with the localbus is near the bottom of the dts.]

Paul.


/*
 * SBC8560 Device Tree Source
 *
 * Copyright 2007 Wind River Systems Inc.
 *
 * Paul Gortmaker (see MAINTAINERS for contact information)
 *
 * 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 = "SBC8560";
compatible = "SBC8560";
#address-cells = <1>;
#size-cells = <1>;

aliases {
ethernet0 = &enet0;
ethernet1 = &enet1;
ethernet2 = &enet2;
ethernet3 = &enet3;
serial0 = &serial0;
serial1 = &serial1;
pci0 = &pci0;
};

cpus {
#address-cells = <1>;
#size-cells = <0>;

PowerPC,[EMAIL PROTECTED] {
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 = <0>;   // From uboot
bus-frequency = <0>;
clock-frequency = <0>;
};
};

memory {
device_type = "memory";
reg = <0x 0x2000>;
};

[EMAIL PROTECTED] {
#address-cells = <1>;
#size-cells = <1>;
device_type = "soc";
ranges = <0x0 0xff70 0x0010>;
reg = <0xff70 0x0010>;
clock-frequency = <0>;

[EMAIL PROTECTED] {
compatible = "fsl,8560-memory-controller";
reg = <0x2000 0x1000>;
interrupt-parent = <&mpic>;
interrupts = <0x12 0x2>;
};

[EMAIL PROTECTED] {
compatible = "fsl,8560-l2-cache-controller";
reg = <0x2 0x1000>;
cache-line-size = <0x20>;   // 32 bytes
cache-size = <0x4>; // L2, 256K
interrupt-parent = <&mpic>;
interrupts = <0x10 0x2>;
};

[EMAIL PROTECTED] {
#address-cells = <1>;
#size-cells = <0>;
cell-index = <0>;
compatible = "fsl-i2c";
reg = <0x3000 0x100>;
interrupts = <0x2b 0x2>;
interrupt-parent = <&mpic>;
dfsrr;
};

[EMAIL PROTECTED] {
#address-cells = <1>;
#size-cells = <0>;
cell-index = <1>;
compatible = "fsl-i2c";
reg = <0x3100 0x100>;
  

[PATCH][TRIVIAL] ibm_emac/ibm_emac_mal.c:mal_poll: Fix MAL_DBG2 invocation

2008-01-17 Thread Hal Rosenstock
ibm_emac/ibm_emac_mal.c:mal_poll: Fix MAL_DBG2 invocation

Signed-off-by: Hal Rosenstock <[EMAIL PROTECTED]>

diff --git a/drivers/net/ibm_emac/ibm_emac_mal.c 
b/drivers/net/ibm_emac/ibm_emac_mal.c
index dcd8826..1977791 100644
--- a/drivers/net/ibm_emac/ibm_emac_mal.c
+++ b/drivers/net/ibm_emac/ibm_emac_mal.c
@@ -279,7 +279,7 @@ static int mal_poll(struct napi_struct *napi, int budget)
struct list_head *l;
int received = 0;
 
-   MAL_DBG2("%d: poll(%d) %d ->" NL, mal->def->index, *budget,
+   MAL_DBG2("%d: poll(%d) %d ->" NL, mal->def->index, budget,
 rx_work_limit);
   again:
/* Process TX skbs */

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


Warp Watchdog

2008-01-17 Thread Sean MacLennan
The taco, er warp, has a watchdog timer built into the fpga. The 
watchdog is very trivial and very tied to the warp. I have put it has 
part of the platform code rather than a standalone module.

Two reasons for this: one, once started it can't be stopped. A module 
unload would be fatal ;) Two, it is so closely tied to the taco that it 
really has no use otherwise.

The platform always starts the watchdog, assuming you asked for the 
watchdog, but does not enable it until hit from user mode.

What is the general feeling about this implementation? I am not 
submitting this for inclusion in the kernel right now, just feeling out 
what others think.

Cheers,
   Sean

diff --git a/arch/powerpc/platforms/44x/warp.c 
b/arch/powerpc/platforms/44x/warp.c
new file mode 100644
index 000..a8b0d2c
--- /dev/null
+++ b/arch/powerpc/platforms/44x/warp.c
@@ -0,0 +1,270 @@
+/*
+ * PIKA Warp(tm) board specific routines
+ *
+ * Copyright (c) 2008 PIKA Technologies
+ *   Sean MacLennan <[EMAIL PROTECTED]>
+ *
+ * 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.
+ */
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "44x.h"
+
+
+static __initdata struct of_device_id warp_of_bus[] = {
+   { .compatible = "ibm,plb4", },
+   { .compatible = "ibm,opb", },
+   { .compatible = "ibm,ebc", },
+   {},
+};
+
+static int __init warp_device_probe(void)
+{
+   of_platform_bus_probe(NULL, warp_of_bus, NULL);
+   return 0;
+}
+machine_device_initcall(warp, warp_device_probe);
+
+static int __init warp_probe(void)
+{
+   unsigned long root = of_get_flat_dt_root();
+
+   return of_flat_dt_is_compatible(root, "pika,warp");
+}
+
+define_machine(warp) {
+   .name   = "Warp",
+   .probe  = warp_probe,
+   .progress   = udbg_progress,
+   .init_IRQ   = uic_init_tree,
+   .get_irq= uic_get_irq,
+   .restart= ppc44x_reset_system,
+   .calibrate_decr = generic_calibrate_decr,
+};
+
+
+#define LED_GREEN (0x8000 >> 0)
+#define LED_RED   (0x8000 >> 1)
+
+
+/* This is for the power LEDs 1 = on, 0 = off, -1 = leave alone */
+void warp_set_power_leds(int green, int red)
+{
+   static void __iomem *gpio_base = NULL;
+   unsigned leds;
+
+   if (gpio_base == NULL) {
+   struct device_node *np;
+
+   /* Power LEDS are on the second GPIO controller */
+   np = of_find_compatible_node(NULL, NULL, "ibm,gpio-440EP");
+   if (np)
+   np = of_find_compatible_node(np, NULL, 
"ibm,gpio-440EP");
+   if (np == NULL) {
+   printk(KERN_ERR __FILE__ ": Unable to find gpio\n");
+   return;
+   }
+
+   gpio_base = of_iomap(np, 0);
+   of_node_put(np);
+   if (gpio_base == NULL) {
+   printk(KERN_ERR __FILE__ ": Unable to map gpio");
+   return;
+   }
+   }
+
+   leds = in_be32(gpio_base);
+
+   switch (green) {
+   case 0: leds &= ~LED_GREEN; break;
+   case 1: leds |=  LED_GREEN; break;
+   }
+   switch (red) {
+   case 0: leds &= ~LED_RED; break;
+   case 1: leds |=  LED_RED; break;
+   }
+
+   out_be32(gpio_base, leds);
+}
+EXPORT_SYMBOL(warp_set_power_leds);
+
+
+#ifdef CONFIG_SENSORS_AD7414
+static int pika_dtm_thread(void __iomem *fpga)
+{
+   extern int ad7414_get_temp(int index);
+
+   while (!kthread_should_stop()) {
+   int temp = ad7414_get_temp(0);
+
+   out_be32(fpga, temp);
+
+   set_current_state(TASK_INTERRUPTIBLE);
+   schedule_timeout(HZ);
+   }
+
+   return 0;
+}
+
+static int pika_dtm_start(void __iomem *fpga)
+{
+   struct task_struct *dtm_thread;
+
+   dtm_thread = kthread_run(pika_dtm_thread, fpga + 0x20, "pika-dtm");
+   if (IS_ERR(dtm_thread)) {
+   printk(KERN_ERR __FILE__ ": Unable to start PIKA DTM thread\n");
+   return PTR_ERR(dtm_thread);
+   }
+
+   return 0;
+}
+#else
+static int pika_dtm_start(void __iomem *fpga)
+{
+   printk(KERN_WARNING "PIKA DTM disabled\n");
+   return 0;
+}
+#endif
+
+
+#ifdef CONFIG_WARP_WATCHDOG
+
+#include 
+#include 
+
+static void __iomem *wd_fpga;
+
+static inline void warpwd_ping(void)
+{
+   unsigned reset = in_be32(wd_fpga + 0x14);
+   out_be32(wd_fpga + 0x14, reset);
+}
+
+static int warpwd_open(struct inode *inode, struct file *file)
+{
+   unsigned reset;
+
+   /* Enable the watchdog. Note this is an implicit ping. */
+   reset = in_be32(wd_fpga + 0x14);
+   reset |= 0xf80; /* enable with max timeout - 15 seconds */
+   out_be3

Re: crash in kmem_cache_init

2008-01-17 Thread Olaf Hering
On Thu, Jan 17, Olaf Hering wrote:

> Since -mm boots further, what patch should I try?

rc8-mm1 crashes as well, l3 passed to reap_alien() is NULL.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: crash in kmem_cache_init

2008-01-17 Thread Olaf Hering
On Thu, Jan 17, Christoph Lameter wrote:

> > freeing bootmem node 1
> > Memory: 3496632k/3571712k available (6188k kernel code, 75080k reserved, 
> > 1324k data, 1220k bss, 304k init)
> > cache_grow(2781) swapper(0):c0,j4294937299 cp c06a4fb8 !l3
> 
> Is there more backtrace information? What function called cache_grow?

I just put a 'if (!l3) return 0;' into cache_grow, the backtrace is the
one from the initial report.
Reverting 04231b3002ac53f8a64a7bd142fde3fa4b6808c6 does not change
anything.


Since -mm boots further, what patch should I try?

The kernel boots on a different p570.
See attached dmesg. huckleberry boots, cranberry crashes.


--- huckleberry.suse.de-2.6.16.57-0.5-ppc64.txt 2008-01-17 20:48:18.510309000 
+0100
+++ cranberry.suse.de-2.6.16.57-0.5-ppc64.txt   2008-01-17 20:48:09.425402000 
+0100
@@ -1,56 +1,55 @@
 Page orders: linear mapping = 24, others = 12
-Found initrd at 0xc270:0xc2a93000
+Found initrd at 0xc130:0xc16e6c1e
 Partition configured for 8 cpus.
 Starting Linux PPC64 #1 SMP Wed Dec 5 09:02:21 UTC 2007
 -
-ppc64_pft_size= 0x1b
+ppc64_pft_size= 0x1c
 ppc64_interrupt_controller= 0x2
 platform  = 0x101
-physicalMemorySize= 0x15800
+physicalMemorySize= 0xda00
 ppc64_caches.dcache_line_size = 0x80
 ppc64_caches.icache_line_size = 0x80
 htab_address  = 0x
-htab_hash_mask= 0xf
+htab_hash_mask= 0x1f
 -
 [boot]0100 MM Init
 [boot]0100 MM Init Done
 Linux version 2.6.16.57-0.5-ppc64 ([EMAIL PROTECTED]) (gcc version 4.1.2 
20070115 (prerelease) (SUSE Linux)) #1 SMP Wed Dec 5 09:02:21 UTC 2007
 [boot]0012 Setup Arch
-Node 0 Memory: 0x0-0xb000
-Node 1 Memory: 0xb000-0x15800
+Node 0 Memory:
+Node 1 Memory: 0x0-0xda00
 EEH: PCI Enhanced I/O Error Handling Enabled
-PPC64 nvram contains 7168 bytes
+PPC64 nvram contains 8192 bytes
 Using dedicated idle loop
-On node 0 totalpages: 720896
-  DMA zone: 720896 pages, LIFO batch:31
+On node 0 totalpages: 0
+  DMA zone: 0 pages, LIFO batch:0
   DMA32 zone: 0 pages, LIFO batch:0
   Normal zone: 0 pages, LIFO batch:0
   HighMem zone: 0 pages, LIFO batch:0
-On node 1 totalpages: 688128
-  DMA zone: 688128 pages, LIFO batch:31
+On node 1 totalpages: 892928
+  DMA zone: 892928 pages, LIFO batch:31
   DMA32 zone: 0 pages, LIFO batch:0
   Normal zone: 0 pages, LIFO batch:0
   HighMem zone: 0 pages, LIFO batch:0
 [boot]0015 Setup Done
 Built 2 zonelists
-Kernel command line: 
root=/dev/disk/by-id/scsi-SIBM_ST373453LC_3HW1CPW57445Q010-part5  xmon=on 
sysrq=1 quiet 
+Kernel command line: root=/dev/system/root  xmon=on sysrq=1 quiet 
 [boot]0020 XICS Init
 xics: no ISA interrupt controller
 [boot]0021 XICS Done
 PID hash table entries: 4096 (order: 12, 131072 bytes)
-time_init: decrementer frequency = 207.052000 MHz
-time_init: processor frequency   = 1654.344000 MHz
+time_init: decrementer frequency = 275.07 MHz
+time_init: processor frequency   = 2197.80 MHz
 Console: colour dummy device 80x25
-Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes)
-Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes)
-freeing bootmem node 0
+Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
+Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
 freeing bootmem node 1
-Memory: 5524952k/5636096k available (4464k kernel code, 44k reserved, 
1992k data, 836k bss, 264k init)
-Calibrating delay loop... 413.69 BogoMIPS (lpj=2068480)
+Memory: 3494648k/3571712k available (4464k kernel code, 77064k reserved, 1992k 
data, 836k bss, 264k init)
+Calibrating delay loop... 548.86 BogoMIPS (lpj=2744320)
 Security Framework v1.0.0 initialized
 Mount-cache hash table entries: 256
 checking if image is initramfs... it is
-Freeing initrd memory: 3660k freed
+Freeing initrd memory: 3995k freed
 Processor 1 found.
 Processor 2 found.
 Processor 3 found.
@@ -61,7 +60,7 @@ Processor 7 found.
 Brought up 8 CPUs
 Node 0 CPUs: 0-3
 Node 1 CPUs: 4-7
-migration_cost=41,0,4308
+migration_cost=38,0,3225
 NET: Registered protocol family 16
 PCI: Probing PCI hardware
 IOMMU table initialized, virtual merging enabled
Page orders: linear mapping = 24, others = 12
Found initrd at 0xc270:0xc2a93000
Partition configured for 8 cpus.
Starting Linux PPC64 #1 SMP Wed Dec 5 09:02:21 UTC 2007
-
ppc64_pft_size= 0x1b
ppc64_interrupt_controller= 0x2
platform  = 0x101
physicalMemorySize= 0x15800
ppc64_caches.dcache_line_size = 0x80
ppc64_caches.icache_line_size = 0x80
htab_address  = 0x
htab_hash_mask= 0xf
---

Re: 2.6.24-rc8-mm1 powerpc build errors

2008-01-17 Thread Andrew Morton
On Thu, 17 Jan 2008 13:06:39 -0600 Olof Johansson <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> My powerpc build-all-defconfigs script found the following:

thanks.

> mpc837x_mds_defconfig. Brokage looks like it came from libata's
> for_each_sg() patch.
> 
> drivers/ata/sata_fsl.c: In function 'sata_fsl_fill_sg':
> drivers/ata/sata_fsl.c:337: error: redeclaration of 'si' with no linkage
> drivers/ata/sata_fsl.c:326: error: previous declaration of 'si' was here

--- a/drivers/ata/sata_fsl.c~git-libata-all-fix-drivers-ata-sata_fslc
+++ a/drivers/ata/sata_fsl.c
@@ -323,7 +323,6 @@ static unsigned int sata_fsl_fill_sg(str
struct scatterlist *sg;
unsigned int num_prde = 0;
u32 ttl_dwords = 0;
-   unsigned int si;
 
/*
 * NOTE : direct & indirect prdt's are contigiously allocated
_

> powerpc_allyesconfig:
> 
> drivers/net/ehea/ehea_main.c: In function 'ehea_driver_sysfs_add':
> drivers/net/ehea/ehea_main.c:2812: error: 'struct device_driver' has no 
> member named 'kobj'
> drivers/net/ehea/ehea_main.c:2815: error: 'struct device_driver' has no 
> member named 'kobj'
> drivers/net/ehea/ehea_main.c:2818: error: 'struct device_driver' has no 
> member named 'kobj'
> drivers/net/ehea/ehea_main.c: In function 'ehea_driver_sysfs_remove':
> drivers/net/ehea/ehea_main.c:2830: error: 'struct device_driver' has no 
> member named 'kobj'

Looks like the driver tree wrecking ball failed to visit that driver.

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


Re: Patches added to master/for-2.6.25 branch of powerpc.git

2008-01-17 Thread Jochen Friedrich
Hi Kumar,

>> http://ozlabs.org/pipermail/linuxppc-dev/2007-December/048473.html
>>
>> ^^ fixed phy support for fs_enet. Needed for some other boards, I
>> presume.
> 
> Hmm, its vitaly picking this one up?  if not I can.

That would be great. Jeff Garzik agreed to have this patch go through the 
PowerPC tree and this
patch is dependent on the other fixed-phy patches.

Thanks,
Jochen
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: 2.6.24-rc8-mm1: powerpc: include/asm/nvram.h:62: error: field 'partition' has incomplete type

2008-01-17 Thread Andrew Morton
On Thu, 17 Jan 2008 19:18:07 +0100 Mariusz Kozlowski <[EMAIL PROTECTED]> wrote:

>   CC [M]  sound/ppc/awacs.o
> In file included from sound/ppc/awacs.c:24:
> include/asm/nvram.h:62: error: field 'partition' has incomplete type
> make[1]: *** [sound/ppc/awacs.o] Error 1
> make: *** [sound/ppc/awacs.o] Error 2

hm.

--- a/include/asm-powerpc/nvram.h~include-asm-powerpc-nvramh-needs-listh
+++ a/include/asm-powerpc/nvram.h
@@ -11,6 +11,7 @@
 #define _ASM_POWERPC_NVRAM_H
 
 #include 
+#include 
 
 #define NVRW_CNT 0x20
 #define NVRAM_HEADER_LEN 16 /* sizeof(struct nvram_header) */
_

I wonder why mainline isn't busted actually.


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


Re: crash in kmem_cache_init

2008-01-17 Thread Christoph Lameter
Could you try Pekka's suggestion of reverting  
04231b3002ac53f8a64a7bd142fde3fa4b6808c6 ?

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


Re: crash in kmem_cache_init

2008-01-17 Thread Christoph Lameter
On Thu, 17 Jan 2008, Olaf Hering wrote:

> The patch does not help.

Duh. We need to know more about the problem.

> > --- linux-2.6.orig/mm/slab.c2008-01-03 12:26:42.0 -0800
> > +++ linux-2.6/mm/slab.c 2008-01-09 15:59:49.0 -0800
> > @@ -2977,7 +2977,10 @@ retry:
> > }
> > l3 = cachep->nodelists[node];
> >  
> > -   BUG_ON(ac->avail > 0 || !l3);
> > +   if (!l3)
> > +   return NULL;
> > +
> > +   BUG_ON(ac->avail > 0);
> > spin_lock(&l3->list_lock);
> >  
> > /* See if we can refill from the shared array */
> 
> Is this hsupposed to go into cache_grow()? There is no NULL check
> for l3.

No its for cache_alloc_refill. cache_grow should only be called for
nodes that have memory. l3 is always used before cache_grow is called.

> freeing bootmem node 1
> Memory: 3496632k/3571712k available (6188k kernel code, 75080k reserved, 
> 1324k data, 1220k bss, 304k init)
> cache_grow(2781) swapper(0):c0,j4294937299 cp c06a4fb8 !l3

Is there more backtrace information? What function called cache_grow?

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


Re: 2.6.24-rc8-mm1 powerpc build errors

2008-01-17 Thread Olof Johansson
Hi,

My powerpc build-all-defconfigs script found the following:

mpc837x_mds_defconfig. Brokage looks like it came from libata's
for_each_sg() patch.

drivers/ata/sata_fsl.c: In function 'sata_fsl_fill_sg':
drivers/ata/sata_fsl.c:337: error: redeclaration of 'si' with no linkage
drivers/ata/sata_fsl.c:326: error: previous declaration of 'si' was here

powerpc_allyesconfig:

drivers/net/ehea/ehea_main.c: In function 'ehea_driver_sysfs_add':
drivers/net/ehea/ehea_main.c:2812: error: 'struct device_driver' has no member 
named 'kobj'
drivers/net/ehea/ehea_main.c:2815: error: 'struct device_driver' has no member 
named 'kobj'
drivers/net/ehea/ehea_main.c:2818: error: 'struct device_driver' has no member 
named 'kobj'
drivers/net/ehea/ehea_main.c: In function 'ehea_driver_sysfs_remove':
drivers/net/ehea/ehea_main.c:2830: error: 'struct device_driver' has no member 
named 'kobj'


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


Re: 2.6.24-rc8-mm1: powerpc: include/asm/nvram.h:62: error: field 'partition' has incomplete type

2008-01-17 Thread Mariusz Kozlowski
Hello,

This is from powerpc (iMac G3):

  CC [M]  sound/ppc/awacs.o
In file included from sound/ppc/awacs.c:24:
include/asm/nvram.h:62: error: field 'partition' has incomplete type
make[1]: *** [sound/ppc/awacs.o] Error 1
make: *** [sound/ppc/awacs.o] Error 2

Regards,

Mariusz
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.24-rc8-mm1
# Thu Jan 17 18:14:07 2008
#
# CONFIG_PPC64 is not set

#
# Processor support
#
CONFIG_6xx=y
# CONFIG_PPC_85xx is not set
# CONFIG_PPC_8xx is not set
# CONFIG_40x is not set
# CONFIG_44x is not set
# CONFIG_E200 is not set
CONFIG_PPC_FPU=y
# CONFIG_ALTIVEC is not set
CONFIG_PPC_STD_MMU=y
CONFIG_PPC_STD_MMU_32=y
# CONFIG_PPC_MM_SLICES is not set
# CONFIG_SMP is not set
CONFIG_PPC32=y
CONFIG_WORD_SIZE=32
CONFIG_PPC_MERGE=y
CONFIG_MMU=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_HARDIRQS=y
# CONFIG_ARCH_SETS_UP_PER_CPU_AREA is not set
CONFIG_IRQ_PER_CPU=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_ARCH_HAS_ILOG2_U32=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
CONFIG_PPC=y
CONFIG_EARLY_PRINTK=y
CONFIG_GENERIC_NVRAM=y
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_PPC_OF=y
CONFIG_OF=y
CONFIG_PPC_UDBG_16550=y
# CONFIG_GENERIC_TBSYNC is not set
CONFIG_AUDIT_ARCH=y
CONFIG_GENERIC_BUG=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
# CONFIG_DEFAULT_UIMAGE is not set
CONFIG_HIBERNATE_32=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
# CONFIG_PPC_DCR_NATIVE is not set
# CONFIG_PPC_DCR_MMIO is not set
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
# CONFIG_AUDIT is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=18
# CONFIG_CGROUPS is not set
CONFIG_FAIR_GROUP_SCHED=y
CONFIG_FAIR_USER_SCHED=y
# CONFIG_FAIR_CGROUP_SCHED is not set
CONFIG_SYSFS_DEPRECATED=y
# CONFIG_RELAY is not set
CONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not set
# CONFIG_IPC_NS is not set
# CONFIG_USER_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_BLK_DEV_INITRD is not set
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_SYSCTL=y
# CONFIG_EMBEDDED is not set
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLUB_DEBUG=y
# CONFIG_SLAB is not set
CONFIG_SLUB=y
# CONFIG_SLOB is not set
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y
CONFIG_BLOCK=y
# CONFIG_LBD is not set
# CONFIG_BLK_DEV_IO_TRACE is not set
# CONFIG_LSF is not set
# CONFIG_BLK_DEV_BSG is not set

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
# CONFIG_IOSCHED_DEADLINE is not set
# CONFIG_IOSCHED_CFQ is not set
CONFIG_DEFAULT_AS=y
# CONFIG_DEFAULT_DEADLINE is not set
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="anticipatory"
# CONFIG_CLASSIC_RCU is not set
CONFIG_PREEMPT_RCU=y

#
# Platform support
#
CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_PPC_82xx is not set
# CONFIG_PPC_83xx is not set
# CONFIG_PPC_86xx is not set
CONFIG_CLASSIC32=y
CONFIG_PPC_CHRP=y
# CONFIG_PPC_MPC52xx is not set
# CONFIG_PPC_MPC5200 is not set
# CONFIG_PPC_EFIKA is not set
# CONFIG_PPC_LITE5200 is not set
CONFIG_PPC_PMAC=y
# CONFIG_PPC_CELL is not set
# CONFIG_PPC_CELL_NATIVE is not set
# CONFIG_PQ2ADS is not set
# CONFIG_EMBEDDED6xx is not set
CONFIG_PPC_NATIVE=y
# CONFIG_UDBG_RTAS_CONSOLE is not set
CONFIG_MPIC=y
# CONFIG_MPIC_WEIRD is not set
CONFIG_PPC_I8259=y
CONFIG_PPC_RTAS=y
# CONFIG_RTAS_ERROR_LOGGING is not set
CONFIG_RTAS_PROC=y
# CONFIG_MMIO_NVRAM is not set
CONFIG_PPC_MPC106=y
# CONFIG_PPC_970_NAP is not set
# CONFIG_PPC_INDIRECT_IO is not set
# CONFIG_GENERIC_IOMAP is not set
# CONFIG_CPU_FREQ is not set
CONFIG_PPC601_SYNC_FIX=y
CONFIG_TAU=y
# CONFIG_TAU_INT is not set
CONFIG_TAU_AVERAGE=y
# CONFIG_CPM2 is not set
# CONFIG_FSL_ULI1575 is not set

#
# Kernel options
#
# CONFIG_HIGHMEM is not set
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
CONFIG_HZ_300=y
# CONFIG_HZ_1000 is not set
CONFI

Re: [PATCH/RFC] [POWERPC] CPM1: implement GPIO LIB API

2008-01-17 Thread Scott Wood
On Thu, Jan 17, 2008 at 03:42:58PM +0100, Jochen Friedrich wrote:
> Hi Grant,
> 
> >>  arch/powerpc/platforms/8xx/Kconfig |2 +
> >>  arch/powerpc/sysdev/commproc.c |  162 
> >> +++-
> > 
> > Is this 8xx only?  Can it live in arch/powerpc/platforms/8xx?
> 
> According to the freescale docs, the GPIO ports are part of the CPM1. So I've 
> put the
> support into commproc.c (which maybe should be renamed to cpm1_common.c to 
> match cpm2_common.c).
> 
> AFAIK, CPM1 is specific to 8xx.

If we're going to rename, I'd change commproc.c to cpm1.c, and cpm2_common.c
to cpm2.c.

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


Re: [PATCH v5] [POWERPC] Add LED driver for Promess Motion-PRO board.

2008-01-17 Thread Grant Likely
On 1/17/08, Marian Balakowicz <[EMAIL PROTECTED]> wrote:
> Add support for two Motion-PRO board custom LEDs:
> - motionpro-statusled
> - motionpro-readyled
>
> Signed-off-by: Jan Wrobel <[EMAIL PROTECTED]>
> Signed-off-by: Marian Balakowicz <[EMAIL PROTECTED]>

I'm still not quite sure what to do with this one... give me a couple
of days to think about it and re-review it.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] [POWERPC] Update TQM5200, CM5200 and Motion-PRO _defconfig and .dts files

2008-01-17 Thread Grant Likely
On 1/17/08, Marian Balakowicz <[EMAIL PROTECTED]> wrote:
> Grant Likely wrote:
> > On 1/17/08, Marian Balakowicz <[EMAIL PROTECTED]> wrote:
> >> Updates include:
> >> - set soc node compatible property to "fsl,mpc5200-immr"
> >
> > On these three boards; which have the original mpc5200 and which have
> > the mpc5200b?
>
> cm5200 and motionpro have mpc5200b, some versions of tqm5200 have
> mpc5200, some have mpc5200b.
>
> > I'm not going to pick up this patch immediately, I've got an invasive
> > set of mpc5200 device tree cleanups which need to go in first.  After
> > that I'll revisit your changes here.
>
> Understood, thanks.
>
> >> - update i2c device tree nodes
> >> - add mdio node
> >> - add lpb bus node and flash device (without partitions defined)
> >> - add second mscan node for Motio-PRO
> >> - add rtc i2c nodes and enable RTC in _defconfigs
> >> - use SLUB insteand of SLAB
> >> - enable printk timestamp
> >
> > Can you split the defconfig changes into a separate patch...  That
> > being said, how do you feel about merging all the 5200 defconfigs into
> > a single defconfig?  They are all multiplatform after all and it would
> > make maintenance easier.
>
> Ok, I'll split it into two patches.
>
> But merging defconfigs won't be a good option, boards differ in which
> devices they use, some have PCI, some have USB, etc. Having one
> defconfig, it would be necessary to manually customize kernel
> configuration and remember which options are to be set/disabled.

That doesn't matter for defconfigs.  That needs to be done when you're
tailoring a product regardless.  defconfigs are simply a known good
configuration; they are not intended to be the deployed config.  If
the defconfig enables all features used by any of the boards then it
should be okay.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: crash in kmem_cache_init

2008-01-17 Thread Olaf Hering
On Thu, Jan 17, Christoph Lameter wrote:

> On Thu, 17 Jan 2008, Pekka Enberg wrote:
> 
> > Looks similar to the one discussed on linux-mm ("[BUG] at
> > mm/slab.c:3320" thread). Christoph?
> 
> Right. Try the latest version of the patch to fix it:

The patch does not help.
 
> Index: linux-2.6/mm/slab.c
> ===
> --- linux-2.6.orig/mm/slab.c  2008-01-03 12:26:42.0 -0800
> +++ linux-2.6/mm/slab.c   2008-01-09 15:59:49.0 -0800
> @@ -2977,7 +2977,10 @@ retry:
>   }
>   l3 = cachep->nodelists[node];
>  
> - BUG_ON(ac->avail > 0 || !l3);
> + if (!l3)
> + return NULL;
> +
> + BUG_ON(ac->avail > 0);
>   spin_lock(&l3->list_lock);
>  
>   /* See if we can refill from the shared array */

Is this hunk supposed to go into cache_grow()? There is no NULL check
for l3.

But if I do that, it does not help:

freeing bootmem node 1
Memory: 3496632k/3571712k available (6188k kernel code, 75080k reserved, 1324k 
data, 1220k bss, 304k init)
cache_grow(2781) swapper(0):c0,j4294937299 cp c06a4fb8 !l3
Kernel panic - not syncing: kmem_cache_create(): failed to create slab `size-32'

Rebooting in 1 seconds..

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


[PATCH v5] [POWERPC] Add LED driver for Promess Motion-PRO board.

2008-01-17 Thread Marian Balakowicz
Add support for two Motion-PRO board custom LEDs:
- motionpro-statusled
- motionpro-readyled

Signed-off-by: Jan Wrobel <[EMAIL PROTECTED]>
Signed-off-by: Marian Balakowicz <[EMAIL PROTECTED]>
---

Call to removed mpc52xx_map_node() was replaced with the of_iomap() call.

 drivers/leds/Kconfig  |7 +
 drivers/leds/Makefile |3 
 drivers/leds/leds-motionpro.c |  250 +
 include/asm-powerpc/mpc52xx.h |5 +
 4 files changed, 264 insertions(+), 1 deletions(-)
 create mode 100644 drivers/leds/leds-motionpro.c


diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index ec568fa..1567ed6 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -55,6 +55,13 @@ config LEDS_TOSA
  This option enables support for the LEDs on Sharp Zaurus
  SL-6000 series.
 
+config LEDS_MOTIONPRO
+   tristate "Motion-PRO LEDs Support"
+   depends on LEDS_CLASS && PPC_MPC5200
+   help
+ This option enables support for status and ready LEDs connected
+ to GPIO lines on Motion-PRO board.
+
 config LEDS_S3C24XX
tristate "LED Support for Samsung S3C24XX GPIO LEDs"
depends on LEDS_CLASS && ARCH_S3C2410
diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile
index a60de1b..a56d399 100644
--- a/drivers/leds/Makefile
+++ b/drivers/leds/Makefile
@@ -18,7 +18,8 @@ obj-$(CONFIG_LEDS_H1940)  += leds-h1940.o
 obj-$(CONFIG_LEDS_COBALT_QUBE) += leds-cobalt-qube.o
 obj-$(CONFIG_LEDS_COBALT_RAQ)  += leds-cobalt-raq.o
 obj-$(CONFIG_LEDS_GPIO)+= leds-gpio.o
-obj-$(CONFIG_LEDS_CM_X270)  += leds-cm-x270.o
+obj-$(CONFIG_LEDS_CM_X270) += leds-cm-x270.o
+obj-$(CONFIG_LEDS_MOTIONPRO)   += leds-motionpro.o
 
 # LED Triggers
 obj-$(CONFIG_LEDS_TRIGGER_TIMER)   += ledtrig-timer.o
diff --git a/drivers/leds/leds-motionpro.c b/drivers/leds/leds-motionpro.c
new file mode 100644
index 000..1374dd2
--- /dev/null
+++ b/drivers/leds/leds-motionpro.c
@@ -0,0 +1,250 @@
+/*
+ * LEDs driver for the Motion-PRO board.
+ * 
+ * Copyright (C) 2007 Semihalf
+ * Jan Wrobel <[EMAIL PROTECTED]>
+ * Marian Balakowicz <[EMAIL PROTECTED]>
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ *
+ * Decription:
+ * This driver enables control over Motion-PRO status and ready LEDs through
+ * sysfs. LEDs can be controlled by writing to sysfs files:
+ * class/leds//(brightness|delay_off|delay_on).
+ * See Documentation/leds-class.txt for more details.
+ *  is the set to the value of 'label' property of the
+ * corresponding GPT node.
+ *
+ * Before user issues first control command via sysfs, LED blinking is
+ * controlled by the kernel ('blink-delay' property of the GPT node
+ * in the device tree blob).
+ *
+ */
+
+#define DEBUG
+
+#include 
+#include 
+#include 
+#include 
+
+/* LED control bits */
+#define LED_ON MPC52xx_GPT_OUTPUT_1
+
+/* LED mode */
+#define LED_MODE_KERNEL1
+#define LED_MODE_USER  2
+
+struct motionpro_led {
+   spinlock_t led_lock;/* Protects the LED data */
+   struct mpc52xx_gpt __iomem *gpt;/* LED registers */
+   struct timer_list blink_timer;  /* Used if blink_delay is nonzero */
+   unsigned int blink_delay;   /* [ms], if set to 0 blinking is off */
+   unsigned int mode;  /* kernel/user */
+   struct led_classdev mpled_cdev; /* LED class */
+};
+
+/*
+ * Timer event - blinks LED before user takes control over it
+ * with the first access via sysfs.
+ */
+static void mpled_timer_toggle(unsigned long data)
+{
+   struct motionpro_led *mpled = (struct motionpro_led *)data;
+
+   spin_lock_bh(&mpled->led_lock);
+   if (mpled->mode == LED_MODE_KERNEL) {
+   u32 val = in_be32(&mpled->gpt->mode);
+   val ^= LED_ON;
+   out_be32(&mpled->gpt->mode, val);
+
+   mod_timer(&mpled->blink_timer,
+   jiffies + msecs_to_jiffies(mpled->blink_delay));
+   }
+   spin_unlock_bh(&mpled->led_lock);
+}
+
+/*
+ * Turn on/off led according to user settings in sysfs.
+ * First call to this function disables kernel blinking.
+ */
+static void mpled_set(struct led_classdev *led_cdev,
+ enum led_brightness brightness)
+{
+   struct motionpro_led *mpled;
+   int old_m

[PATCH v2] [POWERPC] Update TQM5200, CM5200 and Motion-PRO _defconfig files

2008-01-17 Thread Marian Balakowicz
Updates include:
- enable RTC in _defconfigs
- use SLUB insteand of SLAB
- enable printk timestamp

Signed-off-by: Marian Balakowicz <[EMAIL PROTECTED]>
---

This patch was applied and tested against:
git://git.secretlab.ca/git/linux-2.6-mpc52xx.git#for-2.6.25

 arch/powerpc/configs/cm5200_defconfig|   53 --
 arch/powerpc/configs/motionpro_defconfig |  161 ++
 arch/powerpc/configs/tqm5200_defconfig   |   91 -
 3 files changed, 137 insertions(+), 168 deletions(-)


diff --git a/arch/powerpc/configs/cm5200_defconfig 
b/arch/powerpc/configs/cm5200_defconfig
index a17d966..4fcedcd 100644
--- a/arch/powerpc/configs/cm5200_defconfig
+++ b/arch/powerpc/configs/cm5200_defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.23
-# Mon Oct 29 14:06:34 2007
+# Linux kernel version: 2.6.24-rc6
+# Tue Jan 15 16:03:14 2008
 #
 # CONFIG_PPC64 is not set
 
@@ -67,11 +67,14 @@ CONFIG_SYSVIPC_SYSCTL=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
 # CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
 # CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
 CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
 CONFIG_FAIR_GROUP_SCHED=y
 CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
 CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_BLK_DEV_INITRD=y
@@ -93,18 +96,14 @@ CONFIG_SIGNALFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
 CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_SLAB=y
-# CONFIG_SLUB is not set
+CONFIG_SLUB_DEBUG=y
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
 # CONFIG_SLOB is not set
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-# CONFIG_MODVERSIONS is not set
-# CONFIG_MODULE_SRCVERSION_ALL is not set
-# CONFIG_KMOD is not set
+# CONFIG_MODULES is not set
 CONFIG_BLOCK=y
 # CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
@@ -246,7 +245,7 @@ CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
 CONFIG_UNIX=y
 CONFIG_XFRM=y
-CONFIG_XFRM_USER=m
+CONFIG_XFRM_USER=y
 # CONFIG_XFRM_SUB_POLICY is not set
 # CONFIG_XFRM_MIGRATE is not set
 # CONFIG_NET_KEY is not set
@@ -297,10 +296,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_LAPB is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
 # CONFIG_NET_SCHED is not set
 
 #
@@ -457,7 +452,6 @@ CONFIG_CHR_DEV_SG=y
 # CONFIG_SCSI_CONSTANTS is not set
 # CONFIG_SCSI_LOGGING is not set
 # CONFIG_SCSI_SCAN_ASYNC is not set
-CONFIG_SCSI_WAIT_SCAN=m
 
 #
 # SCSI Transports
@@ -496,7 +490,6 @@ CONFIG_NETDEVICES=y
 # CONFIG_USB_KAWETH is not set
 # CONFIG_USB_PEGASUS is not set
 # CONFIG_USB_RTL8150 is not set
-# CONFIG_USB_USBNET_MII is not set
 # CONFIG_USB_USBNET is not set
 # CONFIG_WAN is not set
 # CONFIG_PPP is not set
@@ -543,7 +536,6 @@ CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
 # CONFIG_IPMI_HANDLER is not set
-# CONFIG_WATCHDOG is not set
 # CONFIG_HW_RANDOM is not set
 # CONFIG_NVRAM is not set
 # CONFIG_GEN_RTC is not set
@@ -569,7 +561,6 @@ CONFIG_I2C_MPC=y
 # CONFIG_I2C_PARPORT_LIGHT is not set
 # CONFIG_I2C_SIMTEC is not set
 # CONFIG_I2C_TAOS_EVM is not set
-# CONFIG_I2C_STUB is not set
 # CONFIG_I2C_TINY_USB is not set
 
 #
@@ -598,6 +589,7 @@ CONFIG_I2C_MPC=y
 # CONFIG_W1 is not set
 # CONFIG_POWER_SUPPLY is not set
 # CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
 
 #
 # Sonics Silicon Backplane
@@ -621,7 +613,7 @@ CONFIG_SSB_POSSIBLE=y
 # Graphics support
 #
 # CONFIG_VGASTATE is not set
-CONFIG_VIDEO_OUTPUT_CONTROL=m
+CONFIG_VIDEO_OUTPUT_CONTROL=y
 # CONFIG_FB is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
@@ -683,6 +675,7 @@ CONFIG_USB_STORAGE=y
 # CONFIG_USB_STORAGE_DEBUG is not set
 # CONFIG_USB_STORAGE_DATAFAB is not set
 # CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
 # CONFIG_USB_STORAGE_DPCM is not set
 # CONFIG_USB_STORAGE_USBAT is not set
 # CONFIG_USB_STORAGE_SDDR09 is not set
@@ -761,7 +754,6 @@ CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_SECURITY is not set
 # CONFIG_EXT4DEV_FS is not set
 CONFIG_JBD=y
-# CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
@@ -936,16 +928,13 @@ CONFIG_PLIST=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
 CONFIG_HAS_DMA=y
-
-#
-# Instrumentation Support
-#
-# CONFIG_PROFILING is not set
+# CONFIG_INSTRUMENTATION is not set
 
 #
 # Kernel hacking
 #
-# CONFIG_PRINTK_TIME is not set
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_WARN_DEPRECATED=y
 CONFIG_ENABLE_MUST_CHECK=y
 # CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_UNUSED_SYMBOLS is not set
@@ -957,7 +946,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
 CONFIG_SCHED_DEBUG=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_TIMER_STATS is not set
-# CONFIG_DEBUG_SLAB is not set
+# CONFIG_SLUB_DEBUG_ON is not set
 # CONFIG_DEBUG_RT_MUTEXES is not set
 # CONFIG_RT_MU

[PATCH v2] [POWERPC] Update TQM5200, CM5200 and Motion-PRO .dts files

2008-01-17 Thread Marian Balakowicz
Updates include:
- set soc mnode compatible property to "fsl,mpc5200-immr"
- update i2c device tree nodes
- add mdio node
- add lpb bus node and flash device (without partitions defined)
- add second mscan node for Motio-PRO
- add rtc i2c nodes

Signed-off-by: Marian Balakowicz <[EMAIL PROTECTED]>
---

This patch was applied and tested against:
git://git.secretlab.ca/git/linux-2.6-mpc52xx.git#for-2.6.25

 arch/powerpc/boot/dts/cm5200.dts|   40 +++--
 arch/powerpc/boot/dts/motionpro.dts |   49 ---
 arch/powerpc/boot/dts/tqm5200.dts   |   45 +++-
 3 files changed, 126 insertions(+), 8 deletions(-)


diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts
index 9295083..ff01478 100644
--- a/arch/powerpc/boot/dts/cm5200.dts
+++ b/arch/powerpc/boot/dts/cm5200.dts
@@ -46,7 +46,7 @@
 
[EMAIL PROTECTED] {
model = "fsl,mpc5200b";
-   compatible = "fsl,mpc5200b";
+   compatible = "fsl,mpc5200-immr";
revision = "";  // from bootloader
device_type = "soc";
ranges = <0 f000 c000>;
@@ -214,13 +214,31 @@
[EMAIL PROTECTED] {
device_type = "network";
compatible = "mpc5200b-fec","mpc5200-fec";
-   reg = <3000 800>;
+   reg = <3000 400>;
local-mac-address = [ 00 00 00 00 00 00 ]; /* Filled in 
by U-Boot */
interrupts = <2 5 0>;
interrupt-parent = <&mpc5200_pic>;
+   phy-handle = <&phy0>;
+   };
+
+   [EMAIL PROTECTED] {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   device_type = "mdio";
+   compatible = "mpc5200b-fec-phy";
+   reg = <3000 400>;   // fec range, since we need to 
setup fec interrupts
+   interrupts = <2 5 0>;   // these are for "mii command 
finished", not link changes & co.
+   interrupt-parent = <&mpc5200_pic>;
+
+   phy0:[EMAIL PROTECTED] {
+   device_type = "ethernet-phy";
+   reg = <0>;
+   };
};
 
[EMAIL PROTECTED] {
+   #address-cells = <1>;
+   #size-cells = <0>;
compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c";
reg = <3d40 40>;
interrupts = <2 10 0>;
@@ -233,4 +251,22 @@
reg = <8000 4000>;
};
};
+
+   lpb {
+   model = "fsl,lpb";
+   compatible = "fsl,lpb";
+   #address-cells = <2>;
+   #size-cells = <1>;
+   ranges = <0 0 fc00 200>;
+
+   // 16-bit flash device at LocalPlus Bus CS0
+   [EMAIL PROTECTED],0 {
+   compatible = "cfi-flash";
+   reg = <0 0 200>;
+   bank-width = <2>;
+   device-width = <2>;
+   #size-cells = <1>;
+   #address-cells = <1>;
+   };
+   };
 };
diff --git a/arch/powerpc/boot/dts/motionpro.dts 
b/arch/powerpc/boot/dts/motionpro.dts
index d8c316a..1a046aa 100644
--- a/arch/powerpc/boot/dts/motionpro.dts
+++ b/arch/powerpc/boot/dts/motionpro.dts
@@ -46,7 +46,7 @@
 
[EMAIL PROTECTED] {
model = "fsl,mpc5200b";
-   compatible = "fsl,mpc5200b";
+   compatible = "fsl,mpc5200-immr";
revision = "";  // from bootloader
device_type = "soc";
ranges = <0 f000 c000>;
@@ -134,6 +134,13 @@
interrupt-parent = <&mpc5200_pic>;
};
 
+   [EMAIL PROTECTED] {
+   compatible = "mpc5200b-mscan\0mpc5200-mscan";
+   interrupts = <2 11 0>;
+   interrupt-parent = <&mpc5200_pic>;
+   reg = <900 80>;
+   };
+
[EMAIL PROTECTED] {
compatible = "mpc5200b-mscan","mpc5200-mscan";
interrupts = <2 12 0>;
@@ -155,7 +162,6 @@
interrupt-parent = <&mpc5200_pic>;
};
 
-
[EMAIL PROTECTED] {
compatible = "mpc5200b-spi","mpc5200-spi";
reg = ;
@@ -216,10 +222,26 @@
[EMAIL PROTECTED] {
device_type = "network";
compatible = "mpc5200b-fec","mpc5200-fec";
-   reg = <3000 800>;
+   reg = <3000 

Re: [Add mpc5121 support PATCH v2 5/8] Separate MPC52xx PSC FIFO registers from rest of PSC

2008-01-17 Thread Grant Likely
On 1/16/08, John Rigby <[EMAIL PROTECTED]> wrote:
> This is in preparation for the addition of MPC512x
> PSC support.  The main difference in the 512x is
> in the fifo registers.
>
> Signed-off-by: John Rigby <[EMAIL PROTECTED]>

Acked-by: Grant Likely <[EMAIL PROTECTED]>

I'll pick this one up

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] [POWERPC] Update TQM5200, CM5200 and Motion-PRO _defconfig and .dts files

2008-01-17 Thread Marian Balakowicz
Grant Likely wrote:
> On 1/17/08, Marian Balakowicz <[EMAIL PROTECTED]> wrote:
>> Updates include:
>> - set soc node compatible property to "fsl,mpc5200-immr"
> 
> On these three boards; which have the original mpc5200 and which have
> the mpc5200b?

cm5200 and motionpro have mpc5200b, some versions of tqm5200 have
mpc5200, some have mpc5200b.

> I'm not going to pick up this patch immediately, I've got an invasive
> set of mpc5200 device tree cleanups which need to go in first.  After
> that I'll revisit your changes here.

Understood, thanks.

>> - update i2c device tree nodes
>> - add mdio node
>> - add lpb bus node and flash device (without partitions defined)
>> - add second mscan node for Motio-PRO
>> - add rtc i2c nodes and enable RTC in _defconfigs
>> - use SLUB insteand of SLAB
>> - enable printk timestamp
> 
> Can you split the defconfig changes into a separate patch...  That
> being said, how do you feel about merging all the 5200 defconfigs into
> a single defconfig?  They are all multiplatform after all and it would
> make maintenance easier.

Ok, I'll split it into two patches.

But merging defconfigs won't be a good option, boards differ in which
devices they use, some have PCI, some have USB, etc. Having one
defconfig, it would be necessary to manually customize kernel
configuration and remember which options are to be set/disabled.

Cheers,
m.

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


Re: [Add mpc5121 support PATCH v2 6/8] Cleanup checkpatch.pl problems in mpc52xx_uart.c

2008-01-17 Thread Grant Likely
On 1/16/08, John Rigby <[EMAIL PROTECTED]> wrote:
> In preparation of adding MPC5121 support
> cleanup some things that checkpatch.pl complains
> about also some minor fixes suggested by
> Stephen Rothwell.
>
> Signed-off-by: John Rigby <[EMAIL PROTECTED]>

Acked-by: Grant Likely <[EMAIL PROTECTED]>

I'll pick this one up into my tree.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [Add mpc5121 support PATCH v2 4/8] Device tree for MPC5121 ADS

2008-01-17 Thread Grant Likely
On 1/16/08, John Rigby <[EMAIL PROTECTED]> wrote:
> Minimal tree for mpc5121 ads.
>
> Signed-off-by: John Rigby <[EMAIL PROTECTED]>
> ---
>  arch/powerpc/boot/dts/mpc5121ads.dts |  116 
> ++
>  1 files changed, 116 insertions(+), 0 deletions(-)
>  create mode 100644 arch/powerpc/boot/dts/mpc5121ads.dts
>
> diff --git a/arch/powerpc/boot/dts/mpc5121ads.dts 
> b/arch/powerpc/boot/dts/mpc5121ads.dts
> new file mode 100644
> index 000..fac1f15
> --- /dev/null
> +++ b/arch/powerpc/boot/dts/mpc5121ads.dts
> @@ -0,0 +1,116 @@
> +/*
> + * MPC5121E MDS Device Tree Source
> + *
> + * Copyright 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 as published by the
> + * Free Software Foundation;  either version 2 of the  License, or (at your
> + * option) any later version.
> + */
> +
> +/ {
> +   model = "MPC5121ADS";

Model should also use the form "fsl,mpc5121ads".  I think lowercase is
also preferred.

> +   compatible = "fsl,mpc5121ads";
> +   #address-cells = <1>;
> +   #size-cells = <1>;
> +
> +   cpus {
> +   #address-cells = <1>;
> +   #size-cells = <0>;
> +
> +   PowerPC,[EMAIL PROTECTED] {
> +   device_type = "cpu";
> +   reg = <0>;
> +   d-cache-line-size = <20>;   // 32 bytes
> +   i-cache-line-size = <20>;   // 32 bytes
> +   d-cache-size = <8000>;  // L1, 32K
> +   i-cache-size = <8000>;  // L1, 32K
> +   timebase-frequency = ; // 49.5 MHz (csb/4)
> +   bus-frequency = ;  // 198 MHz csb bus
> +   clock-frequency = ;// 396 MHz ppc core
> +   };
> +   };
> +
> +   memory {
> +   device_type = "memory";
> +   reg = < 1000>;  // 256MB at 0
> +   };
> +
> +   [EMAIL PROTECTED] {
> +   compatible = "fsl,mpc5121ads_localbus";

fsl,mpc5121ads-localbus (use dash instead of underscore)

> +   #address-cells = <2>;
> +   #size-cells = <1>;
> +   reg = <8020 40>;
> +
> +   ranges = <0 0 fc00 0400
> + 2 0 8200 8000>;
> +
> +   [EMAIL PROTECTED],0 {
> +   compatible = "cfi-flash";
> +   reg = <0 0 400>;
> +   bank-width = <4>;
> +   device-width = <1>;
> +   };
> +
> +   [EMAIL PROTECTED],0 {
> +   compatible = "fsl,mpc5121ads-cpld";
> +   reg = <2 0 8000>;
> +   };
> +   };
> +
> +   [EMAIL PROTECTED] {
> +   compatible = "fsl,mpc5121-immr";
> +   #address-cells = <1>;
> +   #size-cells = <1>;
> +   #interrupt-cells = <2>;
> +   ranges = <0 8000 40>;
> +   reg = <8000 40>;
> +   bus-frequency = ;   // 66 MHz ips bus
> +
> +
> +   // IPIC
> +   // interrupts cell = 
> +   // sense values match linux IORESOURCE_IRQ_* defines:
> +   // sense == 8: Level, low assertion
> +   // sense == 2: Edge, high-to-low change
> +   //
> +   ipic: [EMAIL PROTECTED] {
> +   compatible = "fsl,ipic";

for completeness: compatible = "fsl,mpc5121-ipic", "fsl,ipic";

> +   interrupt-controller;
> +   #address-cells = <0>;
> +   #interrupt-cells = <2>;
> +   reg = ;
> +   };
> +
> +   // 512x PSCs are not 52xx PSCs compatible
> +   // PSC3 serial port A aka ttyPSC0
> +   [EMAIL PROTECTED] {
> +   device_type = "serial";
> +   compatible = "fsl,mpc5121-psc-uart";
> +   port-number = <0>;  // Logical port assignment

This should be going away in short order.  I hope to have some code
written soon which will use aliases for assigning the port number.

> +   cell-index = <3>;
> +   reg = <11300 100>;
> +   interrupts = <28 8>; // actually the fifo irq

Hmmm, interesting.  Perhaps it would be better to leave the interrupts
property out of this node and have a fsl,fifo-handle property pointing
to the fifo node.

> +   interrupt-parent = < &ipic >;
> +   };
> +
> +   // PSC4 serial port B aka ttyPSC1
> +   [EMAIL PROTECTED] {
> +   device_type = "serial";
> +   compatible = "fsl,mpc5121-psc-uart";
> +   port-number = <1>;  // Lo

Re: [Add mpc5121 support PATCH v2 3/8] Basic Freescale MPC512x support

2008-01-17 Thread Grant Likely
On 1/16/08, John Rigby <[EMAIL PROTECTED]> wrote:
> 512x is very similar to 83xx and most
> of this is patterned after code from 83xx.
>
> New platform:
> changed:
> arch/powerpc/Kconfig
> arch/powerpc/platforms/Kconfig
> arch/powerpc/platforms/Kconfig.cputype
> arch/powerpc/platforms/Makefile
> new:
> arch/powerpc/platforms/512x/*
> include/asm-powerpc/mpc512x.h
>
> Signed-off-by: John Rigby <[EMAIL PROTECTED]>

After Stephen's comment is addressed:

Acked-by: Grant Likely <[EMAIL PROTECTED]>
-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] [POWERPC] Update TQM5200, CM5200 and Motion-PRO _defconfig and .dts files

2008-01-17 Thread Grant Likely
On 1/17/08, Marian Balakowicz <[EMAIL PROTECTED]> wrote:
> Updates include:
> - set soc node compatible property to "fsl,mpc5200-immr"

On these three boards; which have the original mpc5200 and which have
the mpc5200b?

I'm not going to pick up this patch immediately, I've got an invasive
set of mpc5200 device tree cleanups which need to go in first.  After
that I'll revisit your changes here.

> - update i2c device tree nodes
> - add mdio node
> - add lpb bus node and flash device (without partitions defined)
> - add second mscan node for Motio-PRO
> - add rtc i2c nodes and enable RTC in _defconfigs
> - use SLUB insteand of SLAB
> - enable printk timestamp

Can you split the defconfig changes into a separate patch...  That
being said, how do you feel about merging all the 5200 defconfigs into
a single defconfig?  They are all multiplatform after all and it would
make maintenance easier.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: Patches added to master/for-2.6.25 branch of powerpc.git

2008-01-17 Thread Grant Likely
Paul, can you also please pull the following 52xx changes?

Thanks,
g.

The following changes since commit 52920df4aa9dd25836b8ed4dc0b177ea14c09e53:
  Paul Mackerras (1):
Merge branch 'for-2.6.25' of
master.kernel.org:/.../olof/pasemi into for-2.6.25

are available in the git repository at:

  git://git.secretlab.ca/git/linux-2.6-mpc52xx.git for-2.6.25

Grant Likely (1):
  [POWERPC] mpc5200: eliminate mpc52xx_*_map_*() functions.

Marian Balakowicz (9):
  Add 'fsl, lpb' bus type for MPC5200 LocalPlus Bus
  Add common mpc52xx_setup_pci() routine
  TQM5200 DTS
  TQM5200 defconfig
  CM5200 DTS
  CM5200 defconfig
  Promess Motion-PRO DTS
  Promess Motion-PRO defconfig
  Add generic support for simple MPC5200 based boards

 arch/powerpc/boot/dts/cm5200.dts |  236 +
 arch/powerpc/boot/dts/lite5200.dts   |2 +-
 arch/powerpc/boot/dts/lite5200b.dts  |2 +-
 arch/powerpc/boot/dts/motionpro.dts  |  309 ++
 arch/powerpc/boot/dts/tqm5200.dts|  184 
 arch/powerpc/configs/cm5200_defconfig| 1031 
 arch/powerpc/configs/motionpro_defconfig |  989 +++
 arch/powerpc/configs/tqm5200_defconfig   | 1306 ++
 arch/powerpc/platforms/52xx/Kconfig  |   22 +-
 arch/powerpc/platforms/52xx/Makefile |1 +
 arch/powerpc/platforms/52xx/lite5200.c   |   22 +-
 arch/powerpc/platforms/52xx/lite5200_pm.c|6 +-
 arch/powerpc/platforms/52xx/mpc5200_simple.c |   85 ++
 arch/powerpc/platforms/52xx/mpc52xx_common.c |   63 +-
 arch/powerpc/platforms/52xx/mpc52xx_pci.c|   14 +
 arch/powerpc/platforms/52xx/mpc52xx_pic.c|8 +-
 arch/powerpc/platforms/52xx/mpc52xx_pm.c |8 +-
 drivers/spi/mpc52xx_psc_spi.c|9 +-
 include/asm-powerpc/mpc52xx.h|7 +-
 19 files changed, 4234 insertions(+), 70 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/cm5200.dts
 create mode 100644 arch/powerpc/boot/dts/motionpro.dts
 create mode 100644 arch/powerpc/boot/dts/tqm5200.dts
 create mode 100644 arch/powerpc/configs/cm5200_defconfig
 create mode 100644 arch/powerpc/configs/motionpro_defconfig
 create mode 100644 arch/powerpc/configs/tqm5200_defconfig
 create mode 100644 arch/powerpc/platforms/52xx/mpc5200_simple.c

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


  1   2   >