2 +++ b/arch/arm/mach-gemini/board-wbd111.c
5 + * Support for Wiliboard WBD-111
7 + * Copyright (C) 2009 Imre Kaloz <kaloz@openwrt.org>
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.
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>
26 +#include <mach/gmac.h>
30 +static struct mdio_gpio_platform_data wbd111_mdio = {
33 + .phy_mask = ~(1 << 1),
36 +static struct platform_device wbd111_phy_device = {
37 + .name = "mdio-gpio",
40 + .platform_data = &wbd111_mdio,
44 +static struct gemini_gmac_platform_data gmac_data = {
45 + .bus_id[0] = "0:01",
46 + .interface[0] = PHY_INTERFACE_MODE_MII,
49 +static struct gpio_keys_button wbd111_keys[] = {
59 +static struct gpio_keys_platform_data wbd111_keys_data = {
60 + .buttons = wbd111_keys,
61 + .nbuttons = ARRAY_SIZE(wbd111_keys),
64 +static struct platform_device wbd111_keys_device = {
65 + .name = "gpio-keys",
68 + .platform_data = &wbd111_keys_data,
72 +static struct gpio_led wbd111_leds[] = {
91 +static struct gpio_led_platform_data wbd111_leds_data = {
92 + .num_leds = ARRAY_SIZE(wbd111_leds),
93 + .leds = wbd111_leds,
96 +static struct platform_device wbd111_leds_device = {
97 + .name = "leds-gpio",
100 + .platform_data = &wbd111_leds_data,
104 +static struct sys_timer wbd111_timer = {
105 + .init = gemini_timer_init,
108 +static void __init wbd111_init(void)
110 + gemini_gpio_init();
111 + platform_register_uart();
112 + platform_register_watchdog();
113 + platform_register_pflash(SZ_8M, NULL, 0);
114 + platform_device_register(&wbd111_leds_device);
115 + platform_device_register(&wbd111_keys_device);
116 + platform_device_register(&wbd111_phy_device);
117 + platform_register_ethernet(&gmac_data);
120 +MACHINE_START(WBD111, "Wiliboard WBD-111")
121 + .phys_io = 0x7fffc000,
122 + .io_pg_offst = ((0xffffc000) >> 18) & 0xfffc,
123 + .boot_params = 0x100,
124 + .map_io = gemini_map_io,
125 + .init_irq = gemini_init_irq,
126 + .timer = &wbd111_timer,
127 + .init_machine = wbd111_init,
129 --- a/arch/arm/mach-gemini/Kconfig
130 +++ b/arch/arm/mach-gemini/Kconfig
131 @@ -16,6 +16,13 @@ config MACH_RUT100
132 Say Y here if you intend to run this kernel on a
133 Teltonika 3G Router RUT100.
136 + bool "Wiliboard WBD-111"
137 + select GEMINI_MEM_SWAP
139 + Say Y here if you intend to run this kernel on a
144 config GEMINI_MEM_SWAP
145 --- a/arch/arm/mach-gemini/Makefile
146 +++ b/arch/arm/mach-gemini/Makefile
147 @@ -11,3 +11,4 @@ obj-$(CONFIG_PCI) += pci.o
148 # Board-specific support
149 obj-$(CONFIG_MACH_NAS4220B) += board-nas4220b.o
150 obj-$(CONFIG_MACH_RUT100) += board-rut1xx.o
151 +obj-$(CONFIG_MACH_WBD111) += board-wbd111.o