1 --- a/arch/arm/mach-gemini/Kconfig
2 +++ b/arch/arm/mach-gemini/Kconfig
3 @@ -23,6 +23,13 @@ config MACH_WBD111
4 Say Y here if you intend to run this kernel on a
8 + bool "Wiliboard WBD-222"
9 + select GEMINI_MEM_SWAP
11 + Say Y here if you intend to run this kernel on a
16 config GEMINI_MEM_SWAP
17 --- a/arch/arm/mach-gemini/Makefile
18 +++ b/arch/arm/mach-gemini/Makefile
19 @@ -12,3 +12,4 @@ obj-$(CONFIG_PCI) += pci.o
20 obj-$(CONFIG_MACH_NAS4220B) += board-nas4220b.o
21 obj-$(CONFIG_MACH_RUT100) += board-rut1xx.o
22 obj-$(CONFIG_MACH_WBD111) += board-wbd111.o
23 +obj-$(CONFIG_MACH_WBD222) += board-wbd222.o
25 +++ b/arch/arm/mach-gemini/board-wbd222.c
28 + * Support for Wiliboard WBD-222
30 + * Copyright (C) 2009 Imre Kaloz <kaloz@openwrt.org>
32 + * This program is free software; you can redistribute it and/or modify
33 + * it under the terms of the GNU General Public License as published by
34 + * the Free Software Foundation; either version 2 of the License, or
35 + * (at your option) any later version.
37 +#include <linux/kernel.h>
38 +#include <linux/init.h>
39 +#include <linux/platform_device.h>
40 +#include <linux/leds.h>
41 +#include <linux/input.h>
42 +#include <linux/skbuff.h>
43 +#include <linux/gpio_keys.h>
44 +#include <linux/mdio-gpio.h>
45 +#include <linux/mtd/mtd.h>
46 +#include <linux/mtd/partitions.h>
47 +#include <asm/mach-types.h>
48 +#include <asm/mach/arch.h>
49 +#include <asm/mach/time.h>
51 +#include <mach/gmac.h>
55 +static struct mdio_gpio_platform_data wbd222_mdio = {
58 + .phy_mask = ~((1 << 1) | (1 << 3)),
61 +static struct platform_device wbd222_phy_device = {
62 + .name = "mdio-gpio",
65 + .platform_data = &wbd222_mdio,
69 +static struct gemini_gmac_platform_data gmac_data = {
70 + .bus_id[0] = "0:01",
71 + .interface[0] = PHY_INTERFACE_MODE_MII,
72 + .bus_id[1] = "0:03",
73 + .interface[1] = PHY_INTERFACE_MODE_MII,
76 +static struct gpio_keys_button wbd222_keys[] = {
86 +static struct gpio_keys_platform_data wbd222_keys_data = {
87 + .buttons = wbd222_keys,
88 + .nbuttons = ARRAY_SIZE(wbd222_keys),
91 +static struct platform_device wbd222_keys_device = {
92 + .name = "gpio-keys",
95 + .platform_data = &wbd222_keys_data,
99 +static struct gpio_led wbd222_leds[] = {
118 +static struct gpio_led_platform_data wbd222_leds_data = {
119 + .num_leds = ARRAY_SIZE(wbd222_leds),
120 + .leds = wbd222_leds,
123 +static struct platform_device wbd222_leds_device = {
124 + .name = "leds-gpio",
127 + .platform_data = &wbd222_leds_data,
131 +static struct sys_timer wbd222_timer = {
132 + .init = gemini_timer_init,
135 +#ifdef CONFIG_MTD_PARTITIONS
136 +static struct mtd_partition wbd222_partitions[] = {
141 + .mask_flags = MTD_WRITEABLE,
144 + .offset = 0x020000,
148 + .offset = 0x120000,
152 + .offset = 0x7c0000,
154 + .mask_flags = MTD_WRITEABLE,
157 + .offset = 0x7d0000,
159 + .mask_flags = MTD_WRITEABLE,
162 + .offset = 0x7e0000,
164 + .mask_flags = MTD_WRITEABLE,
167 +#define wbd222_num_partitions ARRAY_SIZE(wbd222_partitions)
169 +#define wbd222_partitions NULL
170 +#define wbd222_num_partitions 0
171 +#endif /* CONFIG_MTD_PARTITIONS */
173 +static void __init wbd222_init(void)
175 + gemini_gpio_init();
176 + platform_register_uart();
177 + platform_register_watchdog();
178 + platform_register_pflash(SZ_8M, wbd222_partitions,
179 + wbd222_num_partitions);
180 + platform_device_register(&wbd222_leds_device);
181 + platform_device_register(&wbd222_keys_device);
182 + platform_device_register(&wbd222_phy_device);
183 + platform_register_ethernet(&gmac_data);
184 + platform_register_usb(0);
185 + platform_register_usb(1);
188 +MACHINE_START(WBD222, "Wiliboard WBD-222")
189 + .phys_io = 0x7fffc000,
190 + .io_pg_offst = ((0xffffc000) >> 18) & 0xfffc,
191 + .boot_params = 0x100,
192 + .map_io = gemini_map_io,
193 + .init_irq = gemini_init_irq,
194 + .timer = &wbd222_timer,
195 + .init_machine = wbd222_init,
197 --- a/arch/arm/tools/mach-types
198 +++ b/arch/arm/tools/mach-types
199 @@ -2536,3 +2536,4 @@ c3ax03 MACH_C3AX03 C3AX03 2549
200 mxt_td60 MACH_MXT_TD60 MXT_TD60 2550
201 esyx MACH_ESYX ESYX 2551
202 bulldog MACH_BULLDOG BULLDOG 2553
203 +wbd222 MACH_WBD222 WBD222 2753