diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-05-19 03:47:56 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-07-28 05:10:28 -0400 |
commit | 3787aa112c653b34b6f901b2eaae2b62f9582569 (patch) | |
tree | 347a43ce6333b7fe437cbbbc6cf0117c32c6f8d6 | |
parent | 2cd1e31859837155033b4b731de61066d5da50ab (diff) |
sh: RSK+ 7203 board support.
This adds initial support for the RTE RSK+ SH7203 board.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | arch/sh/Kconfig | 4 | ||||
-rw-r--r-- | arch/sh/Makefile | 1 | ||||
-rw-r--r-- | arch/sh/boards/renesas/rsk7203/Makefile | 1 | ||||
-rw-r--r-- | arch/sh/boards/renesas/rsk7203/setup.c | 126 | ||||
-rw-r--r-- | arch/sh/tools/mach-types | 1 |
5 files changed, 133 insertions, 0 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 8879938f3356..83495882778c 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -477,6 +477,10 @@ config SH_RTS7751R2D | |||
477 | Select RTS7751R2D if configuring for a Renesas Technology | 477 | Select RTS7751R2D if configuring for a Renesas Technology |
478 | Sales SH-Graphics board. | 478 | Sales SH-Graphics board. |
479 | 479 | ||
480 | config SH_RSK7203 | ||
481 | bool "RSK7203" | ||
482 | depends on CPU_SUBTYPE_SH7203 | ||
483 | |||
480 | config SH_SDK7780 | 484 | config SH_SDK7780 |
481 | bool "SDK7780R3" | 485 | bool "SDK7780R3" |
482 | depends on CPU_SUBTYPE_SH7780 | 486 | depends on CPU_SUBTYPE_SH7780 |
diff --git a/arch/sh/Makefile b/arch/sh/Makefile index fb7b1b15e392..c97a779c36ed 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile | |||
@@ -121,6 +121,7 @@ machdir-$(CONFIG_SH_HIGHLANDER) += renesas/r7780rp | |||
121 | machdir-$(CONFIG_SH_MIGOR) += renesas/migor | 121 | machdir-$(CONFIG_SH_MIGOR) += renesas/migor |
122 | machdir-$(CONFIG_SH_SDK7780) += renesas/sdk7780 | 122 | machdir-$(CONFIG_SH_SDK7780) += renesas/sdk7780 |
123 | machdir-$(CONFIG_SH_X3PROTO) += renesas/x3proto | 123 | machdir-$(CONFIG_SH_X3PROTO) += renesas/x3proto |
124 | machdir-$(CONFIG_SH_RSK7203) += renesas/rsk7203 | ||
124 | machdir-$(CONFIG_SH_SH4202_MICRODEV) += superh/microdev | 125 | machdir-$(CONFIG_SH_SH4202_MICRODEV) += superh/microdev |
125 | machdir-$(CONFIG_SH_LANDISK) += landisk | 126 | machdir-$(CONFIG_SH_LANDISK) += landisk |
126 | machdir-$(CONFIG_SH_TITAN) += titan | 127 | machdir-$(CONFIG_SH_TITAN) += titan |
diff --git a/arch/sh/boards/renesas/rsk7203/Makefile b/arch/sh/boards/renesas/rsk7203/Makefile new file mode 100644 index 000000000000..f663768429f0 --- /dev/null +++ b/arch/sh/boards/renesas/rsk7203/Makefile | |||
@@ -0,0 +1 @@ | |||
obj-y := setup.o | |||
diff --git a/arch/sh/boards/renesas/rsk7203/setup.c b/arch/sh/boards/renesas/rsk7203/setup.c new file mode 100644 index 000000000000..0bbda04b03b9 --- /dev/null +++ b/arch/sh/boards/renesas/rsk7203/setup.c | |||
@@ -0,0 +1,126 @@ | |||
1 | /* | ||
2 | * Renesas Technology Europe RSK+ 7203 Support. | ||
3 | * | ||
4 | * Copyright (C) 2008 Paul Mundt | ||
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/mtd/mtd.h> | ||
14 | #include <linux/mtd/partitions.h> | ||
15 | #include <linux/mtd/physmap.h> | ||
16 | #include <linux/mtd/map.h> | ||
17 | #include <asm/machvec.h> | ||
18 | #include <asm/io.h> | ||
19 | |||
20 | static struct resource smc911x_resources[] = { | ||
21 | [0] = { | ||
22 | .start = 0x24000000, | ||
23 | .end = 0x24000000 + 0x100, | ||
24 | .flags = IORESOURCE_MEM, | ||
25 | }, | ||
26 | [1] = { | ||
27 | .start = 64, | ||
28 | .end = 64, | ||
29 | .flags = IORESOURCE_IRQ, | ||
30 | }, | ||
31 | }; | ||
32 | |||
33 | static struct platform_device smc911x_device = { | ||
34 | .name = "smc911x", | ||
35 | .id = -1, | ||
36 | .num_resources = ARRAY_SIZE(smc911x_resources), | ||
37 | .resource = smc911x_resources, | ||
38 | }; | ||
39 | |||
40 | static const char *probes[] = { "cmdlinepart", NULL }; | ||
41 | |||
42 | static struct mtd_partition *parsed_partitions; | ||
43 | |||
44 | static struct mtd_partition rsk7203_partitions[] = { | ||
45 | { | ||
46 | .name = "Bootloader", | ||
47 | .offset = 0x00000000, | ||
48 | .size = 0x00040000, | ||
49 | .mask_flags = MTD_WRITEABLE, | ||
50 | }, { | ||
51 | .name = "Kernel", | ||
52 | .offset = MTDPART_OFS_NXTBLK, | ||
53 | .size = 0x001c0000, | ||
54 | }, { | ||
55 | .name = "Flash_FS", | ||
56 | .offset = MTDPART_OFS_NXTBLK, | ||
57 | .size = MTDPART_SIZ_FULL, | ||
58 | } | ||
59 | }; | ||
60 | |||
61 | static struct physmap_flash_data flash_data = { | ||
62 | .width = 2, | ||
63 | }; | ||
64 | |||
65 | static struct resource flash_resource = { | ||
66 | .start = 0x20000000, | ||
67 | .end = 0x20400000, | ||
68 | .flags = IORESOURCE_MEM, | ||
69 | }; | ||
70 | |||
71 | static struct platform_device flash_device = { | ||
72 | .name = "physmap-flash", | ||
73 | .id = -1, | ||
74 | .resource = &flash_resource, | ||
75 | .num_resources = 1, | ||
76 | .dev = { | ||
77 | .platform_data = &flash_data, | ||
78 | }, | ||
79 | }; | ||
80 | |||
81 | static struct mtd_info *flash_mtd; | ||
82 | |||
83 | static struct map_info rsk7203_flash_map = { | ||
84 | .name = "RSK+ Flash", | ||
85 | .size = 0x400000, | ||
86 | .bankwidth = 2, | ||
87 | }; | ||
88 | |||
89 | static void __init set_mtd_partitions(void) | ||
90 | { | ||
91 | int nr_parts = 0; | ||
92 | |||
93 | simple_map_init(&rsk7203_flash_map); | ||
94 | flash_mtd = do_map_probe("cfi_probe", &rsk7203_flash_map); | ||
95 | nr_parts = parse_mtd_partitions(flash_mtd, probes, | ||
96 | &parsed_partitions, 0); | ||
97 | /* If there is no partition table, used the hard coded table */ | ||
98 | if (nr_parts <= 0) { | ||
99 | flash_data.parts = rsk7203_partitions; | ||
100 | flash_data.nr_parts = ARRAY_SIZE(rsk7203_partitions); | ||
101 | } else { | ||
102 | flash_data.nr_parts = nr_parts; | ||
103 | flash_data.parts = parsed_partitions; | ||
104 | } | ||
105 | } | ||
106 | |||
107 | |||
108 | static struct platform_device *rsk7203_devices[] __initdata = { | ||
109 | &smc911x_device, | ||
110 | &flash_device, | ||
111 | }; | ||
112 | |||
113 | static int __init rsk7203_devices_setup(void) | ||
114 | { | ||
115 | set_mtd_partitions(); | ||
116 | return platform_add_devices(rsk7203_devices, | ||
117 | ARRAY_SIZE(rsk7203_devices)); | ||
118 | } | ||
119 | device_initcall(rsk7203_devices_setup); | ||
120 | |||
121 | /* | ||
122 | * The Machine Vector | ||
123 | */ | ||
124 | static struct sh_machine_vector mv_rsk7203 __initmv = { | ||
125 | .mv_name = "RSK+7203", | ||
126 | }; | ||
diff --git a/arch/sh/tools/mach-types b/arch/sh/tools/mach-types index 1bba7d36be90..1ae9fefed0f4 100644 --- a/arch/sh/tools/mach-types +++ b/arch/sh/tools/mach-types | |||
@@ -46,3 +46,4 @@ R2D_1 RTS7751R2D_1 | |||
46 | CAYMAN SH_CAYMAN | 46 | CAYMAN SH_CAYMAN |
47 | SDK7780 SH_SDK7780 | 47 | SDK7780 SH_SDK7780 |
48 | MIGOR SH_MIGOR | 48 | MIGOR SH_MIGOR |
49 | RSK7203 SH_RSK7203 | ||