aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-gemini
diff options
context:
space:
mode:
authorHans Ulli Kroll <ulli.kroll@googlemail.com>2010-05-13 01:37:26 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-05-13 07:19:14 -0400
commita21e0030d659476b4ae48aab7846fa01e6ee0a71 (patch)
tree7935235b61573c6590df031f6ddea87defb5c069 /arch/arm/mach-gemini
parent6a5f0d3a7800caf74078039d66460466da487b10 (diff)
ARM: 6130/1: Gemini: add support for Raidsonic IB4220
depends on patch # 6128, 6129 Add support for Nasbox IB4220 from Raidsonic. supported devices on SoC - GPIO with led und keys - UART - PFLASH, set fixed partition table Signed-off-by: Janos Laube <janos.dev@gmail.com> Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-gemini')
-rw-r--r--arch/arm/mach-gemini/Kconfig7
-rw-r--r--arch/arm/mach-gemini/Makefile1
-rw-r--r--arch/arm/mach-gemini/board-nas4220b.c111
3 files changed, 119 insertions, 0 deletions
diff --git a/arch/arm/mach-gemini/Kconfig b/arch/arm/mach-gemini/Kconfig
index 799750032ef6..6f066ee4bf24 100644
--- a/arch/arm/mach-gemini/Kconfig
+++ b/arch/arm/mach-gemini/Kconfig
@@ -2,6 +2,13 @@ if ARCH_GEMINI
2 2
3menu "Cortina Systems Gemini Implementations" 3menu "Cortina Systems Gemini Implementations"
4 4
5config MACH_NAS4220B
6 bool "Raidsonic NAS-4220-B"
7 select GEMINI_MEM_SWAP
8 help
9 Say Y here if you intend to run this kernel on a
10 Raidsonic NAS-4220-B.
11
5config MACH_RUT100 12config MACH_RUT100
6 bool "Teltonika RUT100" 13 bool "Teltonika RUT100"
7 select GEMINI_MEM_SWAP 14 select GEMINI_MEM_SWAP
diff --git a/arch/arm/mach-gemini/Makefile b/arch/arm/mach-gemini/Makefile
index 8e02c471acd4..c5b24b95a76e 100644
--- a/arch/arm/mach-gemini/Makefile
+++ b/arch/arm/mach-gemini/Makefile
@@ -7,6 +7,7 @@
7obj-y := irq.o mm.o time.o devices.o gpio.o 7obj-y := irq.o mm.o time.o devices.o gpio.o
8 8
9# Board-specific support 9# Board-specific support
10obj-$(CONFIG_MACH_NAS4220B) += board-nas4220b.o
10obj-$(CONFIG_MACH_RUT100) += board-rut1xx.o 11obj-$(CONFIG_MACH_RUT100) += board-rut1xx.o
11obj-$(CONFIG_MACH_WBD111) += board-wbd111.o 12obj-$(CONFIG_MACH_WBD111) += board-wbd111.o
12obj-$(CONFIG_MACH_WBD222) += board-wbd222.o 13obj-$(CONFIG_MACH_WBD222) += board-wbd222.o
diff --git a/arch/arm/mach-gemini/board-nas4220b.c b/arch/arm/mach-gemini/board-nas4220b.c
new file mode 100644
index 000000000000..01f1d6daab44
--- /dev/null
+++ b/arch/arm/mach-gemini/board-nas4220b.c
@@ -0,0 +1,111 @@
1/*
2 * Support for Raidsonic NAS-4220-B
3 *
4 * Copyright (C) 2009 Janos Laube <janos.dev@gmail.com>
5 *
6 * based on rut1xx.c
7 * Copyright (C) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
8 *
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.
13 */
14
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>
22#include <linux/io.h>
23
24#include <asm/setup.h>
25#include <asm/mach-types.h>
26#include <asm/mach/arch.h>
27#include <asm/mach/time.h>
28
29#include <mach/hardware.h>
30#include <mach/global_reg.h>
31
32#include "common.h"
33
34static struct sys_timer ib4220b_timer = {
35 .init = gemini_timer_init,
36};
37
38static struct gpio_led ib4220b_leds[] = {
39 {
40 .name = "nas4220b:orange:hdd",
41 .default_trigger = "none",
42 .gpio = 60,
43 },
44 {
45 .name = "nas4220b:green:os",
46 .default_trigger = "heartbeat",
47 .gpio = 62,
48 },
49};
50
51static struct gpio_led_platform_data ib4220b_leds_data = {
52 .num_leds = ARRAY_SIZE(ib4220b_leds),
53 .leds = ib4220b_leds,
54};
55
56static struct platform_device ib4220b_led_device = {
57 .name = "leds-gpio",
58 .id = -1,
59 .dev = {
60 .platform_data = &ib4220b_leds_data,
61 },
62};
63
64static struct gpio_keys_button ib4220b_keys[] = {
65 {
66 .code = KEY_SETUP,
67 .gpio = 61,
68 .active_low = 1,
69 .desc = "Backup Button",
70 .type = EV_KEY,
71 },
72 {
73 .code = KEY_RESTART,
74 .gpio = 63,
75 .active_low = 1,
76 .desc = "Softreset Button",
77 .type = EV_KEY,
78 },
79};
80
81static struct gpio_keys_platform_data ib4220b_keys_data = {
82 .buttons = ib4220b_keys,
83 .nbuttons = ARRAY_SIZE(ib4220b_keys),
84};
85
86static struct platform_device ib4220b_key_device = {
87 .name = "gpio-keys",
88 .id = -1,
89 .dev = {
90 .platform_data = &ib4220b_keys_data,
91 },
92};
93
94static void __init ib4220b_init(void)
95{
96 gemini_gpio_init();
97 platform_register_uart();
98 platform_register_pflash(SZ_16M, NULL, 0);
99 platform_device_register(&ib4220b_led_device);
100 platform_device_register(&ib4220b_key_device);
101}
102
103MACHINE_START(NAS4220B, "Raidsonic NAS IB-4220-B")
104 .phys_io = 0x7fffc000,
105 .io_pg_offst = ((0xffffc000) >> 18) & 0xfffc,
106 .boot_params = 0x100,
107 .map_io = gemini_map_io,
108 .init_irq = gemini_init_irq,
109 .timer = &ib4220b_timer,
110 .init_machine = ib4220b_init,
111MACHINE_END