Re: State of the MPC5200 PSC AC97 driver

2008-04-11 Thread Marian Balakowicz

All,

Thanks for the input and comments.

I am also having a look at the I2S driver. There were attempts some
time ago and I found few pieces of code floating on net but couldn't
find anything cleaned up. Did anyone tried to put the results of those
attempts together?

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


Re: State of the MPC5200 PSC AC97 driver

2008-04-11 Thread Marian Balakowicz
Grant Likely wrote:
 On Fri, Apr 11, 2008 at 3:23 AM, Marian Balakowicz [EMAIL PROTECTED] wrote:
  All,

  Thanks for the input and comments.

  I am also having a look at the I2S driver. There were attempts some
  time ago and I found few pieces of code floating on net but couldn't
  find anything cleaned up. Did anyone tried to put the results of those
  attempts together?
 
 I'm actually working on the I2S driver now and I'll probably have
 something to post about a month from now.  This is funded development,
 so I'll actually have lots of time to spend on it when I get back from
 ELC.

Nice, I'll most probably work on it quite soon as well. It would be
good to coordinate efforts, will ping you when I am about to start.

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


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

2008-01-31 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]
---

Update since v6:
- fix error handling for null label proper

 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..b8dfa8a
--- /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/led-name/(brightness|delay_off|delay_on).
+ * See Documentation/leds-class.txt for more details.
+ * led-name 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 linux/module.h
+#include linux/leds.h
+#include linux/of_platform.h
+#include asm/mpc52xx.h
+
+/* 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

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

2008-01-23 Thread Marian Balakowicz
Olof Johansson wrote:
...
 
 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.

Well, I just prefer separate defconfigs but I can live with the common
one as well, feel free to merge it as you see it fit.

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


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

2008-01-23 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]
---

Updated static struct of_device_id mpled_match[] definition
to static const struct of_device_id mpled_match[].

 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..cad7ccd
--- /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/led-name/(brightness|delay_off|delay_on).
+ * See Documentation/leds-class.txt for more details.
+ * led-name 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 linux/module.h
+#include linux/leds.h
+#include linux/of_platform.h
+#include asm/mpc52xx.h
+
+/* 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

Re: [PATCH v4 02/13] [POWERPC] Add 'fsl, lpb' bus type for MPC5200 LocalPlus Bus

2008-01-17 Thread Marian Balakowicz

Hi Grant,

Sorry, for the late reply.

Grant Likely wrote:
 On 11/9/07, Marian Balakowicz [EMAIL PROTECTED] wrote:
 Define MPC52xx specific device id list, add new
 'fsl,lpb' compatible id for LocalPlus Bus.
 
 I'll pick this up, but I'm going to drop the .compatible=soc line.
 (I'd like to drop the device_type=soc line also, but that requires a
 bit more thought first).

I finally got a chance to re-test my 5200 patches. I pulled
'for-2.6.25' branch from your tree where you already applied those
patches and adapted .dts and _defconfig files.

See '[POWERPC] Update TQM5200, CM5200 and Motion-PRO _defconfig and
.dts files' patch. It introduces necessary modification resulting from
the meantime development, so please pick this one up as well.

I got one more pending patch: '[POWERPC] Motion-PRO: Add LED support',
but that's the diver code and I am not sure who should be picking it
up, any ideas?

Thanks,
m.
___
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 Marian Balakowicz
Hi,

Paul Mackerras wrote:
 Includes commits pulled from Josh Boyer's tree.


Will you be willing to pick up this one? It's a generic powerpc patch,
so I'm not sure where else to direct it.

[POWERPC] Add 'model: ...' line to common show_cpuinfo()
http://patchwork.ozlabs.org/linuxppc/patch?id=14661

Thanks,
m.

___
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/led-name/(brightness|delay_off|delay_on).
+ * See Documentation/leds-class.txt for more details.
+ * led-name 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 linux/module.h
+#include linux/leds.h
+#include linux/of_platform.h
+#include asm/mpc52xx.h
+
+/* 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

[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

[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 = f00 20;
@@ -216,10 +222,26 @@
[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

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: [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: Yet more patches added to for-2.6.25/master branches

2007-12-21 Thread Marian Balakowicz

Any changes to add new 52xx targets:

http://patchwork.ozlabs.org/linuxppc/patch?person=988id=14661
http://patchwork.ozlabs.org/linuxppc/patch?person=988id=14662
http://patchwork.ozlabs.org/linuxppc/patch?person=988id=14663
http://patchwork.ozlabs.org/linuxppc/patch?person=988id=14743
http://patchwork.ozlabs.org/linuxppc/patch?person=988id=14665
http://patchwork.ozlabs.org/linuxppc/patch?person=988id=14666
http://patchwork.ozlabs.org/linuxppc/patch?person=988id=14667
http://patchwork.ozlabs.org/linuxppc/patch?person=988id=14668
http://patchwork.ozlabs.org/linuxppc/patch?person=988id=14669
http://patchwork.ozlabs.org/linuxppc/patch?person=988id=14670
http://patchwork.ozlabs.org/linuxppc/patch?person=988id=14671
http://patchwork.ozlabs.org/linuxppc/patch?person=988id=14672
http://patchwork.ozlabs.org/linuxppc/patch?person=988id=14673

Those did not make it to 2.6.24, Grant Likely suggested to wait until
2.6.25 window opens.

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


Re: Yet more patches added to for-2.6.25/master branches

2007-12-21 Thread Marian Balakowicz
Grant Likely wrote:
 
 On 12/21/07, *Marian Balakowicz* [EMAIL PROTECTED]
 
 Any changes to add new 52xx targets:
 
 http://patchwork.ozlabs.org/linuxppc/patch?person=988id=14661
[...]
 
 Those did not make it to 2.6.24, Grant Likely suggested to wait until
 2.6.25 window opens.
 
 
 I'll be picking these up next week.  I haven't had time to do it earlier.

Great, I'll retest the set with the latest vanilla next week.

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


Re: [PATCH v5 04/13] [POWERPC] Add generic support for simple MPC5200 based boards

2007-11-15 Thread Marian Balakowicz
Hi Stephen,

Stephen Rothwell wrote:
 
 On Wed, 14 Nov 2007 11:21:37 +0100 Marian Balakowicz [EMAIL PROTECTED] 
 wrote:
 +++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c
 +#include asm/time.h
 +#include asm/machdep.h
 +#include asm/mpc52xx.h
 
 You still need asm/prom.h because you use of_get_flat_dt_root() and
 of_flat_dt_is_compatible().
 
 +/* list of the supported boards */
 +static const char *board[] __initdata = {
 
 Unfortunately you can't use const and __initdata, so just remove the
 const.  (const changes the attributes on the section that __initdata is
 stored in.)

Arghh, too much of a hurry it seems, thanks for catching it.

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


[PATCH v5 04/13] [POWERPC] Add generic support for simple MPC5200 based boards

2007-11-14 Thread Marian Balakowicz
This patch adds support for 'mpc5200-simple-platform' compatible
boards which do not need a platform specific setup. Such boards
are supported assuming the following:

- GPIO pins are configured by the firmware,
- CDM configuration (clocking) is setup correctly by firmware,
- if the 'fsl,has-wdt' property is present in one of the
  gpt nodes, then it is safe to use such gpt to reset the board,
- PCI is supported if enabled in the kernel configuration
and if there is a PCI bus node defined in the device tree.

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

This is a updated version of the patch 04/13 from the patchset that
adds arch/powerpc support for three MPC5200 based boards:
TQ-Components TQM5200, Schindler CM5200 and Promess Motion-PRO.

Supported boards table was made static __initdata and
sorted alphabetically.

Cheers,
Marian Balakowicz


 arch/powerpc/boot/dts/lite5200.dts   |2 -
 arch/powerpc/boot/dts/lite5200b.dts  |2 -
 arch/powerpc/platforms/52xx/Kconfig  |   22 ++-
 arch/powerpc/platforms/52xx/Makefile |1 
 arch/powerpc/platforms/52xx/mpc5200_simple.c |   84 ++
 5 files changed, 107 insertions(+), 4 deletions(-)
 create mode 100644 arch/powerpc/platforms/52xx/mpc5200_simple.c


diff --git a/arch/powerpc/boot/dts/lite5200.dts 
b/arch/powerpc/boot/dts/lite5200.dts
index 6731763..5902362 100644
--- a/arch/powerpc/boot/dts/lite5200.dts
+++ b/arch/powerpc/boot/dts/lite5200.dts
@@ -19,7 +19,7 @@
 / {
model = fsl,lite5200;
// revision = 1.0;
-   compatible = fsl,lite5200,generic-mpc5200;
+   compatible = fsl,lite5200;
#address-cells = 1;
#size-cells = 1;
 
diff --git a/arch/powerpc/boot/dts/lite5200b.dts 
b/arch/powerpc/boot/dts/lite5200b.dts
index b540388..b509129 100644
--- a/arch/powerpc/boot/dts/lite5200b.dts
+++ b/arch/powerpc/boot/dts/lite5200b.dts
@@ -19,7 +19,7 @@
 / {
model = fsl,lite5200b;
// revision = 1.0;
-   compatible = fsl,lite5200b,generic-mpc5200;
+   compatible = fsl,lite5200b;
#address-cells = 1;
#size-cells = 1;
 
diff --git a/arch/powerpc/platforms/52xx/Kconfig 
b/arch/powerpc/platforms/52xx/Kconfig
index 2938d49..36e880b 100644
--- a/arch/powerpc/platforms/52xx/Kconfig
+++ b/arch/powerpc/platforms/52xx/Kconfig
@@ -19,6 +19,26 @@ config PPC_MPC5200_BUGFIX
 
  It is safe to say 'Y' here
 
+config PPC_MPC5200_SIMPLE
+   bool Generic support for simple MPC5200 based boards
+   depends on PPC_MULTIPLATFORM  PPC32
+   select PPC_MPC5200
+   default n
+   help
+ This option enables support for a simple MPC52xx based boards which
+ do not need a custom platform specific setup. Such boards are
+ supported assuming the following:
+
+ - GPIO pins are configured by the firmware,
+ - CDM configuration (clocking) is setup correctly by firmware,
+ - if the 'fsl,has-wdt' property is present in one of the
+   gpt nodes, then it is safe to use such gpt to reset the board,
+ - PCI is supported if enabled in the kernel configuration
+   and if there is a PCI bus node defined in the device tree.
+
+ Boards that are compatible with this generic platform support
+ are: 'tqc,tqm5200', 'promess,motionpro', 'schindler,cm5200'.
+
 config PPC_EFIKA
bool bPlan Efika 5k2. MPC5200B based computer
depends on PPC_MULTIPLATFORM  PPC32
@@ -34,5 +54,3 @@ config PPC_LITE5200
select WANT_DEVICE_TREE
select PPC_MPC5200
default n
-
-
diff --git a/arch/powerpc/platforms/52xx/Makefile 
b/arch/powerpc/platforms/52xx/Makefile
index 307dbc1..fe1b81b 100644
--- a/arch/powerpc/platforms/52xx/Makefile
+++ b/arch/powerpc/platforms/52xx/Makefile
@@ -6,6 +6,7 @@ obj-y   += mpc52xx_pic.o 
mpc52xx_common.o
 obj-$(CONFIG_PCI)  += mpc52xx_pci.o
 endif
 
+obj-$(CONFIG_PPC_MPC5200_SIMPLE) += mpc5200_simple.o
 obj-$(CONFIG_PPC_EFIKA)+= efika.o
 obj-$(CONFIG_PPC_LITE5200) += lite5200.o
 
diff --git a/arch/powerpc/platforms/52xx/mpc5200_simple.c 
b/arch/powerpc/platforms/52xx/mpc5200_simple.c
new file mode 100644
index 000..049c03d
--- /dev/null
+++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c
@@ -0,0 +1,84 @@
+/*
+ * Support for 'mpc5200-simple-platform' compatible boards.
+ *
+ * Written by Marian Balakowicz [EMAIL PROTECTED]
+ * Copyright (C) 2007 Semihalf
+ *
+ * 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.
+ *
+ * Description:
+ * This code implements support for a simple MPC52xx based boards which
+ * do not need a custom platform specific setup. Such boards are
+ * supported assuming the following:
+ *
+ * - GPIO pins are configured

Re: [PATCH v4 04/13] [POWERPC] Add generic support for simple MPC5200 based boards

2007-11-12 Thread Marian Balakowicz
Stephen Rothwell wrote:
 On Fri, 09 Nov 2007 18:12:02 +0100 Marian Balakowicz [EMAIL PROTECTED] 
 wrote:
 +++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c

 +static int __init mpc5200_simple_probe(void)
 +{
 +unsigned long node = of_get_flat_dt_root();
 
 You need to include asm/prom.h to use the flattened device tree accessors.

Right, but this one is already included in mpc52xx.h.

 +/* list of the supported boards */
 +const char *board[] = { 
 +tqc,tqm5200,
 +promess,motionpro,
 +schindler,cm5200,
 +NULL
 +};
 
 Make that static.

Board table is no longer needed after kernel is initialized, it would
be nice to declare it static and __initdata, but that would be quite
ugly as it's a table of pointers and each string would require
separate statement too. If we don't do it then what's the benefit of
making it static?

Cheers,
m.


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


Re: [PATCH v4 00/13] [POWERPC] Add TQM5200/CM5200/Motion-PRO board support

2007-11-12 Thread Marian Balakowicz
Grant Likely wrote:
 On 11/9/07, Grant Likely [EMAIL PROTECTED] wrote:
 On 11/9/07, Marian Balakowicz [EMAIL PROTECTED] wrote:
 Please review, and if everything is ok schedule for 2.6.24-rc3.
 Just to be clear, I won't be picking up these changes until the 2.6.25
 merge window.

 The .24 tree is closed for new board support patches and is in bug fix
 only mode.
 
 Ummm; on rereading this (after getting gently nudged on IRC) I realize
 my reply was both inaccurate and just plain rude.  Sorry about that,
 it was unintentional.

Not a problem, really, no worries.

 Yes, I'll be picking up your patches into my tree fairly soon (before
 the .25 merge window opens), but I cannot ask Paul to pick it up for
 2.6.24 because .24 is only open for bug fixes.

Understand, thanks!

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


Re: [PATCH v4 04/13] [POWERPC] Add generic support for simple MPC5200 based boards

2007-11-12 Thread Marian Balakowicz
Wolfgang Denk wrote:
 In message [EMAIL PROTECTED] you wrote:
 This patch adds support for 'mpc5200-simple-platform' compatible
 boards which do not need a platform specific setup. Such boards
 are supported assuming the following:
 ...
 +const char *board[] = { 
 +tqc,tqm5200,
 +promess,motionpro,
 +schindler,cm5200,
 +NULL
 +};
 
 would it make sense to sort this list alphabetiacally? At the moment
 we can setill easily find each board, but assume that list grows to 50
 boards names...

Yes, that may be helpful, will change that.

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


Re: [PATCH v3 04/13] [POWERPC] Add generic support for simple MPC5200 based boards

2007-11-09 Thread Marian Balakowicz

Hi Stephen,

Stephen Rothwell wrote:
 
 On Tue, 06 Nov 2007 21:05:20 +0100 Marian Balakowicz [EMAIL PROTECTED] 
 wrote:
 +++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c
 +
 +#include linux/pci.h
 +#include linux/of.h
 +#include asm/time.h
 +#include asm/io.h
 
 Its not clear to me that you need any of the above four includes.

#include asm/time.h is needed for generic_calibrate_decr() but other
few includes are in fact not necessary. Thanks.

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


Re: [PATCH v3 07/13] [POWERPC] TQM5200 DTS

2007-11-09 Thread Marian Balakowicz
David Gibson wrote:
 On Tue, Nov 06, 2007 at 09:05:48PM +0100, Marian Balakowicz wrote:
 Add device tree source file for TQM5200 board.
  [snip]
 +[EMAIL PROTECTED] {
 +device_type = usb-ohci-be;
 
 This device_type is bogus.  Remember having a valid device_type is the
 exception not the rule.  Really the only common device_type values are
 cpu, memory, network and serial.

Ok, rechecked this one, doesn't seem necessary, removed.

 +[EMAIL PROTECTED] { // PSC1
 +device_type = serial;
 +compatible = mpc5200-psc-uart;
 +port-number = 0;  // Logical port assignment
 
 I know you said this is still needed, but the driver really needs to
 be fixed.  This is not a proper way of using the device tree for
 logical numbering.

True, driver needs fixing, but there are also other boards that use
that driver, and I am not able to test them right now. And, as I
recall Grant mentioned that he's working on straightening this up.

Cheers,
m.


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


Re: [PATCH v3 12/13] [POWERPC] Promess Motion-PRO DTS

2007-11-09 Thread Marian Balakowicz
David Gibson wrote:
 On Tue, Nov 06, 2007 at 09:06:34PM +0100, Marian Balakowicz wrote:
 Add device tree source file for Motion-PRO board.
 [snip]
 +[EMAIL PROTECTED] { // Motion-PRO status LED
 +compatible = promess,motionpro-statusled;
 +reg = 660 10;
 +interrupts = 1 f 0;
 +interrupt-parent = mpc5200_pic;
 +blink-delay = 64; // 100 msec
 +};
 +
 +[EMAIL PROTECTED] { // Motion-PRO ready LED
 +compatible = promess,motionpro-readyled;
 +reg = 670 10;
 +interrupts = 1 10 0;
 +interrupt-parent = mpc5200_pic;
 +};
 
 Is there actually any difference in behaviour betweeen the two LEDs?
 If not, they should probably have the same compatible value, and
 perhaps a label property or some such to associate them with a
 particular LED.

In fact they are identical, so I have used the same compatible
property and added label property do distinguish them.

 [snip]
 +[EMAIL PROTECTED] {
 +device_type = spi;
 
 No device_type!

Removed.

 +compatible = mpc5200b-spi,mpc5200-spi;
 +reg = f00 20;
 +interrupts = 2 d 0 2 e 0;
 +interrupt-parent = mpc5200_pic;
 +};
 +
 +[EMAIL PROTECTED] {
 +device_type = usb-ohci-be;
 
 Nor here.

Removed.


 [snip]
 +// PSC2 in spi master mode 
 +[EMAIL PROTECTED] { // PSC2
 +compatible = mpc5200b-psc-spi,mpc5200-psc-spi;
 +cell-index = 1;
 
From your description, this is an incorrect usage of cell-index - it
 should *only* be used to index into SoC shared registers; never for
 logical numbering.

Again true, but the situation is similar to the one with the serial
node.

Cheers,
m.

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


Re: [PATCH v3 04/13] [POWERPC] Add generic support for simple MPC5200 based boards

2007-11-09 Thread Marian Balakowicz

Hi Grant,

Grant Likely wrote:
 On 11/6/07, Wolfgang Denk [EMAIL PROTECTED] wrote:

 in message [EMAIL PROTECTED] you wrote:
 In other words; make the assumption that it is easier to change the
 kernel than it is to change the device tree.
 Are you serious about this?

 Reading this from someone with your experience with device trees if
 feeding my worst fears...
 
 I think I better clarify.
 
 Once a device tree is written and shipped on a deployed board, it may
 never change again.  Or, the kernel version may be updated more
 frequently than the device tree.
 
 Say, for example, that in kernel 2.6.25 tqm5200 and cm5200 are both
 handled by the same platform code.  And lets say that in 2.6.26 we
 decide that they really need to have separate platform code (perhaps
 due to a firmware bug that needs to be worked around on one board).
 In this case, mpc5200-simple-platform has suddenly become useless.
 Or, does mpc5200-simple-platform now describe the cm5200 or the
 tqm5200?  (an assumption which cannot be made due to deployed boards
 of both types claiming mpc5200-simple-platform).
 
 Trying to claim compatible at the board level is far more difficult
 than claiming it at the device level.
 
 Segher suggested on IRC: for boards it is pretty much useless most of
 the time, i think -- use model instead

I can imagine that we may get into various trouble (or at least the
situation is less flexible) if we are unable to update .dts file along
with the kernel image on a deployed board. If so, then in fact there
is little sens in using mpc5200-simple-platform compatible.

But how serious is that, does such situation frequently happen in
field? If we are able to update kernel image than what prevents .dts
file update?

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


[PATCH v4 00/13] [POWERPC] Add TQM5200/CM5200/Motion-PRO board support

2007-11-09 Thread Marian Balakowicz
This is a yet another version of the patches that add arch/powerpc support for
three MPC5200 based boards: TQ-Components TQM5200, Schindler CM5200
and Promess Motion-PRO.

Updates include modifications to mpc5200_simple_probe() routine in the
generic support for simple MPC5200 based boards, changes to
leds-motionpro driver - using common compatility property for both LEDs,
and few other .dts cleanups.

[POWERPC] Promess Motion-PRO defconfig
[POWERPC] Promess Motion-PRO DTS
[POWERPC] Motion-PRO: Add LED support.
[POWERPC] CM5200 defconfig
[POWERPC] CM5200 DTS
[POWERPC] TQM5200 defconfig
[POWERPC] TQM5200 DTS
[POWERPC] Use EXPORT_SYMBOL_GPL for 52xx common routines symbol export
[POWERPC] Export mpc52xx_map_node() routine symbol
[POWERPC] Add generic support for simple MPC5200 based boards
[POWERPC] Add common mpc52xx_setup_pci() routine
[POWERPC] Add 'fsl,lpb' bus type for MPC5200 LocalPlus Bus
[POWERPC] Add 'model: ...' line to common show_cpuinfo()

Please review, and if everything is ok schedule for 2.6.24-rc3.

Cheers,
m.

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


[PATCH v4 02/13] [POWERPC] Add 'fsl, lpb' bus type for MPC5200 LocalPlus Bus

2007-11-09 Thread Marian Balakowicz
Define MPC52xx specific device id list, add new
'fsl,lpb' compatible id for LocalPlus Bus.

Signed-off-by: Marian Balakowicz [EMAIL PROTECTED]
Acked-by: David Gibson [EMAIL PROTECTED]
---

 arch/powerpc/platforms/52xx/mpc52xx_common.c |9 -
 1 files changed, 8 insertions(+), 1 deletions(-)


diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c 
b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 9850685..2df97c5 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -124,11 +124,18 @@ mpc5200_setup_xlb_arbiter(void)
iounmap(xlb);
 }
 
+static struct of_device_id mpc52xx_ids[] = {
+   { .type = soc, },
+   { .compatible = soc, },
+   { .compatible = fsl,lpb, },
+   {},
+};
+
 void __init
 mpc52xx_declare_of_platform_devices(void)
 {
/* Find every child of the SOC node and add it to of_platform */
-   if (of_platform_bus_probe(NULL, NULL, NULL))
+   if (of_platform_bus_probe(NULL, mpc52xx_ids, NULL))
printk(KERN_ERR __FILE__ : 
Error while probing of_platform bus\n);
 }

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


[PATCH v4 03/13] [POWERPC] Add common mpc52xx_setup_pci() routine

2007-11-09 Thread Marian Balakowicz
This patch moves a generic pci init code from lite5200
platform file to a common mpc52xx_setup_pci() routine
and adds additional compatibility property verification.

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

 arch/powerpc/platforms/52xx/lite5200.c|   12 +---
 arch/powerpc/platforms/52xx/mpc52xx_pci.c |   15 +++
 include/asm-powerpc/mpc52xx.h |5 +
 3 files changed, 21 insertions(+), 11 deletions(-)


diff --git a/arch/powerpc/platforms/52xx/lite5200.c 
b/arch/powerpc/platforms/52xx/lite5200.c
index 25d2bfa..ce903be 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -131,10 +131,6 @@ static void lite5200_resume_finish(void __iomem *mbar)
 
 static void __init lite5200_setup_arch(void)
 {
-#ifdef CONFIG_PCI
-   struct device_node *np;
-#endif
-
if (ppc_md.progress)
ppc_md.progress(lite5200_setup_arch(), 0);
 
@@ -154,13 +150,7 @@ static void __init lite5200_setup_arch(void)
lite5200_pm_init();
 #endif
 
-#ifdef CONFIG_PCI
-   np = of_find_node_by_type(NULL, pci);
-   if (np) {
-   mpc52xx_add_bridge(np);
-   of_node_put(np);
-   }
-#endif
+   mpc52xx_setup_pci();
 }
 
 /*
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c 
b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
index 4c6c82a..89304f2 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -406,3 +406,18 @@ mpc52xx_add_bridge(struct device_node *node)
 
return 0;
 }
+
+void __init mpc52xx_setup_pci(void)
+{
+   struct device_node *pci;
+
+   pci = of_find_node_by_type(NULL, pci);
+   if (!pci)
+   return;
+
+   if (of_device_is_compatible(pci, fsl,mpc5200-pci) ||
+   of_device_is_compatible(pci, mpc5200-pci))
+   mpc52xx_add_bridge(pci);
+
+   of_node_put(pci);
+}
diff --git a/include/asm-powerpc/mpc52xx.h b/include/asm-powerpc/mpc52xx.h
index fcb2ebb..d7efbe0 100644
--- a/include/asm-powerpc/mpc52xx.h
+++ b/include/asm-powerpc/mpc52xx.h
@@ -257,7 +257,12 @@ extern void mpc52xx_declare_of_platform_devices(void);
 extern void mpc52xx_init_irq(void);
 extern unsigned int mpc52xx_get_irq(void);
 
+#ifdef CONFIG_PCI
 extern int __init mpc52xx_add_bridge(struct device_node *node);
+extern void __init mpc52xx_setup_pci(void);
+#else
+static inline void mpc52xx_setup_pci(void) { }
+#endif
 
 extern void __init mpc52xx_map_wdt(void);
 extern void mpc52xx_restart(char *cmd);

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


[PATCH v4 05/13] [POWERPC] Export mpc52xx_map_node() routine symbol

2007-11-09 Thread Marian Balakowicz
Make, so far static, mpc52xx_map_node() routine
symbol available for general use.

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

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


diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c 
b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 2df97c5..7224bfe 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -26,7 +26,7 @@
  */
 static volatile struct mpc52xx_gpt *mpc52xx_wdt = NULL;
 
-static void __iomem *
+void __iomem *
 mpc52xx_map_node(struct device_node *ofn)
 {
const u32 *regaddr_p;
@@ -47,6 +47,7 @@ mpc52xx_map_node(struct device_node *ofn)
 
return ioremap((u32)regaddr64, (u32)size64);
 }
+EXPORT_SYMBOL_GPL(mpc52xx_map_node);
 
 void __iomem *
 mpc52xx_find_and_map(const char *compatible)
diff --git a/include/asm-powerpc/mpc52xx.h b/include/asm-powerpc/mpc52xx.h
index d7efbe0..1887b13 100644
--- a/include/asm-powerpc/mpc52xx.h
+++ b/include/asm-powerpc/mpc52xx.h
@@ -248,6 +248,7 @@ struct mpc52xx_cdm {
 
 #ifndef __ASSEMBLY__
 
+extern void __iomem * mpc52xx_map_node(struct device_node *);
 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);

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


[PATCH v4 07/13] [POWERPC] TQM5200 DTS

2007-11-09 Thread Marian Balakowicz
Add device tree source file for TQM5200 board.

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

 arch/powerpc/boot/dts/tqm5200.dts |  184 +
 1 files changed, 184 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/tqm5200.dts


diff --git a/arch/powerpc/boot/dts/tqm5200.dts 
b/arch/powerpc/boot/dts/tqm5200.dts
new file mode 100644
index 000..5017cec
--- /dev/null
+++ b/arch/powerpc/boot/dts/tqm5200.dts
@@ -0,0 +1,184 @@
+/*
+ * TQM5200 board Device Tree Source
+ *
+ * Copyright (C) 2007 Semihalf
+ * 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 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 = tqc,tqm5200;
+   compatible = tqc,tqm5200;
+   #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
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg =  0400;  // 64MB
+   };
+
+   [EMAIL PROTECTED] {
+   model = fsl,mpc5200;
+   compatible = fsl,mpc5200;
+   revision = ;  // from bootloader
+   device_type = soc;
+   ranges = 0 f000 c000;
+   reg = f000 0100;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200-cdm;
+   reg = 200 38;
+   };
+
+   mpc5200_pic: [EMAIL PROTECTED] {
+   // 5200 interrupts are encoded into two levels;
+   interrupt-controller;
+   #interrupt-cells = 3;
+   compatible = mpc5200-pic;
+   reg = 500 80;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200-gpt;
+   reg = 600 10;
+   interrupts = 1 9 0;
+   interrupt-parent = mpc5200_pic;
+   fsl,has-wdt;
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200-gpio;
+   reg = b00 40;
+   interrupts = 1 7 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200-ohci,ohci-be;
+   reg = 1000 ff;
+   interrupts = 2 6 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200-bestcomm;
+   reg = 1200 80;
+   interrupts = 3 0 0  3 1 0  3 2 0  3 3 0
+ 3 4 0  3 5 0  3 6 0  3 7 0
+ 3 8 0  3 9 0  3 a 0  3 b 0
+ 3 c 0  3 d 0  3 e 0  3 f 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200-xlb;
+   reg = 1f00 100;
+   };
+
+   [EMAIL PROTECTED] { // PSC1
+   device_type = serial;
+   compatible = mpc5200-psc-uart;
+   port-number = 0;  // Logical port assignment
+   reg = 2000 100;
+   interrupts = 2 1 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // PSC2
+   device_type = serial;
+   compatible = mpc5200-psc-uart;
+   port-number = 1;  // Logical port assignment
+   reg = 2200 100

[PATCH v4 08/13] [POWERPC] TQM5200 defconfig

2007-11-09 Thread Marian Balakowicz
Add TQM5200 board defconfig file.

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

 arch/powerpc/configs/tqm5200_defconfig | 1306 
 1 files changed, 1306 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/configs/tqm5200_defconfig


diff --git a/arch/powerpc/configs/tqm5200_defconfig 
b/arch/powerpc/configs/tqm5200_defconfig
new file mode 100644
index 000..53fa968
--- /dev/null
+++ b/arch/powerpc/configs/tqm5200_defconfig
@@ -0,0 +1,1306 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23
+# Mon Oct 29 14:01:58 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_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_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_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+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_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_MPC5200_SIMPLE=y
+# CONFIG_PPC_EFIKA is not set
+# CONFIG_PPC_LITE5200 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_EMBEDDED6xx 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
+# CONFIG_PPC_BESTCOMM is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# 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

[PATCH v4 09/13] [POWERPC] CM5200 DTS

2007-11-09 Thread Marian Balakowicz
Add device tree source file for CM5200 board.

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

 arch/powerpc/boot/dts/cm5200.dts |  236 ++
 1 files changed, 236 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/cm5200.dts


diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts
new file mode 100644
index 000..9295083
--- /dev/null
+++ b/arch/powerpc/boot/dts/cm5200.dts
@@ -0,0 +1,236 @@
+/*
+ * CM5200 board Device Tree Source
+ *
+ * Copyright (C) 2007 Semihalf
+ * 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 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 = schindler,cm5200;
+   compatible = schindler,cm5200;
+   #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
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg =  0400;  // 64MB
+   };
+
+   [EMAIL PROTECTED] {
+   model = fsl,mpc5200b;
+   compatible = fsl,mpc5200b;
+   revision = ;  // from bootloader
+   device_type = soc;
+   ranges = 0 f000 c000;
+   reg = f000 0100;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200b-cdm,mpc5200-cdm;
+   reg = 200 38;
+   };
+
+   mpc5200_pic: [EMAIL PROTECTED] {
+   // 5200 interrupts are encoded into two levels;
+   interrupt-controller;
+   #interrupt-cells = 3;
+   compatible = mpc5200b-pic,mpc5200-pic;
+   reg = 500 80;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 600 10;
+   interrupts = 1 9 0;
+   interrupt-parent = mpc5200_pic;
+   fsl,has-wdt;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 610 10;
+   interrupts = 1 a 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 620 10;
+   interrupts = 1 b 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 630 10;
+   interrupts = 1 c 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 640 10;
+   interrupts = 1 d 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 650 10;
+   interrupts = 1 e 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 660 10;
+   interrupts = 1 f 0

[PATCH v4 10/13] [POWERPC] CM5200 defconfig

2007-11-09 Thread Marian Balakowicz
Add CM5200 board defconfig file.

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

 arch/powerpc/configs/cm5200_defconfig | 1031 +
 1 files changed, 1031 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/configs/cm5200_defconfig


diff --git a/arch/powerpc/configs/cm5200_defconfig 
b/arch/powerpc/configs/cm5200_defconfig
new file mode 100644
index 000..a17d966
--- /dev/null
+++ b/arch/powerpc/configs/cm5200_defconfig
@@ -0,0 +1,1031 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23
+# Mon Oct 29 14:06:34 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_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_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_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+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_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_MPC5200_SIMPLE=y
+# CONFIG_PPC_EFIKA is not set
+# CONFIG_PPC_LITE5200 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_EMBEDDED6xx 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
+# CONFIG_PPC_BESTCOMM is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# 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

[PATCH v4 11/13] [POWERPC] Motion-PRO: Add LED support

2007-11-09 Thread Marian Balakowicz
Add LED driver for Promess Motion-PRO board.

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

 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..7c422d2
--- /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/led-name/(brightness|delay_off|delay_on).
+ * See Documentation/leds-class.txt for more details.
+ * led-name 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 linux/module.h
+#include linux/leds.h
+#include linux/of_platform.h
+#include asm/mpc52xx.h
+
+/* 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_mode;
+   u32 val;
+
+   mpled = container_of(led_cdev, struct

[PATCH v4 06/13] [POWERPC] Use EXPORT_SYMBOL_GPL for 52xx common routines symbol export

2007-11-09 Thread Marian Balakowicz
Replace EXPORT_SYMBOL with EXPORT_SYMBOL_GPL in mpc52xx_common.c

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

 arch/powerpc/platforms/52xx/mpc52xx_common.c |8 +++-
 1 files changed, 3 insertions(+), 5 deletions(-)


diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c 
b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 7224bfe..c9e1ab9 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -55,16 +55,14 @@ mpc52xx_find_and_map(const char *compatible)
return mpc52xx_map_node(
of_find_compatible_node(NULL, NULL, compatible));
 }
-
-EXPORT_SYMBOL(mpc52xx_find_and_map);
+EXPORT_SYMBOL_GPL(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);
+EXPORT_SYMBOL_GPL(mpc52xx_find_and_map_path);
 
 /**
  * mpc52xx_find_ipb_freq - Find the IPB bus frequency for a device
@@ -93,7 +91,7 @@ mpc52xx_find_ipb_freq(struct device_node *node)
 
return p_ipb_freq ? *p_ipb_freq : 0;
 }
-EXPORT_SYMBOL(mpc52xx_find_ipb_freq);
+EXPORT_SYMBOL_GPL(mpc52xx_find_ipb_freq);
 
 
 /*

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


[PATCH v4 12/13] [POWERPC] Promess Motion-PRO DTS

2007-11-09 Thread Marian Balakowicz
Add device tree source file for Motion-PRO board.

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

 arch/powerpc/boot/dts/motionpro.dts |  309 +++
 1 files changed, 309 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/motionpro.dts


diff --git a/arch/powerpc/boot/dts/motionpro.dts 
b/arch/powerpc/boot/dts/motionpro.dts
new file mode 100644
index 000..d8c316a
--- /dev/null
+++ b/arch/powerpc/boot/dts/motionpro.dts
@@ -0,0 +1,309 @@
+/*
+ * Motion-PRO board Device Tree Source
+ *
+ * Copyright (C) 2007 Semihalf
+ * 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 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 = promess,motionpro;
+   compatible = promess,motionpro;
+   #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
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg =  0400;  // 64MB
+   };
+
+   [EMAIL PROTECTED] {
+   model = fsl,mpc5200b;
+   compatible = fsl,mpc5200b;
+   revision = ;  // from bootloader
+   device_type = soc;
+   ranges = 0 f000 c000;
+   reg = f000 0100;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200b-cdm,mpc5200-cdm;
+   reg = 200 38;
+   };
+
+   mpc5200_pic: [EMAIL PROTECTED] {
+   // 5200 interrupts are encoded into two levels;
+   interrupt-controller;
+   #interrupt-cells = 3;
+   compatible = mpc5200b-pic,mpc5200-pic;
+   reg = 500 80;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 600 10;
+   interrupts = 1 9 0;
+   interrupt-parent = mpc5200_pic;
+   fsl,has-wdt;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 610 10;
+   interrupts = 1 a 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 620 10;
+   interrupts = 1 b 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 630 10;
+   interrupts = 1 c 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 640 10;
+   interrupts = 1 d 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 650 10;
+   interrupts = 1 e 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // Motion-PRO status LED
+   compatible = promess,motionpro-led;
+   label = motionpro-statusled;
+   reg = 660 10

[PATCH v4 13/13] [POWERPC] Promess Motion-PRO defconfig

2007-11-09 Thread Marian Balakowicz
Add Motion-PRO board defconfig file.

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

 arch/powerpc/configs/motionpro_defconfig |  989 ++
 1 files changed, 989 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/configs/motionpro_defconfig


diff --git a/arch/powerpc/configs/motionpro_defconfig 
b/arch/powerpc/configs/motionpro_defconfig
new file mode 100644
index 000..fd7a327
--- /dev/null
+++ b/arch/powerpc/configs/motionpro_defconfig
@@ -0,0 +1,989 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23
+# Mon Oct 29 14:11:27 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_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_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_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+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_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_MPC5200_SIMPLE=y
+# CONFIG_PPC_EFIKA is not set
+# CONFIG_PPC_LITE5200 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_EMBEDDED6xx 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
+# CONFIG_PPC_BESTCOMM is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# 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

Re: [PATCH v2 05/12] [POWERPC] Export mpc52xx_map_node() routine symbol

2007-11-06 Thread Marian Balakowicz

Hi Stephan,

Stephen Rothwell wrote:
 
 On Sun, 04 Nov 2007 00:52:40 +0100 Marian Balakowicz [EMAIL PROTECTED] 
 wrote:
 -static void __iomem *
 +void __iomem *
  mpc52xx_map_node(struct device_node *ofn)
  {
  const u32 *regaddr_p;
 @@ -48,6 +48,8 @@ mpc52xx_map_node(struct device_node *ofn)
  return ioremap((u32)regaddr64, (u32)size64);
  }
  
 +EXPORT_SYMBOL(mpc52xx_map_node);
 +
 
 We generally don't leave a blank line between a function an its
 EXPORT_SYMBOL().

Will fix that.

 Also, any reason not to use EXPORT_SYMBOL_GPL?

No, no particular reason, I used EXPORT_SYMBOL because it's used for
exporting symbols in this file. But that's good point, I'll switch  to
EXPORT_SYMBOL_GPL and I guess it would be nice to convert other
EXPORT_SYMBOL to EXPORT_SYMBOL_GPL as well, but that would be a
separate patch.

Cheers,
m.


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


Re: [PATCH v2 10/12] [POWERPC] Motion-PRO: Add LED support.

2007-11-06 Thread Marian Balakowicz

Hi Stephen,

Stephen Rothwell wrote:
 On Sun, 04 Nov 2007 00:53:11 +0100 Marian Balakowicz [EMAIL PROTECTED] 
 wrote:
 +++ b/drivers/leds/leds-motionpro.c
[snip]
 +#include asm/io.h
 +#include asm/of_platform.h
 
 You want linux/of_platform.h instead of asm/.. and probably not
 linux/platform_device.h above.
[snip]

Thanks for comments, I'll apply your suggestions for v3 respin of the
patches.

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


Re: [PATCH v2 08/12] [POWERPC] CM5200 DTS

2007-11-06 Thread Marian Balakowicz
David Gibson wrote:
 On Sun, Nov 04, 2007 at 12:52:59AM +0100, Marian Balakowicz wrote:
 Add device tree source file for CM5200 board.
 [snip]
 +[EMAIL PROTECTED] { // Real time clock
 +compatible = mpc5200b-rtc,mpc5200-rtc;
 +device_type = rtc;
 
 No device_type here.
 
 [snip]
 +[EMAIL PROTECTED] {
 +device_type = spi;
 
 Definitely no device_type here.
 
 +compatible = mpc5200b-spi,mpc5200-spi;
 +reg = f00 20;
 +interrupts = 2 d 0 2 e 0;
 +interrupt-parent = mpc5200_pic;
 +};
 
 [snip]
 +[EMAIL PROTECTED] {
 +device_type = i2c;
 
 No device_type here.

OK, device_type removed for the above devices.

Thanks
m.

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


Re: [PATCH v2 06/12] [POWERPC] TQM5200 DTS

2007-11-06 Thread Marian Balakowicz
David Gibson wrote:
 On Sun, Nov 04, 2007 at 12:52:47AM +0100, Marian Balakowicz wrote:
 Add device tree source file for TQM5200 board.
 [snip]
 +[EMAIL PROTECTED] {
 
 [EMAIL PROTECTED] is the new convention, I believe, but I guess you need
 compatibility with older bootstraps.

Correct, we stick with 'soc5200' due to hardcoded paths in U-boot.

 
 +model = fsl,mpc5200;
 +compatible = mpc5200;
 
 This compatible looks bogus; it should have the fsl, at least.

Added 'fsl,'.

 [snip]
 +mpc5200_pic: [EMAIL PROTECTED] {
 +// 5200 interrupts are encoded into two levels;
 +interrupt-controller;
 +#interrupt-cells = 3;
 +device_type = interrupt-controller;
 
 No device_type here.

Removed it.

 
 +compatible = mpc5200-pic;
 +reg = 500 80;
 +};
 +
 +[EMAIL PROTECTED] { // General Purpose Timer
 +compatible = fsl,mpc5200-gpt;
 +cell-index = 0;
 
 Ok, is this actually a suitable usage for cell-index?  It should only
 be used when the cell-index number is used to program some soc-global
 register.  It should not be used just for ordering or logical-indexing
 purposes.

Rechecked that and it's not being used anywhere. Removed.

 [snip]
 +[EMAIL PROTECTED] { // PSC1
 +device_type = serial;
 +compatible = mpc5200-psc-uart;
 +port-number = 0;  // Logical port assignment
 +cell-index = 0;
 
 Ditto w.r.t. cell-index.

Not used, removed.

 port-number also looks bogus - the device tree should not generally
 contain logical numbering information in this manner.  How and what
 uses the port-number property?

'port-number' is used by serial driver (mpc52xx_uart.c), if present it
 assigns a device number (/dev/PSCport-number) for given serial port.
That allows to override default auto-numbering.

 +[EMAIL PROTECTED] {
 +compatible = mpc5200-sram,sram;
 
 Uh.. is there an sram binding?  sram doesn't look specific enough
 for a compatible property.

Right, removed sram.

Thanks,
m.


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


Re: [PATCH v2 11/12] [POWERPC] Promess Motion-PRO DTS

2007-11-06 Thread Marian Balakowicz
David Gibson wrote:
 On Sun, Nov 04, 2007 at 12:53:17AM +0100, Marian Balakowicz wrote:
 Add device tree source file for Motion-PRO board.
 [snip]
 +[EMAIL PROTECTED] { // Motion-PRO status LED
 +compatible = promess,motionpro-statusled;
 +cell-index = 6;
 +reg = 660 10;
 +interrupts = 1 f 0;
 +interrupt-parent = mpc5200_pic;
 +blink-delay = 64; // 100 msec
 +};
 +
 +[EMAIL PROTECTED] { // Motion-PRO ready LED
 +compatible = promess,motionpro-readyled;
 +cell-index = 7;
 
 These cell-index values for the LEDs look very strange.  How are they
 used?
[snip]
 +
 +[EMAIL PROTECTED] {
 +compatible = mpc5200b-mscan,mpc5200-mscan;
 +cell-index = 1;
 
 As for serial and gpt, is cell-index really suitable here?

Ok, removed those unused cell-index properties.

 [snip]
 +[EMAIL PROTECTED] {
 +device_type = spi;
 +compatible = mpc5200b-spi,mpc5200-spi;
 +reg = f00 20;
 +interrupts = 2 d 0 2 e 0;
 +interrupt-parent = mpc5200_pic;
 +};
 [snip]
 +// PSC2 in spi master mode 
 +[EMAIL PROTECTED] { // PSC2
 +device_type = spi;
 +compatible = mpc5200b-psc-spi,mpc5200-psc-spi;
 +cell-index = 1;
 
 cell-index present for one spi, but not the other makes be even more
 suspicious about it's applicability here...

These are two different SPIs, both are part of the SoC but first one
is dedicated SPI interface while the second one is PSC port in a SPI
mode. Driver for the second one (mpc52xx_psc_spi.c) is actually using
cell-index to get the PSC port number it's controlling.

 [snip]
 +lpb {
 +model = fsl,lpb;
 +compatible = fsl,lpb;
 
 Is lpb another one of these chipselect/offset configurable bus bridge
 things?  If so, you should use a 2-cell addressing convention for the
 subnodes like fsl localbus and 4xx EBC.

Yes, it is, so I have switched to 2-cell addressing. Please see the v3
respin of the patches.


 +// 8-bit custom Anybus Module on LocalPlus Bus CS3
 +anybus5002 {
 
 Missing '@'.

Fixed.

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


[PATCH v3 00/13] [POWERPC] Add TQM5200/CM5200/Motion-PRO board support

2007-11-06 Thread Marian Balakowicz
This is a third version of the patches that add arch/powerpc support for
three MPC5200 based boards: TQ-Components TQM5200, Schindler CM5200
and Promess Motion-PRO.

[POWERPC] Promess Motion-PRO defconfig
[POWERPC] Promess Motion-PRO DTS
[POWERPC] Motion-PRO: Add LED support.
[POWERPC] CM5200 defconfig
[POWERPC] CM5200 DTS
[POWERPC] TQM5200 defconfig
[POWERPC] TQM5200 DTS
[POWERPC] Use EXPORT_SYMBOL_GPL for 52xx common routines symbol export
[POWERPC] Export mpc52xx_map_node() routine symbol
[POWERPC] Add generic support for simple MPC5200 based boards
[POWERPC] Add common mpc52xx_setup_pci() routine
[POWERPC] Add 'fsl,lpb' bus type for MPC5200 LocalPlus Bus
[POWERPC] Add 'model: ...' line to common show_cpuinfo()

Please review them and schedule for 2.6.24-rc2 if you are ok with them.

Cheers,
m.

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


[PATCH v3 01/13] [POWERPC] Add 'model: ...' line to common show_cpuinfo()

2007-11-06 Thread Marian Balakowicz
Print out 'model' property of '/' node as a machine name
in generic show_cpuinfo() routine.

Signed-off-by: Marian Balakowicz [EMAIL PROTECTED]
Acked-by: David Gibson [EMAIL PROTECTED]
Acked-by: Olof Johansson [EMAIL PROTECTED]
---

 arch/powerpc/kernel/setup-common.c |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)


diff --git a/arch/powerpc/kernel/setup-common.c 
b/arch/powerpc/kernel/setup-common.c
index 2de00f8..cb291f1 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -165,6 +165,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
unsigned short min;
 
if (cpu_id == NR_CPUS) {
+   struct device_node *root;
+   const char *model = NULL;
 #if defined(CONFIG_SMP)  defined(CONFIG_PPC32)
unsigned long bogosum = 0;
int i;
@@ -176,6 +178,13 @@ static int show_cpuinfo(struct seq_file *m, void *v)
seq_printf(m, timebase\t: %lu\n, ppc_tb_freq);
if (ppc_md.name)
seq_printf(m, platform\t: %s\n, ppc_md.name);
+   root = of_find_node_by_path(/);
+   if (root)
+   model = of_get_property(root, model, NULL);
+   of_node_put(root);
+   if (model)
+   seq_printf(m, model\t\t: %s\n, model);
+
if (ppc_md.show_cpuinfo != NULL)
ppc_md.show_cpuinfo(m);
 

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


[PATCH v3 02/13] [POWERPC] Add 'fsl, lpb' bus type for MPC5200 LocalPlus Bus

2007-11-06 Thread Marian Balakowicz
Define MPC52xx specific device id list, add new
'fsl,lpb' compatible id for LocalPlus Bus.

Signed-off-by: Marian Balakowicz [EMAIL PROTECTED]
Acked-by: David Gibson [EMAIL PROTECTED]
---

 arch/powerpc/platforms/52xx/mpc52xx_common.c |9 -
 1 files changed, 8 insertions(+), 1 deletions(-)


diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c 
b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 9850685..2df97c5 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -124,11 +124,18 @@ mpc5200_setup_xlb_arbiter(void)
iounmap(xlb);
 }
 
+static struct of_device_id mpc52xx_ids[] = {
+   { .type = soc, },
+   { .compatible = soc, },
+   { .compatible = fsl,lpb, },
+   {},
+};
+
 void __init
 mpc52xx_declare_of_platform_devices(void)
 {
/* Find every child of the SOC node and add it to of_platform */
-   if (of_platform_bus_probe(NULL, NULL, NULL))
+   if (of_platform_bus_probe(NULL, mpc52xx_ids, NULL))
printk(KERN_ERR __FILE__ : 
Error while probing of_platform bus\n);
 }

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


[PATCH v3 03/13] [POWERPC] Add common mpc52xx_setup_pci() routine

2007-11-06 Thread Marian Balakowicz
This patch moves a generic pci init code from lite5200
platform file to a common mpc52xx_setup_pci() routine
and adds additional compatibility property verification.

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

 arch/powerpc/platforms/52xx/lite5200.c|   12 +---
 arch/powerpc/platforms/52xx/mpc52xx_pci.c |   15 +++
 include/asm-powerpc/mpc52xx.h |5 +
 3 files changed, 21 insertions(+), 11 deletions(-)


diff --git a/arch/powerpc/platforms/52xx/lite5200.c 
b/arch/powerpc/platforms/52xx/lite5200.c
index 25d2bfa..ce903be 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -131,10 +131,6 @@ static void lite5200_resume_finish(void __iomem *mbar)
 
 static void __init lite5200_setup_arch(void)
 {
-#ifdef CONFIG_PCI
-   struct device_node *np;
-#endif
-
if (ppc_md.progress)
ppc_md.progress(lite5200_setup_arch(), 0);
 
@@ -154,13 +150,7 @@ static void __init lite5200_setup_arch(void)
lite5200_pm_init();
 #endif
 
-#ifdef CONFIG_PCI
-   np = of_find_node_by_type(NULL, pci);
-   if (np) {
-   mpc52xx_add_bridge(np);
-   of_node_put(np);
-   }
-#endif
+   mpc52xx_setup_pci();
 }
 
 /*
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c 
b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
index 4c6c82a..89304f2 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -406,3 +406,18 @@ mpc52xx_add_bridge(struct device_node *node)
 
return 0;
 }
+
+void __init mpc52xx_setup_pci(void)
+{
+   struct device_node *pci;
+
+   pci = of_find_node_by_type(NULL, pci);
+   if (!pci)
+   return;
+
+   if (of_device_is_compatible(pci, fsl,mpc5200-pci) ||
+   of_device_is_compatible(pci, mpc5200-pci))
+   mpc52xx_add_bridge(pci);
+
+   of_node_put(pci);
+}
diff --git a/include/asm-powerpc/mpc52xx.h b/include/asm-powerpc/mpc52xx.h
index fcb2ebb..d7efbe0 100644
--- a/include/asm-powerpc/mpc52xx.h
+++ b/include/asm-powerpc/mpc52xx.h
@@ -257,7 +257,12 @@ extern void mpc52xx_declare_of_platform_devices(void);
 extern void mpc52xx_init_irq(void);
 extern unsigned int mpc52xx_get_irq(void);
 
+#ifdef CONFIG_PCI
 extern int __init mpc52xx_add_bridge(struct device_node *node);
+extern void __init mpc52xx_setup_pci(void);
+#else
+static inline void mpc52xx_setup_pci(void) { }
+#endif
 
 extern void __init mpc52xx_map_wdt(void);
 extern void mpc52xx_restart(char *cmd);

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


[PATCH v3 04/13] [POWERPC] Add generic support for simple MPC5200 based boards

2007-11-06 Thread Marian Balakowicz
This patch adds support for 'mpc5200-simple-platform' compatible
boards which do not need a platform specific setup. Such boards
are supported assuming the following:

- GPIO pins are configured by the firmware,
- CDM configuration (clocking) is setup correctly by firmware,
- if the 'fsl,has-wdt' property is present in one of the
  gpt nodes, then it is safe to use such gpt to reset the board,
- PCI is supported if enabled in the kernel configuration

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

 arch/powerpc/boot/dts/lite5200.dts   |2 -
 arch/powerpc/boot/dts/lite5200b.dts  |2 -
 arch/powerpc/platforms/52xx/Kconfig  |   18 ++-
 arch/powerpc/platforms/52xx/Makefile |1 
 arch/powerpc/platforms/52xx/mpc5200_simple.c |   72 ++
 5 files changed, 91 insertions(+), 4 deletions(-)
 create mode 100644 arch/powerpc/platforms/52xx/mpc5200_simple.c


diff --git a/arch/powerpc/boot/dts/lite5200.dts 
b/arch/powerpc/boot/dts/lite5200.dts
index 6731763..5902362 100644
--- a/arch/powerpc/boot/dts/lite5200.dts
+++ b/arch/powerpc/boot/dts/lite5200.dts
@@ -19,7 +19,7 @@
 / {
model = fsl,lite5200;
// revision = 1.0;
-   compatible = fsl,lite5200,generic-mpc5200;
+   compatible = fsl,lite5200;
#address-cells = 1;
#size-cells = 1;
 
diff --git a/arch/powerpc/boot/dts/lite5200b.dts 
b/arch/powerpc/boot/dts/lite5200b.dts
index b540388..b509129 100644
--- a/arch/powerpc/boot/dts/lite5200b.dts
+++ b/arch/powerpc/boot/dts/lite5200b.dts
@@ -19,7 +19,7 @@
 / {
model = fsl,lite5200b;
// revision = 1.0;
-   compatible = fsl,lite5200b,generic-mpc5200;
+   compatible = fsl,lite5200b;
#address-cells = 1;
#size-cells = 1;
 
diff --git a/arch/powerpc/platforms/52xx/Kconfig 
b/arch/powerpc/platforms/52xx/Kconfig
index 2938d49..b8a6ebc 100644
--- a/arch/powerpc/platforms/52xx/Kconfig
+++ b/arch/powerpc/platforms/52xx/Kconfig
@@ -19,6 +19,22 @@ config PPC_MPC5200_BUGFIX
 
  It is safe to say 'Y' here
 
+config PPC_MPC5200_SIMPLE
+   bool Generic support for simple MPC5200 based boards
+   depends on PPC_MULTIPLATFORM  PPC32
+   select PPC_MPC5200
+   default n
+   help
+ This option enables support for a simple MPC52xx based boards which
+ do not need a custom platform specific setup. Such boards are
+ supported assuming the following:
+
+ - GPIO pins are configured by the firmware,
+ - CDM configuration (clocking) is setup correctly by firmware,
+ - if the 'fsl,has-wdt' property is present in one of the
+   gpt nodes, then it is safe to use such gpt to reset the board,
+ - PCI is supported if enabled in the kernel configuration
+
 config PPC_EFIKA
bool bPlan Efika 5k2. MPC5200B based computer
depends on PPC_MULTIPLATFORM  PPC32
@@ -34,5 +50,3 @@ config PPC_LITE5200
select WANT_DEVICE_TREE
select PPC_MPC5200
default n
-
-
diff --git a/arch/powerpc/platforms/52xx/Makefile 
b/arch/powerpc/platforms/52xx/Makefile
index 307dbc1..fe1b81b 100644
--- a/arch/powerpc/platforms/52xx/Makefile
+++ b/arch/powerpc/platforms/52xx/Makefile
@@ -6,6 +6,7 @@ obj-y   += mpc52xx_pic.o 
mpc52xx_common.o
 obj-$(CONFIG_PCI)  += mpc52xx_pci.o
 endif
 
+obj-$(CONFIG_PPC_MPC5200_SIMPLE) += mpc5200_simple.o
 obj-$(CONFIG_PPC_EFIKA)+= efika.o
 obj-$(CONFIG_PPC_LITE5200) += lite5200.o
 
diff --git a/arch/powerpc/platforms/52xx/mpc5200_simple.c 
b/arch/powerpc/platforms/52xx/mpc5200_simple.c
new file mode 100644
index 000..618cf24
--- /dev/null
+++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c
@@ -0,0 +1,72 @@
+/*
+ * Support for 'mpc5200-simple-platform' compatible boards.
+ *
+ * Written by Marian Balakowicz [EMAIL PROTECTED]
+ * Copyright (C) 2007 Semihalf
+ *
+ * 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.
+ *
+ * Description:
+ * This code implements support for a simple MPC52xx based boards which
+ * do not need a custom platform specific setup. Such boards are
+ * supported assuming the following:
+ *
+ * - GPIO pins are configured by the firmware,
+ * - CDM configuration (clocking) is setup correctly by firmware,
+ * - if the 'fsl,has-wdt' property is present in one of the
+ *   gpt nodes, then it is safe to use such gpt to reset the board,
+ * - PCI is supported if enabled in the kernel configuration
+ */
+
+#undef DEBUG
+#include linux/init.h
+#include linux/pci.h
+#include linux/of.h
+#include asm/time.h
+#include asm/io.h
+#include asm/machdep.h
+#include asm/prom.h
+#include asm/mpc52xx.h
+
+/*
+ * Setup the architecture
+ */
+static void __init mpc5200_simple_setup_arch(void

[PATCH v3 05/13] [POWERPC] Export mpc52xx_map_node() routine symbol

2007-11-06 Thread Marian Balakowicz
Make, so far static, mpc52xx_map_node() routine
symbol available for general use.

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

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


diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c 
b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 2df97c5..7224bfe 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -26,7 +26,7 @@
  */
 static volatile struct mpc52xx_gpt *mpc52xx_wdt = NULL;
 
-static void __iomem *
+void __iomem *
 mpc52xx_map_node(struct device_node *ofn)
 {
const u32 *regaddr_p;
@@ -47,6 +47,7 @@ mpc52xx_map_node(struct device_node *ofn)
 
return ioremap((u32)regaddr64, (u32)size64);
 }
+EXPORT_SYMBOL_GPL(mpc52xx_map_node);
 
 void __iomem *
 mpc52xx_find_and_map(const char *compatible)
diff --git a/include/asm-powerpc/mpc52xx.h b/include/asm-powerpc/mpc52xx.h
index d7efbe0..1887b13 100644
--- a/include/asm-powerpc/mpc52xx.h
+++ b/include/asm-powerpc/mpc52xx.h
@@ -248,6 +248,7 @@ struct mpc52xx_cdm {
 
 #ifndef __ASSEMBLY__
 
+extern void __iomem * mpc52xx_map_node(struct device_node *);
 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);

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


[PATCH v3 06/13] [POWERPC] Use EXPORT_SYMBOL_GPL for 52xx common routines symbol export

2007-11-06 Thread Marian Balakowicz
Replace EXPORT_SYMBOL with EXPORT_SYMBOL_GPL in mpc52xx_common.c

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

 arch/powerpc/platforms/52xx/mpc52xx_common.c |8 +++-
 1 files changed, 3 insertions(+), 5 deletions(-)


diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c 
b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 7224bfe..c9e1ab9 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -55,16 +55,14 @@ mpc52xx_find_and_map(const char *compatible)
return mpc52xx_map_node(
of_find_compatible_node(NULL, NULL, compatible));
 }
-
-EXPORT_SYMBOL(mpc52xx_find_and_map);
+EXPORT_SYMBOL_GPL(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);
+EXPORT_SYMBOL_GPL(mpc52xx_find_and_map_path);
 
 /**
  * mpc52xx_find_ipb_freq - Find the IPB bus frequency for a device
@@ -93,7 +91,7 @@ mpc52xx_find_ipb_freq(struct device_node *node)
 
return p_ipb_freq ? *p_ipb_freq : 0;
 }
-EXPORT_SYMBOL(mpc52xx_find_ipb_freq);
+EXPORT_SYMBOL_GPL(mpc52xx_find_ipb_freq);
 
 
 /*

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


[PATCH v3 07/13] [POWERPC] TQM5200 DTS

2007-11-06 Thread Marian Balakowicz
Add device tree source file for TQM5200 board.

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

 arch/powerpc/boot/dts/tqm5200.dts |  185 +
 1 files changed, 185 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/tqm5200.dts


diff --git a/arch/powerpc/boot/dts/tqm5200.dts 
b/arch/powerpc/boot/dts/tqm5200.dts
new file mode 100644
index 000..24d5369
--- /dev/null
+++ b/arch/powerpc/boot/dts/tqm5200.dts
@@ -0,0 +1,185 @@
+/*
+ * TQM5200 board Device Tree Source
+ *
+ * Copyright (C) 2007 Semihalf
+ * 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 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 = tqc,tqm5200;
+   compatible = tqc,tqm5200,mpc5200-simple-platform;
+   #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
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg =  0400;  // 64MB
+   };
+
+   [EMAIL PROTECTED] {
+   model = fsl,mpc5200;
+   compatible = fsl,mpc5200;
+   revision = ;  // from bootloader
+   device_type = soc;
+   ranges = 0 f000 c000;
+   reg = f000 0100;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200-cdm;
+   reg = 200 38;
+   };
+
+   mpc5200_pic: [EMAIL PROTECTED] {
+   // 5200 interrupts are encoded into two levels;
+   interrupt-controller;
+   #interrupt-cells = 3;
+   compatible = mpc5200-pic;
+   reg = 500 80;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200-gpt;
+   reg = 600 10;
+   interrupts = 1 9 0;
+   interrupt-parent = mpc5200_pic;
+   fsl,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,ohci-be;
+   reg = 1000 ff;
+   interrupts = 2 6 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200-bestcomm;
+   reg = 1200 80;
+   interrupts = 3 0 0  3 1 0  3 2 0  3 3 0
+ 3 4 0  3 5 0  3 6 0  3 7 0
+ 3 8 0  3 9 0  3 a 0  3 b 0
+ 3 c 0  3 d 0  3 e 0  3 f 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200-xlb;
+   reg = 1f00 100;
+   };
+
+   [EMAIL PROTECTED] { // PSC1
+   device_type = serial;
+   compatible = mpc5200-psc-uart;
+   port-number = 0;  // Logical port assignment
+   reg = 2000 100;
+   interrupts = 2 1 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // PSC2
+   device_type = serial;
+   compatible = mpc5200-psc-uart;
+   port-number

[PATCH v3 08/13] [POWERPC] TQM5200 defconfig

2007-11-06 Thread Marian Balakowicz
Add TQM5200 board defconfig file.

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

 arch/powerpc/configs/tqm5200_defconfig | 1306 
 1 files changed, 1306 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/configs/tqm5200_defconfig


diff --git a/arch/powerpc/configs/tqm5200_defconfig 
b/arch/powerpc/configs/tqm5200_defconfig
new file mode 100644
index 000..53fa968
--- /dev/null
+++ b/arch/powerpc/configs/tqm5200_defconfig
@@ -0,0 +1,1306 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23
+# Mon Oct 29 14:01:58 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_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_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_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+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_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_MPC5200_SIMPLE=y
+# CONFIG_PPC_EFIKA is not set
+# CONFIG_PPC_LITE5200 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_EMBEDDED6xx 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
+# CONFIG_PPC_BESTCOMM is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# 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

[PATCH v3 10/13] [POWERPC] CM5200 defconfig

2007-11-06 Thread Marian Balakowicz
Add CM5200 board defconfig file.

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

 arch/powerpc/configs/cm5200_defconfig | 1031 +
 1 files changed, 1031 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/configs/cm5200_defconfig


diff --git a/arch/powerpc/configs/cm5200_defconfig 
b/arch/powerpc/configs/cm5200_defconfig
new file mode 100644
index 000..a17d966
--- /dev/null
+++ b/arch/powerpc/configs/cm5200_defconfig
@@ -0,0 +1,1031 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23
+# Mon Oct 29 14:06:34 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_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_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_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+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_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_MPC5200_SIMPLE=y
+# CONFIG_PPC_EFIKA is not set
+# CONFIG_PPC_LITE5200 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_EMBEDDED6xx 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
+# CONFIG_PPC_BESTCOMM is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# 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

[PATCH v3 12/13] [POWERPC] Promess Motion-PRO DTS

2007-11-06 Thread Marian Balakowicz
Add device tree source file for Motion-PRO board.

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

 arch/powerpc/boot/dts/motionpro.dts |  309 +++
 1 files changed, 309 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/motionpro.dts


diff --git a/arch/powerpc/boot/dts/motionpro.dts 
b/arch/powerpc/boot/dts/motionpro.dts
new file mode 100644
index 000..6124dd5
--- /dev/null
+++ b/arch/powerpc/boot/dts/motionpro.dts
@@ -0,0 +1,309 @@
+/*
+ * Motion-PRO board Device Tree Source
+ *
+ * Copyright (C) 2007 Semihalf
+ * 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 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 = promess,motionpro;
+   compatible = promess,motionpro,mpc5200-simple-platform;
+   #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
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg =  0400;  // 64MB
+   };
+
+   [EMAIL PROTECTED] {
+   model = fsl,mpc5200b;
+   compatible = fsl,mpc5200b;
+   revision = ;  // from bootloader
+   device_type = soc;
+   ranges = 0 f000 c000;
+   reg = f000 0100;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200b-cdm,mpc5200-cdm;
+   reg = 200 38;
+   };
+
+   mpc5200_pic: [EMAIL PROTECTED] {
+   // 5200 interrupts are encoded into two levels;
+   interrupt-controller;
+   #interrupt-cells = 3;
+   compatible = mpc5200b-pic,mpc5200-pic;
+   reg = 500 80;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 600 10;
+   interrupts = 1 9 0;
+   interrupt-parent = mpc5200_pic;
+   fsl,has-wdt;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 610 10;
+   interrupts = 1 a 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 620 10;
+   interrupts = 1 b 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 630 10;
+   interrupts = 1 c 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 640 10;
+   interrupts = 1 d 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 650 10;
+   interrupts = 1 e 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // Motion-PRO status LED
+   compatible = promess,motionpro-statusled;
+   reg = 660 10

[PATCH v3 11/13] [POWERPC] Motion-PRO: Add LED support

2007-11-06 Thread Marian Balakowicz
Add LED driver for Promess Motion-PRO board.

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

 drivers/leds/Kconfig  |7 +
 drivers/leds/Makefile |3 -
 drivers/leds/leds-motionpro.c |  243 +
 include/asm-powerpc/mpc52xx.h |5 +
 4 files changed, 257 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..11b283f
--- /dev/null
+++ b/drivers/leds/leds-motionpro.c
@@ -0,0 +1,243 @@
+/*
+ * 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/led-name/(brightness|delay_off|delay_on).
+ * See Documentation/leds-class.txt for more details.
+ * led-name is the set to the corresponding GPT node name.
+ *
+ * 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).
+ *
+ */
+
+#undef DEBUG
+
+#include linux/module.h
+#include linux/types.h
+#include linux/kernel.h
+#include linux/leds.h
+#include linux/vmalloc.h
+#include linux/of_platform.h
+
+#include asm/mpc52xx.h
+#include asm/io.h
+
+/* 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_mode

[PATCH v3 13/13] [POWERPC] Promess Motion-PRO defconfig

2007-11-06 Thread Marian Balakowicz
Add Motion-PRO board defconfig file.

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

 arch/powerpc/configs/motionpro_defconfig |  989 ++
 1 files changed, 989 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/configs/motionpro_defconfig


diff --git a/arch/powerpc/configs/motionpro_defconfig 
b/arch/powerpc/configs/motionpro_defconfig
new file mode 100644
index 000..fd7a327
--- /dev/null
+++ b/arch/powerpc/configs/motionpro_defconfig
@@ -0,0 +1,989 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23
+# Mon Oct 29 14:11:27 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_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_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_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+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_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_MPC5200_SIMPLE=y
+# CONFIG_PPC_EFIKA is not set
+# CONFIG_PPC_LITE5200 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_EMBEDDED6xx 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
+# CONFIG_PPC_BESTCOMM is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# 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

[PATCH v2 00/12] [POWERPC] Add TQM5200/CM5200/Motion-PRO board support

2007-11-03 Thread Marian Balakowicz
This is a secon respin of the patches that add arch/powerpc support for
three MPC5200 based boards: TQ-Components TQM5200, Schindler CM5200
and Promess Motion-PRO. Please review.

[POWERPC] Promess Motion-PRO defconfig
[POWERPC] Promess Motion-PRO DTS
[POWERPC] Motion-PRO: Add LED support.
[POWERPC] CM5200 defconfig
[POWERPC] CM5200 DTS
[POWERPC] TQM5200 defconfig
[POWERPC] TQM5200 DTS
[POWERPC] Export mpc52xx_map_node() routine symbol
[POWERPC] Add generic support for simple MPC5200 based boards
[POWERPC] Add common mpc52xx_setup_pci() routine
[POWERPC] Add 'fsl,lpb' bus type for MPC5200 LocalPlus Bus
[POWERPC] Add 'model: ...' line to common show_cpuinfo()

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


[PATCH v2 01/12] [POWERPC] Add 'model: ...' line to common show_cpuinfo()

2007-11-03 Thread Marian Balakowicz
Print out 'model' property of '/' node as a machine name
in generic show_cpuinfo() routine.

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

 arch/powerpc/kernel/setup-common.c |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)


diff --git a/arch/powerpc/kernel/setup-common.c 
b/arch/powerpc/kernel/setup-common.c
index 2de00f8..cb291f1 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -165,6 +165,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
unsigned short min;
 
if (cpu_id == NR_CPUS) {
+   struct device_node *root;
+   const char *model = NULL;
 #if defined(CONFIG_SMP)  defined(CONFIG_PPC32)
unsigned long bogosum = 0;
int i;
@@ -176,6 +178,13 @@ static int show_cpuinfo(struct seq_file *m, void *v)
seq_printf(m, timebase\t: %lu\n, ppc_tb_freq);
if (ppc_md.name)
seq_printf(m, platform\t: %s\n, ppc_md.name);
+   root = of_find_node_by_path(/);
+   if (root)
+   model = of_get_property(root, model, NULL);
+   of_node_put(root);
+   if (model)
+   seq_printf(m, model\t\t: %s\n, model);
+
if (ppc_md.show_cpuinfo != NULL)
ppc_md.show_cpuinfo(m);
 

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


[PATCH v2 02/12] [POWERPC] Add 'fsl, lpb' bus type for MPC5200 LocalPlus Bus

2007-11-03 Thread Marian Balakowicz
Define MPC52xx specific device id list, add new
'fsl,lpb' compatible id for LocalPlus Bus.

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

 arch/powerpc/platforms/52xx/mpc52xx_common.c |9 -
 1 files changed, 8 insertions(+), 1 deletions(-)


diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c 
b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 9850685..2df97c5 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -124,11 +124,18 @@ mpc5200_setup_xlb_arbiter(void)
iounmap(xlb);
 }
 
+static struct of_device_id mpc52xx_ids[] = {
+   { .type = soc, },
+   { .compatible = soc, },
+   { .compatible = fsl,lpb, },
+   {},
+};
+
 void __init
 mpc52xx_declare_of_platform_devices(void)
 {
/* Find every child of the SOC node and add it to of_platform */
-   if (of_platform_bus_probe(NULL, NULL, NULL))
+   if (of_platform_bus_probe(NULL, mpc52xx_ids, NULL))
printk(KERN_ERR __FILE__ : 
Error while probing of_platform bus\n);
 }

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


[PATCH v2 03/12] [POWERPC] Add common mpc52xx_setup_pci() routine

2007-11-03 Thread Marian Balakowicz
This patch moves a generic pci init code from lite5200
platform file to a common mpc52xx_setup_pci() routine
and adds additional compatibility property verification.

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

 arch/powerpc/platforms/52xx/lite5200.c|   12 +---
 arch/powerpc/platforms/52xx/mpc52xx_pci.c |   15 +++
 include/asm-powerpc/mpc52xx.h |5 +
 3 files changed, 21 insertions(+), 11 deletions(-)


diff --git a/arch/powerpc/platforms/52xx/lite5200.c 
b/arch/powerpc/platforms/52xx/lite5200.c
index 25d2bfa..ce903be 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -131,10 +131,6 @@ static void lite5200_resume_finish(void __iomem *mbar)
 
 static void __init lite5200_setup_arch(void)
 {
-#ifdef CONFIG_PCI
-   struct device_node *np;
-#endif
-
if (ppc_md.progress)
ppc_md.progress(lite5200_setup_arch(), 0);
 
@@ -154,13 +150,7 @@ static void __init lite5200_setup_arch(void)
lite5200_pm_init();
 #endif
 
-#ifdef CONFIG_PCI
-   np = of_find_node_by_type(NULL, pci);
-   if (np) {
-   mpc52xx_add_bridge(np);
-   of_node_put(np);
-   }
-#endif
+   mpc52xx_setup_pci();
 }
 
 /*
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c 
b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
index 4c6c82a..89304f2 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -406,3 +406,18 @@ mpc52xx_add_bridge(struct device_node *node)
 
return 0;
 }
+
+void __init mpc52xx_setup_pci(void)
+{
+   struct device_node *pci;
+
+   pci = of_find_node_by_type(NULL, pci);
+   if (!pci)
+   return;
+
+   if (of_device_is_compatible(pci, fsl,mpc5200-pci) ||
+   of_device_is_compatible(pci, mpc5200-pci))
+   mpc52xx_add_bridge(pci);
+
+   of_node_put(pci);
+}
diff --git a/include/asm-powerpc/mpc52xx.h b/include/asm-powerpc/mpc52xx.h
index fcb2ebb..d7efbe0 100644
--- a/include/asm-powerpc/mpc52xx.h
+++ b/include/asm-powerpc/mpc52xx.h
@@ -257,7 +257,12 @@ extern void mpc52xx_declare_of_platform_devices(void);
 extern void mpc52xx_init_irq(void);
 extern unsigned int mpc52xx_get_irq(void);
 
+#ifdef CONFIG_PCI
 extern int __init mpc52xx_add_bridge(struct device_node *node);
+extern void __init mpc52xx_setup_pci(void);
+#else
+static inline void mpc52xx_setup_pci(void) { }
+#endif
 
 extern void __init mpc52xx_map_wdt(void);
 extern void mpc52xx_restart(char *cmd);

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


[PATCH v2 05/12] [POWERPC] Export mpc52xx_map_node() routine symbol

2007-11-03 Thread Marian Balakowicz
Make, so far static, mpc52xx_map_node() routine
symbol available for general use.

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

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


diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c 
b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 2df97c5..14e20ce 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -26,7 +26,7 @@
  */
 static volatile struct mpc52xx_gpt *mpc52xx_wdt = NULL;
 
-static void __iomem *
+void __iomem *
 mpc52xx_map_node(struct device_node *ofn)
 {
const u32 *regaddr_p;
@@ -48,6 +48,8 @@ mpc52xx_map_node(struct device_node *ofn)
return ioremap((u32)regaddr64, (u32)size64);
 }
 
+EXPORT_SYMBOL(mpc52xx_map_node);
+
 void __iomem *
 mpc52xx_find_and_map(const char *compatible)
 {
diff --git a/include/asm-powerpc/mpc52xx.h b/include/asm-powerpc/mpc52xx.h
index d7efbe0..1887b13 100644
--- a/include/asm-powerpc/mpc52xx.h
+++ b/include/asm-powerpc/mpc52xx.h
@@ -248,6 +248,7 @@ struct mpc52xx_cdm {
 
 #ifndef __ASSEMBLY__
 
+extern void __iomem * mpc52xx_map_node(struct device_node *);
 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);

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


[PATCH v2 06/12] [POWERPC] TQM5200 DTS

2007-11-03 Thread Marian Balakowicz
Add device tree source file for TQM5200 board.

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

 arch/powerpc/boot/dts/tqm5200.dts |  191 +
 1 files changed, 191 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/tqm5200.dts


diff --git a/arch/powerpc/boot/dts/tqm5200.dts 
b/arch/powerpc/boot/dts/tqm5200.dts
new file mode 100644
index 000..a649ba7
--- /dev/null
+++ b/arch/powerpc/boot/dts/tqm5200.dts
@@ -0,0 +1,191 @@
+/*
+ * TQM5200 board Device Tree Source
+ *
+ * Copyright (C) 2007 Semihalf
+ * 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 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 = tqc,tqm5200;
+   compatible = tqc,tqm5200,mpc5200-simple-platform;
+   #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
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg =  0400;  // 64MB
+   };
+
+   [EMAIL PROTECTED] {
+   model = fsl,mpc5200;
+   compatible = mpc5200;
+   revision = ;  // from bootloader
+   device_type = soc;
+   ranges = 0 f000 c000;
+   reg = f000 0100;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200-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;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200-gpt;
+   cell-index = 0;
+   reg = 600 10;
+   interrupts = 1 9 0;
+   interrupt-parent = mpc5200_pic;
+   fsl,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,ohci-be;
+   reg = 1000 ff;
+   interrupts = 2 6 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200-bestcomm;
+   reg = 1200 80;
+   interrupts = 3 0 0  3 1 0  3 2 0  3 3 0
+ 3 4 0  3 5 0  3 6 0  3 7 0
+ 3 8 0  3 9 0  3 a 0  3 b 0
+ 3 c 0  3 d 0  3 e 0  3 f 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200-xlb;
+   reg = 1f00 100;
+   };
+
+   [EMAIL PROTECTED] { // PSC1
+   device_type = serial;
+   compatible = mpc5200-psc-uart;
+   port-number = 0;  // Logical port assignment
+   cell-index = 0;
+   reg = 2000 100;
+   interrupts = 2 1 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // PSC2

[PATCH v2 07/12] [POWERPC] TQM5200 defconfig

2007-11-03 Thread Marian Balakowicz
Add TQM5200 board defconfig file.

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

 arch/powerpc/configs/tqm5200_defconfig | 1306 
 1 files changed, 1306 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/configs/tqm5200_defconfig


diff --git a/arch/powerpc/configs/tqm5200_defconfig 
b/arch/powerpc/configs/tqm5200_defconfig
new file mode 100644
index 000..53fa968
--- /dev/null
+++ b/arch/powerpc/configs/tqm5200_defconfig
@@ -0,0 +1,1306 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23
+# Mon Oct 29 14:01:58 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_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_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_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+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_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_MPC5200_SIMPLE=y
+# CONFIG_PPC_EFIKA is not set
+# CONFIG_PPC_LITE5200 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_EMBEDDED6xx 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
+# CONFIG_PPC_BESTCOMM is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# 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

[PATCH v2 08/12] [POWERPC] CM5200 DTS

2007-11-03 Thread Marian Balakowicz
Add device tree source file for CM5200 board.

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

 arch/powerpc/boot/dts/cm5200.dts |  252 ++
 1 files changed, 252 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/cm5200.dts


diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts
new file mode 100644
index 000..8b3f93c
--- /dev/null
+++ b/arch/powerpc/boot/dts/cm5200.dts
@@ -0,0 +1,252 @@
+/*
+ * CM5200 board Device Tree Source
+ *
+ * Copyright (C) 2007 Semihalf
+ * 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 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 = schindler,cm5200;
+   compatible = schindler,cm5200,mpc5200-simple-platform;
+   #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
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg =  0400;  // 64MB
+   };
+
+   [EMAIL PROTECTED] {
+   model = fsl,mpc5200b;
+   compatible = mpc5200;
+   revision = ;  // from bootloader
+   device_type = soc;
+   ranges = 0 f000 c000;
+   reg = f000 0100;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200b-cdm,mpc5200-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,mpc5200-pic;
+   reg = 500 80;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 0;
+   reg = 600 10;
+   interrupts = 1 9 0;
+   interrupt-parent = mpc5200_pic;
+   fsl,has-wdt;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 1;
+   reg = 610 10;
+   interrupts = 1 a 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 2;
+   reg = 620 10;
+   interrupts = 1 b 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 3;
+   reg = 630 10;
+   interrupts = 1 c 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 4;
+   reg = 640 10;
+   interrupts = 1 d 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 5;
+   reg = 650 10;
+   interrupts = 1 e 0

[PATCH v2 09/12] [POWERPC] CM5200 defconfig

2007-11-03 Thread Marian Balakowicz
Add CM5200 board defconfig file.

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

 arch/powerpc/configs/cm5200_defconfig | 1031 +
 1 files changed, 1031 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/configs/cm5200_defconfig


diff --git a/arch/powerpc/configs/cm5200_defconfig 
b/arch/powerpc/configs/cm5200_defconfig
new file mode 100644
index 000..a17d966
--- /dev/null
+++ b/arch/powerpc/configs/cm5200_defconfig
@@ -0,0 +1,1031 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23
+# Mon Oct 29 14:06:34 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_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_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_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+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_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_MPC5200_SIMPLE=y
+# CONFIG_PPC_EFIKA is not set
+# CONFIG_PPC_LITE5200 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_EMBEDDED6xx 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
+# CONFIG_PPC_BESTCOMM is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# 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

[PATCH v2 10/12] [POWERPC] Motion-PRO: Add LED support.

2007-11-03 Thread Marian Balakowicz
Add LED driver for Promess Motion-PRO board.

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

 drivers/leds/Kconfig  |7 +
 drivers/leds/Makefile |3 -
 drivers/leds/leds-motionpro.c |  240 +
 include/asm-powerpc/mpc52xx.h |5 +
 4 files changed, 254 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..74b99aa
--- /dev/null
+++ b/drivers/leds/leds-motionpro.c
@@ -0,0 +1,240 @@
+/*
+ * 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/led-name/(brightness|delay_off|delay_on).
+ * See Documentation/leds-class.txt for more details.
+ * led-name is the set to the corresponding GPT node name.
+ *
+ * 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).
+ *
+ */
+
+#undef DEBUG
+
+#include linux/module.h
+#include linux/types.h
+#include linux/kernel.h
+#include linux/platform_device.h
+#include linux/leds.h
+#include linux/vmalloc.h
+
+#include asm/mpc52xx.h
+#include asm/io.h
+#include asm/of_platform.h
+
+/* 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

[PATCH v2 11/12] [POWERPC] Promess Motion-PRO DTS

2007-11-03 Thread Marian Balakowicz
Add device tree source file for Motion-PRO board.

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

 arch/powerpc/boot/dts/motionpro.dts |  323 +++
 1 files changed, 323 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/motionpro.dts


diff --git a/arch/powerpc/boot/dts/motionpro.dts 
b/arch/powerpc/boot/dts/motionpro.dts
new file mode 100644
index 000..82212d9
--- /dev/null
+++ b/arch/powerpc/boot/dts/motionpro.dts
@@ -0,0 +1,323 @@
+/*
+ * Motion-PRO board Device Tree Source
+ *
+ * Copyright (C) 2007 Semihalf
+ * 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 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 = promess,motionpro;
+   compatible = promess,motionpro,mpc5200-simple-platform;
+   #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
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg =  0400;  // 64MB
+   };
+
+   [EMAIL PROTECTED] {
+   model = fsl,mpc5200b;
+   compatible = mpc5200;
+   revision = ;  // from bootloader
+   device_type = soc;
+   ranges = 0 f000 c000;
+   reg = f000 0100;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200b-cdm,mpc5200-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,mpc5200-pic;
+   reg = 500 80;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 0;
+   reg = 600 10;
+   interrupts = 1 9 0;
+   interrupt-parent = mpc5200_pic;
+   fsl,has-wdt;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 1;
+   reg = 610 10;
+   interrupts = 1 a 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 2;
+   reg = 620 10;
+   interrupts = 1 b 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 3;
+   reg = 630 10;
+   interrupts = 1 c 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 4;
+   reg = 640 10;
+   interrupts = 1 d 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 5;
+   reg = 650 10

[PATCH v2 12/12] [POWERPC] Promess Motion-PRO defconfig

2007-11-03 Thread Marian Balakowicz
Add Motion-PRO board defconfig file.

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

 arch/powerpc/configs/motionpro_defconfig |  989 ++
 1 files changed, 989 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/configs/motionpro_defconfig


diff --git a/arch/powerpc/configs/motionpro_defconfig 
b/arch/powerpc/configs/motionpro_defconfig
new file mode 100644
index 000..fd7a327
--- /dev/null
+++ b/arch/powerpc/configs/motionpro_defconfig
@@ -0,0 +1,989 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23
+# Mon Oct 29 14:11:27 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_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_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_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+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_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_MPC5200_SIMPLE=y
+# CONFIG_PPC_EFIKA is not set
+# CONFIG_PPC_LITE5200 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_EMBEDDED6xx 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
+# CONFIG_PPC_BESTCOMM is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# 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

Re: [PATCH 05/11] [POWERPC] TQM5200 DTS

2007-10-29 Thread Marian Balakowicz
David Gibson wrote:
 On Thu, Oct 25, 2007 at 05:46:19PM +0200, Marian Balakowicz wrote:
 Grant Likely wrote:
 On 10/25/07, Martin Krause [EMAIL PROTECTED] wrote:
 [snip]
 On a board with 16 MiB FLASH for example the big-fs _and_ the misc
 partition could not be used. big-fs, because the memory is too small
 (which is OK) and misc, because it overlaps 1 MiB over the physikal
 flash border. So only the first 9 MiB of the flash could be used in Linux.
 The remaining 7 MiB couldn't be accessed.
 Perhaps it would be better to drop the flash layout from the in-kernel
 dts files entirely since flash layout can be a fluid thing.
 Well, but that would not be really user friendly, I'd rather stick
 with some default config.
 
 Strictly speaking the device-tree is not the right place for flash
 partitioning information.  We put it there because it's preferable to
 having hardcoded per-board flash layouts in the code itself.
 
 It only really works well, though, when there are strong conventions
 (shared with the firmware) about how to partition the flash.
 
 Where it's really up to the user to determine how they want to lay out
 their flash, putting things in the device tree isn't a really good
 idea.

In principle, you are right, we should not be putting a user dependent
configuration into .dts files. But on the other hand, bindings have
been defined for flash-like devices and their partition layouts and
physmap_of device driver is expecting to get this information from the
blob. So, it is the place for it. But if we are not to put partition
layouts into the default kernel .dts files then we should
provide/maintain some examples an that may be a even bigger mess.

 Incidentally, it's not required that *all* the flash address space be
 in partitions, so it is possible only give partitions for those flash
 chunks which the firmware needs to know about.

That might be nicer solution but different variants of TQM5200 boards
do not share the same subset of partitions (default u-boot partitions
at least), so it will not help much.

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


Re: [PATCH 01/11] [POWERPC] Add 'machine: ...' line to common show_cpuinfo()

2007-10-25 Thread Marian Balakowicz
Milton Miller wrote:
 On Wed Oct 24 17:11:29 EST 2007, Stephen Rothwell wrote:
 On Wed, 24 Oct 2007 01:13:09 +0200 Marian Balakowicz  wrote:
 +   root = of_find_node_by_path(/);
 +   if (root)
 +   model = of_get_property(root, model, NULL);
 +   of_node_put(root);
 The paranoid part of me says:

  if (model)

 +   seq_printf(m, machine\t\t: %s\n, model);
 
 My thoughts too (don't fail if no model property in /), and that
 means that
 
 +   const char *model = ;
 
 can change to  
 + const char *model = NULL;
 
 
 
 However, a quick grep shows there are several platforms that print
 out machine\t\t: something in show_cpuinfo.  Some are fixed strings
 (eg linkstation, holly, iSeries), some print model with a fallback
 (powermac), some augment the model (chrp, pseries, cell), some print
 something else (52xx/efika).  There are others.  All of those need
 to be dealt with or another tag chosen.

That's true, there is pretty wide range of different approaches. I
would opt for using a different tag and letting the platforms use
their custom machine string if they desire so. How about model\t\t:
...? It's not conflicting and self-explanatory too.

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


Re: [PATCH 02/11] [POWERPC] Add 'lpb' bus type for MPC5200 LocalPlus Bus

2007-10-25 Thread Marian Balakowicz
Olof Johansson wrote:
 
 On Wed, Oct 24, 2007 at 01:13:15AM +0200, Marian Balakowicz wrote:
 Signed-off-by: Marian Balakowicz [EMAIL PROTECTED]
 ---
 
 Your patch lacks any kind of description beyond the title. (I know, it's a
 real simple patch, but a real simple description would do too :)

All right, will add one.

 
 --- a/arch/powerpc/kernel/of_platform.c
 +++ b/arch/powerpc/kernel/of_platform.c
 @@ -49,6 +49,7 @@ static struct of_device_id of_default_bus_ids[] = {
  { .type = plb4, },
  { .type = opb, },
  { .type = ebc, },
 +{ .type = lpb, },
 
 I thought it was consensus to keep the new bus ids only in platform
 code and not add them to the default list, and just pass that list in
 to of_platform_bus_probe().

Sounds reasonable, will move it to the 5xxx platform code.

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


Re: [PATCH 05/11] [POWERPC] TQM5200 DTS

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

  + [EMAIL PROTECTED] {
  + compatible = cfi-flash;
  + reg =  0200;
  + bank-width = 4;
  + device-width = 2;
  + #size-cells = 1;
  + #address-cells = 1;
  + [EMAIL PROTECTED] {
  + label = firmware;
  + reg = 0 a;
  + };
  + [EMAIL PROTECTED] {
  + label = dtb;
  + reg = a 2;
  + };
  + [EMAIL PROTECTED] {
  + label = kernel;
  + reg = c 24;
  + };
  + [EMAIL PROTECTED] {
  + label = initrd;
  + reg = 30 20;
  + };
  + [EMAIL PROTECTED] {
  + label = small-fs;
  + reg = 50 40;
  + };
  + [EMAIL PROTECTED] {
  + label = misc;
  + reg = 90 80;
  + };
  + [EMAIL PROTECTED] {
  + label = big-fs;
  + reg = 110 f0;
  + };
  + };
  + };

 This MTD layout only works on boards with 32 MiB (or 64 MiB) flash
 memory. On TQM5200 boards with smaller Flashes (16 MiB, 8 MiB and 4 MiB)
 the MTD partition borders do not match with the physikal memory borders.
 
 If there is a variant board with a different configuration, then the
 device tree needs to be changed for that variant board; either by
 having multiple .dts files in arch/powerpc/boot/dts or by having the
 bootloader populate the correct information.  A dtb as passed to the
 kernel must exactly represent the hardware.
 
 That also means that there is going to be a different flash map for
 each possible flash size configuration.

Agree, that's one particular configuration (I guess I should add
proper comment), that should be updated if needed. But I'am not sure
if we should have multiple .dts files if it's only flash layout that
changes.

 On a board with 16 MiB FLASH for example the big-fs _and_ the misc
 partition could not be used. big-fs, because the memory is too small
 (which is OK) and misc, because it overlaps 1 MiB over the physikal
 flash border. So only the first 9 MiB of the flash could be used in Linux.
 The remaining 7 MiB couldn't be accessed.
 
 Perhaps it would be better to drop the flash layout from the in-kernel
 dts files entirely since flash layout can be a fluid thing.

Well, but that would not be really user friendly, I'd rather stick
with some default config.

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


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

2007-10-25 Thread Marian Balakowicz
Grant Likely wrote:
...
 +
 +static int __init mpled_init(void)
 +{
 +   int i, error;
 +
 +   for (i = 0; i  sizeof(led) / sizeof(struct motionpro_led); i++){
 +   led[i].reg_addr = mpc52xx_find_and_map(led[i].reg_compat);
 
 Please use of-platform-bus bindings instead.  Let the of-platform bus
 take care of scanning the tree for you.  Don't do it manually.

Hm, let me try that instead, thanks for the suggestion.

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


[PATCH 00/11] [POWERPC] Add TQM5200/CM5200/Motion-PRO board support

2007-10-23 Thread Marian Balakowicz
This is a reworked set of patches that adds arch/powerpc support for
three MPC5200 based boards: TQ-Components TQM5200, Schindler CM5200
and Promess Motion-PRO.

Besides board support there are also few more MPC5200 common patches
that include update to show_cpuinfo(), adding new 'lpb' bus,
moving lite pci init code to common routine and adding platform support
for 'generic-mpc5200' compatible boards. All the above mentioned boards
use this generic support.

[POWERPC] Promess Motion-PRO defconfig
[POWERPC] Promess Motion-PRO DTS
[POWERPC] Motion-PRO: Add LED support.
[POWERPC] CM5200 defconfig
[POWERPC] CM5200 DTS
[POWERPC] TQM5200 defconfig
[POWERPC] TQM5200 DTS
[POWERPC] Add generic support for MPC5200 based boards
[POWERPC] Add common mpc52xx_setup_pci() routine
[POWERPC] Add 'lpb' bus type for MPC5200 LocalPlus Bus
[POWERPC] Add 'machine: ...' line to common show_cpuinfo()

Will appreciate review comments.

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


[PATCH 01/11] [POWERPC] Add 'machine: ...' line to common show_cpuinfo()

2007-10-23 Thread Marian Balakowicz
Print out '/model' property as a machine name in generic
show_cpuinfo() routine.

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

 arch/powerpc/kernel/setup-common.c |8 
 1 files changed, 8 insertions(+), 0 deletions(-)


diff --git a/arch/powerpc/kernel/setup-common.c 
b/arch/powerpc/kernel/setup-common.c
index 2de00f8..1aa0733 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -165,6 +165,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
unsigned short min;
 
if (cpu_id == NR_CPUS) {
+   struct device_node *root;
+   const char *model = ;
 #if defined(CONFIG_SMP)  defined(CONFIG_PPC32)
unsigned long bogosum = 0;
int i;
@@ -176,6 +178,12 @@ static int show_cpuinfo(struct seq_file *m, void *v)
seq_printf(m, timebase\t: %lu\n, ppc_tb_freq);
if (ppc_md.name)
seq_printf(m, platform\t: %s\n, ppc_md.name);
+   root = of_find_node_by_path(/);
+   if (root)
+   model = of_get_property(root, model, NULL);
+   of_node_put(root);
+   seq_printf(m, machine\t\t: %s\n, model);
+
if (ppc_md.show_cpuinfo != NULL)
ppc_md.show_cpuinfo(m);
 

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


[PATCH 02/11] [POWERPC] Add 'lpb' bus type for MPC5200 LocalPlus Bus

2007-10-23 Thread Marian Balakowicz
Signed-off-by: Marian Balakowicz [EMAIL PROTECTED]
---

 arch/powerpc/kernel/of_platform.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


diff --git a/arch/powerpc/kernel/of_platform.c 
b/arch/powerpc/kernel/of_platform.c
index aeaa202..cc33b73 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -49,6 +49,7 @@ static struct of_device_id of_default_bus_ids[] = {
{ .type = plb4, },
{ .type = opb, },
{ .type = ebc, },
+   { .type = lpb, },
{},
 };
 

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


[PATCH 03/11] [POWERPC] Add common mpc52xx_setup_pci() routine

2007-10-23 Thread Marian Balakowicz
This patch moves a generic pci init code from lite5200
platform file to a common mpc52xx_setup_pci() routine
and adds additional compatibility property verification.

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

 arch/powerpc/platforms/52xx/lite5200.c|6 +-
 arch/powerpc/platforms/52xx/mpc52xx_pci.c |   15 +++
 include/asm-powerpc/mpc52xx.h |1 +
 3 files changed, 17 insertions(+), 5 deletions(-)


diff --git a/arch/powerpc/platforms/52xx/lite5200.c 
b/arch/powerpc/platforms/52xx/lite5200.c
index 25d2bfa..0262a9f 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -155,11 +155,7 @@ static void __init lite5200_setup_arch(void)
 #endif
 
 #ifdef CONFIG_PCI
-   np = of_find_node_by_type(NULL, pci);
-   if (np) {
-   mpc52xx_add_bridge(np);
-   of_node_put(np);
-   }
+   mpc52xx_setup_pci();
 #endif
 }
 
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c 
b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
index 4c6c82a..89304f2 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -406,3 +406,18 @@ mpc52xx_add_bridge(struct device_node *node)
 
return 0;
 }
+
+void __init mpc52xx_setup_pci(void)
+{
+   struct device_node *pci;
+
+   pci = of_find_node_by_type(NULL, pci);
+   if (!pci)
+   return;
+
+   if (of_device_is_compatible(pci, fsl,mpc5200-pci) ||
+   of_device_is_compatible(pci, mpc5200-pci))
+   mpc52xx_add_bridge(pci);
+
+   of_node_put(pci);
+}
diff --git a/include/asm-powerpc/mpc52xx.h b/include/asm-powerpc/mpc52xx.h
index 39f619f..859ffb0 100644
--- a/include/asm-powerpc/mpc52xx.h
+++ b/include/asm-powerpc/mpc52xx.h
@@ -251,6 +251,7 @@ extern void mpc52xx_init_irq(void);
 extern unsigned int mpc52xx_get_irq(void);
 
 extern int __init mpc52xx_add_bridge(struct device_node *node);
+extern void __init mpc52xx_setup_pci(void);
 
 extern void __init mpc52xx_map_wdt(void);
 extern void mpc52xx_restart(char *cmd);

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


[PATCH 04/11] [POWERPC] Add generic support for MPC5200 based boards

2007-10-23 Thread Marian Balakowicz
This patch adds support for 'generic-mpc5200' compatible
boards which do not need a platform specific setup.

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

 arch/powerpc/platforms/52xx/Kconfig   |8 ++-
 arch/powerpc/platforms/52xx/Makefile  |1 
 arch/powerpc/platforms/52xx/generic_mpc5200.c |   63 +
 3 files changed, 70 insertions(+), 2 deletions(-)
 create mode 100644 arch/powerpc/platforms/52xx/generic_mpc5200.c


diff --git a/arch/powerpc/platforms/52xx/Kconfig 
b/arch/powerpc/platforms/52xx/Kconfig
index 2938d49..59c67b5 100644
--- a/arch/powerpc/platforms/52xx/Kconfig
+++ b/arch/powerpc/platforms/52xx/Kconfig
@@ -19,6 +19,12 @@ config PPC_MPC5200_BUGFIX
 
  It is safe to say 'Y' here
 
+config PPC_GENERIC_MPC5200
+   bool Generic support for MPC5200 based boards
+   depends on PPC_MULTIPLATFORM  PPC32
+   select PPC_MPC5200
+   default n
+
 config PPC_EFIKA
bool bPlan Efika 5k2. MPC5200B based computer
depends on PPC_MULTIPLATFORM  PPC32
@@ -34,5 +40,3 @@ config PPC_LITE5200
select WANT_DEVICE_TREE
select PPC_MPC5200
default n
-
-
diff --git a/arch/powerpc/platforms/52xx/Makefile 
b/arch/powerpc/platforms/52xx/Makefile
index 307dbc1..bea05df 100644
--- a/arch/powerpc/platforms/52xx/Makefile
+++ b/arch/powerpc/platforms/52xx/Makefile
@@ -6,6 +6,7 @@ obj-y   += mpc52xx_pic.o 
mpc52xx_common.o
 obj-$(CONFIG_PCI)  += mpc52xx_pci.o
 endif
 
+obj-$(CONFIG_PPC_GENERIC_MPC5200) += generic_mpc5200.o
 obj-$(CONFIG_PPC_EFIKA)+= efika.o
 obj-$(CONFIG_PPC_LITE5200) += lite5200.o
 
diff --git a/arch/powerpc/platforms/52xx/generic_mpc5200.c 
b/arch/powerpc/platforms/52xx/generic_mpc5200.c
new file mode 100644
index 000..a4ec899
--- /dev/null
+++ b/arch/powerpc/platforms/52xx/generic_mpc5200.c
@@ -0,0 +1,63 @@
+/*
+ * Support for 'generic-mpc5200' compatible platforms.
+ *
+ * Written by Marian Balakowicz [EMAIL PROTECTED]
+ * Copyright (C) 2007 Semihalf
+ *
+ * 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/init.h
+#include linux/pci.h
+#include linux/of.h
+#include asm/time.h
+#include asm/io.h
+#include asm/machdep.h
+#include asm/prom.h
+#include asm/mpc52xx.h
+
+/*
+ * Setup the architecture
+ */
+static void __init generic_mpc5200_setup_arch(void)
+{
+   if (ppc_md.progress)
+   ppc_md.progress(generic_mpc5200_setup_arch(), 0);
+
+   /* Some mpc5200  mpc5200b related configuration */
+   mpc5200_setup_xlb_arbiter();
+
+   /* Map wdt for mpc52xx_restart() */
+   mpc52xx_map_wdt();
+
+#ifdef CONFIG_PCI
+   mpc52xx_setup_pci();
+#endif
+}
+
+/*
+ * Called very early, MMU is off, device-tree isn't unflattened
+ */
+static int __init generic_mpc5200_probe(void)
+{
+   unsigned long node = of_get_flat_dt_root();
+
+   if (!of_flat_dt_is_compatible(node, generic-mpc5200))
+   return 0;
+   return 1;
+}
+
+define_machine(generic_mpc5200) {
+   .name   = generic-mpc5200,
+   .probe  = generic_mpc5200_probe,
+   .setup_arch = generic_mpc5200_setup_arch,
+   .init   = mpc52xx_declare_of_platform_devices,
+   .init_IRQ   = mpc52xx_init_irq,
+   .get_irq= mpc52xx_get_irq,
+   .restart= mpc52xx_restart,
+   .calibrate_decr = generic_calibrate_decr,
+};

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


[PATCH 05/11] [POWERPC] TQM5200 DTS

2007-10-23 Thread Marian Balakowicz
Add device tree source file for TQM5200 board.

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

 arch/powerpc/boot/dts/tqm5200.dts |  236 +
 1 files changed, 236 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/tqm5200.dts


diff --git a/arch/powerpc/boot/dts/tqm5200.dts 
b/arch/powerpc/boot/dts/tqm5200.dts
new file mode 100644
index 000..01c7778
--- /dev/null
+++ b/arch/powerpc/boot/dts/tqm5200.dts
@@ -0,0 +1,236 @@
+/*
+ * TQM5200 board Device Tree Source
+ *
+ * Copyright (C) 2007 Semihalf
+ * 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 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 = tqc,tqm5200;
+   compatible = tqc,tqm5200,generic-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
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg =  0400;  // 64MB
+   };
+
+   [EMAIL PROTECTED] {
+   model = fsl,mpc5200;
+   compatible = mpc5200;
+   revision = ;  // from bootloader
+   device_type = soc;
+   ranges = 0 f000 c000;
+   reg = f000 0100;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200-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;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200-gpt;
+   cell-index = 0;
+   reg = 600 10;
+   interrupts = 1 9 0;
+   interrupt-parent = mpc5200_pic;
+   fsl,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,ohci-be;
+   reg = 1000 ff;
+   interrupts = 2 6 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200-bestcomm;
+   reg = 1200 80;
+   interrupts = 3 0 0  3 1 0  3 2 0  3 3 0
+ 3 4 0  3 5 0  3 6 0  3 7 0
+ 3 8 0  3 9 0  3 a 0  3 b 0
+ 3 c 0  3 d 0  3 e 0  3 f 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200-xlb;
+   reg = 1f00 100;
+   };
+
+   [EMAIL PROTECTED] { // PSC1
+   device_type = serial;
+   compatible = mpc5200-psc-uart;
+   port-number = 0;  // Logical port assignment
+   cell-index = 0;
+   reg = 2000 100;
+   interrupts = 2 1 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // PSC2

[PATCH 06/11] [POWERPC] TQM5200 defconfig

2007-10-23 Thread Marian Balakowicz
Add TQM5200 board defconfig file.

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

 arch/powerpc/configs/tqm5200_defconfig | 1306 
 1 files changed, 1306 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/configs/tqm5200_defconfig


diff --git a/arch/powerpc/configs/tqm5200_defconfig 
b/arch/powerpc/configs/tqm5200_defconfig
new file mode 100644
index 000..24b98a6
--- /dev/null
+++ b/arch/powerpc/configs/tqm5200_defconfig
@@ -0,0 +1,1306 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23
+# Fri Oct 19 19:33: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_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_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_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+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_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_GENERIC_MPC5200=y
+# CONFIG_PPC_EFIKA is not set
+# CONFIG_PPC_LITE5200 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_EMBEDDED6xx 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
+# CONFIG_PPC_BESTCOMM is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# 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

[PATCH 07/11] [POWERPC] CM5200 DTS

2007-10-23 Thread Marian Balakowicz
Add device tree source file for CM5200 board.

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

 arch/powerpc/boot/dts/cm5200.dts |  296 ++
 1 files changed, 296 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/cm5200.dts


diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts
new file mode 100644
index 000..a5f112e
--- /dev/null
+++ b/arch/powerpc/boot/dts/cm5200.dts
@@ -0,0 +1,296 @@
+/*
+ * CM5200 board Device Tree Source
+ *
+ * Copyright (C) 2007 Semihalf
+ * 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 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 = schindler,cm5200;
+   compatible = schindler,cm5200,generic-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
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg =  0400;  // 64MB
+   };
+
+   [EMAIL PROTECTED] {
+   model = fsl,mpc5200b;
+   compatible = mpc5200;
+   revision = ;  // from bootloader
+   device_type = soc;
+   ranges = 0 f000 c000;
+   reg = f000 0100;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200b-cdm,mpc5200-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,mpc5200-pic;
+   reg = 500 80;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 0;
+   reg = 600 10;
+   interrupts = 1 9 0;
+   interrupt-parent = mpc5200_pic;
+   fsl,has-wdt;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 1;
+   reg = 610 10;
+   interrupts = 1 a 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 2;
+   reg = 620 10;
+   interrupts = 1 b 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 3;
+   reg = 630 10;
+   interrupts = 1 c 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 4;
+   reg = 640 10;
+   interrupts = 1 d 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 5;
+   reg = 650 10;
+   interrupts = 1 e 0

[PATCH 08/11] [POWERPC] CM5200 defconfig

2007-10-23 Thread Marian Balakowicz
Add CM5200 board defconfig file.

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

 arch/powerpc/configs/cm5200_defconfig | 1031 +
 1 files changed, 1031 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/configs/cm5200_defconfig


diff --git a/arch/powerpc/configs/cm5200_defconfig 
b/arch/powerpc/configs/cm5200_defconfig
new file mode 100644
index 000..ad2038f
--- /dev/null
+++ b/arch/powerpc/configs/cm5200_defconfig
@@ -0,0 +1,1031 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23
+# Tue Oct 23 20:41:18 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_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_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_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+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_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_GENERIC_MPC5200=y
+# CONFIG_PPC_EFIKA is not set
+# CONFIG_PPC_LITE5200 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_EMBEDDED6xx 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
+# CONFIG_PPC_BESTCOMM is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# 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

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

2007-10-23 Thread Marian Balakowicz
Add LED driver for Promess Motion-PRO board.

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

 drivers/leds/Kconfig  |7 +
 drivers/leds/Makefile |3 -
 drivers/leds/leds-motionpro.c |  222 +
 include/asm-powerpc/mpc52xx.h |5 +
 4 files changed, 236 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..d4b872c
--- /dev/null
+++ b/drivers/leds/leds-motionpro.c
@@ -0,0 +1,222 @@
+/*
+ * 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 turned off.
+ */
+
+#include linux/module.h
+#include linux/types.h
+#include linux/kernel.h
+#include linux/device.h
+#include linux/leds.h
+
+#include asm/mpc52xx.h
+#include asm/io.h
+
+/* Led status */
+#define LED_NOT_REGISTERED 0
+#define LED_KERNEL_CONTROLLED  1
+#define LED_USER_CONTROLLED2
+
+/* Led control bits */
+#define LED_ON MPC52xx_GPT_OUTPUT_1
+
+static void mpled_set(struct led_classdev *led_cdev,
+ enum led_brightness brightness);
+
+struct motionpro_led{
+   /* Protects the led data */
+   spinlock_t led_lock;
+
+   /* Path to led's control register DTS node */
+   char *reg_compat;
+
+   /* Address to access led's register */
+   void __iomem *reg_addr;
+
+   int status;
+
+   /* Blinking timer used when led is controlled by the kernel */
+   struct timer_list kernel_mode_timer;
+
+   /*
+* Delay between blinks when led is controlled by the kernel.
+* If set to 0 led blinking is off.
+*/
+   int kernel_mode_delay;
+
+   struct led_classdev classdev;
+};
+
+static struct motionpro_led led[] = {
+   {
+   .reg_compat = promess,motionpro-statusled,
+   .reg_addr = 0,
+   .led_lock = SPIN_LOCK_UNLOCKED,
+   .status = LED_NOT_REGISTERED,
+   .kernel_mode_delay = HZ / 10,
+   .classdev = {
+   .name = motionpro-statusled,
+   .brightness_set = mpled_set,
+   .default_trigger = timer,
+   },
+   },
+   {
+   .reg_compat = promess,motionpro-readyled,
+   .reg_addr = 0,
+   .led_lock = SPIN_LOCK_UNLOCKED,
+   .status = LED_NOT_REGISTERED,
+   .kernel_mode_delay = 0

[PATCH 10/11] [POWERPC] Promess Motion-PRO DTS

2007-10-23 Thread Marian Balakowicz
Add device tree source file for Motion-PRO board.

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

 arch/powerpc/boot/dts/motionpro.dts |  360 +++
 1 files changed, 360 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/motionpro.dts


diff --git a/arch/powerpc/boot/dts/motionpro.dts 
b/arch/powerpc/boot/dts/motionpro.dts
new file mode 100644
index 000..5b9896a
--- /dev/null
+++ b/arch/powerpc/boot/dts/motionpro.dts
@@ -0,0 +1,360 @@
+/*
+ * Motion-PRO board Device Tree Source
+ *
+ * Copyright (C) 2007 Semihalf
+ * 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 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 = promess,motionpro;
+   compatible = promess,motionpro,generic-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
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg =  0400;  // 64MB
+   };
+
+   [EMAIL PROTECTED] {
+   model = fsl,mpc5200b;
+   compatible = mpc5200;
+   revision = ;  // from bootloader
+   device_type = soc;
+   ranges = 0 f000 c000;
+   reg = f000 0100;
+   bus-frequency = 0;// from bootloader
+   system-frequency = 0; // from bootloader
+
+   [EMAIL PROTECTED] {
+   compatible = mpc5200b-cdm,mpc5200-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,mpc5200-pic;
+   reg = 500 80;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 0;
+   reg = 600 10;
+   interrupts = 1 9 0;
+   interrupt-parent = mpc5200_pic;
+   fsl,has-wdt;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 1;
+   reg = 610 10;
+   interrupts = 1 a 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 2;
+   reg = 620 10;
+   interrupts = 1 b 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 3;
+   reg = 630 10;
+   interrupts = 1 c 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 4;
+   reg = 640 10;
+   interrupts = 1 d 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   cell-index = 5;
+   reg = 650 10;
+   interrupts

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

2007-10-19 Thread Marian Balakowicz
David Gibson wrote:
 On Wed, Oct 17, 2007 at 02:22:04PM +0200, Marian Balakowicz wrote:
 David Gibson wrote:
 [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.
 Ok.

 Second, is the flash really part of the SoC?
 Not directly, it is attached to LocalPlus Bus Controller, which is
 part of the SoC. And the soc@ is currently the only recognized of bus
 for mpc5200, so if we want to move it to some other place new bindings
 will need to be defined for lpc (LocalPlus Controller) bus. But I am
 not quite sure where this should be attached. Bus is under LPC which
 is a part of the SoC, but on the other hand Soc address range covers
 only device control registers not the address space LPC may handle
 (that may be varied). Any ideas?
 
 The bus bridge has to be there.  Is this something similar to the
 localbus / chipselect bus controllers that a whole bunch of the
 Freescale SoCs have?  

Yes, that's kind of a local bus.

 Because the bridged addresses don't lie in the
 IMMR, althoug the control registers do, the current convention is to
 make the localbus node a sibling of /soc, even though it is really
 part of the SoC (/soc would perhaps be better called /immr, but /soc
 is established now).  This approach is imperfect, but so are most of
 the other compromises we could make.
 
 Incidentally LPC is a pretty bad abbreviation, since LPC more
 frequently refers to the Low Pin Count connections that frequently
 appear on south bridges or superIO chips.

How about 'LocalPlus Bus' and 'lpb' node then?

m.

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


[PATCH v2 3/4] [POWERPC] Add restart support for mpc52xx based platforms

2007-10-18 Thread Marian Balakowicz
Add common helper routines: mpc52xx_map_wdt() and mpc52xx_restart().

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 |   50 ++
 include/asm-powerpc/mpc52xx.h|3 ++
 2 files changed, 53 insertions(+), 0 deletions(-)


diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c 
b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 74b4b41..9850685 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -18,6 +18,13 @@
 #include asm/prom.h
 #include asm/mpc52xx.h
 
+/*
+ * This variable is mapped in mpc52xx_map_wdt() and used in mpc52xx_restart().
+ * Permanent mapping is required because mpc52xx_restart() can be called
+ * from interrupt context while node mapping (which calls ioremap())
+ * cannot be used at such point.
+ */
+static volatile struct mpc52xx_gpt *mpc52xx_wdt = NULL;
 
 static void __iomem *
 mpc52xx_map_node(struct device_node *ofn)
@@ -126,3 +133,46 @@ mpc52xx_declare_of_platform_devices(void)
Error while probing of_platform bus\n);
 }
 
+void __init
+mpc52xx_map_wdt(void)
+{
+   const void *has_wdt;
+   struct device_node *np;
+
+   /* mpc52xx_wdt is mapped here and used in mpc52xx_restart,
+* possibly from a interrupt context. wdt is only implement
+* on a gpt0, so check has-wdt property before mapping.
+*/
+   for_each_compatible_node(np, NULL, fsl,mpc5200-gpt) {
+   has_wdt = of_get_property(np, fsl,has-wdt, NULL);
+   if (has_wdt) {
+   mpc52xx_wdt = mpc52xx_map_node(np);
+   return;
+   }
+   }
+   for_each_compatible_node(np, NULL, mpc5200-gpt) {
+   has_wdt = of_get_property(np, has-wdt, NULL);
+   if (has_wdt) {
+   mpc52xx_wdt = mpc52xx_map_node(np);
+   return;
+   }
+   }
+}
+
+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_wdt) {
+   out_be32(mpc52xx_wdt-mode, 0x);
+   out_be32(mpc52xx_wdt-count, 0x00ff);
+   out_be32(mpc52xx_wdt-mode, 0x9004);
+   } else
+   printk(mpc52xx_restart: Can't access wdt. 
+   Restart impossible, system halted.\n);
+
+   while (1);
+}
diff --git a/include/asm-powerpc/mpc52xx.h b/include/asm-powerpc/mpc52xx.h
index 9cf05f9..39f619f 100644
--- a/include/asm-powerpc/mpc52xx.h
+++ b/include/asm-powerpc/mpc52xx.h
@@ -252,6 +252,9 @@ extern unsigned int mpc52xx_get_irq(void);
 
 extern int __init mpc52xx_add_bridge(struct device_node *node);
 
+extern void __init mpc52xx_map_wdt(void);
+extern void mpc52xx_restart(char *cmd);
+
 #endif /* __ASSEMBLY__ */
 
 #ifdef CONFIG_PM

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


[PATCH v2 2/4] [POWERPC] Update device tree binding for mpc5200 gpt

2007-10-18 Thread Marian Balakowicz
Add 'fsl,' prefix to 'compatible' property for gpt nodes.
Add 'fsl,' prefix to empty, GPT0 specific 'has-wdt' property.

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

 .../powerpc/mpc52xx-device-tree-bindings.txt   |4 ++-
 arch/powerpc/boot/dts/lite5200.dts |   26 +++-
 arch/powerpc/boot/dts/lite5200b.dts|   26 +++-
 drivers/char/watchdog/mpc5200_wdt.c|3 ++
 4 files changed, 23 insertions(+), 36 deletions(-)


diff --git a/Documentation/powerpc/mpc52xx-device-tree-bindings.txt 
b/Documentation/powerpc/mpc52xx-device-tree-bindings.txt
index e59fcbb..fedf7ef 100644
--- a/Documentation/powerpc/mpc52xx-device-tree-bindings.txt
+++ b/Documentation/powerpc/mpc52xx-device-tree-bindings.txt
@@ -185,7 +185,7 @@ bestcomm@addr dma-controller  
mpc5200-bestcomm 5200 pic also requires
 Recommended soc5200 child nodes; populate as needed for your board
 name   device_type compatibleDescription
    --- -----
-gpt@addr gpt mpc5200-gpt   General purpose timers
+gpt@addr gpt fsl,mpc5200-gpt   General purpose timers
 rtc@addr rtc mpc5200-rtc   Real time clock
 mscan@addr   mscan   mpc5200-mscan CAN bus controller
 pci@addr pci mpc5200-pci   PCI bridge
@@ -213,7 +213,7 @@ cell-index  int When multiple devices are 
present, is the
 5) General Purpose Timer nodes (child of soc5200 node)
 On the mpc5200 and 5200b, GPT0 has a watchdog timer function.  If the board
 design supports the internal wdt, then the device node for GPT0 should
-include the empty property 'has-wdt'.
+include the empty property 'fsl,has-wdt'.
 
 6) PSC nodes (child of soc5200 node)
 PSC nodes can define the optional 'port-number' property to force assignment
