[kernel] brcm63xx: fix cardbus support with BCM6358 (closes: #5918)
[openwrt.git] / target / linux / brcm63xx / files / arch / mips / bcm63xx / boards / board_bcm963xx.c
index 4551ef6..5f21516 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
 #include <linux/ssb/ssb.h>
+#include <linux/gpio_buttons.h>
 #include <asm/addrspace.h>
 #include <bcm63xx_board.h>
 #include <bcm63xx_cpu.h>
@@ -543,6 +544,27 @@ static struct board_info __initdata board_AGPFS0 = {
        .has_ohci0 = 1,
        .has_ehci0 = 1,
 };
+
+static struct board_info __initdata board_DWVS0 = {
+       .name                           = "DWV-S0",
+       .expected_cpu_id                = 0x6358,
+
+       .has_enet0                      = 1,
+       .has_enet1                      = 1,
+       .has_pci                        = 1,
+
+       .enet0 = {
+               .has_phy                = 1,
+               .use_internal_phy       = 1,
+       },
+
+       .enet1 = {
+               .force_speed_100        = 1,
+               .force_duplex_full      = 1,
+       },
+
+       .has_ohci0 = 1,
+};
 #endif
 
 /*
@@ -570,6 +592,7 @@ static const struct board_info __initdata *bcm963xx_boards[] = {
        &board_96358vw,
        &board_96358vw2,
        &board_AGPFS0,
+       &board_DWVS0,
 #endif
 };
 
@@ -780,6 +803,17 @@ static struct platform_device bcm63xx_gpio_leds = {
        .dev.platform_data      = &bcm63xx_led_data,
 };
 
+struct gpio_buttons_platform_data bcm63xx_gpio_buttons_data = {
+       .poll_interval  = 20,
+};
+
+struct platform_device bcm63xx_gpio_buttons_device = {
+        .name           = "gpio-buttons",
+        .id             = 0,
+        .dev.platform_data = &bcm63xx_gpio_buttons_data,
+};
+
+
 /*
  * third stage init callback, register all board devices.
  */
@@ -847,6 +881,13 @@ int __init board_register_devices(void)
 
        platform_device_register(&bcm63xx_gpio_leds);
 
+       if (board.reset_btn) {
+               bcm63xx_gpio_buttons_data.nbuttons = 1,
+               bcm63xx_gpio_buttons_data.buttons = board.reset_btn;
+
+               platform_device_register(&bcm63xx_gpio_buttons_device);
+       }
+
        return 0;
 }
 
This page took 0.029558 seconds and 4 git commands to generate.