diff options
Diffstat (limited to 'target/linux/lantiq/patches/210-machtypes.patch')
-rw-r--r-- | target/linux/lantiq/patches/210-machtypes.patch | 314 |
1 files changed, 0 insertions, 314 deletions
diff --git a/target/linux/lantiq/patches/210-machtypes.patch b/target/linux/lantiq/patches/210-machtypes.patch deleted file mode 100644 index 55b67428d..000000000 --- a/target/linux/lantiq/patches/210-machtypes.patch +++ /dev/null @@ -1,314 +0,0 @@ ---- a/arch/mips/lantiq/machtypes.h -+++ b/arch/mips/lantiq/machtypes.h -@@ -20,9 +20,34 @@ enum lantiq_mach_type { - 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 ---- a/arch/mips/lantiq/xway/Kconfig -+++ b/arch/mips/lantiq/xway/Kconfig -@@ -6,6 +6,22 @@ config LANTIQ_MACH_EASY50712 - 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 ---- a/arch/mips/lantiq/xway/Makefile -+++ b/arch/mips/lantiq/xway/Makefile -@@ -7,3 +7,7 @@ obj-$(CONFIG_SOC_VR9) += clk-vr9.o prom- - 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 ---- a/arch/mips/lantiq/falcon/Kconfig -+++ b/arch/mips/lantiq/falcon/Kconfig -@@ -6,6 +6,14 @@ config LANTIQ_MACH_EASY98000 - bool "Easy98000" - default y - -+config LANTIQ_MACH_EASY98020 -+ bool "Easy98020" -+ default y -+ -+config LANTIQ_MACH_95C3AM1 -+ bool "95C3AM1" -+ default y -+ - endmenu - - endif ---- a/arch/mips/lantiq/falcon/Makefile -+++ b/arch/mips/lantiq/falcon/Makefile -@@ -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 ---- a/arch/mips/lantiq/falcon/mach-easy98000.c -+++ b/arch/mips/lantiq/falcon/mach-easy98000.c -@@ -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 @@ static struct mtd_partition easy98000_no - }, - }; - --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 @@ static struct spi_board_info easy98000_s - .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 @@ static struct spi_board_info easy98000_s - .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(); |