diff --git a/arch/powerpc/boot/dts/lite5200.dts 
b/arch/powerpc/boot/dts/lite5200.dts
index bc45f5f..6731763 100644
--- a/arch/powerpc/boot/dts/lite5200.dts
+++ b/arch/powerpc/boot/dts/lite5200.dts
@@ -70,18 +70,16 @@
};
 
[EMAIL PROTECTED] { // General Purpose Timer
-   compatible = mpc5200-gpt;
-   device_type = gpt;
+   compatible = fsl,mpc5200-gpt;
cell-index = 0;
reg = 600 10;
interrupts = 1 9 0;
interrupt-parent = mpc5200_pic;
-   has-wdt;
+   fsl,has-wdt;
};
 
[EMAIL PROTECTED] { // General Purpose Timer
-   compatible = mpc5200-gpt;
-   device_type = gpt;
+   compatible = fsl,mpc5200-gpt;
cell-index = 1;
reg = 610 10;
interrupts = 1 a 0;
@@ -89,8 +87,7 @@
};
 
[EMAIL PROTECTED] { // General Purpose Timer
-   compatible = mpc5200-gpt;
-   device_type = gpt;
+   compatible = fsl,mpc5200-gpt;
cell-index = 2;
reg = 620 10;
interrupts = 1 b 0;
@@ -98,8 +95,7 @@
};
 
