2 * Support for Wiliboard WBD-111
4 * Copyright (C) 2009 Imre Kaloz <kaloz@openwrt.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 #include <linux/kernel.h>
12 #include <linux/init.h>
13 #include <linux/platform_device.h>
14 #include <linux/leds.h>
15 #include <linux/input.h>
16 #include <linux/skbuff.h>
17 #include <linux/gpio_keys.h>
18 #include <linux/mdio-gpio.h>
19 #include <linux/mtd/mtd.h>
20 #include <linux/mtd/partitions.h>
21 #include <asm/mach-types.h>
22 #include <asm/mach/arch.h>
23 #include <asm/mach/time.h>
28 static struct gpio_keys_button wbd111_keys
[] = {
38 static struct gpio_keys_platform_data wbd111_keys_data
= {
39 .buttons
= wbd111_keys
,
40 .nbuttons
= ARRAY_SIZE(wbd111_keys
),
43 static struct platform_device wbd111_keys_device
= {
47 .platform_data
= &wbd111_keys_data
,
51 static struct gpio_led wbd111_leds
[] = {
70 static struct gpio_led_platform_data wbd111_leds_data
= {
71 .num_leds
= ARRAY_SIZE(wbd111_leds
),
75 static struct platform_device wbd111_leds_device
= {
79 .platform_data
= &wbd111_leds_data
,
83 static struct mtd_partition wbd111_partitions
[] = {
88 .mask_flags
= MTD_WRITEABLE
,
101 .mask_flags
= MTD_WRITEABLE
,
106 .mask_flags
= MTD_WRITEABLE
,
111 .mask_flags
= MTD_WRITEABLE
,
114 #define wbd111_num_partitions ARRAY_SIZE(wbd111_partitions)
116 static void __init
wbd111_init(void)
119 platform_register_uart();
120 platform_register_pflash(SZ_8M
, wbd111_partitions
,
121 wbd111_num_partitions
);
122 platform_device_register(&wbd111_leds_device
);
123 platform_device_register(&wbd111_keys_device
);
124 platform_register_rtc();
127 MACHINE_START(WBD111
, "Wiliboard WBD-111")
128 .atag_offset
= 0x100,
129 .map_io
= gemini_map_io
,
130 .init_irq
= gemini_init_irq
,
131 .init_time
= gemini_timer_init
,
132 .init_machine
= wbd111_init
,
133 .restart
= gemini_restart
,