diff options
Diffstat (limited to 'arch/arm/mach-gemini')
-rw-r--r-- | arch/arm/mach-gemini/Kconfig | 21 | ||||
-rw-r--r-- | arch/arm/mach-gemini/Makefile | 3 | ||||
-rw-r--r-- | arch/arm/mach-gemini/board-nas4220b.c | 111 | ||||
-rw-r--r-- | arch/arm/mach-gemini/board-wbd111.c | 143 | ||||
-rw-r--r-- | arch/arm/mach-gemini/board-wbd222.c | 143 |
5 files changed, 421 insertions, 0 deletions
diff --git a/arch/arm/mach-gemini/Kconfig b/arch/arm/mach-gemini/Kconfig index 515b75cf2e8b..6f066ee4bf24 100644 --- a/arch/arm/mach-gemini/Kconfig +++ b/arch/arm/mach-gemini/Kconfig | |||
@@ -2,6 +2,13 @@ if ARCH_GEMINI | |||
2 | 2 | ||
3 | menu "Cortina Systems Gemini Implementations" | 3 | menu "Cortina Systems Gemini Implementations" |
4 | 4 | ||
5 | config 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 | |||
5 | config MACH_RUT100 | 12 | config MACH_RUT100 |
6 | bool "Teltonika RUT100" | 13 | bool "Teltonika RUT100" |
7 | select GEMINI_MEM_SWAP | 14 | select GEMINI_MEM_SWAP |
@@ -9,6 +16,20 @@ config MACH_RUT100 | |||
9 | Say Y here if you intend to run this kernel on a | 16 | Say Y here if you intend to run this kernel on a |
10 | Teltonika 3G Router RUT100. | 17 | Teltonika 3G Router RUT100. |
11 | 18 | ||
19 | config MACH_WBD111 | ||
20 | bool "Wiliboard WBD-111" | ||
21 | select GEMINI_MEM_SWAP | ||
22 | help | ||
23 | Say Y here if you intend to run this kernel on a | ||
24 | Wiliboard WBD-111. | ||
25 | |||
26 | config MACH_WBD222 | ||
27 | bool "Wiliboard WBD-222" | ||
28 | select GEMINI_MEM_SWAP | ||
29 | help | ||
30 | Say Y here if you intend to run this kernel on a | ||
31 | Wiliboard WBD-222. | ||
32 | |||
12 | endmenu | 33 | endmenu |
13 | 34 | ||
14 | config GEMINI_MEM_SWAP | 35 | config GEMINI_MEM_SWAP |
diff --git a/arch/arm/mach-gemini/Makefile b/arch/arm/mach-gemini/Makefile index 719505b81821..c5b24b95a76e 100644 --- a/arch/arm/mach-gemini/Makefile +++ b/arch/arm/mach-gemini/Makefile | |||
@@ -7,4 +7,7 @@ | |||
7 | obj-y := irq.o mm.o time.o devices.o gpio.o | 7 | obj-y := irq.o mm.o time.o devices.o gpio.o |
8 | 8 | ||
9 | # Board-specific support | 9 | # Board-specific support |
10 | obj-$(CONFIG_MACH_NAS4220B) += board-nas4220b.o | ||
10 | obj-$(CONFIG_MACH_RUT100) += board-rut1xx.o | 11 | obj-$(CONFIG_MACH_RUT100) += board-rut1xx.o |
12 | obj-$(CONFIG_MACH_WBD111) += board-wbd111.o | ||
13 | obj-$(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 | |||
34 | static struct sys_timer ib4220b_timer = { | ||
35 | .init = gemini_timer_init, | ||
36 | }; | ||
37 | |||
38 | static 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 | |||
51 | static struct gpio_led_platform_data ib4220b_leds_data = { | ||
52 | .num_leds = ARRAY_SIZE(ib4220b_leds), | ||
53 | .leds = ib4220b_leds, | ||
54 | }; | ||
55 | |||
56 | static struct platform_device ib4220b_led_device = { | ||
57 | .name = "leds-gpio", | ||
58 | .id = -1, | ||
59 | .dev = { | ||
60 | .platform_data = &ib4220b_leds_data, | ||
61 | }, | ||
62 | }; | ||
63 | |||
64 | static 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 | |||
81 | static struct gpio_keys_platform_data ib4220b_keys_data = { | ||
82 | .buttons = ib4220b_keys, | ||
83 | .nbuttons = ARRAY_SIZE(ib4220b_keys), | ||
84 | }; | ||
85 | |||
86 | static struct platform_device ib4220b_key_device = { | ||
87 | .name = "gpio-keys", | ||
88 | .id = -1, | ||
89 | .dev = { | ||
90 | .platform_data = &ib4220b_keys_data, | ||
91 | }, | ||
92 | }; | ||
93 | |||
94 | static 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 | |||
103 | MACHINE_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, | ||
111 | MACHINE_END | ||
diff --git a/arch/arm/mach-gemini/board-wbd111.c b/arch/arm/mach-gemini/board-wbd111.c new file mode 100644 index 000000000000..36538c15b3c4 --- /dev/null +++ b/arch/arm/mach-gemini/board-wbd111.c | |||
@@ -0,0 +1,143 @@ | |||
1 | /* | ||
2 | * Support for Wiliboard WBD-111 | ||
3 | * | ||
4 | * Copyright (C) 2009 Imre Kaloz <kaloz@openwrt.org> | ||
5 | * | ||
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. | ||
10 | */ | ||
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> | ||
24 | |||
25 | |||
26 | #include "common.h" | ||
27 | |||
28 | static struct gpio_keys_button wbd111_keys[] = { | ||
29 | { | ||
30 | .code = KEY_SETUP, | ||
31 | .gpio = 5, | ||
32 | .active_low = 1, | ||
33 | .desc = "reset", | ||
34 | .type = EV_KEY, | ||
35 | }, | ||
36 | }; | ||
37 | |||
38 | static struct gpio_keys_platform_data wbd111_keys_data = { | ||
39 | .buttons = wbd111_keys, | ||
40 | .nbuttons = ARRAY_SIZE(wbd111_keys), | ||
41 | }; | ||
42 | |||
43 | static struct platform_device wbd111_keys_device = { | ||
44 | .name = "gpio-keys", | ||
45 | .id = -1, | ||
46 | .dev = { | ||
47 | .platform_data = &wbd111_keys_data, | ||
48 | }, | ||
49 | }; | ||
50 | |||
51 | static struct gpio_led wbd111_leds[] = { | ||
52 | { | ||
53 | .name = "L3red", | ||
54 | .gpio = 1, | ||
55 | }, | ||
56 | { | ||
57 | .name = "L4green", | ||
58 | .gpio = 2, | ||
59 | }, | ||
60 | { | ||
61 | .name = "L4red", | ||
62 | .gpio = 3, | ||
63 | }, | ||
64 | { | ||
65 | .name = "L3green", | ||
66 | .gpio = 5, | ||
67 | }, | ||
68 | }; | ||
69 | |||
70 | static struct gpio_led_platform_data wbd111_leds_data = { | ||
71 | .num_leds = ARRAY_SIZE(wbd111_leds), | ||
72 | .leds = wbd111_leds, | ||
73 | }; | ||
74 | |||
75 | static struct platform_device wbd111_leds_device = { | ||
76 | .name = "leds-gpio", | ||
77 | .id = -1, | ||
78 | .dev = { | ||
79 | .platform_data = &wbd111_leds_data, | ||
80 | }, | ||
81 | }; | ||
82 | |||
83 | static struct sys_timer wbd111_timer = { | ||
84 | .init = gemini_timer_init, | ||
85 | }; | ||
86 | |||
87 | #ifdef CONFIG_MTD_PARTITIONS | ||
88 | static struct mtd_partition wbd111_partitions[] = { | ||
89 | { | ||
90 | .name = "RedBoot", | ||
91 | .offset = 0, | ||
92 | .size = 0x020000, | ||
93 | .mask_flags = MTD_WRITEABLE, | ||
94 | } , { | ||
95 | .name = "kernel", | ||
96 | .offset = 0x020000, | ||
97 | .size = 0x100000, | ||
98 | } , { | ||
99 | .name = "rootfs", | ||
100 | .offset = 0x120000, | ||
101 | .size = 0x6a0000, | ||
102 | } , { | ||
103 | .name = "VCTL", | ||
104 | .offset = 0x7c0000, | ||
105 | .size = 0x010000, | ||
106 | .mask_flags = MTD_WRITEABLE, | ||
107 | } , { | ||
108 | .name = "cfg", | ||
109 | .offset = 0x7d0000, | ||
110 | .size = 0x010000, | ||
111 | .mask_flags = MTD_WRITEABLE, | ||
112 | } , { | ||
113 | .name = "FIS", | ||
114 | .offset = 0x7e0000, | ||
115 | .size = 0x010000, | ||
116 | .mask_flags = MTD_WRITEABLE, | ||
117 | } | ||
118 | }; | ||
119 | #define wbd111_num_partitions ARRAY_SIZE(wbd111_partitions) | ||
120 | #else | ||
121 | #define wbd111_partitions NULL | ||
122 | #define wbd111_num_partitions 0 | ||
123 | #endif /* CONFIG_MTD_PARTITIONS */ | ||
124 | |||
125 | static void __init wbd111_init(void) | ||
126 | { | ||
127 | gemini_gpio_init(); | ||
128 | platform_register_uart(); | ||
129 | platform_register_pflash(SZ_8M, wbd111_partitions, | ||
130 | wbd111_num_partitions); | ||
131 | platform_device_register(&wbd111_leds_device); | ||
132 | platform_device_register(&wbd111_keys_device); | ||
133 | } | ||
134 | |||
135 | MACHINE_START(WBD111, "Wiliboard WBD-111") | ||
136 | .phys_io = 0x7fffc000, | ||
137 | .io_pg_offst = ((0xffffc000) >> 18) & 0xfffc, | ||
138 | .boot_params = 0x100, | ||
139 | .map_io = gemini_map_io, | ||
140 | .init_irq = gemini_init_irq, | ||
141 | .timer = &wbd111_timer, | ||
142 | .init_machine = wbd111_init, | ||
143 | MACHINE_END | ||
diff --git a/arch/arm/mach-gemini/board-wbd222.c b/arch/arm/mach-gemini/board-wbd222.c new file mode 100644 index 000000000000..ece8b4c65110 --- /dev/null +++ b/arch/arm/mach-gemini/board-wbd222.c | |||
@@ -0,0 +1,143 @@ | |||
1 | /* | ||
2 | * Support for Wiliboard WBD-222 | ||
3 | * | ||
4 | * Copyright (C) 2009 Imre Kaloz <kaloz@openwrt.org> | ||
5 | * | ||
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. | ||
10 | */ | ||
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> | ||
24 | |||
25 | |||
26 | #include "common.h" | ||
27 | |||
28 | static struct gpio_keys_button wbd222_keys[] = { | ||
29 | { | ||
30 | .code = KEY_SETUP, | ||
31 | .gpio = 5, | ||
32 | .active_low = 1, | ||
33 | .desc = "reset", | ||
34 | .type = EV_KEY, | ||
35 | }, | ||
36 | }; | ||
37 | |||
38 | static struct gpio_keys_platform_data wbd222_keys_data = { | ||
39 | .buttons = wbd222_keys, | ||
40 | .nbuttons = ARRAY_SIZE(wbd222_keys), | ||
41 | }; | ||
42 | |||
43 | static struct platform_device wbd222_keys_device = { | ||
44 | .name = "gpio-keys", | ||
45 | .id = -1, | ||
46 | .dev = { | ||
47 | .platform_data = &wbd222_keys_data, | ||
48 | }, | ||
49 | }; | ||
50 | |||
51 | static struct gpio_led wbd222_leds[] = { | ||
52 | { | ||
53 | .name = "L3red", | ||
54 | .gpio = 1, | ||
55 | }, | ||
56 | { | ||
57 | .name = "L4green", | ||
58 | .gpio = 2, | ||
59 | }, | ||
60 | { | ||
61 | .name = "L4red", | ||
62 | .gpio = 3, | ||
63 | }, | ||
64 | { | ||
65 | .name = "L3green", | ||
66 | .gpio = 5, | ||
67 | }, | ||
68 | }; | ||
69 | |||
70 | static struct gpio_led_platform_data wbd222_leds_data = { | ||
71 | .num_leds = ARRAY_SIZE(wbd222_leds), | ||
72 | .leds = wbd222_leds, | ||
73 | }; | ||
74 | |||
75 | static struct platform_device wbd222_leds_device = { | ||
76 | .name = "leds-gpio", | ||
77 | .id = -1, | ||
78 | .dev = { | ||
79 | .platform_data = &wbd222_leds_data, | ||
80 | }, | ||
81 | }; | ||
82 | |||
83 | static struct sys_timer wbd222_timer = { | ||
84 | .init = gemini_timer_init, | ||
85 | }; | ||
86 | |||
87 | #ifdef CONFIG_MTD_PARTITIONS | ||
88 | static struct mtd_partition wbd222_partitions[] = { | ||
89 | { | ||
90 | .name = "RedBoot", | ||
91 | .offset = 0, | ||
92 | .size = 0x020000, | ||
93 | .mask_flags = MTD_WRITEABLE, | ||
94 | } , { | ||
95 | .name = "kernel", | ||
96 | .offset = 0x020000, | ||
97 | .size = 0x100000, | ||
98 | } , { | ||
99 | .name = "rootfs", | ||
100 | .offset = 0x120000, | ||
101 | .size = 0x6a0000, | ||
102 | } , { | ||
103 | .name = "VCTL", | ||
104 | .offset = 0x7c0000, | ||
105 | .size = 0x010000, | ||
106 | .mask_flags = MTD_WRITEABLE, | ||
107 | } , { | ||
108 | .name = "cfg", | ||
109 | .offset = 0x7d0000, | ||
110 | .size = 0x010000, | ||
111 | .mask_flags = MTD_WRITEABLE, | ||
112 | } , { | ||
113 | .name = "FIS", | ||
114 | .offset = 0x7e0000, | ||
115 | .size = 0x010000, | ||
116 | .mask_flags = MTD_WRITEABLE, | ||
117 | } | ||
118 | }; | ||
119 | #define wbd222_num_partitions ARRAY_SIZE(wbd222_partitions) | ||
120 | #else | ||
121 | #define wbd222_partitions NULL | ||
122 | #define wbd222_num_partitions 0 | ||
123 | #endif /* CONFIG_MTD_PARTITIONS */ | ||
124 | |||
125 | static void __init wbd222_init(void) | ||
126 | { | ||
127 | gemini_gpio_init(); | ||
128 | platform_register_uart(); | ||
129 | platform_register_pflash(SZ_8M, wbd222_partitions, | ||
130 | wbd222_num_partitions); | ||
131 | platform_device_register(&wbd222_leds_device); | ||
132 | platform_device_register(&wbd222_keys_device); | ||
133 | } | ||
134 | |||
135 | MACHINE_START(WBD222, "Wiliboard WBD-222") | ||
136 | .phys_io = 0x7fffc000, | ||
137 | .io_pg_offst = ((0xffffc000) >> 18) & 0xfffc, | ||
138 | .boot_params = 0x100, | ||
139 | .map_io = gemini_map_io, | ||
140 | .init_irq = gemini_init_irq, | ||
141 | .timer = &wbd222_timer, | ||
142 | .init_machine = wbd222_init, | ||
143 | MACHINE_END | ||