From 08c92313b135dc9c60b76b2f2c4eb52e4382c9b9 Mon Sep 17 00:00:00 2001
From: Imre Kaloz <kaloz@openwrt.org>
Date: Tue, 21 Jul 2009 18:55:02 +0000
Subject: upgrade orion to 2.6.30.2

SVN-Revision: 16950
---
 target/linux/orion/Makefile                        |   2 +-
 .../orion/files/arch/arm/mach-orion5x/dt2-setup.c  |  10 +-
 .../orion/patches/010-ignore_atag_cmdline.patch    |   2 +-
 .../orion/patches/020-wnr854t_switch_support.patch |  13 ++-
 .../orion/patches/030-mv88e6095_support.patch      | 115 ---------------------
 .../patches/050-wrt350nv2_cfi_workaround.patch     |   6 +-
 6 files changed, 21 insertions(+), 127 deletions(-)
 delete mode 100644 target/linux/orion/patches/030-mv88e6095_support.patch

diff --git a/target/linux/orion/Makefile b/target/linux/orion/Makefile
index 8231d02ea4..112ca01e29 100644
--- a/target/linux/orion/Makefile
+++ b/target/linux/orion/Makefile
@@ -12,7 +12,7 @@ BOARDNAME:=Marvell Orion
 FEATURES:=squashfs
 SUBTARGETS=generic harddisk
 
-LINUX_VERSION:=2.6.28.10
+LINUX_VERSION:=2.6.30.2
 
 include $(INCLUDE_DIR)/target.mk
 
diff --git a/target/linux/orion/files/arch/arm/mach-orion5x/dt2-setup.c b/target/linux/orion/files/arch/arm/mach-orion5x/dt2-setup.c
index f794b4cc52..5ce2114460 100644
--- a/target/linux/orion/files/arch/arm/mach-orion5x/dt2-setup.c
+++ b/target/linux/orion/files/arch/arm/mach-orion5x/dt2-setup.c
@@ -209,7 +209,7 @@ static struct mv643xx_eth_platform_data dt2_eth_data = {
 	.duplex		= DUPLEX_FULL,
 };
 
