diff options
Diffstat (limited to 'arch/sh/boards')
-rw-r--r-- | arch/sh/boards/Kconfig | 4 | ||||
-rw-r--r-- | arch/sh/boards/Makefile | 1 | ||||
-rw-r--r-- | arch/sh/boards/board-rsk7201.c | 105 |
3 files changed, 110 insertions, 0 deletions
diff --git a/arch/sh/boards/Kconfig b/arch/sh/boards/Kconfig index 50467f9d0d0b..2bf3f6c73c12 100644 --- a/arch/sh/boards/Kconfig +++ b/arch/sh/boards/Kconfig | |||
@@ -126,6 +126,10 @@ config SH_RTS7751R2D | |||
126 | Select RTS7751R2D if configuring for a Renesas Technology | 126 | Select RTS7751R2D if configuring for a Renesas Technology |
127 | Sales SH-Graphics board. | 127 | Sales SH-Graphics board. |
128 | 128 | ||
129 | config SH_RSK7201 | ||
130 | bool "RSK7201" | ||
131 | depends on CPU_SUBTYPE_SH7201 | ||
132 | |||
129 | config SH_RSK7203 | 133 | config SH_RSK7203 |
130 | bool "RSK7203" | 134 | bool "RSK7203" |
131 | select GENERIC_GPIO | 135 | select GENERIC_GPIO |
diff --git a/arch/sh/boards/Makefile b/arch/sh/boards/Makefile index d9efa3923721..ce4d4d465185 100644 --- a/arch/sh/boards/Makefile +++ b/arch/sh/boards/Makefile | |||
@@ -3,6 +3,7 @@ | |||
3 | # | 3 | # |
4 | obj-$(CONFIG_SH_AP325RXA) += board-ap325rxa.o | 4 | obj-$(CONFIG_SH_AP325RXA) += board-ap325rxa.o |
5 | obj-$(CONFIG_SH_MAGIC_PANEL_R2) += board-magicpanelr2.o | 5 | obj-$(CONFIG_SH_MAGIC_PANEL_R2) += board-magicpanelr2.o |
6 | obj-$(CONFIG_SH_RSK7201) += board-rsk7201.o | ||
6 | obj-$(CONFIG_SH_RSK7203) += board-rsk7203.o | 7 | obj-$(CONFIG_SH_RSK7203) += board-rsk7203.o |
7 | obj-$(CONFIG_SH_SH7785LCR) += board-sh7785lcr.o | 8 | obj-$(CONFIG_SH_SH7785LCR) += board-sh7785lcr.o |
8 | obj-$(CONFIG_SH_SHMIN) += board-shmin.o | 9 | obj-$(CONFIG_SH_SHMIN) += board-shmin.o |
diff --git a/arch/sh/boards/board-rsk7201.c b/arch/sh/boards/board-rsk7201.c new file mode 100644 index 000000000000..6fcf64453752 --- /dev/null +++ b/arch/sh/boards/board-rsk7201.c | |||
@@ -0,0 +1,105 @@ | |||
1 | /* | ||
2 | * Renesas Technology Europe RSK+ 7201 Support. | ||
3 | * | ||
4 | * Copyright (C) 2008 Peter Griffin <pgriffin@mpc-data.co.uk> | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | #include <linux/init.h> | ||
11 | #include <linux/types.h> | ||
12 | #include <linux/platform_device.h> | ||
13 | #include <linux/interrupt.h> | ||
14 | #include <linux/mtd/mtd.h> | ||
15 | #include <linux/mtd/partitions.h> | ||
16 | #include <linux/mtd/physmap.h> | ||
17 | #include <linux/mtd/map.h> | ||
18 | #include <asm/machvec.h> | ||
19 | #include <asm/io.h> | ||
20 | |||
21 | static const char *probes[] = { "cmdlinepart", NULL }; | ||
22 | |||
23 | static struct mtd_partition *parsed_partitions; | ||
24 | |||
25 | static struct mtd_partition rsk7201_partitions[] = { | ||
26 | { | ||
27 | .name = "Bootloader", | ||
28 | .offset = 0x00000000, | ||
29 | .size = 0x00040000, | ||
30 | .mask_flags = MTD_WRITEABLE, | ||
31 | }, { | ||
32 | .name = "Kernel", | ||
33 | .offset = MTDPART_OFS_NXTBLK, | ||
34 | .size = 0x001c0000, | ||
35 | }, { | ||
36 | .name = "Flash_FS", | ||
37 | .offset = MTDPART_OFS_NXTBLK, | ||
38 | .size = MTDPART_SIZ_FULL, | ||
39 | } | ||
40 | }; | ||
41 | |||
42 | static struct physmap_flash_data flash_data = { | ||
43 | .width = 2, | ||
44 | }; | ||
45 | |||
46 | static struct resource flash_resource = { | ||
47 | .start = 0x20000000, | ||
48 | .end = 0x20400000, | ||
49 | .flags = IORESOURCE_MEM, | ||
50 | }; | ||
51 | |||
52 | static struct platform_device flash_device = { | ||
53 | .name = "physmap-flash", | ||
54 | .id = -1, | ||
55 | .resource = &flash_resource, | ||
56 | .num_resources = 1, | ||
57 | .dev = { | ||
58 | .platform_data = &flash_data, | ||
59 | }, | ||
60 | }; | ||
61 | |||
62 | static struct mtd_info *flash_mtd; | ||
63 | |||
64 | static struct map_info rsk7201_flash_map = { | ||
65 | .name = "RSK+ Flash", | ||
66 | .size = 0x400000, | ||
67 | .bankwidth = 2, | ||
68 | }; | ||
69 | |||
70 | static void __init set_mtd_partitions(void) | ||
71 | { | ||
72 | int nr_parts = 0; | ||
73 | |||
74 | simple_map_init(&rsk7201_flash_map); | ||
75 | flash_mtd = do_map_probe("cfi_probe", &rsk7201_flash_map); | ||
76 | nr_parts = parse_mtd_partitions(flash_mtd, probes, | ||
77 | &parsed_partitions, 0); | ||
78 | /* If there is no partition table, used the hard coded table */ | ||
79 | if (nr_parts <= 0) { | ||
80 | flash_data.parts = rsk7201_partitions; | ||
81 | flash_data.nr_parts = ARRAY_SIZE(rsk7201_partitions); | ||
82 | } else { | ||
83 | flash_data.nr_parts = nr_parts; | ||
84 | flash_data.parts = parsed_partitions; | ||
85 | } | ||
86 | } | ||
87 | |||
88 | static struct platform_device *rsk7201_devices[] __initdata = { | ||
89 | &flash_device, | ||
90 | }; | ||
91 | |||
92 | static int __init rsk7201_devices_setup(void) | ||
93 | { | ||
94 | set_mtd_partitions(); | ||
95 | return platform_add_devices(rsk7201_devices, | ||
96 | ARRAY_SIZE(rsk7201_devices)); | ||
97 | } | ||
98 | device_initcall(rsk7201_devices_setup); | ||
99 | |||
100 | /* | ||
101 | * The Machine Vector | ||
102 | */ | ||
103 | static struct sh_machine_vector mv_rsk7201 __initmv = { | ||
104 | .mv_name = "RSK+7201", | ||
105 | }; | ||