summaryrefslogtreecommitdiff
path: root/target/linux/lantiq/files-3.3/arch/mips
diff options
context:
space:
mode:
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-05-27 16:02:20 +0000
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-05-27 16:02:20 +0000
commitf72e7bf12d984ed2e9c23a95d8364598bc3db9d0 (patch)
tree5851001ff2cf4050898ed262a93a47e8f64cf572 /target/linux/lantiq/files-3.3/arch/mips
parent2b03aafe3100c77b8550402cd630ef63389cc6df (diff)
[lantiq] fixes zyxel p2601hnfx
moves the linux partition, removes the config partition and the buttons settings have small adjustments. Signed-off-by: Luka Perkov <openwrt@lukaperkov.net> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31909 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/lantiq/files-3.3/arch/mips')
-rw-r--r--target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-p2601hnfx.c61
1 files changed, 35 insertions, 26 deletions
diff --git a/target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-p2601hnfx.c b/target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-p2601hnfx.c
index ea7e6e8900..247dfb572c 100644
--- a/target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-p2601hnfx.c
+++ b/target/linux/lantiq/files-3.3/arch/mips/lantiq/xway/mach-p2601hnfx.c
@@ -22,13 +22,13 @@
#include <lantiq_soc.h>
#include <lantiq_platform.h>
+#include <dev-gpio-leds.h>
+#include <dev-gpio-buttons.h>
#include "../machtypes.h"
#include "devices.h"
-#include "../dev-gpio-leds.h"
#include "dev-dwc_otg.h"
-
static struct mtd_partition p2601hnfx_partitions[] __initdata =
{
{
@@ -36,21 +36,16 @@ static struct mtd_partition p2601hnfx_partitions[] __initdata =
.offset = 0x0,
.size = 0x20000,
},
-/* {
+ {
.name = "uboot_env",
.offset = 0x20000,
.size = 0x20000,
},
-*/ {
+ {
.name = "linux",
- .offset = 0x020000,
+ .offset = 0x40000,
.size = 0xfc0000,
},
- {
- .name = "board_config",
- .offset = 0xfe0000,
- .size = 0x20000,
- },
};
static struct physmap_flash_data p2601hnfx_flash_data __initdata = {
@@ -58,22 +53,36 @@ static struct physmap_flash_data p2601hnfx_flash_data __initdata = {
.parts = p2601hnfx_partitions,
};
-static struct gpio_led p2601hnfx_leds_gpio[] __initdata = {
- { .name = "soc:red:power", .gpio = 29, .active_low = 1, .default_trigger = "default-off" },
- { .name = "soc:yellow:phone", .gpio = 64, .active_low = 1, .default_trigger = "default-off" },
- { .name = "soc:green:phone", .gpio = 65, .active_low = 1, .default_trigger = "default-off" },
- { .name = "soc:yellow:wlan", .gpio = 66, .active_low = 1, .default_trigger = "default-off" },
- { .name = "soc:green:power", .gpio = 67, .active_low = 1, .default_trigger = "default-on" },
- { .name = "soc:red:internet", .gpio = 68, .active_low = 1, .default_trigger = "default-off" },
- { .name = "soc:green:internet", .gpio = 69, .active_low = 1, .default_trigger = "default-off" },
- { .name = "soc:green:dsl", .gpio = 70, .active_low = 1, .default_trigger = "default-off" },
- { .name = "soc:green:wlan", .gpio = 71, .active_low = 1, .default_trigger = "default-off" },
+static struct gpio_led
+p2601hnfx_leds_gpio[] __initdata = {
+ { .name = "soc:yellow:phone", .gpio = 216, .active_low = 1 },
+ { .name = "soc:green:phone", .gpio = 217, .active_low = 1 },
+ { .name = "soc:yellow:wifi", .gpio = 218, .active_low = 1 },
+ { .name = "soc:green:power", .gpio = 219, .active_low = 1 },
+ { .name = "soc:red:internet", .gpio = 220, .active_low = 1 },
+ { .name = "soc:green:internet", .gpio = 221, .active_low = 1 },
+ { .name = "soc:green:dsl", .gpio = 222, .active_low = 1 },
+ { .name = "soc:green:wifi", .gpio = 223, .active_low = 1 },
};
-static struct gpio_button
-p2601hnfx_gpio_buttons[] /* __initdata */ = {
- { .desc = "reset", .type = EV_KEY, .code = BTN_0, .threshold = 3, .gpio = 53, .active_low = 1, },
- { .desc = "wlan", .type = EV_KEY, .code = BTN_1, .threshold = 1, .gpio = 54, .active_low = 1, },
+static struct gpio_keys_button
+p2601hnfx_gpio_keys[] __initdata = {
+ {
+ .desc = "reset",
+ .type = EV_KEY,
+ .code = BTN_0,
+ .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+ .gpio = 53,
+ .active_low = 1,
+ },
+ {
+ .desc = "wifi",
+ .type = EV_KEY,
+ .code = BTN_1,
+ .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+ .gpio = 54,
+ .active_low = 1,
+ },
};
static struct ltq_eth_data ltq_eth_data = {
@@ -86,9 +95,9 @@ p2601hnfx_init(void)
#define P2601HNFX_USB 9
ltq_register_gpio_stp();
- ltq_add_device_gpio_leds(-1, ARRAY_SIZE(p2601hnfx_leds_gpio), p2601hnfx_leds_gpio);
- ltq_register_gpio_buttons(p2601hnfx_gpio_buttons, ARRAY_SIZE(p2601hnfx_gpio_buttons));
ltq_register_nor(&p2601hnfx_flash_data);
+ ltq_add_device_gpio_leds(-1, ARRAY_SIZE(p2601hnfx_leds_gpio), p2601hnfx_leds_gpio);
+ ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL, ARRAY_SIZE(p2601hnfx_gpio_keys), p2601hnfx_gpio_keys);
ltq_register_etop(&ltq_eth_data);
xway_register_dwc(P2601HNFX_USB);