X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Fbrcm63xx%2Fpatches-3.14%2F300-reset_buttons.patch;h=2263b499ad33b90dfb1a307c4705f4bae52cd447;hb=86a0913dd8dd17dfd1f4014d3e6238efe67ae8b9;hp=0886f6c5fc65097a9bfc009f78f2b20c5c8101ff;hpb=8ef323302f93b40854fa628da94cc6c699732702;p=openwrt.git diff --git a/target/linux/brcm63xx/patches-3.14/300-reset_buttons.patch b/target/linux/brcm63xx/patches-3.14/300-reset_buttons.patch index 0886f6c5fc..2263b499ad 100644 --- a/target/linux/brcm63xx/patches-3.14/300-reset_buttons.patch +++ b/target/linux/brcm63xx/patches-3.14/300-reset_buttons.patch @@ -1,59 +1,44 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -12,6 +12,8 @@ +@@ -10,6 +10,8 @@ + #include + #include #include - #include - #include +#include +#include #include #include #include -@@ -37,6 +39,9 @@ +@@ -26,6 +28,9 @@ #define HCS_OFFSET_128K 0x20000 +#define BCM963XX_KEYS_POLL_INTERVAL 20 +#define BCM963XX_KEYS_DEBOUNCE_INTERVAL (BCM963XX_KEYS_POLL_INTERVAL * 3) + - static struct board_info board; - /* -@@ -380,6 +385,16 @@ static struct board_info __initdata boar - .active_low = 1, - }, - }, -+ .buttons = { -+ { -+ .desc = "reset", -+ .gpio = 33, -+ .active_low = 1, -+ .type = EV_KEY, -+ .code = KEY_RESTART, -+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL, -+ }, -+ }, - }; + * known 3368 boards + */ +--- a/arch/mips/bcm63xx/boards/board_common.c ++++ b/arch/mips/bcm63xx/boards/board_common.c +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -32,6 +33,8 @@ - static struct board_info __initdata board_96348gw = { -@@ -438,6 +453,16 @@ static struct board_info __initdata boar - .active_low = 1, - }, - }, -+ .buttons = { -+ { -+ .desc = "reset", -+ .gpio = 36, -+ .active_low = 1, -+ .type = EV_KEY, -+ .code = KEY_RESTART, -+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL, -+ }, -+ }, - }; + #define PFX "board: " - static struct board_info __initdata board_FAST2404 = { -@@ -871,11 +896,23 @@ static struct platform_device bcm63xx_gp ++#define BCM963XX_KEYS_POLL_INTERVAL 20 ++ + static struct board_info board; + + /* +@@ -151,11 +154,23 @@ static struct platform_device bcm63xx_gp .dev.platform_data = &bcm63xx_led_data, }; @@ -77,7 +62,7 @@ if (board.has_uart0) bcm63xx_uart_register(0); -@@ -937,5 +974,16 @@ int __init board_register_devices(void) +@@ -217,5 +232,16 @@ int __init board_register_devices(void) gpio_request_one(board.ephy_reset_gpio, board.ephy_reset_gpio_flags, "ephy-reset");