diff options
author | John Crispin <john@openwrt.org> | 2011-01-23 12:08:44 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2011-01-23 12:08:44 +0000 |
commit | 7c9e1370e910ddd70ef79ddd41eea8357aa2b43e (patch) | |
tree | bcc59be06817f085d5f6870bb623ab1321218d62 /target/linux/lantiq/patches/400-mach-arv45xx.patch | |
parent | d6f4fa08eb62c138a929c342332302f2c27f728f (diff) | |
download | upstream-7c9e1370e910ddd70ef79ddd41eea8357aa2b43e.tar.gz upstream-7c9e1370e910ddd70ef79ddd41eea8357aa2b43e.tar.bz2 upstream-7c9e1370e910ddd70ef79ddd41eea8357aa2b43e.zip |
* fix pci support for more than 1 device * fixes ioport mappings * adds support for arcor easybox 803/arv752DWP22 * gpio direction was not set properly during a gpio_request() * usb compile warning
bugfix, cleanup,
SVN-Revision: 25072
Diffstat (limited to 'target/linux/lantiq/patches/400-mach-arv45xx.patch')
-rw-r--r-- | target/linux/lantiq/patches/400-mach-arv45xx.patch | 97 |
1 files changed, 94 insertions, 3 deletions
diff --git a/target/linux/lantiq/patches/400-mach-arv45xx.patch b/target/linux/lantiq/patches/400-mach-arv45xx.patch index 643a0f7ae1..b778a5bbff 100644 --- a/target/linux/lantiq/patches/400-mach-arv45xx.patch +++ b/target/linux/lantiq/patches/400-mach-arv45xx.patch @@ -1,12 +1,13 @@ --- a/arch/mips/include/asm/mach-lantiq/machine.h +++ b/arch/mips/include/asm/mach-lantiq/machine.h -@@ -11,4 +11,7 @@ +@@ -11,4 +11,8 @@ LANTIQ_MACH_EASY4010, /* Twinpass evalkit */ LANTIQ_MACH_EASY50712, /* Danube evalkit */ LANTIQ_MACH_EASY50812, /* AR9 eval board */ + LANTIQ_MACH_ARV4518, /* Airties WAV-221, SMC-7908A-ISP */ + LANTIQ_MACH_ARV452, /* Airties WAV-281, Arcor EasyboxA800 */ + LANTIQ_MACH_ARV4525, /* Speedport W502V */ ++ LANTIQ_MACH_ARV752DPW22, /* Arcor easybox a803 */ }; --- a/arch/mips/lantiq/xway/Kconfig +++ b/arch/mips/lantiq/xway/Kconfig @@ -30,7 +31,7 @@ +obj-$(CONFIG_LANTIQ_MACH_ARV45XX) += mach-arv45xx.o --- /dev/null +++ b/arch/mips/lantiq/xway/mach-arv45xx.c -@@ -0,0 +1,178 @@ +@@ -0,0 +1,268 @@ +/* + * 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 @@ -58,6 +59,7 @@ +#include "devices.h" + +#define ARV452_LATCH_SWITCH (1 << 10) ++#define ARV752DPW22_LATCH_DEFAULT (2) + +#ifdef CONFIG_MTD_PARTITIONS +static struct mtd_partition arv45xx_partitions[] = @@ -92,9 +94,43 @@ +#endif +}; + ++static struct mtd_partition arv75xx_partitions[] = ++{ ++ { ++ .name = "uboot", ++ .offset = 0x0, ++ .size = 0x40000, ++ }, ++ { ++ .name = "uboot_env", ++ .offset = 0x40000, ++ .size = 0x10000, ++ }, ++ { ++ .name = "linux", ++ .offset = 0x50000, ++ .size = 0x7a0000, ++ }, ++ { ++ .name = "board_config", ++ .offset = 0x7f0000, ++ .size = 0x10000, ++ }, ++}; ++ ++static struct physmap_flash_data arv75xx_flash_data = { ++#ifdef CONFIG_MTD_PARTITIONS ++ .nr_parts = ARRAY_SIZE(arv75xx_partitions), ++ .parts = arv75xx_partitions, ++#endif ++}; ++ +static struct lq_pci_data lq_pci_data = { + .clock = PCI_CLOCK_EXT, -+ .req_mask = 0xf, ++ .gpio = PCI_GNT1 | PCI_REQ1, ++ .irq = { ++ [14] = INT_NUM_IM0_IRL0 + 22, ++ }, +}; + +static struct lq_eth_data lq_eth_data = { @@ -144,6 +180,25 @@ + { .name = "soc:green:online", .gpio = 9, .active_low = 1, }, +}; + ++static struct gpio_led ++arv752dpw22_leds_gpio[] __initdata = { ++ { .name = "soc:blue:power", .gpio = 3, .active_low = 1, .default_trigger = "default-on" }, ++ { .name = "soc:red:internet", .gpio = 5, .active_low = 1, .default_trigger = "default-on" }, ++ { .name = "soc:red:power", .gpio = 6, .active_low = 1, .default_trigger = "default-on" }, ++ { .name = "soc:red:wps", .gpio = 8, .active_low = 1, .default_trigger = "default-on" }, ++ { .name = "soc:red:fxo", .gpio = 35, .active_low = 1, .default_trigger = "default-on" }, ++ { .name = "soc:red:voice", .gpio = 36, .active_low = 1, .default_trigger = "default-on" }, ++ { .name = "soc:green:usb", .gpio = 37, .active_low = 1, .default_trigger = "default-on" }, ++ { .name = "soc:green:wlan", .gpio = 38, .active_low = 1, .default_trigger = "default-on" }, ++ { .name = "soc:green:wlan1", .gpio = 39, .active_low = 1, .default_trigger = "default-on" }, ++ { .name = "soc:blue:wlan", .gpio = 40, .active_low = 1, .default_trigger = "default-on" }, ++ { .name = "soc:blue:wlan1", .gpio = 41, .active_low = 1, .default_trigger = "default-on" }, ++ { .name = "soc:green:eth1", .gpio = 43, .active_low = 1, .default_trigger = "default-on" }, ++ { .name = "soc:green:eth2", .gpio = 44, .active_low = 1, .default_trigger = "default-on" }, ++ { .name = "soc:green:eth3", .gpio = 45, .active_low = 1, .default_trigger = "default-on" }, ++ { .name = "soc:green:eth4", .gpio = 46, .active_low = 1, .default_trigger = "default-on", }, ++}; ++ +static void +arv45xx_register_ethernet(void) +{ @@ -153,6 +208,15 @@ + lq_register_ethernet(&lq_eth_data); +} + ++static void ++arv75xx_register_ethernet(void) ++{ ++#define ARV75XX_BRN_MAC 0x7f0016 ++ memcpy_fromio(lq_eth_data.mac, ++ (void *)KSEG1ADDR(LQ_FLASH_START + ARV75XX_BRN_MAC), 6); ++ lq_register_ethernet(&lq_eth_data); ++} ++ +static void __init +arv4518_init(void) +{ @@ -209,3 +273,30 @@ + "ARV4525", + "ARV4525 - Speedport W502V", + arv4525_init); ++ ++static void __init ++arv752dpw22_init(void) ++{ ++ lq_register_gpio(); ++ lq_register_gpio_ebu(ARV752DPW22_LATCH_DEFAULT); ++ lq_register_asc(0); ++ lq_register_asc(1); ++ lq_register_gpio_leds(arv752dpw22_leds_gpio, ARRAY_SIZE(arv752dpw22_leds_gpio)); ++ lq_register_nor(&arv75xx_flash_data); ++ lq_pci_data.irq[15] = (INT_NUM_IM2_IRL0 + 31); ++ lq_pci_data.gpio |= PCI_EXIN1 | PCI_REQ2; ++ lq_register_pci(&lq_pci_data); ++ lq_register_wdt(); ++ arv75xx_register_ethernet(); ++ gpio_request(32, "usb-power"); ++ gpio_direction_output(32, 0); ++ mdelay(1); ++ __gpio_set_value(32, 1); ++ gpio_request(33, "relay"); ++ gpio_direction_output(33, 1); ++} ++ ++MIPS_MACHINE(LANTIQ_MACH_ARV752DPW22, ++ "ARV752DPW22", ++ "ARV752DPW22 - Arcor A803", ++ arv752dpw22_init); |