On Tue, 2012-03-20 at 09:00 +0000, Ian Campbell wrote:
> It looks like the exact patches which are going upstream have evolved a
> bit since then (and there are now others which cover more functionality)
> so I will retry with those.
So... I backported thepatches which went into v3.4-rc1 to v3.2 and
applied them to the Debian kernel package (full diff of that vs 3.2.14-1
is attached). I've also pushed the backported branch to:
git://gitorious.org/ijc/linux.git debian/squeeze/dreamplug
(branch is actually based on 3.2.9)
The upstream commits are:
e871b87a1e97 ARM: kirkwood: use devicetree for rtc-mv
ea983ede1195 ARM: kirkwood: rtc-mv devicetree bindings
163f2cea673a ARM: kirkwood: fdt: define uart[01] as disabled, enable uart0
6fa6b8781fbd ARM: kirkwood: fdt: facilitate new boards during fdt migration
2b45e05f51a7 ARM: kirkwood: fdt: absorb kirkwood_init()
b77816dea3e4 ARM: kirkwood: fdt: use mrvl ticker symbol
a855a7ced4f5 ARM: orion: wdt: use resource vice direct access
7399532065a6 ARM: Kirkwood: Remove tclk from kirkwood_asoc_platform_data.
d34b7d452397 ARM: orion: spi: remove enable_clock_fix which is not used
759a45185ac0 ARM: kirkwood: convert uart0 to devicetree.
3d468b6d6052 ARM: kirkwood: add dreamplug (fdt) support.
There is one additional build fix which I have sent upstream:
http://lists.arm.linux.org.uk/lurker/message/20120406.131038.d940552d.en.html
The total impact is:
$ git diff --stat v3.2.9 HEAD
arch/arm/boot/dts/kirkwood-dreamplug.dts | 24 +++++
arch/arm/boot/dts/kirkwood.dtsi | 36 +++++++
arch/arm/mach-kirkwood/Kconfig | 14 +++
arch/arm/mach-kirkwood/Makefile | 2 +
arch/arm/mach-kirkwood/Makefile.boot | 2 +
arch/arm/mach-kirkwood/board-dreamplug.c | 152 ++++++++++++++++++++++++++++++
arch/arm/mach-kirkwood/board-dt.c | 75 +++++++++++++++
arch/arm/mach-kirkwood/common.c | 11 +-
arch/arm/mach-kirkwood/common.h | 15 +++
arch/arm/plat-orion/common.c | 7 +-
drivers/rtc/rtc-mv.c | 9 ++
drivers/spi/spi-orion.c | 5 -
drivers/watchdog/orion_wdt.c | 24 +++--
include/linux/spi/orion_spi.h | 1 -
Of this the non-kirkwood changes are from:
ea983ede1195 ARM: kirkwood: rtc-mv devicetree bindings
a855a7ced4f5 ARM: orion: wdt: use resource vice direct access
7399532065a6 ARM: Kirkwood: Remove tclk from kirkwood_asoc_platform_data.
d34b7d452397 ARM: orion: spi: remove enable_clock_fix which is not used
By my inspection these changes (which include the plat-orion change and
the rtc, spi and watchdog driver changes) are fine WRT other platforms
using these drivers and obviously if they weren't then that would be a
bug which can & should be fixed with upstream.
The changes to mach-kirkwood/common.[ch] are purely about exporting some
functions (i.e. removing the static and adding a prototype to a header),
this is part of the upstream strategy for minimising the impact on
non-DT kirkwood platforms.
Apart from the build fix all these changes are in the mainline kernel.
Enabling DT on a flavour appears to mangle the ABI in ways which I
expect is not going to be easy to avoid so this change will probably
have to wait until an ABI bump.
These Dreamplug patches add DT support for kirkwood in a way which is
designed not to interfere with existing non-DT platforms and more
generally upstream has done things in a way that FDT and ATAG platforms
can safely be supported using the same kernel image.
Ian.
--
Ian Campbell
BOFH excuse #165:
Backbone Scoliosis
From 1ca1c4d66bc27558e2e003898dfa1b88354a4361 Mon Sep 17 00:00:00 2001
From: Ian Campbell <ijc@hellion.org.uk>
Date: Fri, 6 Apr 2012 13:38:55 +0100
Subject: [PATCH] [armel] add support for dreamplug
---
linux-2.6/debian/changelog | 6 +
linux-2.6/debian/config/armel/config.kirkwood | 4 +
...d-Remove-tclk-from-kirkwood_asoc_platform.patch | 34 ++
.../ARM-kirkwood-add-dreamplug-fdt-support.patch | 306 ++++++++++++++++
.../ARM-kirkwood-add-missing-kexec.h-include.patch | 32 ++
.../arm/ARM-kirkwood-backport-to-3.2.patch | 24 ++
.../ARM-kirkwood-convert-uart0-to-devicetree.patch | 50 +++
.../ARM-kirkwood-fdt-absorb-kirkwood_init.patch | 149 ++++++++
...d-fdt-define-uart-01-as-disabled-enable-u.patch | 79 ++++
...d-fdt-facilitate-new-boards-during-fdt-mi.patch | 372 ++++++++++++++++++++
.../ARM-kirkwood-fdt-use-mrvl-ticker-symbol.patch | 51 +++
.../ARM-kirkwood-use-devicetree-for-rtc-mv.patch | 71 ++++
...orion-wdt-use-resource-vice-direct-access.patch | 143 ++++++++
linux-2.6/debian/patches/series/base | 13 +
14 files changed, 1334 insertions(+), 0 deletions(-)
create mode 100644 linux-2.6/debian/patches/features/arm/ARM-Kirkwood-Remove-tclk-from-kirkwood_asoc_platform.patch
create mode 100644 linux-2.6/debian/patches/features/arm/ARM-kirkwood-add-dreamplug-fdt-support.patch
create mode 100644 linux-2.6/debian/patches/features/arm/ARM-kirkwood-add-missing-kexec.h-include.patch
create mode 100644 linux-2.6/debian/patches/features/arm/ARM-kirkwood-backport-to-3.2.patch
create mode 100644 linux-2.6/debian/patches/features/arm/ARM-kirkwood-convert-uart0-to-devicetree.patch
create mode 100644 linux-2.6/debian/patches/features/arm/ARM-kirkwood-fdt-absorb-kirkwood_init.patch
create mode 100644 linux-2.6/debian/patches/features/arm/ARM-kirkwood-fdt-define-uart-01-as-disabled-enable-u.patch
create mode 100644 linux-2.6/debian/patches/features/arm/ARM-kirkwood-fdt-facilitate-new-boards-during-fdt-mi.patch
create mode 100644 linux-2.6/debian/patches/features/arm/ARM-kirkwood-fdt-use-mrvl-ticker-symbol.patch
create mode 100644 linux-2.6/debian/patches/features/arm/ARM-kirkwood-use-devicetree-for-rtc-mv.patch
create mode 100644 linux-2.6/debian/patches/features/arm/ARM-orion-wdt-use-resource-vice-direct-access.patch
diff --git a/linux-2.6/debian/changelog b/linux-2.6/debian/changelog
index ed59a0d..f06809b 100644
--- a/linux-2.6/debian/changelog
+++ b/linux-2.6/debian/changelog
@@ -1,3 +1,9 @@
+linux-2.6 (3.2.14-2) UNRELEASED; urgency=low
+
+ * [armel] add support for Dreamplug.
+
+ -- Ian Campbell <ijc@hellion.org.uk> Fri, 06 Apr 2012 13:38:21 +0100
+
linux-2.6 (3.2.14-1) unstable; urgency=low
* New upstream stable update:
diff --git a/linux-2.6/debian/config/armel/config.kirkwood b/linux-2.6/debian/config/armel/config.kirkwood
index 992f634..358aeab 100644
--- a/linux-2.6/debian/config/armel/config.kirkwood
+++ b/linux-2.6/debian/config/armel/config.kirkwood
@@ -37,6 +37,7 @@ CONFIG_LEDS_CPU=y
CONFIG_UACCESS_WITH_MEMCPY=y
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
+# CONFIG_ARM_APPENDED_DTB is not set
CONFIG_CMDLINE=""
# CONFIG_XIP_KERNEL is not set
CONFIG_KEXEC=y
@@ -57,6 +58,8 @@ CONFIG_MACH_MV88F6281GTW_GE=y
CONFIG_MACH_SHEEVAPLUG=y
CONFIG_MACH_ESATA_SHEEVAPLUG=y
CONFIG_MACH_GURUPLUG=y
+CONFIG_ARCH_KIRKWOOD_DT=y
+CONFIG_MACH_DREAMPLUG_DT=y
CONFIG_MACH_TS219=y
CONFIG_MACH_TS41X=y
CONFIG_MACH_DOCKSTAR=y
@@ -558,6 +561,7 @@ CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=2
# CONFIG_SERIAL_8250_EXTENDED is not set
+CONFIG_SERIAL_OF_PLATFORM=y
##
## file: drivers/usb/Kconfig
diff --git a/linux-2.6/debian/patches/features/arm/ARM-Kirkwood-Remove-tclk-from-kirkwood_asoc_platform.patch b/linux-2.6/debian/patches/features/arm/ARM-Kirkwood-Remove-tclk-from-kirkwood_asoc_platform.patch
new file mode 100644
index 0000000..a965b53
--- /dev/null
+++ b/linux-2.6/debian/patches/features/arm/ARM-Kirkwood-Remove-tclk-from-kirkwood_asoc_platform.patch
@@ -0,0 +1,34 @@
+From abf3eebc30953249737a6f557e68acd24a157be3 Mon Sep 17 00:00:00 2001
+From: Andrew Lunn <andrew@lunn.ch>
+Date: Tue, 6 Mar 2012 07:31:04 +0100
+Subject: [PATCH 04/12] ARM: Kirkwood: Remove tclk from
+ kirkwood_asoc_platform_data.
+
+It is not used anywhere in the sound driver.
+
+Signed-off-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: Jason Cooper <jason@lakedaemon.net>
+(cherry picked from commit 7399532065a68cce8b0ea18aace7ded45bfb205f)
+
+Conflicts:
+
+ arch/arm/plat-orion/include/plat/audio.h
+---
+ arch/arm/mach-kirkwood/common.c | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
+index f3248cf..31a0a0f 100644
+--- a/arch/arm/mach-kirkwood/common.c
++++ b/arch/arm/mach-kirkwood/common.c
+@@ -452,7 +452,6 @@ void __init kirkwood_init(void)
+ {
+ printk(KERN_INFO "Kirkwood: %s, TCLK=%d.\n",
+ kirkwood_id(), kirkwood_tclk);
+- kirkwood_i2s_data.tclk = kirkwood_tclk;
+
+ /*
+ * Disable propagation of mbus errors to the CPU local bus,
+--
+1.7.8.3
+
diff --git a/linux-2.6/debian/patches/features/arm/ARM-kirkwood-add-dreamplug-fdt-support.patch b/linux-2.6/debian/patches/features/arm/ARM-kirkwood-add-dreamplug-fdt-support.patch
new file mode 100644
index 0000000..bcbb095
--- /dev/null
+++ b/linux-2.6/debian/patches/features/arm/ARM-kirkwood-add-dreamplug-fdt-support.patch
@@ -0,0 +1,306 @@
+From 8b97d8ac8fa4f7e53f5e565a9ed6feb2d6063d5e Mon Sep 17 00:00:00 2001
+From: Jason Cooper <jason@lakedaemon.net>
+Date: Mon, 27 Feb 2012 16:07:13 +0000
+Subject: [PATCH 01/12] ARM: kirkwood: add dreamplug (fdt) support.
+
+Initially, copied guruplug-setup.c and did s/guruplug/dreamplug/g.
+Then, switched to SPI based NOR flash.
+
+After talking to Arnd Bergman, chose an incremental approach to adding
+devicetree support. First, we use the dtb to tell us we are on the
+dreamplug, then we gradually port over drivers.
+
+Driver porting will start with the uart (see next patch), and progress
+from there. Possibly, spi/flash/partitions will be next.
+
+When done, board-dt.c will no longer be dreamplug specific, and dt's can
+be made for the other kirkwood boards.
+
+Signed-off-by: Jason Cooper <jason@lakedaemon.net>
+Reviewed-by: Arnd Bergmann <arnd@arndb.de>
+Acked-by: Nicolas Pitre <nico@linaro.org>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+(cherry picked from commit 3d468b6d6052293ad3b8538b8277077981c28286)
+[ijc -- backport by removing kirkwood_restart]
+---
+ arch/arm/boot/dts/kirkwood-dreamplug.dts | 18 +++
+ arch/arm/boot/dts/kirkwood.dtsi | 6 +
+ arch/arm/mach-kirkwood/Kconfig | 14 +++
+ arch/arm/mach-kirkwood/Makefile | 1 +
+ arch/arm/mach-kirkwood/Makefile.boot | 2 +
+ arch/arm/mach-kirkwood/board-dt.c | 181 ++++++++++++++++++++++++++++++
+ 6 files changed, 222 insertions(+), 0 deletions(-)
+ create mode 100644 arch/arm/boot/dts/kirkwood-dreamplug.dts
+ create mode 100644 arch/arm/boot/dts/kirkwood.dtsi
+ create mode 100644 arch/arm/mach-kirkwood/board-dt.c
+
+diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts
+new file mode 100644
+index 0000000..0424d99
+--- /dev/null
++++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts
+@@ -0,0 +1,18 @@
++/dts-v1/;
++
++/include/ "kirkwood.dtsi"
++
++/ {
++ model = "Globalscale Technologies Dreamplug";
++ compatible = "globalscale,dreamplug-003-ds2001", "globalscale,dreamplug", "marvell,kirkwood-88f6281", "marvell,kirkwood";
++
++ memory {
++ device_type = "memory";
++ reg = <0x00000000 0x20000000>;
++ };
++
++ chosen {
++ bootargs = "console=ttyS0,115200n8 earlyprintk";
++ };
++
++};
+diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
+new file mode 100644
+index 0000000..771c6bb
+--- /dev/null
++++ b/arch/arm/boot/dts/kirkwood.dtsi
+@@ -0,0 +1,6 @@
++/include/ "skeleton.dtsi"
++
++/ {
++ compatible = "marvell,kirkwood";
++};
++
+diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
+index 7fc603b..90ceab7 100644
+--- a/arch/arm/mach-kirkwood/Kconfig
++++ b/arch/arm/mach-kirkwood/Kconfig
+@@ -44,6 +44,20 @@ config MACH_GURUPLUG
+ Say 'Y' here if you want your kernel to support the
+ Marvell GuruPlug Reference Board.
+
++config ARCH_KIRKWOOD_DT
++ bool "Marvell Kirkwood Flattened Device Tree"
++ select USE_OF
++ help
++ Say 'Y' here if you want your kernel to support the
++ Marvell Kirkwood using flattened device tree.
++
++config MACH_DREAMPLUG_DT
++ bool "Marvell DreamPlug (Flattened Device Tree)"
++ select ARCH_KIRKWOOD_DT
++ help
++ Say 'Y' here if you want your kernel to support the
++ Marvell DreamPlug (Flattened Device Tree).
++
+ config MACH_TS219
+ bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS"
+ help
+diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
+index 5dcaa81..acbc5e1 100644
+--- a/arch/arm/mach-kirkwood/Makefile
++++ b/arch/arm/mach-kirkwood/Makefile
+@@ -20,3 +20,4 @@ obj-$(CONFIG_MACH_NET5BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o
+ obj-$(CONFIG_MACH_T5325) += t5325-setup.o
+
+ obj-$(CONFIG_CPU_IDLE) += cpuidle.o
++obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o
+diff --git a/arch/arm/mach-kirkwood/Makefile.boot b/arch/arm/mach-kirkwood/Makefile.boot
+index 760a0ef..16f9385 100644
+--- a/arch/arm/mach-kirkwood/Makefile.boot
++++ b/arch/arm/mach-kirkwood/Makefile.boot
+@@ -1,3 +1,5 @@
+ zreladdr-y += 0x00008000
+ params_phys-y := 0x00000100
+ initrd_phys-y := 0x00800000
++
++dtb-$(CONFIG_MACH_DREAMPLUG_DT) += kirkwood-dreamplug.dtb
+diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
+new file mode 100644
+index 0000000..0802624
+--- /dev/null
++++ b/arch/arm/mach-kirkwood/board-dt.c
+@@ -0,0 +1,181 @@
++/*
++ * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net>
++ *
++ * arch/arm/mach-kirkwood/board-dt.c
++ *
++ * Marvell DreamPlug Reference Board Setup
++ *
++ * This file is licensed under the terms of the GNU General Public
++ * License version 2. This program is licensed "as is" without any
++ * warranty of any kind, whether express or implied.
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/mtd/partitions.h>
++#include <linux/ata_platform.h>
++#include <linux/mv643xx_eth.h>
++#include <linux/of.h>
++#include <linux/of_address.h>
++#include <linux/of_fdt.h>
++#include <linux/of_irq.h>
++#include <linux/of_platform.h>
++#include <linux/gpio.h>
++#include <linux/leds.h>
++#include <linux/mtd/physmap.h>
++#include <linux/spi/flash.h>
++#include <linux/spi/spi.h>
++#include <linux/spi/orion_spi.h>
++#include <asm/mach-types.h>
++#include <asm/mach/arch.h>
++#include <mach/kirkwood.h>
++#include <plat/mvsdio.h>
++#include "common.h"
++#include "mpp.h"
++
++static struct of_device_id kirkwood_dt_match_table[] __initdata = {
++ { .compatible = "simple-bus", },
++ { }
++};
++
++struct mtd_partition dreamplug_partitions[] = {
++ {
++ .name = "u-boot",
++ .size = SZ_512K,
++ .offset = 0,
++ },
++ {
++ .name = "u-boot env",
++ .size = SZ_64K,
++ .offset = SZ_512K + SZ_512K,
++ },
++ {
++ .name = "dtb",
++ .size = SZ_64K,
++ .offset = SZ_512K + SZ_512K + SZ_512K,
++ },
++};
++
++static const struct flash_platform_data dreamplug_spi_slave_data = {
++ .type = "mx25l1606e",
++ .name = "spi_flash",
++ .parts = dreamplug_partitions,
++ .nr_parts = ARRAY_SIZE(dreamplug_partitions),
++};
++
++static struct spi_board_info __initdata dreamplug_spi_slave_info[] = {
++ {
++ .modalias = "m25p80",
++ .platform_data = &dreamplug_spi_slave_data,
++ .irq = -1,
++ .max_speed_hz = 50000000,
++ .bus_num = 0,
++ .chip_select = 0,
++ },
++};
++
++static struct mv643xx_eth_platform_data dreamplug_ge00_data = {
++ .phy_addr = MV643XX_ETH_PHY_ADDR(0),
++};
++
++static struct mv643xx_eth_platform_data dreamplug_ge01_data = {
++ .phy_addr = MV643XX_ETH_PHY_ADDR(1),
++};
++
++static struct mv_sata_platform_data dreamplug_sata_data = {
++ .n_ports = 1,
++};
++
++static struct mvsdio_platform_data dreamplug_mvsdio_data = {
++ /* unfortunately the CD signal has not been connected */
++};
++
++static struct gpio_led dreamplug_led_pins[] = {
++ {
++ .name = "dreamplug:blue:bluetooth",
++ .gpio = 47,
++ .active_low = 1,
++ },
++ {
++ .name = "dreamplug:green:wifi",
++ .gpio = 48,
++ .active_low = 1,
++ },
++ {
++ .name = "dreamplug:green:wifi_ap",
++ .gpio = 49,
++ .active_low = 1,
++ },
++};
++
++static struct gpio_led_platform_data dreamplug_led_data = {
++ .leds = dreamplug_led_pins,
++ .num_leds = ARRAY_SIZE(dreamplug_led_pins),
++};
++
++static struct platform_device dreamplug_leds = {
++ .name = "leds-gpio",
++ .id = -1,
++ .dev = {
++ .platform_data = &dreamplug_led_data,
++ }
++};
++
++static unsigned int dreamplug_mpp_config[] __initdata = {
++ MPP0_SPI_SCn,
++ MPP1_SPI_MOSI,
++ MPP2_SPI_SCK,
++ MPP3_SPI_MISO,
++ MPP47_GPIO, /* Bluetooth LED */
++ MPP48_GPIO, /* Wifi LED */
++ MPP49_GPIO, /* Wifi AP LED */
++ 0
++};
++
++static void __init dreamplug_init(void)
++{
++ /*
++ * Basic setup. Needs to be called early.
++ */
++ kirkwood_mpp_conf(dreamplug_mpp_config);
++
++ kirkwood_uart0_init();
++
++ spi_register_board_info(dreamplug_spi_slave_info,
++ ARRAY_SIZE(dreamplug_spi_slave_info));
++ kirkwood_spi_init();
++
++ kirkwood_ehci_init();
++ kirkwood_ge00_init(&dreamplug_ge00_data);
++ kirkwood_ge01_init(&dreamplug_ge01_data);
++ kirkwood_sata_init(&dreamplug_sata_data);
++ kirkwood_sdio_init(&dreamplug_mvsdio_data);
++
++ platform_device_register(&dreamplug_leds);
++}
++
++static void __init kirkwood_dt_init(void)
++{
++ kirkwood_init();
++
++ if (of_machine_is_compatible("globalscale,dreamplug"))
++ dreamplug_init();
++
++ of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL);
++}
++
++static const char *kirkwood_dt_board_compat[] = {
++ "globalscale,dreamplug",
++ NULL
++};
++
++DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)")
++ /* Maintainer: Jason Cooper <jason@lakedaemon.net> */
++ .map_io = kirkwood_map_io,
++ .init_early = kirkwood_init_early,
++ .init_irq = kirkwood_init_irq,
++ .timer = &kirkwood_timer,
++ .init_machine = kirkwood_dt_init,
++ .dt_compat = kirkwood_dt_board_compat,
++MACHINE_END
+--
+1.7.8.3
+
diff --git a/linux-2.6/debian/patches/features/arm/ARM-kirkwood-add-missing-kexec.h-include.patch b/linux-2.6/debian/patches/features/arm/ARM-kirkwood-add-missing-kexec.h-include.patch
new file mode 100644
index 0000000..7a447c8
--- /dev/null
+++ b/linux-2.6/debian/patches/features/arm/ARM-kirkwood-add-missing-kexec.h-include.patch
@@ -0,0 +1,32 @@
+From eab7d096368d325d2a25fc71d408bbfdd94341e4 Mon Sep 17 00:00:00 2001
+From: Ian Campbell <ijc@hellion.org.uk>
+Date: Fri, 6 Apr 2012 13:27:23 +0100
+Subject: [PATCH 12/12] ARM: kirkwood: add missing kexec.h include
+
+Fixes build the following build error when CONFIG_KEXEC is enabled:
+ CC arch/arm/mach-kirkwood/board-dt.o
+arch/arm/mach-kirkwood/board-dt.c: In function 'kirkwood_dt_init':
+arch/arm/mach-kirkwood/board-dt.c:52:2: error: 'kexec_reinit' undeclared (first use in this function)
+arch/arm/mach-kirkwood/board-dt.c:52:2: note: each undeclared identifier is reported only once for each function it appears in
+
+Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
+[v2, using linux/kexec.h not asm/kexec.h]
+---
+ arch/arm/mach-kirkwood/board-dt.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
+index d3cf5e6..23da042 100644
+--- a/arch/arm/mach-kirkwood/board-dt.c
++++ b/arch/arm/mach-kirkwood/board-dt.c
+@@ -14,6 +14,7 @@
+ #include <linux/init.h>
+ #include <linux/of.h>
+ #include <linux/of_platform.h>
++#include <linux/kexec.h>
+ #include <asm/mach/arch.h>
+ #include <asm/mach/map.h>
+ #include <mach/bridge-regs.h>
+--
+1.7.8.3
+
diff --git a/linux-2.6/debian/patches/features/arm/ARM-kirkwood-backport-to-3.2.patch b/linux-2.6/debian/patches/features/arm/ARM-kirkwood-backport-to-3.2.patch
new file mode 100644
index 0000000..7856f90
--- /dev/null
+++ b/linux-2.6/debian/patches/features/arm/ARM-kirkwood-backport-to-3.2.patch
@@ -0,0 +1,24 @@
+From 89c1168d065245c697c21045621532a618409240 Mon Sep 17 00:00:00 2001
+From: Ian Campbell <ijc@hellion.org.uk>
+Date: Sun, 11 Mar 2012 13:03:25 +0000
+Subject: [PATCH 03/13] ARM: kirkwood: backport to 3.2
+
+Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
+---
+ arch/arm/mach-kirkwood/board-dt.c | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
+index fbe6405..d93d6e0 100644
+--- a/arch/arm/mach-kirkwood/board-dt.c
++++ b/arch/arm/mach-kirkwood/board-dt.c
+@@ -175,6 +175,5 @@ DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)")
+ .init_irq = kirkwood_init_irq,
+ .timer = &kirkwood_timer,
+ .init_machine = kirkwood_dt_init,
+- .restart = kirkwood_restart,
+ .dt_compat = kirkwood_dt_board_compat,
+ MACHINE_END
+--
+1.7.8.3
+
diff --git a/linux-2.6/debian/patches/features/arm/ARM-kirkwood-convert-uart0-to-devicetree.patch b/linux-2.6/debian/patches/features/arm/ARM-kirkwood-convert-uart0-to-devicetree.patch
new file mode 100644
index 0000000..42815c9
--- /dev/null
+++ b/linux-2.6/debian/patches/features/arm/ARM-kirkwood-convert-uart0-to-devicetree.patch
@@ -0,0 +1,50 @@
+From 6078cc253b47bc90fd06394f6667a2b43e367794 Mon Sep 17 00:00:00 2001
+From: Jason Cooper <jason@lakedaemon.net>
+Date: Mon, 27 Feb 2012 16:07:14 +0000
+Subject: [PATCH 02/12] ARM: kirkwood: convert uart0 to devicetree.
+
+This uart is the primary console for the dreamplug. Removed
+kirkwood_uart0_init() call from board-dt.c.
+
+Signed-off-by: Jason Cooper <jason@lakedaemon.net>
+Reviewed-by: Arnd Bergmann <arnd@arndb.de>
+Acked-by: Nicolas Pitre <nico@linaro.org>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+(cherry picked from commit 759a45185ac0e4dfaf8bbfcb390ec73aca4b7a34)
+---
+ arch/arm/boot/dts/kirkwood-dreamplug.dts | 7 +++++++
+ arch/arm/mach-kirkwood/board-dt.c | 2 --
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts
+index 0424d99..8a5dff8 100644
+--- a/arch/arm/boot/dts/kirkwood-dreamplug.dts
++++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts
+@@ -15,4 +15,11 @@
+ bootargs = "console=ttyS0,115200n8 earlyprintk";
+ };
+
++ serial@f1012000 {
++ compatible = "ns16550a";
++ reg = <0xf1012000 0xff>;
++ reg-shift = <2>;
++ interrupts = <33>;
++ clock-frequency = <200000000>;
++ };
+ };
+diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
+index 0802624..d93d6e0 100644
+--- a/arch/arm/mach-kirkwood/board-dt.c
++++ b/arch/arm/mach-kirkwood/board-dt.c
+@@ -140,8 +140,6 @@ static void __init dreamplug_init(void)
+ */
+ kirkwood_mpp_conf(dreamplug_mpp_config);
+
+- kirkwood_uart0_init();
+-
+ spi_register_board_info(dreamplug_spi_slave_info,
+ ARRAY_SIZE(dreamplug_spi_slave_info));
+ kirkwood_spi_init();
+--
+1.7.8.3
+
diff --git a/linux-2.6/debian/patches/features/arm/ARM-kirkwood-fdt-absorb-kirkwood_init.patch b/linux-2.6/debian/patches/features/arm/ARM-kirkwood-fdt-absorb-kirkwood_init.patch
new file mode 100644
index 0000000..8e07a4b
--- /dev/null
+++ b/linux-2.6/debian/patches/features/arm/ARM-kirkwood-fdt-absorb-kirkwood_init.patch
@@ -0,0 +1,149 @@
+From 423a4ea18bee4882532984434d587a810ccec9f2 Mon Sep 17 00:00:00 2001
+From: Jason Cooper <jason@lakedaemon.net>
+Date: Wed, 29 Feb 2012 17:39:08 +0000
+Subject: [PATCH 07/12] ARM: kirkwood: fdt: absorb kirkwood_init()
+
+We need to absorb kirkwood_init() into kirkwood_dt_init() so that as we
+convert drivers, we can remove the platform call, eg
+kirkwood_rtc_init(). This maintains compatibility with non-fdt
+configurations because they still call kirkwood_init() in common.c.
+
+As drivers are converted, we will reinstate the 'static' qualifier in
+common.c.
+
+Signed-off-by: Jason Cooper <jason@lakedaemon.net>
+(cherry picked from commit 2b45e05f51a79c2818523c923dfe008b8b2f4227)
+---
+ arch/arm/mach-kirkwood/board-dt.c | 29 ++++++++++++++++++++++++++++-
+ arch/arm/mach-kirkwood/common.c | 12 ++++++------
+ arch/arm/mach-kirkwood/common.h | 8 ++++++++
+ 3 files changed, 42 insertions(+), 7 deletions(-)
+
+diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
+index d93d6e0..d926ee8 100644
+--- a/arch/arm/mach-kirkwood/board-dt.c
++++ b/arch/arm/mach-kirkwood/board-dt.c
+@@ -29,7 +29,9 @@
+ #include <linux/spi/orion_spi.h>
+ #include <asm/mach-types.h>
+ #include <asm/mach/arch.h>
++#include <asm/mach/map.h>
+ #include <mach/kirkwood.h>
++#include <mach/bridge-regs.h>
+ #include <plat/mvsdio.h>
+ #include "common.h"
+ #include "mpp.h"
+@@ -155,7 +157,32 @@ static void __init dreamplug_init(void)
+
+ static void __init kirkwood_dt_init(void)
+ {
+- kirkwood_init();
++ pr_info("Kirkwood: %s, TCLK=%d.\n", kirkwood_id(), kirkwood_tclk);
++
++ /*
++ * Disable propagation of mbus errors to the CPU local bus,
++ * as this causes mbus errors (which can occur for example
++ * for PCI aborts) to throw CPU aborts, which we're not set
++ * up to deal with.
++ */
++ writel(readl(CPU_CONFIG) & ~CPU_CONFIG_ERROR_PROP, CPU_CONFIG);
++
++ kirkwood_setup_cpu_mbus();
++
++#ifdef CONFIG_CACHE_FEROCEON_L2
++ kirkwood_l2_init();
++#endif
++
++ /* internal devices that every board has */
++ kirkwood_rtc_init();
++ kirkwood_wdt_init();
++ kirkwood_xor0_init();
++ kirkwood_xor1_init();
++ kirkwood_crypto_init();
++
++#ifdef CONFIG_KEXEC
++ kexec_reinit = kirkwood_enable_pcie;
++#endif
+
+ if (of_machine_is_compatible("globalscale,dreamplug"))
+ dreamplug_init();
+diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
+index 31a0a0f..d10d914 100644
+--- a/arch/arm/mach-kirkwood/common.c
++++ b/arch/arm/mach-kirkwood/common.c
+@@ -163,7 +163,7 @@ void __init kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts,
+ /*****************************************************************************
+ * SoC RTC
+ ****************************************************************************/
+-static void __init kirkwood_rtc_init(void)
++void __init kirkwood_rtc_init(void)
+ {
+ orion_rtc_init(RTC_PHYS_BASE, IRQ_KIRKWOOD_RTC);
+ }
+@@ -281,7 +281,7 @@ void __init kirkwood_crypto_init(void)
+ /*****************************************************************************
+ * XOR0
+ ****************************************************************************/
+-static void __init kirkwood_xor0_init(void)
++void __init kirkwood_xor0_init(void)
+ {
+ kirkwood_clk_ctrl |= CGC_XOR0;
+
+@@ -294,7 +294,7 @@ static void __init kirkwood_xor0_init(void)
+ /*****************************************************************************
+ * XOR1
+ ****************************************************************************/
+-static void __init kirkwood_xor1_init(void)
++void __init kirkwood_xor1_init(void)
+ {
+ kirkwood_clk_ctrl |= CGC_XOR1;
+
+@@ -306,7 +306,7 @@ static void __init kirkwood_xor1_init(void)
+ /*****************************************************************************
+ * Watchdog
+ ****************************************************************************/
+-static void __init kirkwood_wdt_init(void)
++void __init kirkwood_wdt_init(void)
+ {
+ orion_wdt_init(kirkwood_tclk);
+ }
+@@ -396,7 +396,7 @@ void __init kirkwood_audio_init(void)
+ /*
+ * Identify device ID and revision.
+ */
+-static char * __init kirkwood_id(void)
++char * __init kirkwood_id(void)
+ {
+ u32 dev, rev;
+
+@@ -437,7 +437,7 @@ static char * __init kirkwood_id(void)
+ }
+ }
+
+-static void __init kirkwood_l2_init(void)
++void __init kirkwood_l2_init(void)
+ {
+ #ifdef CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH
+ writel(readl(L2_CONFIG_REG) | L2_WRITETHROUGH, L2_CONFIG_REG);
+diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
+index b9b0f09..58faf4e 100644
+--- a/arch/arm/mach-kirkwood/common.h
++++ b/arch/arm/mach-kirkwood/common.h
+@@ -51,6 +51,14 @@ void kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, int delay);
+ void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, int (*dev_ready)(struct mtd_info *));
+ void kirkwood_audio_init(void);
+
++char *kirkwood_id(void);
++void kirkwood_l2_init(void);
++void kirkwood_rtc_init(void);
++void kirkwood_wdt_init(void);
++void kirkwood_xor0_init(void);
++void kirkwood_xor1_init(void);
++void kirkwood_crypto_init(void);
++
+ extern int kirkwood_tclk;
+ extern struct sys_timer kirkwood_timer;
+
+--
+1.7.8.3
+
diff --git a/linux-2.6/debian/patches/features/arm/ARM-kirkwood-fdt-define-uart-01-as-disabled-enable-u.patch b/linux-2.6/debian/patches/features/arm/ARM-kirkwood-fdt-define-uart-01-as-disabled-enable-u.patch
new file mode 100644
index 0000000..88cb79a
--- /dev/null
+++ b/linux-2.6/debian/patches/features/arm/ARM-kirkwood-fdt-define-uart-01-as-disabled-enable-u.patch
@@ -0,0 +1,79 @@
+From 6f18ae75ca025cf6721f286592fe384106cf5790 Mon Sep 17 00:00:00 2001
+From: Jason Cooper <jason@lakedaemon.net>
+Date: Thu, 15 Mar 2012 01:00:27 +0000
+Subject: [PATCH 09/12] ARM: kirkwood: fdt: define uart[01] as disabled,
+ enable uart0
+
+Define both uarts in kirkwood.dtsi as they are common to all kirkwood
+SoCs. Each board may enable all or none of them, so they are disabled
+by default. uart0 is enabled for the dreamplug.
+
+tclk can vary for each board, so we leave it undefined in the kirkwood
+dtsi. Each board can then set it as appropriate when enabling the uart.
+
+Signed-off-by: Jason Cooper <jason@lakedaemon.net>
+(cherry picked from commit 163f2cea673a4ae831ad2cd26d8f01977c3add93)
+---
+ arch/arm/boot/dts/kirkwood-dreamplug.dts | 11 +++++------
+ arch/arm/boot/dts/kirkwood.dtsi | 26 +++++++++++++++++++++++++-
+ 2 files changed, 30 insertions(+), 7 deletions(-)
+
+diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts
+index 333f11b..a5376b8 100644
+--- a/arch/arm/boot/dts/kirkwood-dreamplug.dts
++++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts
+@@ -15,11 +15,10 @@
+ bootargs = "console=ttyS0,115200n8 earlyprintk";
+ };
+
+- serial@f1012000 {
+- compatible = "ns16550a";
+- reg = <0xf1012000 0x100>;
+- reg-shift = <2>;
+- interrupts = <33>;
+- clock-frequency = <200000000>;
++ ocp@f1000000 {
++ serial@12000 {
++ clock-frequency = <200000000>;
++ status = "ok";
++ };
+ };
+ };
+diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
+index 702b955..825310b 100644
+--- a/arch/arm/boot/dts/kirkwood.dtsi
++++ b/arch/arm/boot/dts/kirkwood.dtsi
+@@ -2,5 +2,29 @@
+
+ / {
+ compatible = "mrvl,kirkwood";
+-};
+
++ ocp@f1000000 {
++ compatible = "simple-bus";
++ ranges = <0 0xf1000000 0x1000000>;
++ #address-cells = <1>;
++ #size-cells = <1>;
++
++ serial@12000 {
++ compatible = "ns16550a";
++ reg = <0x12000 0x100>;
++ reg-shift = <2>;
++ interrupts = <33>;
++ /* set clock-frequency in board dts */
++ status = "disabled";
++ };
++
++ serial@12100 {
++ compatible = "ns16550a";
++ reg = <0x12100 0x100>;
++ reg-shift = <2>;
++ interrupts = <34>;
++ /* set clock-frequency in board dts */
++ status = "disabled";
++ };
++ };
++};
+--
+1.7.8.3
+
diff --git a/linux-2.6/debian/patches/features/arm/ARM-kirkwood-fdt-facilitate-new-boards-during-fdt-mi.patch b/linux-2.6/debian/patches/features/arm/ARM-kirkwood-fdt-facilitate-new-boards-during-fdt-mi.patch
new file mode 100644
index 0000000..637c84e
--- /dev/null
+++ b/linux-2.6/debian/patches/features/arm/ARM-kirkwood-fdt-facilitate-new-boards-during-fdt-mi.patch
@@ -0,0 +1,372 @@
+From ad46d963e60406454020bcb25989bffececa89d0 Mon Sep 17 00:00:00 2001
+From: Jason Cooper <jason@lakedaemon.net>
+Date: Thu, 15 Mar 2012 00:52:31 +0000
+Subject: [PATCH 08/12] ARM: kirkwood: fdt: facilitate new boards during fdt
+ migration
+
+Move all dreamplug-specific code out of board-dt.c and into
+board-dreamplug.c. This way new boards that are added during the
+conversion to fdt don't clutter up board-dt.c.
+
+Signed-off-by: Jason Cooper <jason@lakedaemon.net>
+(cherry picked from commit 6fa6b8781fbd5e6cd5e313c5e3bdd73b426d8f30)
+---
+ arch/arm/mach-kirkwood/Makefile | 1 +
+ arch/arm/mach-kirkwood/board-dreamplug.c | 152 ++++++++++++++++++++++++++++++
+ arch/arm/mach-kirkwood/board-dt.c | 133 +--------------------------
+ arch/arm/mach-kirkwood/common.h | 8 ++
+ 4 files changed, 162 insertions(+), 132 deletions(-)
+ create mode 100644 arch/arm/mach-kirkwood/board-dreamplug.c
+
+diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
+index acbc5e1..e299a95 100644
+--- a/arch/arm/mach-kirkwood/Makefile
++++ b/arch/arm/mach-kirkwood/Makefile
+@@ -21,3 +21,4 @@ obj-$(CONFIG_MACH_T5325) += t5325-setup.o
+
+ obj-$(CONFIG_CPU_IDLE) += cpuidle.o
+ obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o
++obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o
+diff --git a/arch/arm/mach-kirkwood/board-dreamplug.c b/arch/arm/mach-kirkwood/board-dreamplug.c
+new file mode 100644
+index 0000000..9854539
+--- /dev/null
++++ b/arch/arm/mach-kirkwood/board-dreamplug.c
+@@ -0,0 +1,152 @@
++/*
++ * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net>
++ *
++ * arch/arm/mach-kirkwood/board-dreamplug.c
++ *
++ * Marvell DreamPlug Reference Board Init for drivers not converted to
++ * flattened device tree yet.
++ *
++ * This file is licensed under the terms of the GNU General Public
++ * License version 2. This program is licensed "as is" without any
++ * warranty of any kind, whether express or implied.
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/mtd/partitions.h>
++#include <linux/ata_platform.h>
++#include <linux/mv643xx_eth.h>
++#include <linux/of.h>
++#include <linux/of_address.h>
++#include <linux/of_fdt.h>
++#include <linux/of_irq.h>
++#include <linux/of_platform.h>
++#include <linux/gpio.h>
++#include <linux/leds.h>
++#include <linux/mtd/physmap.h>
++#include <linux/spi/flash.h>
++#include <linux/spi/spi.h>
++#include <linux/spi/orion_spi.h>
++#include <asm/mach-types.h>
++#include <asm/mach/arch.h>
++#include <asm/mach/map.h>
++#include <mach/kirkwood.h>
++#include <mach/bridge-regs.h>
++#include <plat/mvsdio.h>
++#include "common.h"
++#include "mpp.h"
++
++struct mtd_partition dreamplug_partitions[] = {
++ {
++ .name = "u-boot",
++ .size = SZ_512K,
++ .offset = 0,
++ },
++ {
++ .name = "u-boot env",
++ .size = SZ_64K,
++ .offset = SZ_512K + SZ_512K,
++ },
++ {
++ .name = "dtb",
++ .size = SZ_64K,
++ .offset = SZ_512K + SZ_512K + SZ_512K,
++ },
++};
++
++static const struct flash_platform_data dreamplug_spi_slave_data = {
++ .type = "mx25l1606e",
++ .name = "spi_flash",
++ .parts = dreamplug_partitions,
++ .nr_parts = ARRAY_SIZE(dreamplug_partitions),
++};
++
++static struct spi_board_info __initdata dreamplug_spi_slave_info[] = {
++ {
++ .modalias = "m25p80",
++ .platform_data = &dreamplug_spi_slave_data,
++ .irq = -1,
++ .max_speed_hz = 50000000,
++ .bus_num = 0,
++ .chip_select = 0,
++ },
++};
++
++static struct mv643xx_eth_platform_data dreamplug_ge00_data = {
++ .phy_addr = MV643XX_ETH_PHY_ADDR(0),
++};
++
++static struct mv643xx_eth_platform_data dreamplug_ge01_data = {
++ .phy_addr = MV643XX_ETH_PHY_ADDR(1),
++};
++
++static struct mv_sata_platform_data dreamplug_sata_data = {
++ .n_ports = 1,
++};
++
++static struct mvsdio_platform_data dreamplug_mvsdio_data = {
++ /* unfortunately the CD signal has not been connected */
++};
++
++static struct gpio_led dreamplug_led_pins[] = {
++ {
++ .name = "dreamplug:blue:bluetooth",
++ .gpio = 47,
++ .active_low = 1,
++ },
++ {
++ .name = "dreamplug:green:wifi",
++ .gpio = 48,
++ .active_low = 1,
++ },
++ {
++ .name = "dreamplug:green:wifi_ap",
++ .gpio = 49,
++ .active_low = 1,
++ },
++};
++
++static struct gpio_led_platform_data dreamplug_led_data = {
++ .leds = dreamplug_led_pins,
++ .num_leds = ARRAY_SIZE(dreamplug_led_pins),
++};
++
++static struct platform_device dreamplug_leds = {
++ .name = "leds-gpio",
++ .id = -1,
++ .dev = {
++ .platform_data = &dreamplug_led_data,
++ }
++};
++
++static unsigned int dreamplug_mpp_config[] __initdata = {
++ MPP0_SPI_SCn,
++ MPP1_SPI_MOSI,
++ MPP2_SPI_SCK,
++ MPP3_SPI_MISO,
++ MPP47_GPIO, /* Bluetooth LED */
++ MPP48_GPIO, /* Wifi LED */
++ MPP49_GPIO, /* Wifi AP LED */
++ 0
++};
++
++void __init dreamplug_init(void)
++{
++ /*
++ * Basic setup. Needs to be called early.
++ */
++ kirkwood_mpp_conf(dreamplug_mpp_config);
++
++ spi_register_board_info(dreamplug_spi_slave_info,
++ ARRAY_SIZE(dreamplug_spi_slave_info));
++ kirkwood_spi_init();
++
++ kirkwood_ehci_init();
++ kirkwood_ge00_init(&dreamplug_ge00_data);
++ kirkwood_ge01_init(&dreamplug_ge01_data);
++ kirkwood_sata_init(&dreamplug_sata_data);
++ kirkwood_sdio_init(&dreamplug_mvsdio_data);
++
++ platform_device_register(&dreamplug_leds);
++}
+diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
+index d926ee8..bc37ca2 100644
+--- a/arch/arm/mach-kirkwood/board-dt.c
++++ b/arch/arm/mach-kirkwood/board-dt.c
+@@ -3,7 +3,7 @@
+ *
+ * arch/arm/mach-kirkwood/board-dt.c
+ *
+- * Marvell DreamPlug Reference Board Setup
++ * Flattened Device Tree board initialization
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+@@ -12,149 +12,18 @@
+
+ #include <linux/kernel.h>
+ #include <linux/init.h>
+-#include <linux/platform_device.h>
+-#include <linux/mtd/partitions.h>
+-#include <linux/ata_platform.h>
+-#include <linux/mv643xx_eth.h>
+ #include <linux/of.h>
+-#include <linux/of_address.h>
+-#include <linux/of_fdt.h>
+-#include <linux/of_irq.h>
+ #include <linux/of_platform.h>
+-#include <linux/gpio.h>
+-#include <linux/leds.h>
+-#include <linux/mtd/physmap.h>
+-#include <linux/spi/flash.h>
+-#include <linux/spi/spi.h>
+-#include <linux/spi/orion_spi.h>
+-#include <asm/mach-types.h>
+ #include <asm/mach/arch.h>
+ #include <asm/mach/map.h>
+-#include <mach/kirkwood.h>
+ #include <mach/bridge-regs.h>
+-#include <plat/mvsdio.h>
+ #include "common.h"
+-#include "mpp.h"
+
+ static struct of_device_id kirkwood_dt_match_table[] __initdata = {
+ { .compatible = "simple-bus", },
+ { }
+ };
+
+-struct mtd_partition dreamplug_partitions[] = {
+- {
+- .name = "u-boot",
+- .size = SZ_512K,
+- .offset = 0,
+- },
+- {
+- .name = "u-boot env",
+- .size = SZ_64K,
+- .offset = SZ_512K + SZ_512K,
+- },
+- {
+- .name = "dtb",
+- .size = SZ_64K,
+- .offset = SZ_512K + SZ_512K + SZ_512K,
+- },
+-};
+-
+-static const struct flash_platform_data dreamplug_spi_slave_data = {
+- .type = "mx25l1606e",
+- .name = "spi_flash",
+- .parts = dreamplug_partitions,
+- .nr_parts = ARRAY_SIZE(dreamplug_partitions),
+-};
+-
+-static struct spi_board_info __initdata dreamplug_spi_slave_info[] = {
+- {
+- .modalias = "m25p80",
+- .platform_data = &dreamplug_spi_slave_data,
+- .irq = -1,
+- .max_speed_hz = 50000000,
+- .bus_num = 0,
+- .chip_select = 0,
+- },
+-};
+-
+-static struct mv643xx_eth_platform_data dreamplug_ge00_data = {
+- .phy_addr = MV643XX_ETH_PHY_ADDR(0),
+-};
+-
+-static struct mv643xx_eth_platform_data dreamplug_ge01_data = {
+- .phy_addr = MV643XX_ETH_PHY_ADDR(1),
+-};
+-
+-static struct mv_sata_platform_data dreamplug_sata_data = {
+- .n_ports = 1,
+-};
+-
+-static struct mvsdio_platform_data dreamplug_mvsdio_data = {
+- /* unfortunately the CD signal has not been connected */
+-};
+-
+-static struct gpio_led dreamplug_led_pins[] = {
+- {
+- .name = "dreamplug:blue:bluetooth",
+- .gpio = 47,
+- .active_low = 1,
+- },
+- {
+- .name = "dreamplug:green:wifi",
+- .gpio = 48,
+- .active_low = 1,
+- },
+- {
+- .name = "dreamplug:green:wifi_ap",
+- .gpio = 49,
+- .active_low = 1,
+- },
+-};
+-
+-static struct gpio_led_platform_data dreamplug_led_data = {
+- .leds = dreamplug_led_pins,
+- .num_leds = ARRAY_SIZE(dreamplug_led_pins),
+-};
+-
+-static struct platform_device dreamplug_leds = {
+- .name = "leds-gpio",
+- .id = -1,
+- .dev = {
+- .platform_data = &dreamplug_led_data,
+- }
+-};
+-
+-static unsigned int dreamplug_mpp_config[] __initdata = {
+- MPP0_SPI_SCn,
+- MPP1_SPI_MOSI,
+- MPP2_SPI_SCK,
+- MPP3_SPI_MISO,
+- MPP47_GPIO, /* Bluetooth LED */
+- MPP48_GPIO, /* Wifi LED */
+- MPP49_GPIO, /* Wifi AP LED */
+- 0
+-};
+-
+-static void __init dreamplug_init(void)
+-{
+- /*
+- * Basic setup. Needs to be called early.
+- */
+- kirkwood_mpp_conf(dreamplug_mpp_config);
+-
+- spi_register_board_info(dreamplug_spi_slave_info,
+- ARRAY_SIZE(dreamplug_spi_slave_info));
+- kirkwood_spi_init();
+-
+- kirkwood_ehci_init();
+- kirkwood_ge00_init(&dreamplug_ge00_data);
+- kirkwood_ge01_init(&dreamplug_ge01_data);
+- kirkwood_sata_init(&dreamplug_sata_data);
+- kirkwood_sdio_init(&dreamplug_mvsdio_data);
+-
+- platform_device_register(&dreamplug_leds);
+-}
+-
+ static void __init kirkwood_dt_init(void)
+ {
+ pr_info("Kirkwood: %s, TCLK=%d.\n", kirkwood_id(), kirkwood_tclk);
+diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
+index 58faf4e..c71b528 100644
+--- a/arch/arm/mach-kirkwood/common.h
++++ b/arch/arm/mach-kirkwood/common.h
+@@ -51,6 +51,14 @@ void kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, int delay);
+ void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, int (*dev_ready)(struct mtd_info *));
+ void kirkwood_audio_init(void);
+
++/* board init functions for boards not fully converted to fdt */
++#ifdef CONFIG_MACH_DREAMPLUG_DT
++void dreamplug_init(void);
++#else
++static inline void dreamplug_init(void) {};
++#endif
++
++/* early init functions not converted to fdt yet */
+ char *kirkwood_id(void);
+ void kirkwood_l2_init(void);
+ void kirkwood_rtc_init(void);
+--
+1.7.8.3
+
diff --git a/linux-2.6/debian/patches/features/arm/ARM-kirkwood-fdt-use-mrvl-ticker-symbol.patch b/linux-2.6/debian/patches/features/arm/ARM-kirkwood-fdt-use-mrvl-ticker-symbol.patch
new file mode 100644
index 0000000..475f614
--- /dev/null
+++ b/linux-2.6/debian/patches/features/arm/ARM-kirkwood-fdt-use-mrvl-ticker-symbol.patch
@@ -0,0 +1,51 @@
+From a299a46ed347960a172e7c36733eaf3b8859e9ca Mon Sep 17 00:00:00 2001
+From: Jason Cooper <jason@lakedaemon.net>
+Date: Wed, 7 Mar 2012 15:03:57 +0000
+Subject: [PATCH 06/12] ARM: kirkwood: fdt: use mrvl ticker symbol
+
+Also, use inclusive register size for uart0.
+
+Signed-off-by: Jason Cooper <jason@lakedaemon.net>
+(cherry picked from commit b77816dea3e4c0f815510dea2a0ca9bcda6644dc)
+---
+ arch/arm/boot/dts/kirkwood-dreamplug.dts | 4 ++--
+ arch/arm/boot/dts/kirkwood.dtsi | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts
+index 8a5dff8..333f11b 100644
+--- a/arch/arm/boot/dts/kirkwood-dreamplug.dts
++++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts
+@@ -4,7 +4,7 @@
+
+ / {
+ model = "Globalscale Technologies Dreamplug";
+- compatible = "globalscale,dreamplug-003-ds2001", "globalscale,dreamplug", "marvell,kirkwood-88f6281", "marvell,kirkwood";
++ compatible = "globalscale,dreamplug-003-ds2001", "globalscale,dreamplug", "mrvl,kirkwood-88f6281", "mrvl,kirkwood";
+
+ memory {
+ device_type = "memory";
+@@ -17,7 +17,7 @@
+
+ serial@f1012000 {
+ compatible = "ns16550a";
+- reg = <0xf1012000 0xff>;
++ reg = <0xf1012000 0x100>;
+ reg-shift = <2>;
+ interrupts = <33>;
+ clock-frequency = <200000000>;
+diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
+index 771c6bb..702b955 100644
+--- a/arch/arm/boot/dts/kirkwood.dtsi
++++ b/arch/arm/boot/dts/kirkwood.dtsi
+@@ -1,6 +1,6 @@
+ /include/ "skeleton.dtsi"
+
+ / {
+- compatible = "marvell,kirkwood";
++ compatible = "mrvl,kirkwood";
+ };
+
+--
+1.7.8.3
+
diff --git a/linux-2.6/debian/patches/features/arm/ARM-kirkwood-use-devicetree-for-rtc-mv.patch b/linux-2.6/debian/patches/features/arm/ARM-kirkwood-use-devicetree-for-rtc-mv.patch
new file mode 100644
index 0000000..13e8e14
--- /dev/null
+++ b/linux-2.6/debian/patches/features/arm/ARM-kirkwood-use-devicetree-for-rtc-mv.patch
@@ -0,0 +1,71 @@
+From 5edcefedbf5bf700c98412928fb3d88787cfad4e Mon Sep 17 00:00:00 2001
+From: Jason Cooper <jason@lakedaemon.net>
+Date: Tue, 6 Mar 2012 23:55:04 +0000
+Subject: [PATCH 11/12] ARM: kirkwood: use devicetree for rtc-mv
+
+Signed-off-by: Jason Cooper <jason@lakedaemon.net>
+Acked-by: Arnd Bergmann <arnd@arndb.de>
+(cherry picked from commit e871b87a1e978e618c75acd4ceb6cd4699728691)
+---
+ arch/arm/boot/dts/kirkwood.dtsi | 6 ++++++
+ arch/arm/mach-kirkwood/board-dt.c | 1 -
+ arch/arm/mach-kirkwood/common.c | 2 +-
+ arch/arm/mach-kirkwood/common.h | 1 -
+ 4 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
+index 825310b..3474ef8 100644
+--- a/arch/arm/boot/dts/kirkwood.dtsi
++++ b/arch/arm/boot/dts/kirkwood.dtsi
+@@ -26,5 +26,11 @@
+ /* set clock-frequency in board dts */
+ status = "disabled";
+ };
++
++ rtc@10300 {
++ compatible = "mrvl,kirkwood-rtc", "mrvl,orion-rtc";
++ reg = <0x10300 0x20>;
++ interrupts = <53>;
++ };
+ };
+ };
+diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
+index bc37ca2..d3cf5e6 100644
+--- a/arch/arm/mach-kirkwood/board-dt.c
++++ b/arch/arm/mach-kirkwood/board-dt.c
+@@ -43,7 +43,6 @@ static void __init kirkwood_dt_init(void)
+ #endif
+
+ /* internal devices that every board has */
+- kirkwood_rtc_init();
+ kirkwood_wdt_init();
+ kirkwood_xor0_init();
+ kirkwood_xor1_init();
+diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
+index d10d914..f74998e 100644
+--- a/arch/arm/mach-kirkwood/common.c
++++ b/arch/arm/mach-kirkwood/common.c
+@@ -163,7 +163,7 @@ void __init kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts,
+ /*****************************************************************************
+ * SoC RTC
+ ****************************************************************************/
+-void __init kirkwood_rtc_init(void)
++static void __init kirkwood_rtc_init(void)
+ {
+ orion_rtc_init(RTC_PHYS_BASE, IRQ_KIRKWOOD_RTC);
+ }
+diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
+index c71b528..2ed2e50 100644
+--- a/arch/arm/mach-kirkwood/common.h
++++ b/arch/arm/mach-kirkwood/common.h
+@@ -61,7 +61,6 @@ static inline void dreamplug_init(void) {};
+ /* early init functions not converted to fdt yet */
+ char *kirkwood_id(void);
+ void kirkwood_l2_init(void);
+-void kirkwood_rtc_init(void);
+ void kirkwood_wdt_init(void);
+ void kirkwood_xor0_init(void);
+ void kirkwood_xor1_init(void);
+--
+1.7.8.3
+
diff --git a/linux-2.6/debian/patches/features/arm/ARM-orion-wdt-use-resource-vice-direct-access.patch b/linux-2.6/debian/patches/features/arm/ARM-orion-wdt-use-resource-vice-direct-access.patch
new file mode 100644
index 0000000..7f3b76d
--- /dev/null
+++ b/linux-2.6/debian/patches/features/arm/ARM-orion-wdt-use-resource-vice-direct-access.patch
@@ -0,0 +1,143 @@
+From cd3369e3135cc1786d58eb3bea2eee50eefbf858 Mon Sep 17 00:00:00 2001
+From: Jason Cooper <jason@lakedaemon.net>
+Date: Thu, 15 Mar 2012 00:33:26 +0000
+Subject: [PATCH 05/12] ARM: orion: wdt: use resource vice direct access
+
+Signed-off-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: Jason Cooper <jason@lakedaemon.net>
+Acked-by: Grant Likely <grant.likely@secretlab.ca>
+Acked-by: Arnd Bergmann <arnd@arndb.de>
+(cherry picked from commit a855a7ced4f572dcd1038db06b532df3ba9f227c)
+---
+ arch/arm/plat-orion/common.c | 7 ++++++-
+ drivers/watchdog/orion_wdt.c | 24 +++++++++++++++---------
+ 2 files changed, 21 insertions(+), 10 deletions(-)
+
+diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c
+index 9e5451b..1674f1c 100644
+--- a/arch/arm/plat-orion/common.c
++++ b/arch/arm/plat-orion/common.c
+@@ -22,6 +22,7 @@
+ #include <plat/orion_wdt.h>
+ #include <plat/mv_xor.h>
+ #include <plat/ehci-orion.h>
++#include <mach/bridge-regs.h>
+
+ /* Fill in the resources structure and link it into the platform
+ device structure. There is always a memory region, and nearly
+@@ -574,13 +575,17 @@ void __init orion_spi_1_init(unsigned long mapbase,
+ ****************************************************************************/
+ static struct orion_wdt_platform_data orion_wdt_data;
+
++static struct resource orion_wdt_resource =
++ DEFINE_RES_MEM(TIMER_VIRT_BASE, 0x28);
++
+ static struct platform_device orion_wdt_device = {
+ .name = "orion_wdt",
+ .id = -1,
+ .dev = {
+ .platform_data = &orion_wdt_data,
+ },
+- .num_resources = 0,
++ .resource = &orion_wdt_resource,
++ .num_resources = 1,
+ };
+
+ void __init orion_wdt_init(unsigned long tclk)
+diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
+index 2d9fb96..b95f556 100644
+--- a/drivers/watchdog/orion_wdt.c
++++ b/drivers/watchdog/orion_wdt.c
+@@ -28,9 +28,9 @@
+ /*
+ * Watchdog timer block registers.
+ */
+-#define TIMER_CTRL (TIMER_VIRT_BASE + 0x0000)
++#define TIMER_CTRL 0x0000
+ #define WDT_EN 0x0010
+-#define WDT_VAL (TIMER_VIRT_BASE + 0x0024)
++#define WDT_VAL 0x0024
+
+ #define WDT_MAX_CYCLE_COUNT 0xffffffff
+ #define WDT_IN_USE 0
+@@ -40,6 +40,7 @@ static int nowayout = WATCHDOG_NOWAYOUT;
+ static int heartbeat = -1; /* module parameter (seconds) */
+ static unsigned int wdt_max_duration; /* (seconds) */
+ static unsigned int wdt_tclk;
++static void __iomem *wdt_reg;
+ static unsigned long wdt_status;
+ static spinlock_t wdt_lock;
+
+@@ -48,7 +49,7 @@ static void orion_wdt_ping(void)
+ spin_lock(&wdt_lock);
+
+ /* Reload watchdog duration */
+- writel(wdt_tclk * heartbeat, WDT_VAL);
++ writel(wdt_tclk * heartbeat, wdt_reg + WDT_VAL);
+
+ spin_unlock(&wdt_lock);
+ }
+@@ -60,7 +61,7 @@ static void orion_wdt_enable(void)
+ spin_lock(&wdt_lock);
+
+ /* Set watchdog duration */
+- writel(wdt_tclk * heartbeat, WDT_VAL);
++ writel(wdt_tclk * heartbeat, wdt_reg + WDT_VAL);
+
+ /* Clear watchdog timer interrupt */
+ reg = readl(BRIDGE_CAUSE);
+@@ -68,9 +69,9 @@ static void orion_wdt_enable(void)
+ writel(reg, BRIDGE_CAUSE);
+
+ /* Enable watchdog timer */
+- reg = readl(TIMER_CTRL);
++ reg = readl(wdt_reg + TIMER_CTRL);
+ reg |= WDT_EN;
+- writel(reg, TIMER_CTRL);
++ writel(reg, wdt_reg + TIMER_CTRL);
+
+ /* Enable reset on watchdog */
+ reg = readl(RSTOUTn_MASK);
+@@ -92,9 +93,9 @@ static void orion_wdt_disable(void)
+ writel(reg, RSTOUTn_MASK);
+
+ /* Disable watchdog timer */
+- reg = readl(TIMER_CTRL);
++ reg = readl(wdt_reg + TIMER_CTRL);
+ reg &= ~WDT_EN;
+- writel(reg, TIMER_CTRL);
++ writel(reg, wdt_reg + TIMER_CTRL);
+
+ spin_unlock(&wdt_lock);
+ }
+@@ -102,7 +103,7 @@ static void orion_wdt_disable(void)
+ static int orion_wdt_get_timeleft(int *time_left)
+ {
+ spin_lock(&wdt_lock);
+- *time_left = readl(WDT_VAL) / wdt_tclk;
++ *time_left = readl(wdt_reg + WDT_VAL) / wdt_tclk;
+ spin_unlock(&wdt_lock);
+ return 0;
+ }
+@@ -236,6 +237,7 @@ static struct miscdevice orion_wdt_miscdev = {
+ static int __devinit orion_wdt_probe(struct platform_device *pdev)
+ {
+ struct orion_wdt_platform_data *pdata = pdev->dev.platform_data;
++ struct resource *res;
+ int ret;
+
+ if (pdata) {
+@@ -245,6 +247,10 @@ static int __devinit orion_wdt_probe(struct platform_device *pdev)
+ return -ENODEV;
+ }
+
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++
++ wdt_reg = ioremap(res->start, resource_size(res));
++
+ if (orion_wdt_miscdev.parent)
+ return -EBUSY;
+ orion_wdt_miscdev.parent = &pdev->dev;
+--
+1.7.8.3
+
diff --git a/linux-2.6/debian/patches/series/base b/linux-2.6/debian/patches/series/base
index b1d599e..c2e6507 100644
--- a/linux-2.6/debian/patches/series/base
+++ b/linux-2.6/debian/patches/series/base
@@ -90,3 +90,16 @@
# Temporary, until the next ABI bump
+ debian/revert-rtc-Provide-flag-for-rtc-devices-that-don-t-s.patch
+
++ features/arm/ARM-kirkwood-add-dreamplug-fdt-support.patch
++ features/arm/ARM-kirkwood-convert-uart0-to-devicetree.patch
++ features/arm/ARM-orion-spi-remove-enable_clock_fix-which-is-not-u.patch
++ features/arm/ARM-Kirkwood-Remove-tclk-from-kirkwood_asoc_platform.patch
++ features/arm/ARM-orion-wdt-use-resource-vice-direct-access.patch
++ features/arm/ARM-kirkwood-fdt-use-mrvl-ticker-symbol.patch
++ features/arm/ARM-kirkwood-fdt-absorb-kirkwood_init.patch
++ features/arm/ARM-kirkwood-fdt-facilitate-new-boards-during-fdt-mi.patch
++ features/arm/ARM-kirkwood-fdt-define-uart-01-as-disabled-enable-u.patch
++ features/arm/ARM-kirkwood-rtc-mv-devicetree-bindings.patch
++ features/arm/ARM-kirkwood-use-devicetree-for-rtc-mv.patch
++ features/arm/ARM-kirkwood-add-missing-kexec.h-include.patch
--
1.7.8.3
Attachment:
signature.asc
Description: This is a digitally signed message part