[PATCH 01/15] [POWERPC] TQM5200 DTS

2007-10-07 Thread Marian Balakowicz

Add device tree source file for TQM5200 board.

Signed-off-by: Marian Balakowicz [EMAIL PROTECTED]
Signed-off-by: Grzegorz Bernacki [EMAIL PROTECTED]
Signed-off-by: Martin Krause [EMAIL PROTECTED]
---

 tqm5200.dts |  217 
 1 file changed, 217 insertions(+)

diff --git a/arch/powerpc/boot/dts/tqm5200.dts 
b/arch/powerpc/boot/dts/tqm5200.dts
new file mode 100644
index 000..e3e0ebf
--- /dev/null
+++ b/arch/powerpc/boot/dts/tqm5200.dts
@@ -0,0 +1,217 @@
+/*
+ * TQM5200 board Device Tree Source
+ *
+ * Copyright (C) 2007 Semihalf
+ * Modified for TQM5200 by Marian Balakowicz [EMAIL PROTECTED]
+ *
+ * Copyright 2006-2007 Secret Lab Technologies Ltd.
+ * Grant Likely [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.
+ */
+
+/*
+ * WARNING: Do not depend on this tree layout remaining static just yet.
+ * The MPC5200 device tree conventions are still in flux
+ * Keep an eye on the linuxppc-dev mailing list for more details
+ */
+
+/ {
+   model = fsl,tqm5200;
+   compatible = fsl,tqm5200\0generic-mpc5200;
+   #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;
+   i-cache-line-size = 20;
+   d-cache-size = 4000;  // L1, 16K
+   i-cache-size = 4000;  // L1, 16K
+   timebase-frequency = 0;   // from bootloader
+   bus-frequency = 0;// from bootloader
+   clock-frequency = 0;  // from bootloader
+   32-bit;
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg =  0400;  // 64MB
+   };
+
+   [EMAIL PROTECTED] {
+   model = fsl,mpc5200;
+   compatible = mpc5200;
+   revision = ;  // from bootloader
+   #interrupt-cells = 3;
+   device_type = soc;
+   ranges = 0 f000 f001;
+   reg = f000 0001;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200b-cdm\0mpc5200-cdm;
+   reg = 200 38;
+   };
+
+   mpc5200_pic: [EMAIL PROTECTED] {
+   // 5200 interrupts are encoded into two levels;
+   interrupt-controller;
+   #interrupt-cells = 3;
+   device_type = interrupt-controller;
+   compatible = mpc5200-pic;
+   reg = 500 80;
+   built-in;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = mpc5200-gpt;
+   device_type = gpt;
+   cell-index = 0;
+   reg = 600 10;
+   interrupts = 1 9 0;
+   interrupt-parent = mpc5200_pic;
+   has-wdt;
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200-gpio;
+   reg = b00 40;
+   interrupts = 1 7 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] {
+   device_type = usb-ohci-be;
+   compatible = mpc5200-ohci\0ohci-be;
+   reg = 1000 ff;
+   interrupts = 2 6 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] {
+   #interrupt-cells = 1;
+   #size-cells = 2;
+   #address-cells = 3;
+   device_type = pci;
+   compatible = mpc5200-pci;
+   reg = d00 100;
+   interrupt-map-mask = f800 0 0 7;
+   interrupt-map = c000 0 0 1 mpc5200_pic 0 0 3
+c000 0 0 2 mpc5200_pic 0 0 3
+c000 0 0 3 mpc5200_pic 0 0 3
+c000 0 0 4 mpc5200_pic 0 0 3;
+   clock-frequency = 0; // From boot loader
+   interrupts = 2 8 0 2 9 0 2 a 0;
+   interrupt-parent = 

[PATCH 02/15] [POWERPC] TQM5200 defconfig

2007-10-07 Thread Marian Balakowicz

Add TQM5200 board defconfig file.

Signed-off-by: Marian Balakowicz [EMAIL PROTECTED]
Signed-off-by: Grzegorz Bernacki [EMAIL PROTECTED]
---

 tqm5200_defconfig | 1303 ++
 1 file changed, 1303 insertions(+)

diff --git a/arch/powerpc/configs/tqm5200_defconfig 
b/arch/powerpc/configs/tqm5200_defconfig
new file mode 100644
index 000..382d12f
--- /dev/null
+++ b/arch/powerpc/configs/tqm5200_defconfig
@@ -0,0 +1,1303 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23-rc9
+# Wed Oct  3 21:14:55 2007
+#
+# 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_PPC_MERGE=y
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+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 is not set
+# CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
+# CONFIG_DEFAULT_UIMAGE is not set
+# 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_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_SYSCTL_SYSCALL is not set
+# CONFIG_KALLSYMS 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 is not set
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# 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_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=y
+CONFIG_IOSCHED_CFQ=y
+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
+
+#
+# Platform support
+#
+CONFIG_PPC_MULTIPLATFORM=y
+# CONFIG_EMBEDDED6xx is not set
+# CONFIG_PPC_82xx is not set
+# CONFIG_PPC_83xx is not set
+# CONFIG_PPC_86xx is not set
+CONFIG_CLASSIC32=y
+# CONFIG_PPC_CHRP is not set
+CONFIG_PPC_MPC52xx=y
+CONFIG_PPC_MPC5200=y
+# CONFIG_PPC_MPC5200_BUGFIX is not set
+# CONFIG_PPC_EFIKA is not set
+# CONFIG_PPC_LITE5200 is not set
+CONFIG_PPC_TQM5200=y
+# CONFIG_PPC_PMAC is not set
+# CONFIG_PPC_CELL is not set
+# CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_PQ2ADS is not set
+# CONFIG_MPIC is not set
+# CONFIG_MPIC_WEIRD is not set
+# CONFIG_PPC_I8259 is not set
+# CONFIG_PPC_RTAS is not set
+# CONFIG_MMIO_NVRAM is not set
+# CONFIG_PPC_MPC106 is not set
+# 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_TAU is not set
+# CONFIG_CPM2 is not set
+# CONFIG_FSL_ULI1575 is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+# CONFIG_KEXEC is not set
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not 

[POWERPC 03/15] [POWERPC] TQM5200 board support

2007-10-07 Thread Marian Balakowicz

Add arch/powerpc board support for TQM5200.

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

 Kconfig   |5 +
 Makefile  |1 
 tqm5200.c |  174 ++
 3 files changed, 180 insertions(+)

diff --git a/arch/powerpc/platforms/52xx/Kconfig 
b/arch/powerpc/platforms/52xx/Kconfig
index 3ffaa06..7c828eb 100644
--- a/arch/powerpc/platforms/52xx/Kconfig
+++ b/arch/powerpc/platforms/52xx/Kconfig
@@ -33,4 +33,9 @@ config PPC_LITE5200
select PPC_MPC5200
default n
 
+config PPC_TQM5200
+   bool TQM5200 Board
+   depends on PPC_MULTIPLATFORM  PPC32
+   select PPC_MPC5200
+   default n
 
diff --git a/arch/powerpc/platforms/52xx/Makefile 
b/arch/powerpc/platforms/52xx/Makefile
index b91e39c..4997ebf 100644
--- a/arch/powerpc/platforms/52xx/Makefile
+++ b/arch/powerpc/platforms/52xx/Makefile
@@ -8,5 +8,6 @@ endif
 
 obj-$(CONFIG_PPC_EFIKA)+= efika.o
 obj-$(CONFIG_PPC_LITE5200) += lite5200.o
+obj-$(CONFIG_PPC_TQM5200)  += tqm5200.o
 
 obj-$(CONFIG_PM)   += mpc52xx_sleep.o mpc52xx_pm.o
diff --git a/arch/powerpc/platforms/52xx/tqm5200.c 
b/arch/powerpc/platforms/52xx/tqm5200.c
new file mode 100644
index 000..780b79f
--- /dev/null
+++ b/arch/powerpc/platforms/52xx/tqm5200.c
@@ -0,0 +1,174 @@
+/*
+ * TQM5200 board support
+ *
+ * Written by: Grant Likely [EMAIL PROTECTED] for lite5200
+ * Adapted for tqm5200 by: Jan Wrobel [EMAIL PROTECTED]
+ *
+ * Copyright (C) Secret Lab Technologies Ltd. 2006. All rights reserved.
+ * Copyright (C) Freescale Semicondutor, Inc. 2006. All rights reserved.
+ *
+ * Description:
+ * 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.
+ */
+
+#undef DEBUG
+
+#include linux/stddef.h
+#include linux/kernel.h
+#include linux/init.h
+#include linux/errno.h
+#include linux/reboot.h
+#include linux/pci.h
+#include linux/kdev_t.h
+#include linux/major.h
+#include linux/console.h
+#include linux/delay.h
+#include linux/seq_file.h
+#include linux/root_dev.h
+#include linux/initrd.h
+
+#include asm/system.h
+#include asm/atomic.h
+#include asm/time.h
+#include asm/io.h
+#include asm/machdep.h
+#include asm/ipic.h
+#include asm/bootinfo.h
+#include asm/irq.h
+#include asm/prom.h
+#include asm/udbg.h
+#include sysdev/fsl_soc.h
+#include asm/of_platform.h
+
+#include asm/mpc52xx.h
+
+/* 
+ *
+ * Setup the architecture
+ *
+ */
+static void __init
+tqm5200_setup_cpu(void)
+{
+   struct mpc52xx_gpio __iomem *gpio;
+   u32 port_config;
+
+   /* Map zones */
+   gpio = mpc52xx_find_and_map(mpc5200-gpio);
+   if (!gpio) {
+   printk(KERN_ERR __FILE__ : 
+   Error while mapping GPIO register for port config. 
+   Expect some abnormal behavior\n);
+   goto error;
+   }
+
+   /* Set port config */
+   port_config = in_be32(gpio-port_config);
+
+   port_config = ~0x0080; /* 48Mhz internal, pin is GPIO  */
+
+   port_config = ~0x7000; /* USB port : Differential mode */
+   port_config |=  0x1000; /*USB 1 only*/
+
+   port_config = ~0x0300; /* ATA CS is on csb_4/5 */
+   port_config |=  0x0100;
+
+   pr_debug(port_config: old:%x new:%x\n,
+in_be32(gpio-port_config), port_config);
+   out_be32(gpio-port_config, port_config);
+
+   /* Unmap zone */
+error:
+   iounmap(gpio);
+}
+
+static void __init tqm5200_setup_arch(void)
+{
+   struct device_node *np;
+
+   if (ppc_md.progress)
+   ppc_md.progress(tqm5200_setup_arch(), 0);
+
+   np = of_find_node_by_type(NULL, cpu);
+   if (np) {
+   unsigned int *fp =
+   (int *)of_get_property(np, clock-frequency, NULL);
+   if (fp != 0)
+   loops_per_jiffy = *fp / HZ;
+   else
+   loops_per_jiffy = 5000 / HZ;
+   of_node_put(np);
+   }
+
+   /* CPU  Port mux setup */
+   mpc52xx_setup_cpu();
+   tqm5200_setup_cpu();
+
+#ifdef CONFIG_PCI
+   np = of_find_node_by_type(NULL, pci);
+   if (np) {
+   mpc52xx_add_bridge(np);
+   of_node_put(np);
+   }
+#endif
+
+#ifdef CONFIG_BLK_DEV_INITRD
+   if (initrd_start)
+   /*
+* We want the proper initrd behavior, i.e., launching of
+* /linuxrc from the initial root file system, and not only
+* mounting it as the normal root file system.
+*/
+   ROOT_DEV = 0x0;
+   else
+#endif
+#ifdef  CONFIG_ROOT_NFS

[PATCH 04/15] [POWERPC] CM5200 DTS

2007-10-07 Thread Marian Balakowicz

Add device tree source file for CM5200 board.

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

 cm5200.dts |  284 +
 1 file changed, 284 insertions(+)

diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts
new file mode 100644
index 000..96d2ee4
--- /dev/null
+++ b/arch/powerpc/boot/dts/cm5200.dts
@@ -0,0 +1,284 @@
+/*
+ * CM5200 board Device Tree Source
+ *
+ * Copyright (C) 2007 Semihalf
+ * Modified for CM5200 by Jan Wrobel [EMAIL PROTECTED]
+ *
+ * Copyright 2006-2007 Secret Lab Technologies Ltd.
+ * Grant Likely [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.
+ */
+
+/*
+ * WARNING: Do not depend on this tree layout remaining static just yet.
+ * The MPC5200 device tree conventions are still in flux
+ * Keep an eye on the linuxppc-dev mailing list for more details
+ */
+
+/ {
+   model = cm5200;
+   compatible = fsl,cm5200\0generic-mpc5200;
+   #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;
+   i-cache-line-size = 20;
+   d-cache-size = 4000;  // L1, 16K
+   i-cache-size = 4000;  // L1, 16K
+   timebase-frequency = 0;   // from bootloader
+   bus-frequency = 0;// from bootloader
+   clock-frequency = 0;  // from bootloader
+   32-bit;
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg =  0400;  // 64MB
+   };
+
+   [EMAIL PROTECTED] {
+   model = fsl,mpc5200b;
+   compatible = mpc5200;
+   revision = ;  // from bootloader
+   #interrupt-cells = 3;
+   device_type = soc;
+   ranges = 0 f000 f001;
+   reg = f000 0001;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200b-cdm\0mpc5200-cdm;
+   reg = 200 38;
+   };
+
+   mpc5200_pic: [EMAIL PROTECTED] {
+   // 5200 interrupts are encoded into two levels;
+   interrupt-controller;
+   #interrupt-cells = 3;
+   device_type = interrupt-controller;
+   compatible = mpc5200b-pic\0mpc5200-pic;
+   reg = 500 80;
+   built-in;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = mpc5200b-gpt\0mpc5200-gpt;
+   device_type = gpt;
+   cell-index = 0;
+   reg = 600 10;
+   interrupts = 1 9 0;
+   interrupt-parent = mpc5200_pic;
+   has-wdt;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = mpc5200b-gpt\0mpc5200-gpt;
+   device_type = gpt;
+   cell-index = 1;
+   reg = 610 10;
+   interrupts = 1 a 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = mpc5200b-gpt\0mpc5200-gpt;
+   device_type = gpt;
+   cell-index = 2;
+   reg = 620 10;
+   interrupts = 1 b 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = mpc5200b-gpt\0mpc5200-gpt;
+   device_type = gpt;
+   cell-index = 3;
+   reg = 630 10;
+   interrupts = 1 c 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = mpc5200b-gpt\0mpc5200-gpt;
+   device_type = gpt;
+   cell-index = 4;
+   reg = 640 10;
+   interrupts = 1 d 0;

[PATCH 05/15] [POWERPC] CM5200 defconfig

2007-10-07 Thread Marian Balakowicz

Add CM5200 board defconfig file.

Signed-off-by Marian Balakowicz [EMAIL PROTECTED]
---

 cm5200_defconfig | 1032 +++
 1 file changed, 1032 insertions(+)

diff --git a/arch/powerpc/configs/cm5200_defconfig 
b/arch/powerpc/configs/cm5200_defconfig
new file mode 100644
index 000..6a31518
--- /dev/null
+++ b/arch/powerpc/configs/cm5200_defconfig
@@ -0,0 +1,1032 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23-rc9
+# Fri Oct  5 12:23:56 2007
+#
+# 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_PPC_MERGE=y
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+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 is not set
+# CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
+# CONFIG_DEFAULT_UIMAGE is not set
+# 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_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_SYSCTL_SYSCALL is not set
+# CONFIG_KALLSYMS 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 is not set
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# 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_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=y
+CONFIG_IOSCHED_CFQ=y
+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
+
+#
+# Platform support
+#
+CONFIG_PPC_MULTIPLATFORM=y
+# CONFIG_EMBEDDED6xx is not set
+# CONFIG_PPC_82xx is not set
+# CONFIG_PPC_83xx is not set
+# CONFIG_PPC_86xx is not set
+CONFIG_CLASSIC32=y
+# CONFIG_PPC_CHRP is not set
+CONFIG_PPC_MPC52xx=y
+CONFIG_PPC_MPC5200=y
+# CONFIG_PPC_MPC5200_BUGFIX is not set
+# CONFIG_PPC_EFIKA is not set
+# CONFIG_PPC_LITE5200 is not set
+# CONFIG_PPC_TQM5200 is not set
+CONFIG_PPC_CM5200=y
+# CONFIG_PPC_PMAC is not set
+# CONFIG_PPC_CELL is not set
+# CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_PQ2ADS is not set
+# CONFIG_MPIC is not set
+# CONFIG_MPIC_WEIRD is not set
+# CONFIG_PPC_I8259 is not set
+# CONFIG_PPC_RTAS is not set
+# CONFIG_MMIO_NVRAM is not set
+# CONFIG_PPC_MPC106 is not set
+# 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_TAU is not set
+# CONFIG_CPM2 is not set
+# CONFIG_FSL_ULI1575 is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+# CONFIG_KEXEC is not set
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set

[PATCH 06/15] [POWERPC] CM5200 board support

2007-10-07 Thread Marian Balakowicz

Add arch/powerpc board support for CM5200.

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

 Kconfig  |5 +
 Makefile |1 
 cm5200.c |  161 +++
 3 files changed, 167 insertions(+)

diff --git a/arch/powerpc/platforms/52xx/Kconfig 
b/arch/powerpc/platforms/52xx/Kconfig
index 7c828eb..ec952e4 100644
--- a/arch/powerpc/platforms/52xx/Kconfig
+++ b/arch/powerpc/platforms/52xx/Kconfig
@@ -39,3 +39,8 @@ config PPC_TQM5200
select PPC_MPC5200
default n
 
+config PPC_CM5200
+   bool Schindler CM5200 Boards
+   depends on PPC_MULTIPLATFORM  PPC32
+   select PPC_MPC5200
+   default n
diff --git a/arch/powerpc/platforms/52xx/Makefile 
b/arch/powerpc/platforms/52xx/Makefile
index 4997ebf..5b4adfb 100644
--- a/arch/powerpc/platforms/52xx/Makefile
+++ b/arch/powerpc/platforms/52xx/Makefile
@@ -9,5 +9,6 @@ endif
 obj-$(CONFIG_PPC_EFIKA)+= efika.o
 obj-$(CONFIG_PPC_LITE5200) += lite5200.o
 obj-$(CONFIG_PPC_TQM5200)  += tqm5200.o
+obj-$(CONFIG_PPC_CM5200)   += cm5200.o
 
 obj-$(CONFIG_PM)   += mpc52xx_sleep.o mpc52xx_pm.o
diff --git a/arch/powerpc/platforms/52xx/cm5200.c 
b/arch/powerpc/platforms/52xx/cm5200.c
new file mode 100644
index 000..9d3b1f2
--- /dev/null
+++ b/arch/powerpc/platforms/52xx/cm5200.c
@@ -0,0 +1,161 @@
+/*
+ * Schindler CM5200 board support
+ *
+ * Written by: Grant Likely [EMAIL PROTECTED]
+ * Adapted for CM5200 by: Jan Wrobel [EMAIL PROTECTED]
+ *
+ * Copyright (C) Secret Lab Technologies Ltd. 2006. All rights reserved.
+ * Copyright (C) Freescale Semicondutor, Inc. 2006. All rights reserved.
+ *
+ * Description:
+ * 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.
+ */
+
+#undef DEBUG
+
+#include linux/stddef.h
+#include linux/kernel.h
+#include linux/init.h
+#include linux/errno.h
+#include linux/reboot.h
+#include linux/pci.h
+#include linux/kdev_t.h
+#include linux/major.h
+#include linux/console.h
+#include linux/delay.h
+#include linux/seq_file.h
+#include linux/root_dev.h
+#include linux/initrd.h
+
+#include asm/system.h
+#include asm/atomic.h
+#include asm/time.h
+#include asm/io.h
+#include asm/machdep.h
+#include asm/ipic.h
+#include asm/bootinfo.h
+#include asm/irq.h
+#include asm/prom.h
+#include asm/udbg.h
+#include sysdev/fsl_soc.h
+#include asm/of_platform.h
+
+#include asm/mpc52xx.h
+
+/* 
+ *
+ * Setup the architecture
+ *
+ */
+static void __init cm5200_setup_cpu(void)
+{
+   struct mpc52xx_gpio __iomem *gpio;
+   u32 port_config;
+
+   /* Map zones */
+   gpio = mpc52xx_find_and_map(mpc5200-gpio);
+   if (!gpio) {
+   printk(KERN_ERR __FILE__ : 
+   Error while mapping GPIO register for port config. 
+   Expect some abnormal behavior\n);
+   goto error;
+   }
+
+   /* Set port config */
+   port_config = in_be32(gpio-port_config);
+
+   port_config = ~0x0080; /* 48Mhz internal, pin is GPIO  */
+
+   port_config = ~0x7000; /* USB port : Differential mode */
+   port_config |=  0x1000; /*USB 1 only*/
+
+   pr_debug(port_config: old:%x new:%x\n,
+   in_be32(gpio-port_config), port_config);
+
+   out_be32(gpio-port_config, port_config);
+
+   /* Unmap zone */
+error:
+   iounmap(gpio);
+}
+
+static void __init cm5200_setup_arch(void)
+{
+   struct device_node *np;
+
+   np = of_find_node_by_type(NULL, cpu);
+   if (np) {
+   unsigned int *fp =
+   (int *)get_property(np, clock-frequency, NULL);
+   if (fp != 0)
+   loops_per_jiffy = *fp / HZ;
+   else
+   loops_per_jiffy = 5000 / HZ;
+   of_node_put(np);
+   }
+
+   /* CPU  Port mux setup */
+   mpc52xx_setup_cpu();/* Generic */
+   cm5200_setup_cpu(); /* Platorm specific */
+
+#ifdef CONFIG_BLK_DEV_INITRD
+   if (initrd_start)
+   /*
+* We want the proper initrd behavior, i.e., launching of
+* /linuxrc from the initial root file system, and not only
+* mounting it as the normal root file system.
+*/
+   ROOT_DEV = 0x0;
+   else
+#endif
+
+#ifdef  CONFIG_ROOT_NFS
+   ROOT_DEV = Root_NFS;
+#else
+   ROOT_DEV = Root_HDA1;
+#endif
+
+}
+
+void cm5200_show_cpuinfo(struct seq_file *m)
+{
+   struct device_node* np = of_find_all_nodes(NULL);
+   const char *model = NULL;
+
+   if (np)
+   model = 

[PATCH 07/15] [POWERPC] Promess Motion-PRO DTS

2007-10-07 Thread Marian Balakowicz

Add device tree source file for Motion-PRO board.

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

 motionpro.dts |  334 ++
 1 file changed, 334 insertions(+)

diff --git a/arch/powerpc/boot/dts/motionpro.dts 
b/arch/powerpc/boot/dts/motionpro.dts
new file mode 100644
index 000..4b197c8
--- /dev/null
+++ b/arch/powerpc/boot/dts/motionpro.dts
@@ -0,0 +1,334 @@
+/*
+ * Motion-PRO board Device Tree Source, based on Lite5200B DTS.
+ *
+ * Copyright (C) 2007 Semihalf
+ * Modified for CM5200 by Marian Balakowicz [EMAIL PROTECTED]
+ *
+ * Copyright 2006-2007 Secret Lab Technologies Ltd.
+ * Grant Likely [EMAIL PROTECTED]
+ *
+ * Copyright (C) 2007 DENX Software Engineering
+ *
+ * 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.
+ */
+
+/*
+ * WARNING: Do not depend on this tree layout remaining static just yet.
+ * The MPC5200 device tree conventions are still in flux
+ * Keep an eye on the linuxppc-dev mailing list for more details
+ */
+
+/ {
+   model = fsl,motionpro;
+   // revision = 1.0;
+   compatible = fsl,motionpro\0generic-mpc5200;
+   #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;
+   i-cache-line-size = 20;
+   d-cache-size = 4000;  // L1, 16K
+   i-cache-size = 4000;  // L1, 16K
+   timebase-frequency = 0;   // from bootloader
+   bus-frequency = 0;// from bootloader
+   clock-frequency = 0;  // from bootloader
+   32-bit;
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg =  0400;  // 64MB
+   };
+
+   [EMAIL PROTECTED] {
+   model = fsl,mpc5200b;
+   compatible = mpc5200;
+   revision = ;  // from bootloader
+   #interrupt-cells = 3;
+   device_type = soc;
+   ranges = 0 f000 f001;
+   reg = f000 0001;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200b-cdm\0mpc5200-cdm;
+   reg = 200 38;
+   };
+
+   mpc5200_pic: [EMAIL PROTECTED] {
+   // 5200 interrupts are encoded into two levels;
+   interrupt-controller;
+   #interrupt-cells = 3;
+   device_type = interrupt-controller;
+   compatible = mpc5200b-pic\0mpc5200-pic;
+   reg = 500 80;
+   built-in;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = mpc5200b-gpt\0mpc5200-gpt;
+   device_type = gpt;
+   cell-index = 0;
+   reg = 600 10;
+   interrupts = 1 9 0;
+   interrupt-parent = mpc5200_pic;
+   has-wdt;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = mpc5200b-gpt\0mpc5200-gpt;
+   device_type = gpt;
+   cell-index = 1;
+   reg = 610 10;
+   interrupts = 1 a 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = mpc5200b-gpt\0mpc5200-gpt;
+   device_type = gpt;
+   cell-index = 2;
+   reg = 620 10;
+   interrupts = 1 b 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = mpc5200b-gpt\0mpc5200-gpt;
+   device_type = gpt;
+   cell-index = 3;
+   reg = 630 10;
+   interrupts = 1 c 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = mpc5200b-gpt\0mpc5200-gpt;
+   device_type = gpt;
+   

[PATCH 08/15] [POWERPC] Promess Motion-PRO defconfig

2007-10-07 Thread Marian Balakowicz

Add Motion-PRO board defconfig file.

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

 motionpro_defconfig |  914 
 1 file changed, 914 insertions(+)

diff --git a/arch/powerpc/configs/motionpro_defconfig 
b/arch/powerpc/configs/motionpro_defconfig
new file mode 100644
index 000..fcce47e
--- /dev/null
+++ b/arch/powerpc/configs/motionpro_defconfig
@@ -0,0 +1,914 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23-rc9
+# Fri Oct  5 12:54:17 2007
+#
+# 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_PPC_MERGE=y
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+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 is not set
+# CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
+# CONFIG_DEFAULT_UIMAGE is not set
+# 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_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_SYSCTL_SYSCALL is not set
+# CONFIG_KALLSYMS 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 is not set
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# 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_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=y
+CONFIG_IOSCHED_CFQ=y
+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
+
+#
+# Platform support
+#
+CONFIG_PPC_MULTIPLATFORM=y
+# CONFIG_EMBEDDED6xx is not set
+# CONFIG_PPC_82xx is not set
+# CONFIG_PPC_83xx is not set
+# CONFIG_PPC_86xx is not set
+CONFIG_CLASSIC32=y
+# CONFIG_PPC_CHRP is not set
+CONFIG_PPC_MPC52xx=y
+CONFIG_PPC_MPC5200=y
+# CONFIG_PPC_MPC5200_BUGFIX is not set
+# CONFIG_PPC_EFIKA is not set
+# CONFIG_PPC_LITE5200 is not set
+CONFIG_PPC_MOTIONPRO=y
+# CONFIG_PPC_TQM5200 is not set
+# CONFIG_PPC_CM5200 is not set
+# CONFIG_PPC_PMAC is not set
+# CONFIG_PPC_CELL is not set
+# CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_PQ2ADS is not set
+# CONFIG_MPIC is not set
+# CONFIG_MPIC_WEIRD is not set
+# CONFIG_PPC_I8259 is not set
+# CONFIG_PPC_RTAS is not set
+# CONFIG_MMIO_NVRAM is not set
+# CONFIG_PPC_MPC106 is not set
+# 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_TAU is not set
+# CONFIG_CPM2 is not set
+# CONFIG_FSL_ULI1575 is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+# CONFIG_KEXEC is not set
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# 

[PATCH 09/15] [POWERPC] Promess Motion-PRO board support

2007-10-07 Thread Marian Balakowicz

Add arch/powerpc board support for Promess Motion-PRO.

Signed-off-by: Marian Balakowicz [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Sieka [EMAIL PROTECTED]
---

 Kconfig |6 ++
 Makefile|1 
 motionpro.c |  175 
 3 files changed, 182 insertions(+)

diff --git a/arch/powerpc/platforms/52xx/Kconfig 
b/arch/powerpc/platforms/52xx/Kconfig
index ec952e4..9cf2402 100644
--- a/arch/powerpc/platforms/52xx/Kconfig
+++ b/arch/powerpc/platforms/52xx/Kconfig
@@ -33,6 +33,12 @@ config PPC_LITE5200
select PPC_MPC5200
default n
 
+config PPC_MOTIONPRO
+   bool Promess Motion-PRO Board
+   depends on PPC_MULTIPLATFORM  PPC32
+   select PPC_MPC5200
+   default n
+
 config PPC_TQM5200
bool TQM5200 Board
depends on PPC_MULTIPLATFORM  PPC32
diff --git a/arch/powerpc/platforms/52xx/Makefile 
b/arch/powerpc/platforms/52xx/Makefile
index 5b4adfb..bde1b0a 100644
--- a/arch/powerpc/platforms/52xx/Makefile
+++ b/arch/powerpc/platforms/52xx/Makefile
@@ -8,6 +8,7 @@ endif
 
 obj-$(CONFIG_PPC_EFIKA)+= efika.o
 obj-$(CONFIG_PPC_LITE5200) += lite5200.o
+obj-$(CONFIG_PPC_MOTIONPRO)+= motionpro.o
 obj-$(CONFIG_PPC_TQM5200)  += tqm5200.o
 obj-$(CONFIG_PPC_CM5200)   += cm5200.o
 
diff --git a/arch/powerpc/platforms/52xx/motionpro.c 
b/arch/powerpc/platforms/52xx/motionpro.c
new file mode 100644
index 000..2cf8a47
--- /dev/null
+++ b/arch/powerpc/platforms/52xx/motionpro.c
@@ -0,0 +1,175 @@
+/*
+ * Promess Motion-PRO board support
+ *
+ * Written by: Grant Likely [EMAIL PROTECTED]
+ * Adapted for Motion-PRO by: Marian Balakowicz [EMAIL PROTECTED]
+ *
+ * Copyright (C) Secret Lab Technologies Ltd. 2006. All rights reserved.
+ * Copyright (C) Freescale Semicondutor, Inc. 2006. All rights reserved.
+ *
+ * Description:
+ * 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.
+ */
+
+#undef DEBUG
+
+#include linux/stddef.h
+#include linux/kernel.h
+#include linux/init.h
+#include linux/errno.h
+#include linux/reboot.h
+#include linux/pci.h
+#include linux/kdev_t.h
+#include linux/major.h
+#include linux/console.h
+#include linux/delay.h
+#include linux/seq_file.h
+#include linux/root_dev.h
+#include linux/initrd.h
+
+#include asm/system.h
+#include asm/atomic.h
+#include asm/time.h
+#include asm/io.h
+#include asm/machdep.h
+#include asm/ipic.h
+#include asm/bootinfo.h
+#include asm/irq.h
+#include asm/prom.h
+#include asm/udbg.h
+#include sysdev/fsl_soc.h
+#include asm/of_platform.h
+
+#include asm/mpc52xx.h
+
+/* 
+ *
+ * Setup the architecture
+ *
+ */
+
+static void __init
+motionpro_setup_cpu(void)
+{
+   struct mpc52xx_gpio __iomem *gpio;
+   u32 port_config;
+
+   /* Map zones */
+   gpio = mpc52xx_find_and_map(mpc5200-gpio);
+   if (!gpio) {
+   printk(KERN_ERR __FILE__ : 
+   Error while mapping GPIO register for port config. 
+   Expect some abnormal behavior\n);
+   goto error;
+   }
+
+   /* Set port config */
+   port_config = in_be32(gpio-port_config);
+
+   port_config = ~0x0080; /* 48Mhz internal, pin is GPIO  */
+
+   port_config = ~0x7000; /* USB port : Differential mode */
+   port_config |=  0x1000; /*USB 1 only*/
+
+   port_config = ~0x0300; /* ATA CS is on csb_4/5 */
+   port_config |=  0x0100;
+
+   pr_debug(port_config: old:%x new:%x\n,
+in_be32(gpio-port_config), port_config);
+   out_be32(gpio-port_config, port_config);
+
+   /* Unmap zone */
+error:
+   iounmap(gpio);
+}
+
+static void __init motionpro_setup_arch(void)
+{
+   struct device_node *np;
+
+   if (ppc_md.progress)
+   ppc_md.progress(motionpro_setup_arch(), 0);
+
+   np = of_find_node_by_type(NULL, cpu);
+   if (np) {
+   unsigned int *fp =
+   (int *)get_property(np, clock-frequency, NULL);
+   if (fp != 0)
+   loops_per_jiffy = *fp / HZ;
+   else
+   loops_per_jiffy = 5000 / HZ;
+   of_node_put(np);
+   }
+
+   /* CPU  Port mux setup */
+   mpc52xx_setup_cpu();/* Generic */
+   motionpro_setup_cpu();  /* Platorm specific */
+
+#ifdef CONFIG_PCI
+   np = of_find_node_by_type(NULL, pci);
+   if (np) {
+   mpc52xx_add_bridge(np);
+   of_node_put(np);
+   }
+#endif
+
+#ifdef CONFIG_BLK_DEV_INITRD
+   if (initrd_start)
+   /*
+* We want the proper initrd behavior, i.e., launching of
+* 

[PATCH 10/15] [POWERPC] Add mpc52xx_find_and_map_path(), refactor utility functions.

2007-10-07 Thread Marian Balakowicz

Add helper routine mpc52xx_find_and_map_path(). Extract common code to
mpc52xx_map_node() and refactor mpc52xx_find_and_map().

Signed-off-by: Jan Wrobel [EMAIL PROTECTED]
---

 arch/powerpc/platforms/52xx/mpc52xx_common.c |   21 +
 include/asm-powerpc/mpc52xx.h|1 +
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c 
b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 2dd415f..b1cd7b0 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -20,14 +20,12 @@
 #include asm/mpc52xx.h
 
 
-void __iomem *
-mpc52xx_find_and_map(const char *compatible)
+static void __iomem *
+mpc52xx_map_node(struct device_node *ofn)
 {
-   struct device_node *ofn;
const u32 *regaddr_p;
u64 regaddr64, size64;
 
-   ofn = of_find_compatible_node(NULL, NULL, compatible);
if (!ofn)
return NULL;
 
@@ -43,8 +41,23 @@ mpc52xx_find_and_map(const char *compatible)
 
return ioremap((u32)regaddr64, (u32)size64);
 }
+
+void __iomem *
+mpc52xx_find_and_map(const char *compatible)
+{
+   return mpc52xx_map_node(
+   of_find_compatible_node(NULL, NULL, compatible));
+}
+
 EXPORT_SYMBOL(mpc52xx_find_and_map);
 
+void __iomem *
+mpc52xx_find_and_map_path(const char *path)
+{
+   return mpc52xx_map_node(of_find_node_by_path(path));
+}
+
+EXPORT_SYMBOL(mpc52xx_find_and_map_path);
 
 /**
  * mpc52xx_find_ipb_freq - Find the IPB bus frequency for a device
diff --git a/include/asm-powerpc/mpc52xx.h b/include/asm-powerpc/mpc52xx.h
index c4631f6..4707de6 100644
--- a/include/asm-powerpc/mpc52xx.h
+++ b/include/asm-powerpc/mpc52xx.h
@@ -242,6 +242,7 @@ struct mpc52xx_cdm {
 #ifndef __ASSEMBLY__
 
 extern void __iomem * mpc52xx_find_and_map(const char *);
+extern void __iomem * mpc52xx_find_and_map_path(const char *path);
 extern unsigned int mpc52xx_find_ipb_freq(struct device_node *node);
 extern void mpc52xx_setup_cpu(void);
 extern void mpc52xx_declare_of_platform_devices(void);


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


[PATCH 11/15] [POWERPC] Motion-PRO: Add LED support.

2007-10-07 Thread Marian Balakowicz

Add LED driver for Promess Motion-PRO board.

Signed-off-by: Jan Wrobel [EMAIL PROTECTED]
---

 arch/powerpc/configs/motionpro_defconfig |3 
 arch/powerpc/platforms/52xx/motionpro.c  |   38 +
 drivers/leds/Kconfig |7 
 drivers/leds/Makefile|1 
 drivers/leds/leds-motionpro.c|  221 +++
 include/asm-powerpc/mpc52xx.h|5 
 6 files changed, 274 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/configs/motionpro_defconfig 
b/arch/powerpc/configs/motionpro_defconfig
index fcce47e..ce62123 100644
--- a/arch/powerpc/configs/motionpro_defconfig
+++ b/arch/powerpc/configs/motionpro_defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.23-rc9
-# Fri Oct  5 12:54:17 2007
+# Fri Oct  5 15:18:42 2007
 #
 # CONFIG_PPC64 is not set
 
@@ -610,6 +610,7 @@ CONFIG_LEDS_CLASS=y
 #
 # LED drivers
 #
+CONFIG_LEDS_MOTIONPRO=y
 
 #
 # LED Triggers
diff --git a/arch/powerpc/platforms/52xx/motionpro.c 
b/arch/powerpc/platforms/52xx/motionpro.c
index 2cf8a47..c1bcfd2 100644
--- a/arch/powerpc/platforms/52xx/motionpro.c
+++ b/arch/powerpc/platforms/52xx/motionpro.c
@@ -86,10 +86,48 @@ error:
iounmap(gpio);
 }
 
+
+#ifdef CONFIG_LEDS_MOTIONPRO
+
+/* Initialize GPT register connected to LED. Turn off LED. */
+static void motionpro_setup_led(const char *reg_path)
+{
+   void __iomem *reg_addr;
+   u32 reg;
+
+   reg_addr = mpc52xx_find_and_map_path(reg_path);
+   if (!reg_addr){
+   printk(KERN_ERR __FILE__ : 
+  LED setup error: can't map GPIO register %s\n,
+  reg_path);
+   return;
+   }
+
+   reg = in_be32(reg_addr);
+   reg |= MPC52xx_GPT_ENABLE_OUTPUT;
+   reg = ~MPC52xx_GPT_OUTPUT_1;
+   out_be32(reg_addr, reg);
+
+   iounmap(reg_addr);
+}
+
+/* Initialize Motionpro status and ready LEDs */
+static void motionpro_setup_leds(void)
+{
+   motionpro_setup_led(/[EMAIL PROTECTED]/[EMAIL PROTECTED]);
+   motionpro_setup_led(/[EMAIL PROTECTED]/[EMAIL PROTECTED]);
+}
+
+#endif
+
 static void __init motionpro_setup_arch(void)
 {
struct device_node *np;
 
+#ifdef CONFIG_LEDS_MOTIONPRO
+   motionpro_setup_leds();
+#endif
+
if (ppc_md.progress)
ppc_md.progress(motionpro_setup_arch(), 0);
 
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 4468cb3..f027009 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 Motionpro LEDs Support
+   depends on LEDS_CLASS
+   help
+ This option enables support for status and ready LEDs connected
+ to GPIO lines on Motionpro 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 f8995c9..6b45be1 100644
--- a/drivers/leds/Makefile
+++ b/drivers/leds/Makefile
@@ -16,6 +16,7 @@ obj-$(CONFIG_LEDS_NET48XX)+= leds-net48xx.o
 obj-$(CONFIG_LEDS_WRAP)+= leds-wrap.o
 obj-$(CONFIG_LEDS_H1940)   += leds-h1940.o
 obj-$(CONFIG_LEDS_COBALT)  += leds-cobalt.o
+obj-$(CONFIG_LEDS_MOTIONPRO)   += leds-motionpro.o
 obj-$(CONFIG_LEDS_GPIO)+= leds-gpio.o
 
 # LED Triggers
diff --git a/drivers/leds/leds-motionpro.c b/drivers/leds/leds-motionpro.c
new file mode 100644
index 000..273e375
--- /dev/null
+++ b/drivers/leds/leds-motionpro.c
@@ -0,0 +1,221 @@
+/*
+ * LEDs driver for the Motionpro board.
+ * 
+ * Copyright (C) 2007 Semihalf
+ *
+ * Author: Jan Wrobel [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
+ *
+ *
+ * This driver enables control over Motionpro's status and ready LEDs through
+ * sysfs. LEDs can be controlled by writing to sysfs files:
+ * class/leds/motionpro-(ready|status)led/(brightness|delay_off|delay_on).
+ * See Documentation/leds-class.txt for more details
+ *
+ * Before user issues first control command via sysfs, LED blinking is
+ * controlled by the kernel. By default status LED is blinking fast and ready
+ * LED is 

[PATCH 12/15] [POWERPC] Add mpc52xx_restart(), mpc52xx_halt(), mpc52xx_power_off().

2007-10-07 Thread Marian Balakowicz

Add common MPC5200 helper routines: mpc52xx_restart(), mpc52xx_halt(),
mpc52xx_power_off().

This patch relies on Sascha Hauer's patch published in:
http://patchwork.ozlabs.org/linuxppc/patch?id=8910.

Signed-off-by: Marian Balakowicz [EMAIL PROTECTED]
Signed-off-by: Sascha Hauer [EMAIL PROTECTED]
---

 arch/powerpc/platforms/52xx/mpc52xx_common.c |   45 +++
 include/asm-powerpc/mpc52xx.h|7 
 2 files changed, 52 insertions(+)

diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c 
b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index b1cd7b0..e7087d7 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -88,6 +88,14 @@ mpc52xx_find_ipb_freq(struct device_node *node)
 }
 EXPORT_SYMBOL(mpc52xx_find_ipb_freq);
 
+/*
+ * This variable is mapped in mpc52xx_setup_cpu() by a call to
+ * mpc52xx_find_and_map(), and used in mpc52xx_restart(). This is because
+ * mpc52xx_restart() can be called from interrupt context (e.g., watchdog
+ * interrupt handler), and mpc52xx_find_and_map() (ioremap() to be exact)
+ * can't be called from interrupt context.
+ */
+volatile struct mpc52xx_gpt *mpc52xx_gpt0 = NULL;
 
 void __init
 mpc52xx_setup_cpu(void)
@@ -95,6 +103,9 @@ mpc52xx_setup_cpu(void)
struct mpc52xx_cdm  __iomem *cdm;
struct mpc52xx_xlb  __iomem *xlb;
 
+   /* mpc52xx_gpt0 is mapped here and used in mpc52xx_restart */
+   mpc52xx_gpt0 = mpc52xx_find_and_map(mpc5200-gpt);
+
/* Map zones */
cdm = mpc52xx_find_and_map(mpc5200-cdm);
xlb = mpc52xx_find_and_map(mpc5200-xlb);
@@ -138,3 +149,37 @@ mpc52xx_declare_of_platform_devices(void)
Error while probing of_platform bus\n);
 }
 
+void
+mpc52xx_restart(char *cmd)
+{
+   local_irq_disable();
+
+   /* Turn on the watchdog and wait for it to expire. It effectively
+ does a reset */
+   if (mpc52xx_gpt0) {
+   out_be32(mpc52xx_gpt0-mode, 0x);
+   out_be32(mpc52xx_gpt0-count, 0x00ff);
+   out_be32(mpc52xx_gpt0-mode, 0x9004);
+   } else
+   printk(mpc52xx_restart: Can't access gpt. 
+   Restart impossible, system halted\n);
+
+   while (1);
+}
+
+void
+mpc52xx_halt(void)
+{
+   local_irq_disable();
+
+   while (1);
+}
+
+void
+mpc52xx_power_off(void)
+{
+   /* By default we don't have any way of shut down.
+  If a specific board wants to, it can set the power down
+  code to any hardware implementation dependent code */
+   mpc52xx_halt();
+}
diff --git a/include/asm-powerpc/mpc52xx.h b/include/asm-powerpc/mpc52xx.h
index a431798..8dfb4de 100644
--- a/include/asm-powerpc/mpc52xx.h
+++ b/include/asm-powerpc/mpc52xx.h
@@ -104,6 +104,9 @@ struct mpc52xx_gpt {
u32 status; /* GPTx + 0X0c */
 };
 
+/* Static instance of GPT0 */
+extern volatile struct mpc52xx_gpt *mpc52xx_gpt0;
+
 /* GPIO */
 struct mpc52xx_gpio {
u32 port_config;/* GPIO + 0x00 */
@@ -257,6 +260,10 @@ extern unsigned int mpc52xx_get_irq(void);
 
 extern int __init mpc52xx_add_bridge(struct device_node *node);
 
+extern void mpc52xx_restart(char *cmd);
+extern void mpc52xx_halt(void);
+extern void mpc52xx_power_off(void);
+
 #endif /* __ASSEMBLY__ */
 
 #ifdef CONFIG_PM


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


[PATCH 13/15] [POWERPC] Init restart/halt/power_off machine hooks for TQM5200.

2007-10-07 Thread Marian Balakowicz

Initialize restart/halt/power_off machine hooks in TQM5200 board
platform code.

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

 tqm5200.c |3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/powerpc/platforms/52xx/tqm5200.c 
b/arch/powerpc/platforms/52xx/tqm5200.c
index 780b79f..09151d6 100644
--- a/arch/powerpc/platforms/52xx/tqm5200.c
+++ b/arch/powerpc/platforms/52xx/tqm5200.c
@@ -171,4 +171,7 @@ define_machine(tqm5200) {
.get_irq= mpc52xx_get_irq,
.show_cpuinfo   = tqm5200_show_cpuinfo,
.calibrate_decr = generic_calibrate_decr,
+   .restart= mpc52xx_restart,
+   .halt   = mpc52xx_halt,
+   .power_off  = mpc52xx_power_off,
 };


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


[PATCH 14/15] [POWERPC] Init restart/halt/power_off machine hooks for CM5200.

2007-10-07 Thread Marian Balakowicz

Initialize restart/halt/power_off machine hooks in CM5200 board
platform code.

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

 cm5200.c |3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/powerpc/platforms/52xx/cm5200.c 
b/arch/powerpc/platforms/52xx/cm5200.c
index 9d3b1f2..9e18bfe 100644
--- a/arch/powerpc/platforms/52xx/cm5200.c
+++ b/arch/powerpc/platforms/52xx/cm5200.c
@@ -158,4 +158,7 @@ define_machine(cm5200) {
.get_irq= mpc52xx_get_irq,
.show_cpuinfo   = cm5200_show_cpuinfo,
.calibrate_decr = generic_calibrate_decr,
+   .restart= mpc52xx_restart,
+   .halt   = mpc52xx_halt,
+   .power_off  = mpc52xx_power_off,
 };


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


[PATCH 15/15] [POWERPC] Init restart/halt/power_off machine hooks for Motion-PRO.

2007-10-07 Thread Marian Balakowicz

Initialize restart/halt/power_off machine hooks in Promess
Motion-PRO board platform code.

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

 motionpro.c |3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/powerpc/platforms/52xx/motionpro.c 
b/arch/powerpc/platforms/52xx/motionpro.c
index c1bcfd2..c6954c2 100644
--- a/arch/powerpc/platforms/52xx/motionpro.c
+++ b/arch/powerpc/platforms/52xx/motionpro.c
@@ -210,4 +210,7 @@ define_machine(motionpro) {
.get_irq= mpc52xx_get_irq,
.show_cpuinfo   = motionpro_show_cpuinfo,
.calibrate_decr = generic_calibrate_decr,
+   .restart= mpc52xx_restart,
+   .halt   = mpc52xx_halt,
+   .power_off  = mpc52xx_power_off,
 };


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


[PATCH] PPC: Remove redundant reference to non-existent CONFIG_BOOTIMG.

2007-10-07 Thread Robert P. J. Day

Signed-off-by: Robert P. J. Day [EMAIL PROTECTED]

---

  there is, AFAICT, no BOOTIMG Kconfig variable.  not to mention that
there is no such include/linux/bootimg.h header file.


 arch/ppc/platforms/ev64360.c |3 ---
 arch/ppc/platforms/katana.c  |3 ---
 2 files changed, 6 deletions(-)

diff --git a/arch/ppc/platforms/ev64360.c b/arch/ppc/platforms/ev64360.c
index f8baf05..6765676 100644
--- a/arch/ppc/platforms/ev64360.c
+++ b/arch/ppc/platforms/ev64360.c
@@ -23,9 +23,6 @@
 #include linux/mtd/physmap.h
 #include linux/mv643xx.h
 #include linux/platform_device.h
-#ifdef CONFIG_BOOTIMG
-#include linux/bootimg.h
-#endif
 #include asm/page.h
 #include asm/time.h
 #include asm/smp.h
diff --git a/arch/ppc/platforms/katana.c b/arch/ppc/platforms/katana.c
index c289e9f..52f63e6 100644
--- a/arch/ppc/platforms/katana.c
+++ b/arch/ppc/platforms/katana.c
@@ -27,9 +27,6 @@
 #include linux/mtd/physmap.h
 #include linux/mv643xx.h
 #include linux/platform_device.h
-#ifdef CONFIG_BOOTIMG
-#include linux/bootimg.h
-#endif
 #include asm/io.h
 #include asm/unistd.h
 #include asm/page.h

-- 

Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca

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


Re: [POWERPC 03/15] [POWERPC] TQM5200 board support

2007-10-07 Thread Stephen Rothwell
On Sun, 07 Oct 2007 13:19:54 +0200 Marian Balakowicz [EMAIL PROTECTED] wrote:

 +++ b/arch/powerpc/platforms/52xx/tqm5200.c

 +#include asm/prom.h

You need this for the flattened device tree stuff, so good. However ...

 +#include asm/of_platform.h

You should not include this file.  And you actually don't use any of the
of_platform routines, but you do need linux/of.h for the of_find_ ...
routines.

 +void tqm5200_show_cpuinfo(struct seq_file *m)
 +{
 + struct device_node* np = of_find_all_nodes(NULL);

Not sure about this - if you want to find the root node, then you should
probably do that explicitly.

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


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

Re: [PATCH 06/15] [POWERPC] CM5200 board support

2007-10-07 Thread Stephen Rothwell
On Sun, 07 Oct 2007 13:24:18 +0200 Marian Balakowicz [EMAIL PROTECTED] wrote:

 +++ b/arch/powerpc/platforms/52xx/cm5200.c

 +#include asm/prom.h
 +#include asm/of_platform.h

Same comments as for tqm5200.c.

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


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

Re: [PATCH 09/15] [POWERPC] Promess Motion-PRO board support

2007-10-07 Thread Stephen Rothwell
On Sun, 07 Oct 2007 13:28:48 +0200 Marian Balakowicz [EMAIL PROTECTED] wrote:

 +++ b/arch/powerpc/platforms/52xx/motionpro.c

Same comments again.

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


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

Re: [PATCH] PPC: Remove redundant reference to non-existent CONFIG_BOOTIMG.

2007-10-07 Thread Dale Farnsworth
On Sun, Oct 07, 2007 at 07:34:57AM -0400, Robert P. J. Day wrote:
   there is, AFAICT, no BOOTIMG Kconfig variable.  not to mention that
 there is no such include/linux/bootimg.h header file.
 
  arch/ppc/platforms/ev64360.c |3 ---
  arch/ppc/platforms/katana.c  |3 ---
  2 files changed, 6 deletions(-)

Ack.  Bootimg is long gone.

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


Re: TASK_SIZE default 0x80000000 ?

2007-10-07 Thread Kumar Gala

On Oct 6, 2007, at 11:06 PM, Paul Mackerras wrote:

 Kumar Gala writes:

 In a discussion with Hollis over beer he raised the question why
 TASK_SIZE is 0x8000 on ppc32.

 I was wondering if anyone know why this was still the case?  Seems
 like we have a 1Gb whole between TASK_SIZE  KERNELBASE.

 Two reasons: (a) PReP used to map PCI stuff with BATs in the
 0x8000 - 0xbfff region, and (b) some embedded ports with
 software-loaded TLBs test just the high bit of the address to
 determine whether to use the kernel or user page tables.

Can you explain (a) further -- I'm assuming the BAT mapping is 1:1  
for that region?

For (b) it looks like:
* 40x, 44x, fsl-booke compare against TASK_SIZE in their software  
handlers.
* 8xx still tests 0x8000
* 6xx (603) compares against KERNELBASE

It would seem like we should set the default on 8xx  PReP to  
0x8000 and not allow it to be modified since that will break the  
world and for everything else move it to match KERNELBASE.  Any  
issues with that?

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


Re: [PATCH 01/15] [POWERPC] TQM5200 DTS

2007-10-07 Thread Grant Likely
On 10/7/07, Marian Balakowicz [EMAIL PROTECTED] wrote:

 Add device tree source file for TQM5200 board.

 Signed-off-by: Marian Balakowicz [EMAIL PROTECTED]
 Signed-off-by: Grzegorz Bernacki [EMAIL PROTECTED]
 Signed-off-by: Martin Krause [EMAIL PROTECTED]
 ---

  tqm5200.dts |  217 
 
  1 file changed, 217 insertions(+)

 diff --git a/arch/powerpc/boot/dts/tqm5200.dts 
 b/arch/powerpc/boot/dts/tqm5200.dts
 new file mode 100644
 index 000..e3e0ebf
 --- /dev/null
 +++ b/arch/powerpc/boot/dts/tqm5200.dts
 @@ -0,0 +1,217 @@
 +/*
 + * TQM5200 board Device Tree Source
 + *
 + * Copyright (C) 2007 Semihalf
 + * Modified for TQM5200 by Marian Balakowicz [EMAIL PROTECTED]
 + *
 + * Copyright 2006-2007 Secret Lab Technologies Ltd.
 + * Grant Likely [EMAIL PROTECTED]

You don't really need to preserve my copyright here.  It will not
bother me if you remove it.

 + *
 + * 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.
 + */
 +
 +/*
 + * WARNING: Do not depend on this tree layout remaining static just yet.
 + * The MPC5200 device tree conventions are still in flux
 + * Keep an eye on the linuxppc-dev mailing list for more details
 + */
 +
 +/ {
 +   model = fsl,tqm5200;

fsl, is not appropriate as the TQM5200 is not a freescale product.
We need a new abbreviation for tq-components.

 +   compatible = fsl,tqm5200\0generic-mpc5200;

Ditto

 +   #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;
 +   i-cache-line-size = 20;
 +   d-cache-size = 4000;  // L1, 16K
 +   i-cache-size = 4000;  // L1, 16K
 +   timebase-frequency = 0;   // from bootloader
 +   bus-frequency = 0;// from bootloader
 +   clock-frequency = 0;  // from bootloader
 +   32-bit;
 +   };
 +   };
 +
 +   memory {
 +   device_type = memory;
 +   reg =  0400;  // 64MB
 +   };
 +
 +   [EMAIL PROTECTED] {

I think we're moving to the convetion of naming these nodes
soc@addr now.  (You can drop the 5200 for the node name)

 +   model = fsl,mpc5200;
 +   compatible = mpc5200;
 +   revision = ;  // from bootloader
 +   #interrupt-cells = 3;
 +   device_type = soc;
 +   ranges = 0 f000 f001;
 +   reg = f000 0001;
 +   bus-frequency = 0;// from bootloader
 +   system-frequency = 0; // from bootloader
 +
 +   [EMAIL PROTECTED] {
 +   compatible = mpc5200b-cdm\0mpc5200-cdm;
 +   reg = 200 38;
 +   };
 +
 +   mpc5200_pic: [EMAIL PROTECTED] {
 +   // 5200 interrupts are encoded into two levels;
 +   interrupt-controller;
 +   #interrupt-cells = 3;
 +   device_type = interrupt-controller;
 +   compatible = mpc5200-pic;
 +   reg = 500 80;
 +   built-in;
 +   };
 +
 +   [EMAIL PROTECTED] {   // General Purpose Timer
 +   compatible = mpc5200-gpt;
 +   device_type = gpt;
 +   cell-index = 0;
 +   reg = 600 10;
 +   interrupts = 1 9 0;
 +   interrupt-parent = mpc5200_pic;
 +   has-wdt;
 +   };
 +
 +   [EMAIL PROTECTED] {
 +   compatible = mpc5200-gpio;
 +   reg = b00 40;
 +   interrupts = 1 7 0;
 +   interrupt-parent = mpc5200_pic;
 +   };
 +
 +   [EMAIL PROTECTED] {
 +   device_type = usb-ohci-be;
 +   compatible = mpc5200-ohci\0ohci-be;
 +   reg = 1000 ff;
 +   interrupts = 2 6 0;
 +   interrupt-parent = mpc5200_pic;
 +   };
 +
 +   [EMAIL PROTECTED] {
 +   #interrupt-cells = 1;
 +   #size-cells = 2;
 +   #address-cells = 3;
 +   device_type = pci;
 +   compatible = mpc5200-pci;
 +   reg = 

Re: TASK_SIZE default 0x80000000 ?

2007-10-07 Thread Dan Malek

On Oct 7, 2007, at 8:02 AM, Kumar Gala wrote:

 It would seem like we should set the default on 8xx  PReP to
 0x8000 and not allow it to be modified

For as much as this has been discussed in the past,
I don't know why the 8xx doesn't check KERNEL_BASE
and work properly with the options.  There is no reason
this can't work.  The history is I wrote the tlb handlers
to test the MS bit due to a hardcoded address, not that
the address is hardcoded because I wanted to just
test a bit.  Unlike PReP, there is no reason to
disallow modification, if this test was changed.

Thanks.

-- Dan


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


Re: [PATCH 01/15] [POWERPC] TQM5200 DTS

2007-10-07 Thread Wolfgang Denk
In message [EMAIL PROTECTED] you wrote:

  +/ {
  +   model = fsl,tqm5200;
 
 fsl, is not appropriate as the TQM5200 is not a freescale product.
 We need a new abbreviation for tq-components.

How about

model = tqc,tqm5200;
?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
Behind every great man, there is a woman -- urging him on.
-- Harry Mudd, I, Mudd, stardate 4513.3
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: TASK_SIZE default 0x80000000 ?

2007-10-07 Thread Benjamin Herrenschmidt

 Can you explain (a) further -- I'm assuming the BAT mapping is 1:1  
 for that region?
 
 For (b) it looks like:
 * 40x, 44x, fsl-booke compare against TASK_SIZE in their software  
 handlers.
 * 8xx still tests 0x8000
 * 6xx (603) compares against KERNELBASE
 
 It would seem like we should set the default on 8xx  PReP to  
 0x8000 and not allow it to be modified since that will break the  
 world and for everything else move it to match KERNELBASE.  Any  
 issues with that?

The proper value is neither :-)

It should be compared against PAGE_OFFSET.

Ben.


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


Re: [RFC] [PATCH] PowerPC: add more than 4MB kernel image size support to bootwarapper

2007-10-07 Thread Scott Wood
Mark A. Greer wrote:
 Why?  Because its only safe to download a zImage to certain safe locations.
 Where those safe locations are vary by firmware, firmware version, and
 zImage size.  This is the issue we're discussing.

In theory, yes -- but in practice the odds of this particular heuristic 
choosing an unsuitable address seem slim.

 I've already explained _why_ the link address matters WRT where its 
 downloaded.

Sorry, I was being a bit too pendantic with respect to the distinction 
between link and load address.

 Also, being able to control the link address (that is, the download
 address with some firmwares) is not a u-boot specific issue and we
 shouldn't make a u-boot specific solution.
 How is this a u-boot specific solution?
 
 Because the hoops being jumped through in the patch(es) are to make
 u-boot happy and no other firmware.

No, the hoops (which I don't think are sufficiently complicated to 
warrant such a name) are to address a generic issue with the bootwrapper 
-- it wants to put the kernel at zero.  It'd be really nice if, in the 
absense of a vmlinux_alloc method, the generic code would do an ordinary 
malloc() if there's not enough room at zero.

 I'd much rather it be automatic than require the user to guess an
 appropriate value (and be aware in the first place that it needs to be set).
 
 Sure, automatic is nice; conjuring up the magic to make it work in all
 situations isn't.

I think this heuristic would work in most situations, so if we do add a 
manual override it should be an override, and not something that 
everybody has to put up with.

 Having the link address--and therefore the download address on some
 systems--mysteriously and uncontrollably jump around based on the zImage
 size is asking for trouble.

It's a source of potential issues, but I think asking for trouble is 
exaggerating somewhat.

-Scott

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


Re: [PATCH 04/15] [POWERPC] CM5200 DTS

2007-10-07 Thread David Gibson
On Sun, Oct 07, 2007 at 01:20:50PM +0200, Marian Balakowicz wrote:
 
 Add device tree source file for CM5200 board.
 
 Signed-off-by Marian Balakowicz [EMAIL PROTECTED]
 Signed-off-by: Jan Wrobel [EMAIL PROTECTED]
 ---
 
  cm5200.dts |  284 
 +
  1 file changed, 284 insertions(+)
 
 diff --git a/arch/powerpc/boot/dts/cm5200.dts 
 b/arch/powerpc/boot/dts/cm5200.dts
 new file mode 100644
 index 000..96d2ee4
 --- /dev/null
 +++ b/arch/powerpc/boot/dts/cm5200.dts
 @@ -0,0 +1,284 @@
 +/*
 + * CM5200 board Device Tree Source
 + *
 + * Copyright (C) 2007 Semihalf
 + * Modified for CM5200 by Jan Wrobel [EMAIL PROTECTED]
 + *
 + * Copyright 2006-2007 Secret Lab Technologies Ltd.
 + * Grant Likely [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.
 + */
 +
 +/*
 + * WARNING: Do not depend on this tree layout remaining static just yet.
 + * The MPC5200 device tree conventions are still in flux
 + * Keep an eye on the linuxppc-dev mailing list for more details
 + */
 +
 +/ {
 + model = cm5200;
 + compatible = fsl,cm5200\0generic-mpc5200;

dtc now supports the syntax fsl,cm5200, generic-mpc5200 so you
don't need the ugly inline \0.

 + #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;
 + i-cache-line-size = 20;
 + d-cache-size = 4000;  // L1, 16K
 + i-cache-size = 4000;  // L1, 16K
 + timebase-frequency = 0;   // from bootloader
 + bus-frequency = 0;// from bootloader
 + clock-frequency = 0;  // from bootloader
 + 32-bit;
 + };
 + };
 +
 + memory {
 + device_type = memory;
 + reg =  0400;  // 64MB
 + };
 +
 + [EMAIL PROTECTED] {
 + model = fsl,mpc5200b;
 + compatible = mpc5200;
 + revision = ;  // from bootloader
 + #interrupt-cells = 3;
 + device_type = soc;
 + ranges = 0 f000 f001;
 + reg = f000 0001;
 + bus-frequency = 0;// from bootloader
 + system-frequency = 0; // from bootloader

[snip]
 + [EMAIL PROTECTED] {
 + device_type = rom;
 + compatible = direct-mapped;
 + reg = 0c00 0200;
 + probe-type = CFI;
 + bank-width = 2;
 + partitions =  0006
 + 0006 0002
 + 0008 0002
 + 000a 0002
 + 000c 0020
 + 002c 01b4
 + 01e0 0020;
 + partition-names = 
 uboot\0env\0redund_env\0dtb\0kernel\0rootfs\0config;
 + };

First, this is the old flash binding, please use the new one.

Second, is the flash really part of the SoC?

-- 
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 07/15] [POWERPC] Promess Motion-PRO DTS

2007-10-07 Thread David Gibson
On Sun, Oct 07, 2007 at 01:25:33PM +0200, Marian Balakowicz wrote:
 
 Add device tree source file for Motion-PRO board.
 
 Signed-off-by: Marian Balakowicz [EMAIL PROTECTED]
 ---
 
  motionpro.dts |  334 
 ++
  1 file changed, 334 insertions(+)
 
 diff --git a/arch/powerpc/boot/dts/motionpro.dts 
 b/arch/powerpc/boot/dts/motionpro.dts
 new file mode 100644
 index 000..4b197c8
 --- /dev/null
 +++ b/arch/powerpc/boot/dts/motionpro.dts
 @@ -0,0 +1,334 @@
 +/*
 + * Motion-PRO board Device Tree Source, based on Lite5200B DTS.
 + *
 + * Copyright (C) 2007 Semihalf
 + * Modified for CM5200 by Marian Balakowicz [EMAIL PROTECTED]
 + *
 + * Copyright 2006-2007 Secret Lab Technologies Ltd.
 + * Grant Likely [EMAIL PROTECTED]
 + *
 + * Copyright (C) 2007 DENX Software Engineering
 + *
 + * 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.
 + */
 +
 +/*
 + * WARNING: Do not depend on this tree layout remaining static just yet.
 + * The MPC5200 device tree conventions are still in flux
 + * Keep an eye on the linuxppc-dev mailing list for more details
 + */
 +
 +/ {
[snip]
 + kollmorgen {
 + device_type = kollmorgen;
 + compatible = kollmorgen;
 + reg = 5000 ;
 + interrupts = 1 1 0;
 + interrupt-parent = mpc5200_pic;
 + };
 + cpld {
 + device_type = cpld;
 + compatible = cpld;
 + reg = 5001 ;
 + };
 + anybus {
 + device_type = anybus;
 + compatible = anybus;
 + reg = 5002 ;
 + };
 + pro_module_general {
 + device_type = pro_module_general;
 + compatible = pro_module_general;
 + reg = 5002 3;
 + };
 + pro_module_dio {
 + device_type = pro_module_dio;
 + compatible = pro_module_dio;
 + reg = 50020800 2;
 + };

Surely there must be some sort of bus controller above these devices..?

-- 
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: 2.6.23-rc7-mm1 -- powerpc rtas panic

2007-10-07 Thread Nish Aravamudan
On 10/5/07, Linas Vepstas [EMAIL PROTECTED] wrote:
 On Thu, Oct 04, 2007 at 05:01:47PM -0700, Nish Aravamudan wrote:
  On 10/2/07, Tony Breeds [EMAIL PROTECTED] wrote:
   On Wed, Oct 03, 2007 at 10:30:16AM +1000, Michael Ellerman wrote:
  
I realise it'll make the patch bigger, but this doesn't seem like a
particularly good name for the variable anymore.
  
   Sure, what about?
  
   Clarify when RTAS logging is enabled.
  
   Signed-off-by: Tony Breeds [EMAIL PROTECTED]
 
  For what it's worth, on a different ppc64 box, this resolves a similar
  panic for me.
 
  Tested-by: Nishanth Aravamudan [EMAIL PROTECTED]

 For the reasons explained, I'd really like to nack Tony's patch.

I see. Can you reply in this thread with the patch you mentioned in
your other reply? (or point me to a copy of it)

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