[EMAIL PROTECTED] { // General Purpose Timer
-   compatible = mpc5200-gpt;
-   device_type = gpt;
+   compatible = fsl,mpc5200-gpt;
cell-index = 3;
reg = 630 10;
interrupts = 1 c 0;
@@ -107,8 +103,7 @@
};
 
[EMAIL PROTECTED] { // General Purpose Timer
-   compatible = mpc5200-gpt;
-   device_type = gpt;
+   compatible = fsl,mpc5200-gpt;
cell-index = 4;
reg = 640 10;
interrupts = 1 d 0;
@@ -116,8 +111,7 @@
};
 
[EMAIL PROTECTED] { // General Purpose Timer
-   compatible = mpc5200-gpt;
-   device_type = gpt;
+   compatible = fsl,mpc5200-gpt;
cell-index = 5;
reg = 650 10;
interrupts = 1 e 0;
@@ -125,8 +119,7 @@
};
 
[EMAIL PROTECTED] { // General Purpose Timer
-   compatible = mpc5200-gpt;
-   device_type = gpt;
+   compatible = fsl,mpc5200-gpt;
cell-index = 6;
reg = 660 10;
interrupts = 1 f 0;
@@ -134,8 +127,7 @@
};
 
[EMAIL PROTECTED] { // General Purpose Timer
-   compatible = mpc5200-gpt

[PATCH v2 0/4] [POWERPC] MPC5200: update gpt binding, add restart support

2007-10-18 Thread Marian Balakowicz
Here's the second version of MPC5200 patches, please review. Thanks!

[POWERPC] Enable restart support for lite5200 board
[POWERPC] Add restart support for mpc52xx based platforms
[POWERPC] Update device tree binding for mpc5200 gpt
[POWERPC] Add mpc52xx_find_and_map_path(), refactor utility functions

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


[PATCH v2 1/4] [POWERPC] Add mpc52xx_find_and_map_path(), refactor utility functions

2007-10-18 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]
Reviewed-by: Grant Likely [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 3bc201e..74b4b41 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -19,14 +19,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;
 
@@ -42,8 +40,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 24751df..9cf05f9 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 mpc5200_setup_xlb_arbiter(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 v2 4/4] [POWERPC] Enable restart support for lite5200 board

2007-10-18 Thread Marian Balakowicz
Signed-off-by: Marian Balakowicz [EMAIL PROTECTED]
---

 arch/powerpc/platforms/52xx/lite5200.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)


