diff options
author | blogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-11-03 15:15:52 +0000 |
---|---|---|
committer | blogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-11-03 15:15:52 +0000 |
commit | dfffaea839fd631ec0b3d4f58540316a04c4f2ad (patch) | |
tree | b174b3a3d03c0c2b4a9b9c980efe38089069a2d4 /target/linux/lantiq/patches/210-machtypes.patch | |
parent | de6080b7c2e5f3d2a9ed9677e3df0667bfc31842 (diff) |
lantiq: bump to 3.1
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28721 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/lantiq/patches/210-machtypes.patch')
-rw-r--r-- | target/linux/lantiq/patches/210-machtypes.patch | 326 |
1 files changed, 326 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches/210-machtypes.patch b/target/linux/lantiq/patches/210-machtypes.patch new file mode 100644 index 0000000000..f4e86b9211 --- /dev/null +++ b/target/linux/lantiq/patches/210-machtypes.patch @@ -0,0 +1,326 @@ +Index: linux-3.1/arch/mips/lantiq/machtypes.h +=================================================================== +--- linux-3.1.orig/arch/mips/lantiq/machtypes.h 2011-11-03 10:32:53.117317313 +0100 ++++ linux-3.1/arch/mips/lantiq/machtypes.h 2011-11-03 15:57:57.106151011 +0100 +@@ -20,9 +20,34 @@ + LANTIQ_MACH_EASY98000, /* Falcon Eval Board, NOR Flash */ + LANTIQ_MACH_EASY98000SF, /* Falcon Eval Board, Serial Flash */ + LANTIQ_MACH_EASY98000NAND, /* Falcon Eval Board, NAND Flash */ ++ LANTIQ_MACH_EASY98020, /* EASY98020 Eval Board */ ++ LANTIQ_MACH_EASY98020_1LAN, /* EASY98020 Eval Board (1 LAN port) */ ++ LANTIQ_MACH_EASY98020_2LAN, /* EASY98020 Eval Board (2 LAN port) */ ++ LANTIQ_MACH_95C3AM1, /* 95C3AM1 Eval Board */ + + /* FRITZ!BOX */ + LANTIQ_MACH_FRITZ3370, /* FRITZ!BOX 3370 vdsl cpe */ ++ ++ /* Arcadyan */ ++ LANTIQ_MACH_ARV3527P, /* Arcor easybox a401 */ ++ LANTIQ_MACH_ARV4510PW, /* Wippies Homebox */ ++ LANTIQ_MACH_ARV4518PW, /* Airties WAV-221, SMC-7908A-ISP */ ++ LANTIQ_MACH_ARV4520PW, /* Airties WAV-281, Arcor EasyboxA800 */ ++ LANTIQ_MACH_ARV452CPW, /* Arcor EasyboxA801 */ ++ LANTIQ_MACH_ARV4525PW, /* Speedport W502V */ ++ LANTIQ_MACH_ARV7525PW, /* Speedport W303V */ ++ LANTIQ_MACH_ARV752DPW, /* Arcor easybox a802 */ ++ LANTIQ_MACH_ARV752DPW22, /* Arcor easybox a803 */ ++ LANTIQ_MACH_ARV7518PW, /* ASTORIA */ ++ ++ /* Netgear */ ++ LANTIQ_MACH_DGN3500B, /* Netgear DGN3500 */ ++ ++ /* Gigaset */ ++ LANTIQ_MACH_GIGASX76X, /* Gigaset SX76x */ ++ ++ /* Buffalo */ ++ LANTIQ_MACH_WBMR, /* WBMR-HP-G300H */ + }; + + #endif +Index: linux-3.1/arch/mips/lantiq/xway/Kconfig +=================================================================== +--- linux-3.1.orig/arch/mips/lantiq/xway/Kconfig 2011-11-03 10:32:53.117317313 +0100 ++++ linux-3.1/arch/mips/lantiq/xway/Kconfig 2011-11-03 10:32:53.409317325 +0100 +@@ -6,6 +6,22 @@ + bool "Easy50712 - Danube" + default y + ++config LANTIQ_MACH_ARV45XX ++ bool "ARV45XX" ++ default y ++ ++config LANTIQ_MACH_NETGEAR ++ bool "Netgear" ++ default y ++ ++config LANTIQ_MACH_GIGASX76X ++ bool "GIGASX76X" ++ default y ++ ++config LANTIQ_MACH_WBMR ++ bool "WBMR-HP-G300H" ++ default y ++ + endmenu + + endif +Index: linux-3.1/arch/mips/lantiq/xway/Makefile +=================================================================== +--- linux-3.1.orig/arch/mips/lantiq/xway/Makefile 2011-11-03 10:32:53.117317313 +0100 ++++ linux-3.1/arch/mips/lantiq/xway/Makefile 2011-11-03 15:57:59.222151170 +0100 +@@ -7,3 +7,7 @@ + obj-$(CONFIG_LANTIQ_MACH_EASY50712) += mach-easy50712.o + obj-$(CONFIG_LANTIQ_MACH_EASY50601) += mach-easy50601.o + obj-$(CONFIG_LANTIQ_MACH_FRITZ3370) += mach-fritz.o ++obj-$(CONFIG_LANTIQ_MACH_ARV45XX) += mach-arv45xx.o ++obj-$(CONFIG_LANTIQ_MACH_NETGEAR) += mach-netgear.o ++obj-$(CONFIG_LANTIQ_MACH_GIGASX76X) += mach-gigasx76x.o ++obj-$(CONFIG_LANTIQ_MACH_WBMR) += mach-wbmr.o +Index: linux-3.1/arch/mips/lantiq/falcon/Kconfig +=================================================================== +--- linux-3.1.orig/arch/mips/lantiq/falcon/Kconfig 2011-11-03 10:32:52.697317294 +0100 ++++ linux-3.1/arch/mips/lantiq/falcon/Kconfig 2011-11-03 10:32:53.409317325 +0100 +@@ -6,6 +6,14 @@ + bool "Easy98000" + default y + ++config LANTIQ_MACH_EASY98020 ++ bool "Easy98020" ++ default y ++ ++config LANTIQ_MACH_95C3AM1 ++ bool "95C3AM1" ++ default y ++ + endmenu + + endif +Index: linux-3.1/arch/mips/lantiq/falcon/Makefile +=================================================================== +--- linux-3.1.orig/arch/mips/lantiq/falcon/Makefile 2011-11-03 10:32:53.033317309 +0100 ++++ linux-3.1/arch/mips/lantiq/falcon/Makefile 2011-11-03 10:32:53.409317325 +0100 +@@ -1,2 +1,6 @@ + obj-y := clk.o prom.o reset.o sysctrl.o devices.o gpio.o softdog_vpe.o ++obj-$(CONFIG_LANTIQ_MACH_EASY98000) += addon-easy98000.o ++obj-$(CONFIG_LANTIQ_MACH_EASY98000) += dev-leds-easy98000-cpld.o + obj-$(CONFIG_LANTIQ_MACH_EASY98000) += mach-easy98000.o ++obj-$(CONFIG_LANTIQ_MACH_EASY98020) += mach-easy98020.o ++obj-$(CONFIG_LANTIQ_MACH_95C3AM1) += mach-95C3AM1.o +Index: linux-3.1/arch/mips/lantiq/falcon/mach-easy98000.c +=================================================================== +--- linux-3.1.orig/arch/mips/lantiq/falcon/mach-easy98000.c 2011-11-03 10:32:52.805317298 +0100 ++++ linux-3.1/arch/mips/lantiq/falcon/mach-easy98000.c 2011-11-03 10:32:53.413317324 +0100 +@@ -1,23 +1,38 @@ +-/* +- * This program is free software; you can redistribute it and/or modify it +- * under the terms of the GNU General Public License version 2 as published +- * by the Free Software Foundation. +- * +- * Copyright (C) 2011 Thomas Langer <thomas.langer@lantiq.com> +- * Copyright (C) 2011 John Crispin <blogic@openwrt.org> +- */ +- ++#include <linux/init.h> + #include <linux/platform_device.h> ++#include <linux/leds.h> ++#include <linux/gpio.h> ++#include <linux/gpio_buttons.h> ++#include <linux/etherdevice.h> ++#include <linux/mtd/mtd.h> + #include <linux/mtd/partitions.h> ++#include <linux/mtd/physmap.h> ++#include <linux/input.h> ++#include <linux/interrupt.h> ++#include <linux/dm9000.h> ++#include <linux/i2c.h> ++#include <linux/i2c-gpio.h> + #include <linux/spi/spi.h> + #include <linux/spi/spi_gpio.h> + #include <linux/spi/eeprom.h> ++#include <falcon/lantiq_soc.h> + + #include "../machtypes.h" + + #include "devices.h" ++#include "dev-leds-gpio.h" ++ ++#define EASY98000_GPIO_LED_0 9 ++#define EASY98000_GPIO_LED_1 10 ++#define EASY98000_GPIO_LED_2 11 ++#define EASY98000_GPIO_LED_3 12 ++#define EASY98000_GPIO_LED_4 13 ++#define EASY98000_GPIO_LED_5 14 ++ ++extern unsigned char ltq_ethaddr[6]; + +-static struct mtd_partition easy98000_nor_partitions[] = { ++static struct mtd_partition easy98000_nor_partitions[] = ++{ + { + .name = "uboot", + .offset = 0x0, +@@ -35,7 +50,7 @@ + }, + }; + +-struct physmap_flash_data easy98000_nor_flash_data = { ++static struct physmap_flash_data easy98000_nor_flash_data = { + .nr_parts = ARRAY_SIZE(easy98000_nor_partitions), + .parts = easy98000_nor_partitions, + }; +@@ -55,12 +70,105 @@ + .platform_data = &easy98000_spi_flash_platform_data + }; + ++static struct gpio_led easy98000_leds_gpio[] __initdata = { ++ { ++ .name = "easy98000:green:0", ++ .gpio = EASY98000_GPIO_LED_0, ++ .active_low = 0, ++ }, { ++ .name = "easy98000:green:1", ++ .gpio = EASY98000_GPIO_LED_1, ++ .active_low = 0, ++ }, { ++ .name = "easy98000:green:2", ++ .gpio = EASY98000_GPIO_LED_2, ++ .active_low = 0, ++ }, { ++ .name = "easy98000:green:3", ++ .gpio = EASY98000_GPIO_LED_3, ++ .active_low = 0, ++ }, { ++ .name = "easy98000:green:4", ++ .gpio = EASY98000_GPIO_LED_4, ++ .active_low = 0, ++ }, { ++ .name = "easy98000:green:5", ++ .gpio = EASY98000_GPIO_LED_5, ++ .active_low = 0, ++ } ++}; ++ ++#define CONFIG_DM9000_BASE 0x14000000 ++#define DM9000_IO (CONFIG_DM9000_BASE + 3) ++#define DM9000_DATA (CONFIG_DM9000_BASE + 1) ++ ++static struct dm9000_plat_data dm9000_plat_data = { ++ .flags = DM9000_PLATF_8BITONLY, ++ //.dev_addr = { }, /* possibility to provide an ethernet address for the chip */ ++}; ++ ++static struct resource dm9000_resources[] = { ++ MEM_RES("dm9000_io", DM9000_IO, DM9000_IO), ++ MEM_RES("dm9000_data", DM9000_DATA, DM9000_DATA), ++ [2] = { ++ /* with irq (210 -> gpio 110) the driver is very unreliable */ ++ .start = -1, /* use polling */ ++ .end = -1, ++ .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW, ++ }, ++}; ++ ++static struct platform_device dm9000_platform = { ++ .name = "dm9000", ++ .id = 0, ++ .num_resources = ARRAY_SIZE(dm9000_resources), ++ .resource = dm9000_resources, ++ .dev = { ++ .platform_data = (void *) &dm9000_plat_data, ++ } ++}; ++ ++extern int easy98000_addon_has_dm9000(void); ++static void __init register_davicom(void) ++{ ++ if (!easy98000_addon_has_dm9000()) ++ return; ++ ++ if (!is_valid_ether_addr(ltq_ethaddr)) ++ random_ether_addr(dm9000_plat_data.dev_addr); ++ else { ++ memcpy(dm9000_plat_data.dev_addr, ltq_ethaddr, 6); ++ /* change to "Locally Administered Address" */ ++ dm9000_plat_data.dev_addr[0] |= 0x2; ++ } ++ platform_device_register(&dm9000_platform); ++} ++ ++static struct i2c_gpio_platform_data easy98000_i2c_gpio_data = { ++ .sda_pin = 107, ++ .scl_pin = 108, ++}; ++ ++static struct platform_device easy98000_i2c_gpio_device = { ++ .name = "i2c-gpio", ++ .id = 0, ++ .dev = { ++ .platform_data = &easy98000_i2c_gpio_data, ++ } ++}; ++ ++void __init register_easy98000_cpld(void) ++{ ++ platform_device_register_simple("easy98000_cpld_led", 0, NULL, 0); ++ platform_device_register_simple("easy98000_addon", 0, NULL, 0); ++} ++ + /* setup gpio based spi bus/device for access to the eeprom on the board */ +-#define SPI_GPIO_MRST 102 +-#define SPI_GPIO_MTSR 103 +-#define SPI_GPIO_CLK 104 +-#define SPI_GPIO_CS0 105 +-#define SPI_GPIO_CS1 106 ++#define SPI_GPIO_MRST 102 ++#define SPI_GPIO_MTSR 103 ++#define SPI_GPIO_CLK 104 ++#define SPI_GPIO_CS0 105 ++#define SPI_GPIO_CS1 106 + #define SPI_GPIO_BUS_NUM 1 + + static struct spi_gpio_platform_data easy98000_spi_gpio_data = { +@@ -93,29 +201,36 @@ + .platform_data = &at25160n, + }; + +-static void __init +-easy98000_init_common(void) ++static void __init easy98000_spi_gpio_init(void) + { + spi_register_board_info(&easy98000_spi_gpio_devices, 1); + platform_device_register(&easy98000_spi_gpio_device); + } + +-static void __init +-easy98000_init(void) ++static void __init easy98000_init_common(void) ++{ ++ falcon_register_i2c(); ++ platform_device_register(&easy98000_i2c_gpio_device); ++ register_davicom(); ++ ltq_add_device_leds_gpio(-1, ARRAY_SIZE(easy98000_leds_gpio), ++ easy98000_leds_gpio); ++ register_easy98000_cpld(); ++ easy98000_spi_gpio_init(); ++} ++ ++static void __init easy98000_init(void) + { + easy98000_init_common(); + ltq_register_nor(&easy98000_nor_flash_data); + } + +-static void __init +-easy98000sf_init(void) ++static void __init easy98000sf_init(void) + { + easy98000_init_common(); + falcon_register_spi_flash(&easy98000_spi_flash_data); + } + +-static void __init +-easy98000nand_init(void) ++static void __init easy98000nand_init(void) + { + easy98000_init_common(); + falcon_register_nand(); |