aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards
diff options
context:
space:
mode:
authorKuninori Morimoto <morimoto.kuninori@renesas.com>2009-03-03 02:22:00 -0500
committerPaul Mundt <lethal@linux-sh.org>2009-03-03 02:22:00 -0500
commit5ac072e110ff358a9ebc318a1b54f0182b799f72 (patch)
treefaa6de8b7eb18f71461b297d5eb85dcfec1b7ceb /arch/sh/boards
parent37042fbd8b3256d2a44b17646fa9de8777d5a34a (diff)
sh: Urquell board support.
This adds preliminary support for the SH7786-based Urquell board. Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards')
-rw-r--r--arch/sh/boards/Kconfig5
-rw-r--r--arch/sh/boards/Makefile1
-rw-r--r--arch/sh/boards/board-urquell.c128
3 files changed, 134 insertions, 0 deletions
diff --git a/arch/sh/boards/Kconfig b/arch/sh/boards/Kconfig
index c9da37088d2..694abecf602 100644
--- a/arch/sh/boards/Kconfig
+++ b/arch/sh/boards/Kconfig
@@ -162,6 +162,11 @@ config SH_SH7785LCR_29BIT_PHYSMAPS
162 DIP switch(S2-5). If you set the DIP switch for S2-5 = ON, 162 DIP switch(S2-5). If you set the DIP switch for S2-5 = ON,
163 you can access all on-board device in 29bit address mode. 163 you can access all on-board device in 29bit address mode.
164 164
165config SH_URQUELL
166 bool "Urquell"
167 depends on CPU_SUBTYPE_SH7786
168 select ARCH_REQUIRE_GPIOLIB
169
165config SH_MIGOR 170config SH_MIGOR
166 bool "Migo-R" 171 bool "Migo-R"
167 depends on CPU_SUBTYPE_SH7722 172 depends on CPU_SUBTYPE_SH7722
diff --git a/arch/sh/boards/Makefile b/arch/sh/boards/Makefile
index 269ae2be49e..6f101a8161f 100644
--- a/arch/sh/boards/Makefile
+++ b/arch/sh/boards/Makefile
@@ -4,5 +4,6 @@
4obj-$(CONFIG_SH_AP325RXA) += board-ap325rxa.o 4obj-$(CONFIG_SH_AP325RXA) += board-ap325rxa.o
5obj-$(CONFIG_SH_MAGIC_PANEL_R2) += board-magicpanelr2.o 5obj-$(CONFIG_SH_MAGIC_PANEL_R2) += board-magicpanelr2.o
6obj-$(CONFIG_SH_SH7785LCR) += board-sh7785lcr.o 6obj-$(CONFIG_SH_SH7785LCR) += board-sh7785lcr.o
7obj-$(CONFIG_SH_URQUELL) += board-urquell.o
7obj-$(CONFIG_SH_SHMIN) += board-shmin.o 8obj-$(CONFIG_SH_SHMIN) += board-shmin.o
8obj-$(CONFIG_SH_EDOSK7760) += board-edosk7760.o 9obj-$(CONFIG_SH_EDOSK7760) += board-edosk7760.o
diff --git a/arch/sh/boards/board-urquell.c b/arch/sh/boards/board-urquell.c
new file mode 100644
index 00000000000..d5caeabf46e
--- /dev/null
+++ b/arch/sh/boards/board-urquell.c
@@ -0,0 +1,128 @@
1/*
2 * Renesas Technology Corp. SH7786 Urquell Support.
3 *
4 * Copyright (C) 2008 Kuninori Morimoto <morimoto.kuninori@renesas.com>
5 * Copyright (C) 2008 Yoshihiro Shimoda
6 *
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details.
10 */
11#include <linux/init.h>
12#include <linux/platform_device.h>
13#include <linux/fb.h>
14#include <linux/mtd/physmap.h>
15#include <linux/delay.h>
16#include <linux/gpio.h>
17#include <linux/irq.h>
18#include <mach/urquell.h>
19#include <cpu/sh7786.h>
20#include <asm/heartbeat.h>
21#include <asm/sizes.h>
22
23static struct resource heartbeat_resources[] = {
24 [0] = {
25 .start = BOARDREG(SLEDR),
26 .end = BOARDREG(SLEDR),
27 .flags = IORESOURCE_MEM,
28 },
29};
30
31static struct heartbeat_data heartbeat_data = {
32 .regsize = 16,
33};
34
35static struct platform_device heartbeat_device = {
36 .name = "heartbeat",
37 .id = -1,
38 .dev = {
39 .platform_data = &heartbeat_data,
40 },
41 .num_resources = ARRAY_SIZE(heartbeat_resources),
42 .resource = heartbeat_resources,
43};
44
45static struct mtd_partition nor_flash_partitions[] = {
46 {
47 .name = "loader",
48 .offset = 0x00000000,
49 .size = SZ_512K,
50 .mask_flags = MTD_WRITEABLE, /* Read-only */
51 },
52 {
53 .name = "bootenv",
54 .offset = MTDPART_OFS_APPEND,
55 .size = SZ_512K,
56 .mask_flags = MTD_WRITEABLE, /* Read-only */
57 },
58 {
59 .name = "kernel",
60 .offset = MTDPART_OFS_APPEND,
61 .size = SZ_4M,
62 },
63 {
64 .name = "data",
65 .offset = MTDPART_OFS_APPEND,
66 .size = MTDPART_SIZ_FULL,
67 },
68};
69
70static struct physmap_flash_data nor_flash_data = {
71 .width = 2,
72 .parts = nor_flash_partitions,
73 .nr_parts = ARRAY_SIZE(nor_flash_partitions),
74};
75
76static struct resource nor_flash_resources[] = {
77 [0] = {
78 .start = NOR_FLASH_ADDR,
79 .end = NOR_FLASH_ADDR + NOR_FLASH_SIZE - 1,
80 .flags = IORESOURCE_MEM,
81 }
82};
83
84static struct platform_device nor_flash_device = {
85 .name = "physmap-flash",
86 .dev = {
87 .platform_data = &nor_flash_data,
88 },
89 .num_resources = ARRAY_SIZE(nor_flash_resources),
90 .resource = nor_flash_resources,
91};
92
93static struct platform_device *urquell_devices[] __initdata = {
94 &heartbeat_device,
95 &nor_flash_device,
96};
97
98static int __init urquell_devices_setup(void)
99{
100 /* USB */
101 gpio_request(GPIO_FN_USB_OVC0, NULL);
102 gpio_request(GPIO_FN_USB_PENC0, NULL);
103
104 return platform_add_devices(urquell_devices,
105 ARRAY_SIZE(urquell_devices));
106}
107device_initcall(urquell_devices_setup);
108
109static void urquell_power_off(void)
110{
111 __raw_writew(0xa5a5, UBOARDREG(SRSTR));
112}
113
114/* Initialize the board */
115static void __init urquell_setup(char **cmdline_p)
116{
117 printk(KERN_INFO "Renesas Technology Corp. Urquell support.\n");
118
119 pm_power_off = urquell_power_off;
120}
121
122/*
123 * The Machine Vector
124 */
125static struct sh_machine_vector mv_urquell __initmv = {
126 .mv_name = "Urquell",
127 .mv_setup = urquell_setup,
128};