diff --git a/arch/powerpc/platforms/52xx/lite5200.c 
b/arch/powerpc/platforms/52xx/lite5200.c
index 65b7ae4..25d2bfa 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -145,6 +145,9 @@ static void __init lite5200_setup_arch(void)
/* Some mpc5200  mpc5200b related configuration */
mpc5200_setup_xlb_arbiter();
 
+   /* Map wdt for mpc52xx_restart() */
+   mpc52xx_map_wdt();
+
 #ifdef CONFIG_PM
mpc52xx_suspend.board_suspend_prepare = lite5200_suspend_prepare;
mpc52xx_suspend.board_resume_finish = lite5200_resume_finish;
@@ -183,5 +186,6 @@ define_machine(lite5200) {
.init   = mpc52xx_declare_of_platform_devices,
.init_IRQ   = mpc52xx_init_irq,
.get_irq= mpc52xx_get_irq,
+   .restart= mpc52xx_restart,
.calibrate_decr = generic_calibrate_decr,
 };

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


Re: [PATCH v2 3/4] [POWERPC] Add restart support for mpc52xx based platforms

2007-10-18 Thread Marian Balakowicz
Grant Likely wrote:
 On 10/18/07, Marian Balakowicz [EMAIL PROTECTED] wrote:
 Add common helper routines: mpc52xx_map_wdt() and mpc52xx_restart().

 This patch relies on Sascha Hauer's patch published in:
 http://patchwork.ozlabs.org/linuxppc/patch?id=8910.
 
 By 'relies', do you mean depends on or was derived from?

