[brcm63xx] include kmod-usb-storage and kmod-ipt-nathelper-extra for SIP connection...
[openwrt.git] / target / linux / gemini / patches / 002-wbd111_support.patch
1 --- /dev/null
2 +++ b/arch/arm/mach-gemini/board-wbd111.c
3 @@ -0,0 +1,124 @@
4 +/*
5 + * Support for Wiliboard WBD-111
6 + *
7 + * Copyright (C) 2009 Imre Kaloz <kaloz@openwrt.org>
8 + *
9 + * This program is free software; you can redistribute it and/or modify
10 + * it under the terms of the GNU General Public License as published by
11 + * the Free Software Foundation; either version 2 of the License, or
12 + * (at your option) any later version.
13 + */
14 +#include <linux/kernel.h>
15 +#include <linux/init.h>
16 +#include <linux/platform_device.h>
17 +#include <linux/leds.h>
18 +#include <linux/input.h>
19 +#include <linux/skbuff.h>
20 +#include <linux/gpio_keys.h>
21 +#include <linux/mdio-gpio.h>
22 +#include <asm/mach-types.h>
23 +#include <asm/mach/arch.h>
24 +#include <asm/mach/time.h>
25 +
26 +#include <mach/gmac.h>
27 +
28 +#include "common.h"
29 +
30 +static struct mdio_gpio_platform_data wbd111_mdio = {
31 + .mdc = 22,
32 + .mdio = 21,
33 + .phy_mask = ~(1 << 1),
34 +};
35 +
36 +static struct platform_device wbd111_phy_device = {
37 + .name = "mdio-gpio",
38 + .id = 0,
39 + .dev = {
40 + .platform_data = &wbd111_mdio,
41 + },
42 +};
43 +
44 +static struct gemini_gmac_platform_data gmac_data = {
45 + .bus_id[0] = "0:01",
46 + .interface[0] = PHY_INTERFACE_MODE_MII,
47 +};
48 +
49 +static struct gpio_keys_button wbd111_keys[] = {
50 + {
51 + .code = KEY_SETUP,
52 + .gpio = 5,
53 + .active_low = 1,
54 + .desc = "reset",
55 + .type = EV_KEY,
56 + },
57 +};
58 +
59 +static struct gpio_keys_platform_data wbd111_keys_data = {
60 + .buttons = wbd111_keys,
61 + .nbuttons = ARRAY_SIZE(wbd111_keys),
62 +};
63 +
64 +static struct platform_device wbd111_keys_device = {
65 + .name = "gpio-keys",
66 + .id = -1,
67 + .dev = {
68 + .platform_data = &wbd111_keys_data,
69 + },
70 +};
71 +
72 +static struct gpio_led wbd111_leds[] = {
73 + {
74 + .name = "L3red",
75 + .gpio = 1,
76 + },
77 + {
78 + .name = "L4green",
79 + .gpio = 2,
80 + },
81 + {
82 + .name = "L4red",
83 + .gpio = 3,
84 + },
85 + {
86 + .name = "L3green",
87 + .gpio = 5,
88 + },
89 +};
90 +
91 +static struct gpio_led_platform_data wbd111_leds_data = {
92 + .num_leds = ARRAY_SIZE(wbd111_leds),
93 + .leds = wbd111_leds,
94 +};
95 +
96 +static struct platform_device wbd111_leds_device = {
97 + .name = "leds-gpio",
98 + .id = -1,
99 + .dev = {
100 + .platform_data = &wbd111_leds_data,
101 + },
102 +};
103 +
104 +static struct sys_timer wbd111_timer = {
105 + .init = gemini_timer_init,
106 +};
107 +
108 +static void __init wbd111_init(void)
109 +{
110 + gemini_gpio_init();
111 + platform_register_uart();
112 + platform_register_pflash(SZ_8M, NULL, 0);
113 + platform_device_register(&wbd111_leds_device);
114 + platform_device_register(&wbd111_keys_device);
115 + platform_device_register(&wbd111_phy_device);
116 + platform_register_ethernet(&gmac_data);
117 +}
118 +
119 +MACHINE_START(WBD111, "Wiliboard WBD-111")
120 + .phys_io = 0x7fffc000,
121 + .io_pg_offst = ((0xffffc000) >> 18) & 0xfffc,
122 + .boot_params = 0x100,
123 + .map_io = gemini_map_io,
124 + .init_irq = gemini_init_irq,
125 + .timer = &wbd111_timer,
126 + .init_machine = wbd111_init,
127 +MACHINE_END
128 --- a/arch/arm/mach-gemini/Kconfig
129 +++ b/arch/arm/mach-gemini/Kconfig
130 @@ -16,6 +16,13 @@ config MACH_RUT100
131 Say Y here if you intend to run this kernel on a
132 Teltonika 3G Router RUT100.
133
134 +config MACH_WBD111
135 + bool "Wiliboard WBD-111"
136 + select GEMINI_MEM_SWAP
137 + help
138 + Say Y here if you intend to run this kernel on a
139 + Wiliboard WBD-111.
140 +
141 endmenu
142
143 config GEMINI_MEM_SWAP
144 --- a/arch/arm/mach-gemini/Makefile
145 +++ b/arch/arm/mach-gemini/Makefile
146 @@ -11,3 +11,4 @@ obj-$(CONFIG_PCI) += pci.o
147 # Board-specific support
148 obj-$(CONFIG_MACH_NAS4220B) += board-nas4220b.o
149 obj-$(CONFIG_MACH_RUT100) += board-rut1xx.o
150 +obj-$(CONFIG_MACH_WBD111) += board-wbd111.o
This page took 0.056805 seconds and 5 git commands to generate.