-static struct dsa_platform_data dt2_switch_data = {
+static struct dsa_chip_data dt2_switch_chip_data = {
 	.port_names[0] = "wan",
 	.port_names[1] = "lan1",
 	.port_names[2] = "lan2",
@@ -218,6 +218,11 @@ static struct dsa_platform_data dt2_switch_data = {
 	.port_names[5] = "lan4",
 };
 
+static struct dsa_platform_data dt2_switch_plat_data = {
+	.nr_chips	= 1,
+	.chip		= &dt2_switch_chip_data,
+};
+
 /*****************************************************************************
  * RTC ISL1208 on I2C bus
  ****************************************************************************/
@@ -300,7 +305,6 @@ static void __init dt2_init(void)
 	/*
 	 * Configure peripherals.
 	 */
-	gpio_display();
 
 	orion5x_uart0_init();
 	orion5x_ehci0_init();
@@ -321,7 +325,7 @@ static void __init dt2_init(void)
 
 	orion5x_eth_init(&dt2_eth_data);
 	memcpy(dt2_eth_data.mac_addr, dt2_eeprom.gw.mac_addr[0], 6);
-	orion5x_eth_switch_init(&dt2_switch_data, NO_IRQ);
+	orion5x_eth_switch_init(&dt2_switch_plat_data, NO_IRQ);
 
 	i2c_register_board_info(0, &dt2_i2c_rtc, 1);
 
diff --git a/target/linux/orion/patches/010-ignore_atag_cmdline.patch b/target/linux/orion/patches/010-ignore_atag_cmdline.patch
index 31a797f669..05e835bf9d 100644
--- a/target/linux/orion/patches/010-ignore_atag_cmdline.patch
+++ b/target/linux/orion/patches/010-ignore_atag_cmdline.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm/kernel/setup.c
 +++ b/arch/arm/kernel/setup.c
-@@ -607,7 +607,7 @@ __tagtable(ATAG_REVISION, parse_tag_revi
+@@ -614,7 +614,7 @@ __tagtable(ATAG_REVISION, parse_tag_revi
  
  static int __init parse_tag_cmdline(const struct tag *tag)
  {
diff --git a/target/linux/orion/patches/020-wnr854t_switch_support.patch b/target/linux/orion/patches/020-wnr854t_switch_support.patch
index 564474a02e..f62b56944e 100644
--- a/target/linux/orion/patches/020-wnr854t_switch_support.patch
+++ b/target/linux/orion/patches/020-wnr854t_switch_support.patch
@@ -8,11 +8,11 @@
  #include <asm/mach-types.h>
  #include <asm/gpio.h>
  #include <asm/mach/arch.h>
-@@ -97,6 +98,15 @@ static struct mv643xx_eth_platform_data 
+@@ -97,6 +98,20 @@ static struct mv643xx_eth_platform_data 
  	.duplex		= DUPLEX_FULL,
  };
  
-+static struct dsa_platform_data wnr854t_switch_data = {
++static struct dsa_chip_data wnr854t_switch_chip_data = {
 +	.port_names[0] = "lan3",
 +	.port_names[1] = "lan4",
 +	.port_names[2] = "wan",
@@ -20,15 +20,20 @@
 +	.port_names[5] = "lan1",
 +	.port_names[7] = "lan2",
 +};
++
++static struct dsa_platform_data wnr854t_switch_plat_data = {
++	.nr_chips	= 1,
++	.chip		= &wnr854t_switch_chip_data,
++};
 +
  static void __init wnr854t_init(void)
  {
  	/*
-@@ -110,6 +120,7 @@ static void __init wnr854t_init(void)
+@@ -110,6 +125,7 @@ static void __init wnr854t_init(void)
  	 * Configure peripherals.
  	 */
  	orion5x_eth_init(&wnr854t_eth_data);
-+	orion5x_eth_switch_init(&wnr854t_switch_data, NO_IRQ);
++	orion5x_eth_switch_init(&wnr854t_switch_plat_data, NO_IRQ);
  	orion5x_uart0_init();
  
  	orion5x_setup_dev_boot_win(WNR854T_NOR_BOOT_BASE,
diff --git a/target/linux/orion/patches/030-mv88e6095_support.patch b/target/linux/orion/patches/030-mv88e6095_support.patch
deleted file mode 100644
index c71ce040fa..0000000000
--- a/target/linux/orion/patches/030-mv88e6095_support.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From: Lennert Buytenhek <buytenh@wantstofly.org>
-Date: Fri, 20 Mar 2009 09:50:39 +0000 (+0000)
-Subject: dsa: add support for the Marvell 88E6095/6095F switch chips
-X-Git-Tag: v2.6.30-rc1~662^2~146
-X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=076d3e10a54caa2c148de5732c126c7a31381d48
-
-dsa: add support for the Marvell 88E6095/6095F switch chips
-
-Add support for the Marvell 88E6095/6095F switch chips.  These
-chips are similar to the 88e6131, so we can add the support to
-mv88e6131.c easily.
-
-Thanks to Gary Thomas <gary@mlbassoc.com> and Jesper Dangaard
-Brouer <hawk@diku.dk> for testing various patches.
-
-Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
-Tested-by: Gary Thomas <gary@mlbassoc.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
----
-
-diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
-index 49211b3..c51b554 100644
---- a/net/dsa/Kconfig
-+++ b/net/dsa/Kconfig
-@@ -41,13 +41,13 @@ config NET_DSA_MV88E6XXX_NEED_PPU
- 	default n
- 
- config NET_DSA_MV88E6131
--	bool "Marvell 88E6131 ethernet switch chip support"
-+	bool "Marvell 88E6095/6095F/6131 ethernet switch chip support"
- 	select NET_DSA_MV88E6XXX
- 	select NET_DSA_MV88E6XXX_NEED_PPU
- 	select NET_DSA_TAG_DSA
- 	---help---
--	  This enables support for the Marvell 88E6131 ethernet switch
--	  chip.
-+	  This enables support for the Marvell 88E6095/6095F/6131
-+	  ethernet switch chips.
- 
- config NET_DSA_MV88E6123_61_65
- 	bool "Marvell 88E6123/6161/6165 ethernet switch chip support"
-diff --git a/net/dsa/mv88e6131.c b/net/dsa/mv88e6131.c
-index 70fae24..0029957 100644
---- a/net/dsa/mv88e6131.c
-+++ b/net/dsa/mv88e6131.c
-@@ -1,6 +1,6 @@
- /*
-- * net/dsa/mv88e6131.c - Marvell 88e6131 switch chip support
-- * Copyright (c) 2008 Marvell Semiconductor
-+ * net/dsa/mv88e6131.c - Marvell 88e6095/6095f/6131 switch chip support
-+ * Copyright (c) 2008-2009 Marvell Semiconductor
-  *
-  * This program is free software; you can redistribute it and/or modify
-  * it under the terms of the GNU General Public License as published by
-@@ -21,6 +21,8 @@ static char *mv88e6131_probe(struct mii_bus *bus, int sw_addr)
- 	ret = __mv88e6xxx_reg_read(bus, sw_addr, REG_PORT(0), 0x03);
- 	if (ret >= 0) {
- 		ret &= 0xfff0;
-+		if (ret == 0x0950)
-+			return "Marvell 88E6095/88E6095F";
- 		if (ret == 0x1060)
- 			return "Marvell 88E6131";
- 	}
-@@ -36,7 +38,7 @@ static int mv88e6131_switch_reset(struct dsa_switch *ds)
- 	/*
- 	 * Set all ports to the disabled state.
- 	 */
--	for (i = 0; i < 8; i++) {
-+	for (i = 0; i < 11; i++) {
- 		ret = REG_READ(REG_PORT(i), 0x04);
- 		REG_WRITE(REG_PORT(i), 0x04, ret & 0xfffc);
- 	}
-@@ -136,7 +138,7 @@ static int mv88e6131_setup_global(struct dsa_switch *ds)
- 	 * Clear all trunk masks.
- 	 */
- 	for (i = 0; i < 8; i++)
--		REG_WRITE(REG_GLOBAL2, 0x07, 0x8000 | (i << 12) | 0xff);
-+		REG_WRITE(REG_GLOBAL2, 0x07, 0x8000 | (i << 12) | 0x7ff);
- 
- 	/*
- 	 * Clear all trunk mappings.
-@@ -159,9 +161,13 @@ static int mv88e6131_setup_port(struct dsa_switch *ds, int p)
- 
- 	/*
- 	 * MAC Forcing register: don't force link, speed, duplex
--	 * or flow control state to any particular values.
-+	 * or flow control state to any particular values on physical
-+	 * ports, but force the CPU port to 1000 Mb/s full duplex.
- 	 */
--	REG_WRITE(addr, 0x01, 0x0003);
-+	if (p == ds->cpu_port)
-+		REG_WRITE(addr, 0x01, 0x003e);
-+	else
-+		REG_WRITE(addr, 0x01, 0x0003);
- 
- 	/*
- 	 * Port Control: disable Core Tag, disable Drop-on-Lock,
-@@ -268,7 +274,7 @@ static int mv88e6131_setup(struct dsa_switch *ds)
- 	if (ret < 0)
- 		return ret;
- 
--	for (i = 0; i < 6; i++) {
-+	for (i = 0; i < 11; i++) {
- 		ret = mv88e6131_setup_port(ds, i);
- 		if (ret < 0)
- 			return ret;
-@@ -279,7 +285,7 @@ static int mv88e6131_setup(struct dsa_switch *ds)
- 
- static int mv88e6131_port_to_phy_addr(int port)
- {
--	if (port >= 0 && port != 3 && port <= 7)
-+	if (port >= 0 && port <= 11)
- 		return port;
- 	return -1;
- }
diff --git a/target/linux/orion/patches/050-wrt350nv2_cfi_workaround.patch b/target/linux/orion/patches/050-wrt350nv2_cfi_workaround.patch
index 7051159732..b8ba0e2e28 100644
--- a/target/linux/orion/patches/050-wrt350nv2_cfi_workaround.patch
+++ b/target/linux/orion/patches/050-wrt350nv2_cfi_workaround.patch
@@ -1,8 +1,8 @@
 --- a/drivers/mtd/chips/cfi_cmdset_0002.c
 +++ b/drivers/mtd/chips/cfi_cmdset_0002.c
-@@ -364,8 +364,9 @@ struct mtd_info *cfi_cmdset_0002(struct 
- 			return NULL;
- 		}
+@@ -385,8 +385,9 @@ struct mtd_info *cfi_cmdset_0002(struct 
+ 
+ 		cfi_fixup_major_minor(cfi, extp);
  
 -		if (extp->MajorVersion != '1' ||
 -		    (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
-- 
cgit v1.2.3