brcm47xx: detect Linksys WRT320N v1
[openwrt/openwrt.git] / target / linux / brcm47xx / patches-3.18 / 320-MIPS-BCM47XX-Devices-database-update-for-4.x.patch
1 diff --git a/arch/mips/bcm47xx/board.c b/arch/mips/bcm47xx/board.c
2 index bd56415..353340f 100644
3 --- a/arch/mips/bcm47xx/board.c
4 +++ b/arch/mips/bcm47xx/board.c
5 @@ -140,6 +140,7 @@ struct bcm47xx_board_type_list2 bcm47xx_board_list_boot_hw[] __initconst = {
6 {{BCM47XX_BOARD_LINKSYS_WRT300NV11, "Linksys WRT300N V1.1"}, "WRT300N", "1.1"},
7 {{BCM47XX_BOARD_LINKSYS_WRT310NV1, "Linksys WRT310N V1"}, "WRT310N", "1.0"},
8 {{BCM47XX_BOARD_LINKSYS_WRT310NV2, "Linksys WRT310N V2"}, "WRT310N", "2.0"},
9 + {{BCM47XX_BOARD_LINKSYS_WRT320N_V1, "Linksys WRT320N V1"}, "WRT320N", "1.0"},
10 {{BCM47XX_BOARD_LINKSYS_WRT54G3GV2, "Linksys WRT54G3GV2-VF"}, "WRT54G3GV2-VF", "1.0"},
11 {{BCM47XX_BOARD_LINKSYS_WRT610NV1, "Linksys WRT610N V1"}, "WRT610N", "1.0"},
12 {{BCM47XX_BOARD_LINKSYS_WRT610NV2, "Linksys WRT610N V2"}, "WRT610N", "2.0"},
13 diff --git a/arch/mips/bcm47xx/buttons.c b/arch/mips/bcm47xx/buttons.c
14 index 276276a..cf2f1bb 100644
15 --- a/arch/mips/bcm47xx/buttons.c
16 +++ b/arch/mips/bcm47xx/buttons.c
17 @@ -270,6 +270,11 @@ bcm47xx_buttons_linksys_wrt310nv1[] __initconst = {
18 };
19
20 static const struct gpio_keys_button
21 +bcm47xx_buttons_linksys_wrt320n_v1[] __initconst = {
22 + BCM47XX_GPIO_KEY(5, KEY_RESTART),
23 +};
24 +
25 +static const struct gpio_keys_button
26 bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = {
27 BCM47XX_GPIO_KEY(5, KEY_WIMAX),
28 BCM47XX_GPIO_KEY(6, KEY_RESTART),
29 @@ -537,6 +542,9 @@ int __init bcm47xx_buttons_register(void)
30 case BCM47XX_BOARD_LINKSYS_WRT310NV1:
31 err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1);
32 break;
33 + case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
34 + err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt320n_v1);
35 + break;
36 case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
37 err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2);
38 break;
39 diff --git a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
40 index c41d1dc..ea5aa3e 100644
41 --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
42 +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
43 @@ -71,6 +71,7 @@ enum bcm47xx_board {
44 BCM47XX_BOARD_LINKSYS_WRT300NV11,
45 BCM47XX_BOARD_LINKSYS_WRT310NV1,
46 BCM47XX_BOARD_LINKSYS_WRT310NV2,
47 + BCM47XX_BOARD_LINKSYS_WRT320N_V1,
48 BCM47XX_BOARD_LINKSYS_WRT54G3GV2,
49 BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101,
50 BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467,