From 45dbd258441584f02d4700c0714c0e26e788f968 Mon Sep 17 00:00:00 2001
From: Eric Cooper <ecc@cmu.edu>
Date: Mon, 2 Aug 2010 14:31:07 -0400
Subject: [PATCH 1/3] kernel patches for Seagate DockStar

---
 .../patches/001-openwrt_partition_map.patch        |    6 +++-
 .../linux/kirkwood/patches/005-dockstar_leds.patch |   32 ++++++++++++++++++++
 .../linux/kirkwood/patches/006-dockstar_name.patch |   11 +++++++
 3 files changed, 48 insertions(+), 1 deletions(-)
 create mode 100644 target/linux/kirkwood/patches/005-dockstar_leds.patch
 create mode 100644 target/linux/kirkwood/patches/006-dockstar_name.patch

diff --git a/target/linux/kirkwood/patches/001-openwrt_partition_map.patch b/target/linux/kirkwood/patches/001-openwrt_partition_map.patch
index 32dc82f..5451d00 100644
--- a/target/linux/kirkwood/patches/001-openwrt_partition_map.patch
+++ b/target/linux/kirkwood/patches/001-openwrt_partition_map.patch
@@ -1,11 +1,15 @@
 --- a/arch/arm/mach-kirkwood/sheevaplug-setup.c
 +++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c
-@@ -34,7 +34,7 @@ static struct mtd_partition sheevaplug_n
+@@ -33,7 +33,11 @@ static struct mtd_partition sheevaplug_nand_parts[] = {
  		.offset = MTDPART_OFS_NXTBLK,
  		.size = SZ_4M
  	}, {
 -		.name = "root",
 +		.name = "rootfs",
++		.offset = MTDPART_OFS_NXTBLK,
++		.size = SZ_32M
++	}, {
++		.name = "rootfs_data",
  		.offset = MTDPART_OFS_NXTBLK,
  		.size = MTDPART_SIZ_FULL
  	},
diff --git a/target/linux/kirkwood/patches/005-dockstar_leds.patch b/target/linux/kirkwood/patches/005-dockstar_leds.patch
new file mode 100644
index 0000000..c73042b
--- /dev/null
+++ b/target/linux/kirkwood/patches/005-dockstar_leds.patch
@@ -0,0 +1,32 @@
+diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c
+index 555f7c3..648c741 100644
+--- a/arch/arm/mach-kirkwood/sheevaplug-setup.c
++++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c
+@@ -62,9 +62,15 @@ static struct mvsdio_platform_data sheeva_esata_mvsdio_data = {
+ 
+ static struct gpio_led sheevaplug_led_pins[] = {
+ 	{
+-		.name			= "plug:green:health",
++		.name			= "dockstar:green:health",
+ 		.default_trigger	= "default-on",
+-		.gpio			= 49,
++		.gpio			= 46, /* green */
++		.active_low		= 1,
++	},
++	{
++		.name			= "dockstar:orange:misc",
++		.default_trigger	= "none",
++		.gpio			= 47, /* orange */
+ 		.active_low		= 1,
+ 	},
+ };
+@@ -84,7 +90,8 @@ static struct platform_device sheevaplug_leds = {
+ 
+ static unsigned int sheevaplug_mpp_config[] __initdata = {
+ 	MPP29_GPIO,	/* USB Power Enable */
+-	MPP49_GPIO,	/* LED */
++	MPP46_GPIO,	/* LED green */
++	MPP47_GPIO,	/* LED orange */
+ 	0
+ };
+ 
diff --git a/target/linux/kirkwood/patches/006-dockstar_name.patch b/target/linux/kirkwood/patches/006-dockstar_name.patch
new file mode 100644
index 0000000..0db103d
--- /dev/null
+++ b/target/linux/kirkwood/patches/006-dockstar_name.patch
@@ -0,0 +1,11 @@
+--- a/arch/arm/mach-kirkwood/sheevaplug-setup.c
++++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c
+@@ -127,7 +127,7 @@
+ 				CGC_SATA1 | CGC_CRYPTO | CGC_GE1 | CGC_TDM);
+ }
+ 
+-MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board")
++MACHINE_START(SHEEVAPLUG, "Seagate DockStar")
+ 	/* Maintainer: shadi Ammouri <shadi@marvell.com> */
+ 	.phys_io	= KIRKWOOD_REGS_PHYS_BASE,
+ 	.io_pg_offst	= ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
-- 
1.7.1

