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_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);
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,
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.
135 + bool "Wiliboard WBD-111"
136 + select GEMINI_MEM_SWAP
138 + Say Y here if you intend to run this kernel on a
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