- Add support for dreamplug and iconnect (kirkwood) systems.
svn path=/dists/sid/linux/; revision=19167
This commit is contained in:
parent
e82a500c44
commit
3636096fe2
|
@ -24,6 +24,9 @@ linux (3.2.20-2) UNRELEASED; urgency=low
|
|||
[ Bastian Blank ]
|
||||
* Support build-arch and build-indep make targets.
|
||||
|
||||
[ Arnaud Patard ]
|
||||
* Add dreamplug and iconnect support (Closes: #675922)
|
||||
|
||||
-- Ben Hutchings <ben@decadent.org.uk> Tue, 12 Jun 2012 06:21:34 +0100
|
||||
|
||||
linux (3.2.20-1) unstable; urgency=low
|
||||
|
|
|
@ -37,6 +37,8 @@ CONFIG_LEDS_CPU=y
|
|||
CONFIG_UACCESS_WITH_MEMCPY=y
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_ARM_APPENDED_DTB=y
|
||||
CONFIG_ARM_ATAG_DTB_COMPAT=y
|
||||
CONFIG_CMDLINE=""
|
||||
# CONFIG_XIP_KERNEL is not set
|
||||
CONFIG_KEXEC=y
|
||||
|
@ -57,6 +59,9 @@ 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_ICONNECT_DT=y
|
||||
CONFIG_MACH_TS219=y
|
||||
CONFIG_MACH_TS41X=y
|
||||
CONFIG_MACH_DOCKSTAR=y
|
||||
|
@ -287,6 +292,7 @@ CONFIG_MMC_MVSDIO=m
|
|||
CONFIG_MTD=y
|
||||
# CONFIG_MTD_REDBOOT_PARTS is not set
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_OF_PARTS=y
|
||||
# CONFIG_MTD_AFS_PARTS is not set
|
||||
CONFIG_MTD_CHAR=y
|
||||
CONFIG_MTD_BLOCK=y
|
||||
|
@ -349,6 +355,7 @@ CONFIG_MTD_PHYSMAP=y
|
|||
CONFIG_MTD_PHYSMAP_START=0x0
|
||||
CONFIG_MTD_PHYSMAP_LEN=0x0
|
||||
CONFIG_MTD_PHYSMAP_BANKWIDTH=0
|
||||
CONFIG_MTD_PHYSMAP_OF=y
|
||||
# CONFIG_MTD_IMPA7 is not set
|
||||
# CONFIG_MTD_INTEL_VR_NOR is not set
|
||||
# CONFIG_MTD_PLATRAM is not set
|
||||
|
@ -460,6 +467,11 @@ CONFIG_MV643XX_ETH=m
|
|||
CONFIG_MWIFIEX=m
|
||||
CONFIG_MWIFIEX_SDIO=m
|
||||
|
||||
##
|
||||
## file: drivers/of/Kconfig
|
||||
##
|
||||
CONFIG_PROC_DEVICETREE=y
|
||||
|
||||
##
|
||||
## file: drivers/pcmcia/Kconfig
|
||||
##
|
||||
|
@ -558,6 +570,8 @@ 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_8250_DW is not set
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
|
||||
##
|
||||
## file: drivers/usb/Kconfig
|
||||
|
|
27
debian/patches/features/arm/kirkwood-add-configuration-for-mpp12-as-gpio.patch
vendored
Normal file
27
debian/patches/features/arm/kirkwood-add-configuration-for-mpp12-as-gpio.patch
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
commit 527ef0550d79e3b3a0ef8f5061072075afef6aaf
|
||||
Author: Arnaud Patard <arnaud.patard@rtp-net.org>
|
||||
Date: Thu Dec 1 11:58:25 2011 +0100
|
||||
|
||||
ARM: Kirkwood: Add configuration for MPP12 as GPIO
|
||||
|
||||
The MPP12 is listed in the 6281 HW manual as output only but the iconnect
|
||||
board from iomega is using it as GPIO (there's a button connected on it). So,
|
||||
I'm adding a definition for the MPP12 as GPIO. As I've no informations about
|
||||
this and which kirkwood are "affected", I'm adding a new #define instead of
|
||||
modifying the current one for MPP12.
|
||||
|
||||
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
|
||||
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
|
||||
|
||||
Index: sid/arch/arm/mach-kirkwood/mpp.h
|
||||
===================================================================
|
||||
--- sid.orig/arch/arm/mach-kirkwood/mpp.h 2012-05-31 01:44:12.000000000 +0200
|
||||
+++ sid/arch/arm/mach-kirkwood/mpp.h 2012-06-10 10:18:11.502678583 +0200
|
||||
@@ -102,6 +102,7 @@
|
||||
#define MPP11_SATA0_ACTn MPP( 11, 0x5, 0, 0, 0, 1, 1, 1, 1 )
|
||||
|
||||
#define MPP12_GPO MPP( 12, 0x0, 0, 1, 1, 1, 1, 1, 1 )
|
||||
+#define MPP12_GPIO MPP( 12, 0x0, 1, 1, 0, 0, 0, 1, 0 )
|
||||
#define MPP12_SD_CLK MPP( 12, 0x1, 0, 0, 1, 1, 1, 1, 1 )
|
||||
#define MPP12_AU_SPDIF0 MPP( 12, 0xa, 0, 0, 0, 0, 0, 0, 1 )
|
||||
#define MPP12_SPI_MOSI MPP( 12, 0xb, 0, 0, 0, 0, 0, 0, 1 )
|
|
@ -0,0 +1,291 @@
|
|||
commit 3d468b6d6052293ad3b8538b8277077981c28286
|
||||
Author: Jason Cooper <jason@lakedaemon.net>
|
||||
Date: Mon Feb 27 16:07:13 2012 +0000
|
||||
|
||||
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>
|
||||
|
||||
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..76392af
|
||||
--- /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
|
|
@ -0,0 +1,285 @@
|
|||
commit c06cd9bfcad4960023bac1f052da748824e24961
|
||||
Author: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
|
||||
Date: Wed Apr 18 23:16:41 2012 +0200
|
||||
|
||||
kirkwood: Add iconnect support
|
||||
|
||||
Add support for Iomega Iconnect system.
|
||||
|
||||
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
|
||||
Tested-By: Adam Baker <linux@baker-net.org.uk>
|
||||
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
|
||||
|
||||
Index: sid/arch/arm/boot/dts/kirkwood-iconnect.dts
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ sid/arch/arm/boot/dts/kirkwood-iconnect.dts 2012-06-10 01:24:28.300087489 +0200
|
||||
@@ -0,0 +1,26 @@
|
||||
+/dts-v1/;
|
||||
+
|
||||
+/include/ "kirkwood.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Iomega Iconnect";
|
||||
+ compatible = "iom,iconnect-1.1", "iom,iconnect", "mrvl,kirkwood-88f6281", "mrvl,kirkwood";
|
||||
+
|
||||
+ memory {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x00000000 0x10000000>;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "console=ttyS0,115200n8 earlyprintk mtdparts=orion_nand:0xc0000@0x0(uboot),0x20000@0xa0000(env),0x300000@0x100000(zImage),0x300000@0x540000(initrd),0x1f400000@0x980000(boot)";
|
||||
+ linux,initrd-start = <0x4500040>;
|
||||
+ linux,initrd-end = <0x4800000>;
|
||||
+ };
|
||||
+
|
||||
+ ocp@f1000000 {
|
||||
+ serial@12000 {
|
||||
+ clock-frequency = <200000000>;
|
||||
+ status = "ok";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
Index: sid/arch/arm/mach-kirkwood/Kconfig
|
||||
===================================================================
|
||||
--- sid.orig/arch/arm/mach-kirkwood/Kconfig 2012-06-10 01:13:01.000000000 +0200
|
||||
+++ sid/arch/arm/mach-kirkwood/Kconfig 2012-06-10 01:24:28.300087489 +0200
|
||||
@@ -58,6 +58,12 @@ config MACH_DREAMPLUG_DT
|
||||
Say 'Y' here if you want your kernel to support the
|
||||
Marvell DreamPlug (Flattened Device Tree).
|
||||
|
||||
+config MACH_ICONNECT_DT
|
||||
+ bool "Iomega Iconnect (Flattened Device Tree)"
|
||||
+ select ARCH_KIRKWOOD_DT
|
||||
+ help
|
||||
+ Say 'Y' here to enable Iomega Iconnect support.
|
||||
+
|
||||
config MACH_TS219
|
||||
bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS"
|
||||
help
|
||||
Index: sid/arch/arm/mach-kirkwood/Makefile
|
||||
===================================================================
|
||||
--- sid.orig/arch/arm/mach-kirkwood/Makefile 2012-06-10 01:13:58.000000000 +0200
|
||||
+++ sid/arch/arm/mach-kirkwood/Makefile 2012-06-10 01:24:28.300087489 +0200
|
||||
@@ -22,3 +22,4 @@ obj-$(CONFIG_MACH_T5325) += t5325-setup
|
||||
obj-$(CONFIG_CPU_IDLE) += cpuidle.o
|
||||
obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o
|
||||
obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o
|
||||
+obj-$(CONFIG_MACH_ICONNECT_DT) += board-iconnect.o
|
||||
Index: sid/arch/arm/mach-kirkwood/Makefile.boot
|
||||
===================================================================
|
||||
--- sid.orig/arch/arm/mach-kirkwood/Makefile.boot 2012-06-10 01:13:01.000000000 +0200
|
||||
+++ sid/arch/arm/mach-kirkwood/Makefile.boot 2012-06-10 01:24:28.300087489 +0200
|
||||
@@ -3,3 +3,4 @@ params_phys-y := 0x00000100
|
||||
initrd_phys-y := 0x00800000
|
||||
|
||||
dtb-$(CONFIG_MACH_DREAMPLUG_DT) += kirkwood-dreamplug.dtb
|
||||
+dtb-$(CONFIG_MACH_ICONNECT_DT) += kirkwood-iconnect.dtb
|
||||
Index: sid/arch/arm/mach-kirkwood/board-dt.c
|
||||
===================================================================
|
||||
--- sid.orig/arch/arm/mach-kirkwood/board-dt.c 2012-06-10 01:14:30.000000000 +0200
|
||||
+++ sid/arch/arm/mach-kirkwood/board-dt.c 2012-06-10 01:24:28.300087489 +0200
|
||||
@@ -56,11 +56,15 @@ static void __init kirkwood_dt_init(void
|
||||
if (of_machine_is_compatible("globalscale,dreamplug"))
|
||||
dreamplug_init();
|
||||
|
||||
+ if (of_machine_is_compatible("iom,iconnect"))
|
||||
+ iconnect_init();
|
||||
+
|
||||
of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL);
|
||||
}
|
||||
|
||||
static const char *kirkwood_dt_board_compat[] = {
|
||||
"globalscale,dreamplug",
|
||||
+ "iom,iconnect",
|
||||
NULL
|
||||
};
|
||||
|
||||
Index: sid/arch/arm/mach-kirkwood/board-iconnect.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ sid/arch/arm/mach-kirkwood/board-iconnect.c 2012-06-10 01:24:28.300087489 +0200
|
||||
@@ -0,0 +1,165 @@
|
||||
+/*
|
||||
+ * arch/arm/mach-kirkwood/board-iconnect.c
|
||||
+ *
|
||||
+ * Iomega i-connect 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/of.h>
|
||||
+#include <linux/of_address.h>
|
||||
+#include <linux/of_fdt.h>
|
||||
+#include <linux/of_irq.h>
|
||||
+#include <linux/of_platform.h>
|
||||
+#include <linux/mtd/partitions.h>
|
||||
+#include <linux/mv643xx_eth.h>
|
||||
+#include <linux/gpio.h>
|
||||
+#include <linux/leds.h>
|
||||
+#include <linux/spi/flash.h>
|
||||
+#include <linux/spi/spi.h>
|
||||
+#include <linux/spi/orion_spi.h>
|
||||
+#include <linux/i2c.h>
|
||||
+#include <linux/input.h>
|
||||
+#include <linux/gpio_keys.h>
|
||||
+#include <asm/mach/arch.h>
|
||||
+#include <mach/kirkwood.h>
|
||||
+#include "common.h"
|
||||
+#include "mpp.h"
|
||||
+
|
||||
+static struct mv643xx_eth_platform_data iconnect_ge00_data = {
|
||||
+ .phy_addr = MV643XX_ETH_PHY_ADDR(11),
|
||||
+};
|
||||
+
|
||||
+static struct gpio_led iconnect_led_pins[] = {
|
||||
+ {
|
||||
+ .name = "led_level",
|
||||
+ .gpio = 41,
|
||||
+ .default_trigger = "default-on",
|
||||
+ }, {
|
||||
+ .name = "power:blue",
|
||||
+ .gpio = 42,
|
||||
+ .default_trigger = "timer",
|
||||
+ }, {
|
||||
+ .name = "power:red",
|
||||
+ .gpio = 43,
|
||||
+ }, {
|
||||
+ .name = "usb1:blue",
|
||||
+ .gpio = 44,
|
||||
+ }, {
|
||||
+ .name = "usb2:blue",
|
||||
+ .gpio = 45,
|
||||
+ }, {
|
||||
+ .name = "usb3:blue",
|
||||
+ .gpio = 46,
|
||||
+ }, {
|
||||
+ .name = "usb4:blue",
|
||||
+ .gpio = 47,
|
||||
+ }, {
|
||||
+ .name = "otb:blue",
|
||||
+ .gpio = 48,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct gpio_led_platform_data iconnect_led_data = {
|
||||
+ .leds = iconnect_led_pins,
|
||||
+ .num_leds = ARRAY_SIZE(iconnect_led_pins),
|
||||
+ .gpio_blink_set = orion_gpio_led_blink_set,
|
||||
+};
|
||||
+
|
||||
+static struct platform_device iconnect_leds = {
|
||||
+ .name = "leds-gpio",
|
||||
+ .id = -1,
|
||||
+ .dev = {
|
||||
+ .platform_data = &iconnect_led_data,
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+static unsigned int iconnect_mpp_config[] __initdata = {
|
||||
+ MPP12_GPIO,
|
||||
+ MPP35_GPIO,
|
||||
+ MPP41_GPIO,
|
||||
+ MPP42_GPIO,
|
||||
+ MPP43_GPIO,
|
||||
+ MPP44_GPIO,
|
||||
+ MPP45_GPIO,
|
||||
+ MPP46_GPIO,
|
||||
+ MPP47_GPIO,
|
||||
+ MPP48_GPIO,
|
||||
+ 0
|
||||
+};
|
||||
+
|
||||
+static struct i2c_board_info __initdata iconnect_board_info[] = {
|
||||
+ {
|
||||
+ I2C_BOARD_INFO("lm63", 0x4c),
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct mtd_partition iconnect_nand_parts[] = {
|
||||
+ {
|
||||
+ .name = "flash",
|
||||
+ .offset = 0,
|
||||
+ .size = MTDPART_SIZ_FULL,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+/* yikes... theses are the original input buttons */
|
||||
+/* but I'm not convinced by the sw event choices */
|
||||
+static struct gpio_keys_button iconnect_buttons[] = {
|
||||
+ {
|
||||
+ .type = EV_SW,
|
||||
+ .code = SW_LID,
|
||||
+ .gpio = 12,
|
||||
+ .desc = "Reset Button",
|
||||
+ .active_low = 1,
|
||||
+ .debounce_interval = 100,
|
||||
+ }, {
|
||||
+ .type = EV_SW,
|
||||
+ .code = SW_TABLET_MODE,
|
||||
+ .gpio = 35,
|
||||
+ .desc = "OTB Button",
|
||||
+ .active_low = 1,
|
||||
+ .debounce_interval = 100,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct gpio_keys_platform_data iconnect_button_data = {
|
||||
+ .buttons = iconnect_buttons,
|
||||
+ .nbuttons = ARRAY_SIZE(iconnect_buttons),
|
||||
+};
|
||||
+
|
||||
+static struct platform_device iconnect_button_device = {
|
||||
+ .name = "gpio-keys",
|
||||
+ .id = -1,
|
||||
+ .num_resources = 0,
|
||||
+ .dev = {
|
||||
+ .platform_data = &iconnect_button_data,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+void __init iconnect_init(void)
|
||||
+{
|
||||
+ kirkwood_mpp_conf(iconnect_mpp_config);
|
||||
+ kirkwood_nand_init(ARRAY_AND_SIZE(iconnect_nand_parts), 25);
|
||||
+ kirkwood_i2c_init();
|
||||
+ i2c_register_board_info(0, iconnect_board_info,
|
||||
+ ARRAY_SIZE(iconnect_board_info));
|
||||
+
|
||||
+ kirkwood_ehci_init();
|
||||
+ kirkwood_ge00_init(&iconnect_ge00_data);
|
||||
+
|
||||
+ platform_device_register(&iconnect_button_device);
|
||||
+ platform_device_register(&iconnect_leds);
|
||||
+}
|
||||
+
|
||||
+static int __init iconnect_pci_init(void)
|
||||
+{
|
||||
+ if (of_machine_is_compatible("iom,iconnect"))
|
||||
+ kirkwood_pcie_init(KW_PCIE0);
|
||||
+ return 0;
|
||||
+}
|
||||
+subsys_initcall(iconnect_pci_init);
|
||||
Index: sid/arch/arm/mach-kirkwood/common.h
|
||||
===================================================================
|
||||
--- sid.orig/arch/arm/mach-kirkwood/common.h 2012-06-10 01:14:15.000000000 +0200
|
||||
+++ sid/arch/arm/mach-kirkwood/common.h 2012-06-10 01:24:28.300087489 +0200
|
||||
@@ -58,6 +58,12 @@ void dreamplug_init(void);
|
||||
static inline void dreamplug_init(void) {};
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_MACH_ICONNECT_DT
|
||||
+void iconnect_init(void);
|
||||
+#else
|
||||
+static inline void iconnect_init(void) {};
|
||||
+#endif
|
||||
+
|
||||
/* early init functions not converted to fdt yet */
|
||||
char *kirkwood_id(void);
|
||||
void kirkwood_l2_init(void);
|
116
debian/patches/features/arm/kirkwood-create-a-generic-function-for-gpio-led-blinking.patch
vendored
Normal file
116
debian/patches/features/arm/kirkwood-create-a-generic-function-for-gpio-led-blinking.patch
vendored
Normal file
|
@ -0,0 +1,116 @@
|
|||
commit ff3e660b5a881b401b2b6735aa5334f433237dcb
|
||||
Author: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
|
||||
Date: Wed Apr 18 23:16:40 2012 +0200
|
||||
|
||||
orion/kirkwood: create a generic function for gpio led blinking
|
||||
|
||||
dns323 and (at least) iconnect platforms are using hw led blinking, so,
|
||||
instead of having 2 identicals .gpio_blink_set gpio-led hooks, move
|
||||
dns323 code into gpio.c
|
||||
|
||||
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
|
||||
Tested-By: Adam Baker <linux@baker-net.org.uk>
|
||||
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
|
||||
|
||||
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c
|
||||
index c3ed15b..13d2bec 100644
|
||||
--- a/arch/arm/mach-orion5x/dns323-setup.c
|
||||
+++ b/arch/arm/mach-orion5x/dns323-setup.c
|
||||
@@ -253,27 +253,6 @@ error_fail:
|
||||
* GPIO LEDs (simple - doesn't use hardware blinking support)
|
||||
*/
|
||||
|
||||
-#define ORION_BLINK_HALF_PERIOD 100 /* ms */
|
||||
-
|
||||
-static int dns323_gpio_blink_set(unsigned gpio, int state,
|
||||
- unsigned long *delay_on, unsigned long *delay_off)
|
||||
-{
|
||||
-
|
||||
- if (delay_on && delay_off && !*delay_on && !*delay_off)
|
||||
- *delay_on = *delay_off = ORION_BLINK_HALF_PERIOD;
|
||||
-
|
||||
- switch(state) {
|
||||
- case GPIO_LED_NO_BLINK_LOW:
|
||||
- case GPIO_LED_NO_BLINK_HIGH:
|
||||
- orion_gpio_set_blink(gpio, 0);
|
||||
- gpio_set_value(gpio, state);
|
||||
- break;
|
||||
- case GPIO_LED_BLINK:
|
||||
- orion_gpio_set_blink(gpio, 1);
|
||||
- }
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
static struct gpio_led dns323ab_leds[] = {
|
||||
{
|
||||
.name = "power:blue",
|
||||
@@ -312,13 +291,13 @@ static struct gpio_led dns323c_leds[] = {
|
||||
static struct gpio_led_platform_data dns323ab_led_data = {
|
||||
.num_leds = ARRAY_SIZE(dns323ab_leds),
|
||||
.leds = dns323ab_leds,
|
||||
- .gpio_blink_set = dns323_gpio_blink_set,
|
||||
+ .gpio_blink_set = orion_gpio_led_blink_set,
|
||||
};
|
||||
|
||||
static struct gpio_led_platform_data dns323c_led_data = {
|
||||
.num_leds = ARRAY_SIZE(dns323c_leds),
|
||||
.leds = dns323c_leds,
|
||||
- .gpio_blink_set = dns323_gpio_blink_set,
|
||||
+ .gpio_blink_set = orion_gpio_led_blink_set,
|
||||
};
|
||||
|
||||
static struct platform_device dns323_gpio_leds = {
|
||||
diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c
|
||||
index d3401e7..af95af2 100644
|
||||
--- a/arch/arm/plat-orion/gpio.c
|
||||
+++ b/arch/arm/plat-orion/gpio.c
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/gpio.h>
|
||||
+#include <linux/leds.h>
|
||||
|
||||
/*
|
||||
* GPIO unit register offsets.
|
||||
@@ -295,6 +296,28 @@ void orion_gpio_set_blink(unsigned pin, int blink)
|
||||
}
|
||||
EXPORT_SYMBOL(orion_gpio_set_blink);
|
||||
|
||||
+#define ORION_BLINK_HALF_PERIOD 100 /* ms */
|
||||
+
|
||||
+int orion_gpio_led_blink_set(unsigned gpio, int state,
|
||||
+ unsigned long *delay_on, unsigned long *delay_off)
|
||||
+{
|
||||
+
|
||||
+ if (delay_on && delay_off && !*delay_on && !*delay_off)
|
||||
+ *delay_on = *delay_off = ORION_BLINK_HALF_PERIOD;
|
||||
+
|
||||
+ switch (state) {
|
||||
+ case GPIO_LED_NO_BLINK_LOW:
|
||||
+ case GPIO_LED_NO_BLINK_HIGH:
|
||||
+ orion_gpio_set_blink(gpio, 0);
|
||||
+ gpio_set_value(gpio, state);
|
||||
+ break;
|
||||
+ case GPIO_LED_BLINK:
|
||||
+ orion_gpio_set_blink(gpio, 1);
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(orion_gpio_led_blink_set);
|
||||
+
|
||||
|
||||
/*****************************************************************************
|
||||
* Orion GPIO IRQ
|
||||
diff --git a/arch/arm/plat-orion/include/plat/gpio.h b/arch/arm/plat-orion/include/plat/gpio.h
|
||||
index 3abf304..bec0c98 100644
|
||||
--- a/arch/arm/plat-orion/include/plat/gpio.h
|
||||
+++ b/arch/arm/plat-orion/include/plat/gpio.h
|
||||
@@ -19,6 +19,8 @@
|
||||
*/
|
||||
void orion_gpio_set_unused(unsigned pin);
|
||||
void orion_gpio_set_blink(unsigned pin, int blink);
|
||||
+int orion_gpio_led_blink_set(unsigned gpio, int state,
|
||||
+ unsigned long *delay_on, unsigned long *delay_off);
|
||||
|
||||
#define GPIO_INPUT_OK (1 << 0)
|
||||
#define GPIO_OUTPUT_OK (1 << 1)
|
|
@ -0,0 +1,141 @@
|
|||
commit 2b45e05f51a79c2818523c923dfe008b8b2f4227
|
||||
Author: Jason Cooper <jason@lakedaemon.net>
|
||||
Date: Wed Feb 29 17:39:08 2012 +0000
|
||||
|
||||
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>
|
||||
|
||||
Index: sid/arch/arm/mach-kirkwood/board-dt.c
|
||||
===================================================================
|
||||
--- sid.orig/arch/arm/mach-kirkwood/board-dt.c 2012-06-10 20:02:17.000000000 +0200
|
||||
+++ sid/arch/arm/mach-kirkwood/board-dt.c 2012-06-10 20:02:22.677136456 +0200
|
||||
@@ -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();
|
||||
Index: sid/arch/arm/mach-kirkwood/common.c
|
||||
===================================================================
|
||||
--- sid.orig/arch/arm/mach-kirkwood/common.c 2012-06-10 19:52:45.000000000 +0200
|
||||
+++ sid/arch/arm/mach-kirkwood/common.c 2012-06-10 20:02:22.677136456 +0200
|
||||
@@ -164,7 +164,7 @@ void __init kirkwood_nand_init_rnb(struc
|
||||
/*****************************************************************************
|
||||
* SoC RTC
|
||||
****************************************************************************/
|
||||
-static void __init kirkwood_rtc_init(void)
|
||||
+void __init kirkwood_rtc_init(void)
|
||||
{
|
||||
orion_rtc_init(RTC_PHYS_BASE, IRQ_KIRKWOOD_RTC);
|
||||
}
|
||||
@@ -282,7 +282,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;
|
||||
|
||||
@@ -295,7 +295,7 @@ static void __init kirkwood_xor0_init(vo
|
||||
/*****************************************************************************
|
||||
* XOR1
|
||||
****************************************************************************/
|
||||
-static void __init kirkwood_xor1_init(void)
|
||||
+void __init kirkwood_xor1_init(void)
|
||||
{
|
||||
kirkwood_clk_ctrl |= CGC_XOR1;
|
||||
|
||||
@@ -307,7 +307,7 @@ static void __init kirkwood_xor1_init(vo
|
||||
/*****************************************************************************
|
||||
* Watchdog
|
||||
****************************************************************************/
|
||||
-static void __init kirkwood_wdt_init(void)
|
||||
+void __init kirkwood_wdt_init(void)
|
||||
{
|
||||
orion_wdt_init(kirkwood_tclk);
|
||||
}
|
||||
@@ -397,7 +397,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;
|
||||
|
||||
@@ -440,7 +440,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);
|
||||
Index: sid/arch/arm/mach-kirkwood/common.h
|
||||
===================================================================
|
||||
--- sid.orig/arch/arm/mach-kirkwood/common.h 2012-06-10 19:52:45.000000000 +0200
|
||||
+++ sid/arch/arm/mach-kirkwood/common.h 2012-06-10 20:02:22.677136456 +0200
|
||||
@@ -51,6 +51,14 @@ void kirkwood_nand_init(struct mtd_parti
|
||||
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;
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
commit 759a45185ac0e4dfaf8bbfcb390ec73aca4b7a34
|
||||
Author: Jason Cooper <jason@lakedaemon.net>
|
||||
Date: Mon Feb 27 16:07:14 2012 +0000
|
||||
|
||||
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>
|
||||
|
||||
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 76392af..fbe6405 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();
|
|
@ -0,0 +1,71 @@
|
|||
commit 163f2cea673a4ae831ad2cd26d8f01977c3add93
|
||||
Author: Jason Cooper <jason@lakedaemon.net>
|
||||
Date: Thu Mar 15 01:00:27 2012 +0000
|
||||
|
||||
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>
|
||||
|
||||
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";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
360
debian/patches/features/arm/kirkwood-fdt-facilitate-new-boards-during-fdt-migration.patch
vendored
Normal file
360
debian/patches/features/arm/kirkwood-fdt-facilitate-new-boards-during-fdt-migration.patch
vendored
Normal file
|
@ -0,0 +1,360 @@
|
|||
commit 6fa6b8781fbd5e6cd5e313c5e3bdd73b426d8f30
|
||||
Author: Jason Cooper <jason@lakedaemon.net>
|
||||
Date: Thu Mar 15 00:52:31 2012 +0000
|
||||
|
||||
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>
|
||||
|
||||
Index: sid/arch/arm/mach-kirkwood/Makefile
|
||||
===================================================================
|
||||
--- sid.orig/arch/arm/mach-kirkwood/Makefile 2012-06-10 20:02:17.000000000 +0200
|
||||
+++ sid/arch/arm/mach-kirkwood/Makefile 2012-06-10 20:02:33.717135970 +0200
|
||||
@@ -21,3 +21,4 @@ obj-$(CONFIG_MACH_T5325) += t5325-setup
|
||||
|
||||
obj-$(CONFIG_CPU_IDLE) += cpuidle.o
|
||||
obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o
|
||||
+obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o
|
||||
Index: sid/arch/arm/mach-kirkwood/board-dreamplug.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ sid/arch/arm/mach-kirkwood/board-dreamplug.c 2012-06-10 20:02:33.717135970 +0200
|
||||
@@ -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);
|
||||
+}
|
||||
Index: sid/arch/arm/mach-kirkwood/board-dt.c
|
||||
===================================================================
|
||||
--- sid.orig/arch/arm/mach-kirkwood/board-dt.c 2012-06-10 20:02:22.000000000 +0200
|
||||
+++ sid/arch/arm/mach-kirkwood/board-dt.c 2012-06-10 20:02:33.721135970 +0200
|
||||
@@ -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);
|
||||
Index: sid/arch/arm/mach-kirkwood/common.h
|
||||
===================================================================
|
||||
--- sid.orig/arch/arm/mach-kirkwood/common.h 2012-06-10 20:02:22.000000000 +0200
|
||||
+++ sid/arch/arm/mach-kirkwood/common.h 2012-06-10 20:02:33.721135970 +0200
|
||||
@@ -51,6 +51,14 @@ void kirkwood_nand_init(struct mtd_parti
|
||||
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);
|
|
@ -0,0 +1,44 @@
|
|||
commit b77816dea3e4c0f815510dea2a0ca9bcda6644dc
|
||||
Author: Jason Cooper <jason@lakedaemon.net>
|
||||
Date: Wed Mar 7 15:03:57 2012 +0000
|
||||
|
||||
ARM: kirkwood: fdt: use mrvl ticker symbol
|
||||
|
||||
Also, use inclusive register size for uart0.
|
||||
|
||||
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
|
||||
|
||||
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";
|
||||
};
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
commit 92a486eabefadca1169fbf15d737feeaf2bda844
|
||||
Author: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
|
||||
Date: Wed Apr 18 23:16:39 2012 +0200
|
||||
|
||||
kirkwood/orion: fix orion_gpio_set_blink
|
||||
|
||||
gpio registers are for 32 gpios. Given that orion_gpio_set_blink is called
|
||||
directly and not through gpiolib, it needs to make sure that the pin value
|
||||
given to the internal functions are between 0 and 31.
|
||||
|
||||
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
|
||||
Tested-By: Adam Baker <linux@baker-net.org.uk>
|
||||
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
|
||||
|
||||
diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c
|
||||
index 10d1608..d3401e7 100644
|
||||
--- a/arch/arm/plat-orion/gpio.c
|
||||
+++ b/arch/arm/plat-orion/gpio.c
|
||||
@@ -289,8 +289,8 @@ void orion_gpio_set_blink(unsigned pin, int blink)
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&ochip->lock, flags);
|
||||
- __set_level(ochip, pin, 0);
|
||||
- __set_blinking(ochip, pin, blink);
|
||||
+ __set_level(ochip, pin & 31, 0);
|
||||
+ __set_blinking(ochip, pin & 31, blink);
|
||||
spin_unlock_irqrestore(&ochip->lock, flags);
|
||||
}
|
||||
EXPORT_SYMBOL(orion_gpio_set_blink);
|
|
@ -0,0 +1,42 @@
|
|||
commit ea983ede1195982c64220e9030c28ff111c8655c
|
||||
Author: Jason Cooper <jason@lakedaemon.net>
|
||||
Date: Tue Mar 6 23:53:57 2012 +0000
|
||||
|
||||
ARM: kirkwood: rtc-mv devicetree bindings
|
||||
|
||||
Trivial conversion to devicetree.
|
||||
|
||||
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
|
||||
|
||||
diff --git a/drivers/rtc/rtc-mv.c b/drivers/rtc/rtc-mv.c
|
||||
index 768e2ed..0dd8421 100644
|
||||
--- a/drivers/rtc/rtc-mv.c
|
||||
+++ b/drivers/rtc/rtc-mv.c
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <linux/bcd.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/platform_device.h>
|
||||
+#include <linux/of.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/gfp.h>
|
||||
#include <linux/module.h>
|
||||
@@ -294,11 +295,19 @@ static int __exit mv_rtc_remove(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_OF
|
||||
+static struct of_device_id rtc_mv_of_match_table[] = {
|
||||
+ { .compatible = "mrvl,orion-rtc", },
|
||||
+ {}
|
||||
+};
|
||||
+#endif
|
||||
+
|
||||
static struct platform_driver mv_rtc_driver = {
|
||||
.remove = __exit_p(mv_rtc_remove),
|
||||
.driver = {
|
||||
.name = "rtc-mv",
|
||||
.owner = THIS_MODULE,
|
||||
+ .of_match_table = of_match_ptr(rtc_mv_of_match_table),
|
||||
},
|
||||
};
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
commit e871b87a1e978e618c75acd4ceb6cd4699728691
|
||||
Author: Jason Cooper <jason@lakedaemon.net>
|
||||
Date: Tue Mar 6 23:55:04 2012 +0000
|
||||
|
||||
ARM: kirkwood: use devicetree for rtc-mv
|
||||
|
||||
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
|
||||
Acked-by: Arnd Bergmann <arnd@arndb.de>
|
||||
|
||||
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 975ad01..1c672d9 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 04a7eb9..a02cae8 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 4737578..fa8e768 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);
|
|
@ -0,0 +1,30 @@
|
|||
commit a7ac56de8316c0eb1111824c9add045cac2bd7a2
|
||||
Author: Ian Campbell <ijc@hellion.org.uk>
|
||||
Date: Sun Apr 29 14:40:42 2012 +0100
|
||||
|
||||
ARM: kirkwood: add missing kexec.h include
|
||||
|
||||
Fixes 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>
|
||||
[v4, rebase onto recent Linus for repost]
|
||||
[v3, speak actual English in the commit message, thanks Sergei Shtylyov]
|
||||
[v2, using linux/kexec.h not asm/kexec.h]
|
||||
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
|
||||
|
||||
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
|
||||
index 1c672d9..f7fe1b9 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>
|
|
@ -337,3 +337,18 @@ features/all/cpu-devices/powernow-k7-Fix-CPU-family-number.patch
|
|||
features/all/cpu-devices/powernow-k6-Really-enable-auto-loading.patch
|
||||
features/all/cpu-devices/intel_idle-Revert-change-of-auto_demotion_disable_fl.patch
|
||||
features/all/cpu-devices/Partially-revert-cpufreq-Add-support-for-x86-cpuinfo.patch
|
||||
|
||||
features/arm/kirkwood-add-dreamplug-fdt-support.patch
|
||||
features/arm/kirkwood-fdt-convert-uart0-to-devicetree.patch
|
||||
features/arm/kirkwood-fdt-use-mrvl-ticker-symbol.patch
|
||||
features/arm/kirkwood-fdt-absorb-kirkwood_init.patch
|
||||
features/arm/kirkwood-fdt-facilitate-new-boards-during-fdt-migration.patch
|
||||
features/arm/kirkwood-fdt-define-uart01-as-disabled.patch
|
||||
features/arm/kirkwood-rtc-mv-devicetree-bindings.patch
|
||||
features/arm/kirkwood-use-devicetree-for-rtc-mv.patch
|
||||
features/arm/kirkwood_add_missing_kexec_h.patch
|
||||
features/arm/kirkwood-fix-orion_gpio_set_blink.patch
|
||||
features/arm/kirkwood-create-a-generic-function-for-gpio-led-blinking.patch
|
||||
features/arm/kirkwood-add-configuration-for-mpp12-as-gpio.patch
|
||||
features/arm/kirkwood-add-iconnect-support.patch
|
||||
|
||||
|
|
|
@ -378,6 +378,15 @@ install-image_sparc64_$(FEATURESET)_$(FLAVOUR)_plain_image \
|
|||
install-image_sh4_$(FEATURESET)_$(FLAVOUR)_plain_image:
|
||||
install -m644 '$(DIR)/arch/$(KERNEL_ARCH)/boot/zImage' $(INSTALL_DIR)/vmlinuz-$(REAL_VERSION)
|
||||
|
||||
ifneq ($(filter armel armhf,$(ARCH)),)
|
||||
install-image_$(ARCH)_$(FEATURESET)_$(FLAVOUR)_plain_image: DTB_INSTALL_DIR = /usr/lib/linux-image-$(REAL_VERSION)
|
||||
install-image_$(ARCH)_$(FEATURESET)_$(FLAVOUR)_plain_image:
|
||||
+$(MAKE_CLEAN) -C $(DIR) dtbs
|
||||
shopt -s nullglob ; for i in $(DIR)/arch/arm/boot/*.dtb ; do \
|
||||
install -D -m644 $$i '$(PACKAGE_DIR)'/'$(DTB_INSTALL_DIR)'/$$(basename $$i) ; \
|
||||
done
|
||||
endif
|
||||
|
||||
install-image_amd64_$(FEATURESET)_$(FLAVOUR)_plain_image \
|
||||
install-image_i386_$(FEATURESET)_$(FLAVOUR)_plain_image:
|
||||
install -m644 '$(DIR)/arch/$(KERNEL_ARCH)/boot/bzImage' $(INSTALL_DIR)/vmlinuz-$(REAL_VERSION)
|
||||
|
|
Loading…
Reference in New Issue