2 * Support for Raidsonic NAS-4220-B
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.
15 #include <linux/kernel.h>
16 #include <linux/init.h>
17 #include <linux/platform_device.h>
18 #include <linux/leds.h>
19 #include <linux/input.h>
20 #include <linux/gpio_keys.h>
21 #include <linux/mdio-gpio.h>
24 #include <asm/setup.h>
25 #include <asm/mach-types.h>
26 #include <asm/mach/arch.h>
27 #include <asm/mach/time.h>
29 #include <mach/hardware.h>
30 #include <mach/global_reg.h>
34 static struct gpio_led ib4220b_leds[] = {
36 .name = "nas4220b:orange:hdd",
37 .default_trigger = "none",
41 .name = "nas4220b:green:os",
42 .default_trigger = "heartbeat",
47 static struct gpio_led_platform_data ib4220b_leds_data = {
48 .num_leds = ARRAY_SIZE(ib4220b_leds),
52 static struct platform_device ib4220b_led_device = {
56 .platform_data = &ib4220b_leds_data,
60 static struct gpio_keys_button ib4220b_keys[] = {
65 .desc = "Backup Button",
72 .desc = "Softreset Button",
77 static struct gpio_keys_platform_data ib4220b_keys_data = {
78 .buttons = ib4220b_keys,
79 .nbuttons = ARRAY_SIZE(ib4220b_keys),
82 static struct platform_device ib4220b_key_device = {
86 .platform_data = &ib4220b_keys_data,
90 static void __init ib4220b_init(void)
93 platform_register_uart();
94 platform_register_pflash(SZ_16M, NULL, 0);
95 platform_device_register(&ib4220b_led_device);
96 platform_device_register(&ib4220b_key_device);
97 platform_register_rtc();
100 MACHINE_START(NAS4220B, "Raidsonic NAS IB-4220-B")
101 .atag_offset = 0x100,
102 .map_io = gemini_map_io,
103 .init_irq = gemini_init_irq,
104 .init_time = gemini_timer_init,
105 .init_machine = ib4220b_init,
106 .restart = gemini_restart,