Initial version was derived from, and since then it slightly evolved.

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


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

2007-10-17 Thread Marian Balakowicz
Grant Likely wrote:
 +   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)

Seems that this will not be painless, U-boot uses hardcoded
paths with 'soc5200', so the appropriate patch will be needed.
That may be ok for new boards but what do we do with lite5200,
where U-boot upgrade is not always an option?

m.
___
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-17 Thread Marian Balakowicz
Grant Likely wrote:
 Both this patch and the CM5200 support patch (#6 in your series) are
 pretty much clones of lite5200.c.  I don't think this is the right
 approach.  Don't duplicate code in this way.  Determine the common
 bits and put them in a common place to be usable by any 5200 board
 port.
 
 It might even be better just to add a platform that matches on
 compatible='mpc5200-generic' which is usable for mpc5200 boards that
 don't need any custom setup by the kernel at platform setup time.
 (which will probably be most 5200 boards).

Agree, will try more generic approach.


 +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;
 
 Are you *sure* you want this?  You should only be touching port_config
 if firmware fails to set it up correctly.  Don't blindly copy what was
 done for the lite5200.
 
 Lite5200 touches it because firmware does *not* do the right thing at
 the moment.

Yes, that's needed, but will be moved to U-boot.


 +void tqm5200_show_cpuinfo(struct seq_file *m)
 +{
 +   struct device_node* np = of_find_all_nodes(NULL);
 +   const char *model = NULL;
 +
 +   if (np)
 +   model = of_get_property(np, model, NULL);
 +
 +   seq_printf(m, vendor\t\t:  Freescale Semiconductor\n);
 
 Freescale?  Really?

Well, not really...

Something like

seq_printf(m, Vendor\t\t: TQ Components\n);
seq_printf(m, Machine\t\t: %s\n, model);

and model set to 'tqc,tqm5200' would be more accurate but going for
compatible='mpc5200-generic' platform we may need to drop Vendor line
anyway.

m.
___
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-17 Thread Marian Balakowicz
Scott Wood wrote:
 
 +void tqm5200_show_cpuinfo(struct seq_file *m)
 +{
 +struct device_node* np = of_find_all_nodes(NULL);
 +const char *model = NULL;
 +
 +if (np)
 +model = of_get_property(np, model, NULL);
 +
 +seq_printf(m, vendor\t\t:  Freescale Semiconductor\n);
 +seq_printf(m, machine\t\t: %s\n, model ? model : unknown);
 +
 +of_node_put(np);
 +}
 
 Get rid of this.

Agree, that may be overhead in some cases. But there would be also
cases where printing out a machine name would be informative. CM5200
is one such example, there are several variants of the hw and platform
name is too generic.

Other situation would be adding compatible='mpc5200-generic' platform
where platform name would not provide any details.

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


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

2007-10-17 Thread Marian Balakowicz
David Gibson wrote:
 [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.

Ok.

 Second, is the flash really part of the SoC?

Not directly, it is attached to LocalPlus Bus Controller, which is
part of the SoC. And the soc@ is currently the only recognized of bus
for mpc5200, so if we want to move it to some other place new bindings
will need to be defined for lpc (LocalPlus Controller) bus. But I am
not quite sure where this should be attached. Bus is under LPC which
is a part of the SoC, but on the other hand Soc address range covers
only device control registers not the address space LPC may handle
(that may be varied). Any ideas?

m.



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


[PATCH 0/4] [POWERPC] MPC5200: update gpt binding, add restart support

2007-10-17 Thread Marian Balakowicz

This is a reworked version of patches to MPC5200 common code that were send
together with the TQM5200/CM5200/Motion-PRO board support chnages.

As there are some open issues in a board support code and to avoid
additional respin I would like to have those reviewed first.

[PATCH 1/4] [POWERPC] Add mpc52xx_find_and_map_path(), refactor utility 
functions
[PATCH 2/4] [POWERPC] Update device tree binding for mpc5200 gpt
[PATCH 3/4] [POWERPC] Add restart support for mpc52xx based platforms
[PATCH 4/4] [POWERPC] Enable restart support for lite5200 board

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


[PATCH 3/4] [POWERPC] Add restart support for mpc52xx based platforms

2007-10-17 Thread Marian Balakowicz

Add common helper routines: mpc52xx_map_wdt() and mpc52xx_restart().

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|3 +
 2 files changed, 48 insertions(+)

diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c 
b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 74b4b41..553937b 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -18,6 +18,13 @@ #include asm/io.h
 #include asm/prom.h
 #include asm/mpc52xx.h
 
+/*
+ * This variable is mapped in mpc52xx_map_wdt() and used in mpc52xx_restart().
+ * Permanent mapping is required because mpc52xx_restart() can be called
+ * from interrupt context while node mapping (which calls iorenmap())
+ * cannot be used at such point.
+ */
+static volatile struct mpc52xx_gpt *mpc52xx_wdt = NULL;
 
 static void __iomem *
 mpc52xx_map_node(struct device_node *ofn)
@@ -126,3 +133,41 @@ mpc52xx_declare_of_platform_devices(void
Error while probing of_platform bus\n);
 }
 
+void __init
+mpc52xx_map_wdt(void)
+{
+const void *has_wdt;
+   struct device_node *np;
+
+   /* mpc52xx_wdt is mapped here and used in mpc52xx_restart,
+* possibly from a interrupt context. */
+
+   for (np = NULL;
+   (np = of_find_compatible_node(np, NULL, fsl,mpc5200-gpt)) != NULL;
+   ) {
+   /* wdt is only implement on gpt0, check has-wdt property. */
+   has_wdt = of_get_property(np, fsl,has-wdt, NULL);
+   if (has_wdt) {
+   mpc52xx_wdt = mpc52xx_map_node(np);
+   break;
+   }
+   }
+}
+
+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_wdt) {
+   out_be32(mpc52xx_wdt-mode, 0x);
+   out_be32(mpc52xx_wdt-count, 0x00ff);
+   out_be32(mpc52xx_wdt-mode, 0x9004);
+   } else
+   printk(mpc52xx_restart: Can't access wdt. 
+   Restart impossible, system halted.\n);
+
+   while (1);
+}
diff --git a/include/asm-powerpc/mpc52xx.h b/include/asm-powerpc/mpc52xx.h
index 9cf05f9..39f619f 100644
--- a/include/asm-powerpc/mpc52xx.h
+++ b/include/asm-powerpc/mpc52xx.h
@@ -252,6 +252,9 @@ extern unsigned int mpc52xx_get_irq(void
 
 extern int __init mpc52xx_add_bridge(struct device_node *node);
 
+extern void __init mpc52xx_map_wdt(void);
+extern void mpc52xx_restart(char *cmd);
+
 #endif /* __ASSEMBLY__ */
 
 #ifdef CONFIG_PM


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


[PATCH 4/4] [POWERPC] Enable restart support for lite5200 board

2007-10-17 Thread Marian Balakowicz

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

 lite5200.c |4 
 1 file changed, 4 insertions(+)

diff --git a/arch/powerpc/platforms/52xx/lite5200.c 
b/arch/powerpc/platforms/52xx/lite5200.c
index 0caa3d9..ce9e3ee 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -143,6 +143,9 @@ #endif
/* Some mpc5200  mpc5200b related configuration */
mpc5200_setup_xlb_arbiter();
 
+   /* Map wdt for mpc52xx_restart() */
+   mpc52xx_map_wdt();
+
 #ifdef CONFIG_PM
mpc52xx_suspend.board_suspend_prepare = lite5200_suspend_prepare;
mpc52xx_suspend.board_resume_finish = lite5200_resume_finish;
@@ -193,5 +196,6 @@ define_machine(lite5200) {
.init   = mpc52xx_declare_of_platform_devices,
.init_IRQ   = mpc52xx_init_irq,
.get_irq= mpc52xx_get_irq,
+   .restart= mpc52xx_restart,
.calibrate_decr = generic_calibrate_decr,
 };


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


[PATCH 1/4] [POWERPC] Add mpc52xx_find_and_map_path(), refactor utility functions

2007-10-17 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]
Reviewed-by: Grant Likely [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 3bc201e..74b4b41 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -19,14 +19,12 @@ #include asm/prom.h
 #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;
 
@@ -42,8 +40,23 @@ mpc52xx_find_and_map(const char *compati
 
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 24751df..9cf05f9 100644
--- a/include/asm-powerpc/mpc52xx.h
+++ b/include/asm-powerpc/mpc52xx.h
@@ -242,6 +242,7 @@ #endif /* __ASSEMBLY__ */
 #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 mpc5200_setup_xlb_arbiter(void);
 extern void mpc52xx_declare_of_platform_devices(void);


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


Re: [PATCH 00/15] [POWERPC] TQM5200, CM5200 and Motion-PRO support

2007-10-09 Thread Marian Balakowicz

All,

Thanks for the review, will process all the comments and resend
updated patches soon.

Marian

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


[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

[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

  1   2   >