diff options
author | David S. Miller <davem@davemloft.net> | 2009-03-26 18:23:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-26 18:23:24 -0400 |
commit | 08abe18af1f78ee80c3c3a5ac47c3e0ae0beadf6 (patch) | |
tree | 2be39bf8942edca1bcec735145e144a682ca9cd3 /arch/sh/boards | |
parent | f0de70f8bb56952f6e016a65a8a8d006918f5bf6 (diff) | |
parent | 0384e2959127a56d0640505d004d8dd92f9c29f5 (diff) |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
drivers/net/wimax/i2400m/usb-notif.c
Diffstat (limited to 'arch/sh/boards')
-rw-r--r-- | arch/sh/boards/Kconfig | 27 | ||||
-rw-r--r-- | arch/sh/boards/Makefile | 3 | ||||
-rw-r--r-- | arch/sh/boards/board-ap325rxa.c | 12 | ||||
-rw-r--r-- | arch/sh/boards/board-espt.c | 102 | ||||
-rw-r--r-- | arch/sh/boards/board-polaris.c | 149 | ||||
-rw-r--r-- | arch/sh/boards/board-sh7785lcr.c | 13 | ||||
-rw-r--r-- | arch/sh/boards/board-urquell.c | 162 | ||||
-rw-r--r-- | arch/sh/boards/mach-highlander/Kconfig | 2 | ||||
-rw-r--r-- | arch/sh/boards/mach-hp6xx/pm_wakeup.S | 31 | ||||
-rw-r--r-- | arch/sh/boards/mach-hp6xx/setup.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-migor/setup.c | 9 | ||||
-rw-r--r-- | arch/sh/boards/mach-rsk/Kconfig | 2 | ||||
-rw-r--r-- | arch/sh/boards/mach-sh7763rdp/setup.c | 10 |
13 files changed, 489 insertions, 34 deletions
diff --git a/arch/sh/boards/Kconfig b/arch/sh/boards/Kconfig index 861914747e4e..dcc1af8a2cfe 100644 --- a/arch/sh/boards/Kconfig +++ b/arch/sh/boards/Kconfig | |||
@@ -155,17 +155,22 @@ config SH_SH7785LCR | |||
155 | 155 | ||
156 | config SH_SH7785LCR_29BIT_PHYSMAPS | 156 | config SH_SH7785LCR_29BIT_PHYSMAPS |
157 | bool "SH7785LCR 29bit physmaps" | 157 | bool "SH7785LCR 29bit physmaps" |
158 | depends on SH_SH7785LCR | 158 | depends on SH_SH7785LCR && 29BIT |
159 | default y | 159 | default y |
160 | help | 160 | help |
161 | This board has 2 physical memory maps. It can be changed with | 161 | This board has 2 physical memory maps. It can be changed with |
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 | ||
165 | config SH_URQUELL | ||
166 | bool "Urquell" | ||
167 | depends on CPU_SUBTYPE_SH7786 | ||
168 | select ARCH_REQUIRE_GPIOLIB | ||
169 | |||
165 | config SH_MIGOR | 170 | config SH_MIGOR |
166 | bool "Migo-R" | 171 | bool "Migo-R" |
167 | depends on CPU_SUBTYPE_SH7722 | 172 | depends on CPU_SUBTYPE_SH7722 |
168 | select GENERIC_GPIO | 173 | select ARCH_REQUIRE_GPIOLIB |
169 | help | 174 | help |
170 | Select Migo-R if configuring for the SH7722 Migo-R platform | 175 | Select Migo-R if configuring for the SH7722 Migo-R platform |
171 | by Renesas System Solutions Asia Pte. Ltd. | 176 | by Renesas System Solutions Asia Pte. Ltd. |
@@ -173,7 +178,7 @@ config SH_MIGOR | |||
173 | config SH_AP325RXA | 178 | config SH_AP325RXA |
174 | bool "AP-325RXA" | 179 | bool "AP-325RXA" |
175 | depends on CPU_SUBTYPE_SH7723 | 180 | depends on CPU_SUBTYPE_SH7723 |
176 | select GENERIC_GPIO | 181 | select ARCH_REQUIRE_GPIOLIB |
177 | help | 182 | help |
178 | Renesas "AP-325RXA" support. | 183 | Renesas "AP-325RXA" support. |
179 | Compatible with ALGO SYSTEM CO.,LTD. "AP-320A" | 184 | Compatible with ALGO SYSTEM CO.,LTD. "AP-320A" |
@@ -185,6 +190,13 @@ config SH_SH7763RDP | |||
185 | Select SH7763RDP if configuring for a Renesas SH7763 | 190 | Select SH7763RDP if configuring for a Renesas SH7763 |
186 | evaluation board. | 191 | evaluation board. |
187 | 192 | ||
193 | config SH_ESPT | ||
194 | bool "ESPT" | ||
195 | depends on CPU_SUBTYPE_SH7763 | ||
196 | help | ||
197 | Select ESPT if configuring for a Renesas SH7763 | ||
198 | with gigabit ether evaluation board. | ||
199 | |||
188 | config SH_EDOSK7705 | 200 | config SH_EDOSK7705 |
189 | bool "EDOSK7705" | 201 | bool "EDOSK7705" |
190 | depends on CPU_SUBTYPE_SH7705 | 202 | depends on CPU_SUBTYPE_SH7705 |
@@ -240,7 +252,7 @@ config SH_X3PROTO | |||
240 | config SH_MAGIC_PANEL_R2 | 252 | config SH_MAGIC_PANEL_R2 |
241 | bool "Magic Panel R2" | 253 | bool "Magic Panel R2" |
242 | depends on CPU_SUBTYPE_SH7720 | 254 | depends on CPU_SUBTYPE_SH7720 |
243 | select GENERIC_GPIO | 255 | select ARCH_REQUIRE_GPIOLIB |
244 | help | 256 | help |
245 | Select Magic Panel R2 if configuring for Magic Panel R2. | 257 | Select Magic Panel R2 if configuring for Magic Panel R2. |
246 | 258 | ||
@@ -249,6 +261,13 @@ config SH_CAYMAN | |||
249 | depends on CPU_SUBTYPE_SH5_101 || CPU_SUBTYPE_SH5_103 | 261 | depends on CPU_SUBTYPE_SH5_101 || CPU_SUBTYPE_SH5_103 |
250 | select SYS_SUPPORTS_PCI | 262 | select SYS_SUPPORTS_PCI |
251 | 263 | ||
264 | config SH_POLARIS | ||
265 | bool "SMSC Polaris" | ||
266 | select CPU_HAS_IPR_IRQ | ||
267 | depends on CPU_SUBTYPE_SH7709 | ||
268 | help | ||
269 | Select if configuring for an SMSC Polaris development board | ||
270 | |||
252 | endmenu | 271 | endmenu |
253 | 272 | ||
254 | source "arch/sh/boards/mach-r2d/Kconfig" | 273 | source "arch/sh/boards/mach-r2d/Kconfig" |
diff --git a/arch/sh/boards/Makefile b/arch/sh/boards/Makefile index 269ae2be49ef..7baa21090231 100644 --- a/arch/sh/boards/Makefile +++ b/arch/sh/boards/Makefile | |||
@@ -4,5 +4,8 @@ | |||
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_SH7785LCR) += board-sh7785lcr.o | 6 | obj-$(CONFIG_SH_SH7785LCR) += board-sh7785lcr.o |
7 | obj-$(CONFIG_SH_URQUELL) += board-urquell.o | ||
7 | obj-$(CONFIG_SH_SHMIN) += board-shmin.o | 8 | obj-$(CONFIG_SH_SHMIN) += board-shmin.o |
8 | obj-$(CONFIG_SH_EDOSK7760) += board-edosk7760.o | 9 | obj-$(CONFIG_SH_EDOSK7760) += board-edosk7760.o |
10 | obj-$(CONFIG_SH_ESPT) += board-espt.o | ||
11 | obj-$(CONFIG_SH_POLARIS) += board-polaris.o | ||
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c index 72da416f6162..a64e38841c49 100644 --- a/arch/sh/boards/board-ap325rxa.c +++ b/arch/sh/boards/board-ap325rxa.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
23 | #include <linux/spi/spi.h> | 23 | #include <linux/spi/spi.h> |
24 | #include <linux/spi/spi_gpio.h> | 24 | #include <linux/spi/spi_gpio.h> |
25 | #include <media/soc_camera.h> | ||
25 | #include <media/soc_camera_platform.h> | 26 | #include <media/soc_camera_platform.h> |
26 | #include <media/sh_mobile_ceu.h> | 27 | #include <media/sh_mobile_ceu.h> |
27 | #include <video/sh_mobile_lcdc.h> | 28 | #include <video/sh_mobile_lcdc.h> |
@@ -165,6 +166,16 @@ static void ap320_wvga_power_on(void *board_data) | |||
165 | ctrl_outw(0x100, FPGA_BKLREG); | 166 | ctrl_outw(0x100, FPGA_BKLREG); |
166 | } | 167 | } |
167 | 168 | ||
169 | static void ap320_wvga_power_off(void *board_data) | ||
170 | { | ||
171 | /* backlight */ | ||
172 | ctrl_outw(0, FPGA_BKLREG); | ||
173 | gpio_set_value(GPIO_PTS3, 1); | ||
174 | |||
175 | /* ASD AP-320/325 LCD OFF */ | ||
176 | ctrl_outw(0, FPGA_LCDREG); | ||
177 | } | ||
178 | |||
168 | static struct sh_mobile_lcdc_info lcdc_info = { | 179 | static struct sh_mobile_lcdc_info lcdc_info = { |
169 | .clock_source = LCDC_CLK_EXTERNAL, | 180 | .clock_source = LCDC_CLK_EXTERNAL, |
170 | .ch[0] = { | 181 | .ch[0] = { |
@@ -190,6 +201,7 @@ static struct sh_mobile_lcdc_info lcdc_info = { | |||
190 | }, | 201 | }, |
191 | .board_cfg = { | 202 | .board_cfg = { |
192 | .display_on = ap320_wvga_power_on, | 203 | .display_on = ap320_wvga_power_on, |
204 | .display_off = ap320_wvga_power_off, | ||
193 | }, | 205 | }, |
194 | } | 206 | } |
195 | }; | 207 | }; |
diff --git a/arch/sh/boards/board-espt.c b/arch/sh/boards/board-espt.c new file mode 100644 index 000000000000..d5ce5e18eb37 --- /dev/null +++ b/arch/sh/boards/board-espt.c | |||
@@ -0,0 +1,102 @@ | |||
1 | /* | ||
2 | * Data Technology Inc. ESPT-GIGA board suport | ||
3 | * | ||
4 | * Copyright (C) 2008, 2009 Renesas Solutions Corp. | ||
5 | * Copyright (C) 2008, 2009 Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com> | ||
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/interrupt.h> | ||
14 | #include <linux/mtd/physmap.h> | ||
15 | #include <linux/io.h> | ||
16 | #include <asm/machvec.h> | ||
17 | #include <asm/sizes.h> | ||
18 | #include <asm/sh_eth.h> | ||
19 | |||
20 | /* NOR Flash */ | ||
21 | static struct mtd_partition espt_nor_flash_partitions[] = { | ||
22 | { | ||
23 | .name = "U-Boot", | ||
24 | .offset = 0, | ||
25 | .size = (2 * SZ_128K), | ||
26 | .mask_flags = MTD_WRITEABLE, /* Read-only */ | ||
27 | }, { | ||
28 | .name = "Linux-Kernel", | ||
29 | .offset = MTDPART_OFS_APPEND, | ||
30 | .size = (20 * SZ_128K), | ||
31 | }, { | ||
32 | .name = "Root Filesystem", | ||
33 | .offset = MTDPART_OFS_APPEND, | ||
34 | .size = MTDPART_SIZ_FULL, | ||
35 | }, | ||
36 | }; | ||
37 | |||
38 | static struct physmap_flash_data espt_nor_flash_data = { | ||
39 | .width = 2, | ||
40 | .parts = espt_nor_flash_partitions, | ||
41 | .nr_parts = ARRAY_SIZE(espt_nor_flash_partitions), | ||
42 | }; | ||
43 | |||
44 | static struct resource espt_nor_flash_resources[] = { | ||
45 | [0] = { | ||
46 | .name = "NOR Flash", | ||
47 | .start = 0, | ||
48 | .end = SZ_8M - 1, | ||
49 | .flags = IORESOURCE_MEM, | ||
50 | }, | ||
51 | }; | ||
52 | |||
53 | static struct platform_device espt_nor_flash_device = { | ||
54 | .name = "physmap-flash", | ||
55 | .resource = espt_nor_flash_resources, | ||
56 | .num_resources = ARRAY_SIZE(espt_nor_flash_resources), | ||
57 | .dev = { | ||
58 | .platform_data = &espt_nor_flash_data, | ||
59 | }, | ||
60 | }; | ||
61 | |||
62 | /* SH-Ether */ | ||
63 | static struct resource sh_eth_resources[] = { | ||
64 | { | ||
65 | .start = 0xFEE00800, /* use eth1 */ | ||
66 | .end = 0xFEE00F7C - 1, | ||
67 | .flags = IORESOURCE_MEM, | ||
68 | }, { | ||
69 | .start = 57, /* irq number */ | ||
70 | .flags = IORESOURCE_IRQ, | ||
71 | }, | ||
72 | }; | ||
73 | |||
74 | static struct sh_eth_plat_data sh7763_eth_pdata = { | ||
75 | .phy = 0, | ||
76 | .edmac_endian = EDMAC_LITTLE_ENDIAN, | ||
77 | }; | ||
78 | |||
79 | static struct platform_device espt_eth_device = { | ||
80 | .name = "sh-eth", | ||
81 | .resource = sh_eth_resources, | ||
82 | .num_resources = ARRAY_SIZE(sh_eth_resources), | ||
83 | .dev = { | ||
84 | .platform_data = &sh7763_eth_pdata, | ||
85 | }, | ||
86 | }; | ||
87 | |||
88 | static struct platform_device *espt_devices[] __initdata = { | ||
89 | &espt_nor_flash_device, | ||
90 | &espt_eth_device, | ||
91 | }; | ||
92 | |||
93 | static int __init espt_devices_setup(void) | ||
94 | { | ||
95 | return platform_add_devices(espt_devices, | ||
96 | ARRAY_SIZE(espt_devices)); | ||
97 | } | ||
98 | device_initcall(espt_devices_setup); | ||
99 | |||
100 | static struct sh_machine_vector mv_espt __initmv = { | ||
101 | .mv_name = "ESPT-GIGA", | ||
102 | }; | ||
diff --git a/arch/sh/boards/board-polaris.c b/arch/sh/boards/board-polaris.c new file mode 100644 index 000000000000..62607eb51004 --- /dev/null +++ b/arch/sh/boards/board-polaris.c | |||
@@ -0,0 +1,149 @@ | |||
1 | /* | ||
2 | * June 2006 steve.glendinning@smsc.com | ||
3 | * | ||
4 | * Polaris-specific resource declaration | ||
5 | * | ||
6 | */ | ||
7 | |||
8 | #include <linux/init.h> | ||
9 | #include <linux/interrupt.h> | ||
10 | #include <linux/irq.h> | ||
11 | #include <linux/platform_device.h> | ||
12 | #include <linux/smsc911x.h> | ||
13 | #include <linux/io.h> | ||
14 | #include <asm/irq.h> | ||
15 | #include <asm/machvec.h> | ||
16 | #include <asm/heartbeat.h> | ||
17 | #include <cpu/gpio.h> | ||
18 | #include <mach-se/mach/se.h> | ||
19 | |||
20 | #define BCR2 (0xFFFFFF62) | ||
21 | #define WCR2 (0xFFFFFF66) | ||
22 | #define AREA5_WAIT_CTRL (0x1C00) | ||
23 | #define WAIT_STATES_10 (0x7) | ||
24 | |||
25 | static struct resource smsc911x_resources[] = { | ||
26 | [0] = { | ||
27 | .name = "smsc911x-memory", | ||
28 | .start = PA_EXT5, | ||
29 | .end = PA_EXT5 + 0x1fff, | ||
30 | .flags = IORESOURCE_MEM, | ||
31 | }, | ||
32 | [1] = { | ||
33 | .name = "smsc911x-irq", | ||
34 | .start = IRQ0_IRQ, | ||
35 | .end = IRQ0_IRQ, | ||
36 | .flags = IORESOURCE_IRQ, | ||
37 | }, | ||
38 | }; | ||
39 | |||
40 | static struct smsc911x_platform_config smsc911x_config = { | ||
41 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
42 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, | ||
43 | .flags = SMSC911X_USE_32BIT, | ||
44 | .phy_interface = PHY_INTERFACE_MODE_MII, | ||
45 | }; | ||
46 | |||
47 | static struct platform_device smsc911x_device = { | ||
48 | .name = "smsc911x", | ||
49 | .id = 0, | ||
50 | .num_resources = ARRAY_SIZE(smsc911x_resources), | ||
51 | .resource = smsc911x_resources, | ||
52 | .dev = { | ||
53 | .platform_data = &smsc911x_config, | ||
54 | }, | ||
55 | }; | ||
56 | |||
57 | static unsigned char heartbeat_bit_pos[] = { 0, 1, 2, 3 }; | ||
58 | |||
59 | static struct heartbeat_data heartbeat_data = { | ||
60 | .bit_pos = heartbeat_bit_pos, | ||
61 | .nr_bits = ARRAY_SIZE(heartbeat_bit_pos), | ||
62 | .regsize = 8, | ||
63 | }; | ||
64 | |||
65 | static struct resource heartbeat_resources[] = { | ||
66 | [0] = { | ||
67 | .start = PORT_PCDR, | ||
68 | .end = PORT_PCDR, | ||
69 | .flags = IORESOURCE_MEM, | ||
70 | }, | ||
71 | }; | ||
72 | |||
73 | static struct platform_device heartbeat_device = { | ||
74 | .name = "heartbeat", | ||
75 | .id = -1, | ||
76 | .dev = { | ||
77 | .platform_data = &heartbeat_data, | ||
78 | }, | ||
79 | .num_resources = ARRAY_SIZE(heartbeat_resources), | ||
80 | .resource = heartbeat_resources, | ||
81 | }; | ||
82 | |||
83 | static struct platform_device *polaris_devices[] __initdata = { | ||
84 | &smsc911x_device, | ||
85 | &heartbeat_device, | ||
86 | }; | ||
87 | |||
88 | static int __init polaris_initialise(void) | ||
89 | { | ||
90 | u16 wcr, bcr_mask; | ||
91 | |||
92 | printk(KERN_INFO "Configuring Polaris external bus\n"); | ||
93 | |||
94 | /* Configure area 5 with 2 wait states */ | ||
95 | wcr = ctrl_inw(WCR2); | ||
96 | wcr &= (~AREA5_WAIT_CTRL); | ||
97 | wcr |= (WAIT_STATES_10 << 10); | ||
98 | ctrl_outw(wcr, WCR2); | ||
99 | |||
100 | /* Configure area 5 for 32-bit access */ | ||
101 | bcr_mask = ctrl_inw(BCR2); | ||
102 | bcr_mask |= 1 << 10; | ||
103 | ctrl_outw(bcr_mask, BCR2); | ||
104 | |||
105 | return platform_add_devices(polaris_devices, | ||
106 | ARRAY_SIZE(polaris_devices)); | ||
107 | } | ||
108 | arch_initcall(polaris_initialise); | ||
109 | |||
110 | static struct ipr_data ipr_irq_table[] = { | ||
111 | /* External IRQs */ | ||
112 | { IRQ0_IRQ, 0, 0, 1, }, /* IRQ0 */ | ||
113 | { IRQ1_IRQ, 0, 4, 1, }, /* IRQ1 */ | ||
114 | }; | ||
115 | |||
116 | static unsigned long ipr_offsets[] = { | ||
117 | INTC_IPRC | ||
118 | }; | ||
119 | |||
120 | static struct ipr_desc ipr_irq_desc = { | ||
121 | .ipr_offsets = ipr_offsets, | ||
122 | .nr_offsets = ARRAY_SIZE(ipr_offsets), | ||
123 | |||
124 | .ipr_data = ipr_irq_table, | ||
125 | .nr_irqs = ARRAY_SIZE(ipr_irq_table), | ||
126 | .chip = { | ||
127 | .name = "sh7709-ext", | ||
128 | }, | ||
129 | }; | ||
130 | |||
131 | static void __init init_polaris_irq(void) | ||
132 | { | ||
133 | /* Disable all interrupts */ | ||
134 | ctrl_outw(0, BCR_ILCRA); | ||
135 | ctrl_outw(0, BCR_ILCRB); | ||
136 | ctrl_outw(0, BCR_ILCRC); | ||
137 | ctrl_outw(0, BCR_ILCRD); | ||
138 | ctrl_outw(0, BCR_ILCRE); | ||
139 | ctrl_outw(0, BCR_ILCRF); | ||
140 | ctrl_outw(0, BCR_ILCRG); | ||
141 | |||
142 | register_ipr_controller(&ipr_irq_desc); | ||
143 | } | ||
144 | |||
145 | static struct sh_machine_vector mv_polaris __initmv = { | ||
146 | .mv_name = "Polaris", | ||
147 | .mv_nr_irqs = 61, | ||
148 | .mv_init_irq = init_polaris_irq, | ||
149 | }; | ||
diff --git a/arch/sh/boards/board-sh7785lcr.c b/arch/sh/boards/board-sh7785lcr.c index 38a64968d7bf..94c0296bc35d 100644 --- a/arch/sh/boards/board-sh7785lcr.c +++ b/arch/sh/boards/board-sh7785lcr.c | |||
@@ -275,7 +275,18 @@ void __init init_sh7785lcr_IRQ(void) | |||
275 | 275 | ||
276 | static void sh7785lcr_power_off(void) | 276 | static void sh7785lcr_power_off(void) |
277 | { | 277 | { |
278 | ctrl_outb(0x01, P2SEGADDR(PLD_POFCR)); | 278 | unsigned char *p; |
279 | |||
280 | p = ioremap(PLD_POFCR, PLD_POFCR + 1); | ||
281 | if (!p) { | ||
282 | printk(KERN_ERR "%s: ioremap error.\n", __func__); | ||
283 | return; | ||
284 | } | ||
285 | *p = 0x01; | ||
286 | iounmap(p); | ||
287 | set_bl_bit(); | ||
288 | while (1) | ||
289 | cpu_relax(); | ||
279 | } | 290 | } |
280 | 291 | ||
281 | /* Initialize the board */ | 292 | /* Initialize the board */ |
diff --git a/arch/sh/boards/board-urquell.c b/arch/sh/boards/board-urquell.c new file mode 100644 index 000000000000..17036ce20086 --- /dev/null +++ b/arch/sh/boards/board-urquell.c | |||
@@ -0,0 +1,162 @@ | |||
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/smc91x.h> | ||
15 | #include <linux/mtd/physmap.h> | ||
16 | #include <linux/delay.h> | ||
17 | #include <linux/gpio.h> | ||
18 | #include <linux/irq.h> | ||
19 | #include <mach/urquell.h> | ||
20 | #include <cpu/sh7786.h> | ||
21 | #include <asm/heartbeat.h> | ||
22 | #include <asm/sizes.h> | ||
23 | |||
24 | static struct resource heartbeat_resources[] = { | ||
25 | [0] = { | ||
26 | .start = BOARDREG(SLEDR), | ||
27 | .end = BOARDREG(SLEDR), | ||
28 | .flags = IORESOURCE_MEM, | ||
29 | }, | ||
30 | }; | ||
31 | |||
32 | static struct heartbeat_data heartbeat_data = { | ||
33 | .regsize = 16, | ||
34 | }; | ||
35 | |||
36 | static struct platform_device heartbeat_device = { | ||
37 | .name = "heartbeat", | ||
38 | .id = -1, | ||
39 | .dev = { | ||
40 | .platform_data = &heartbeat_data, | ||
41 | }, | ||
42 | .num_resources = ARRAY_SIZE(heartbeat_resources), | ||
43 | .resource = heartbeat_resources, | ||
44 | }; | ||
45 | |||
46 | static struct smc91x_platdata smc91x_info = { | ||
47 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | ||
48 | }; | ||
49 | |||
50 | static struct resource smc91x_eth_resources[] = { | ||
51 | [0] = { | ||
52 | .name = "SMC91C111" , | ||
53 | .start = 0x05800300, | ||
54 | .end = 0x0580030f, | ||
55 | .flags = IORESOURCE_MEM, | ||
56 | }, | ||
57 | [1] = { | ||
58 | .start = 11, | ||
59 | .flags = IORESOURCE_IRQ, | ||
60 | }, | ||
61 | }; | ||
62 | |||
63 | static struct platform_device smc91x_eth_device = { | ||
64 | .name = "smc91x", | ||
65 | .num_resources = ARRAY_SIZE(smc91x_eth_resources), | ||
66 | .resource = smc91x_eth_resources, | ||
67 | .dev = { | ||
68 | .platform_data = &smc91x_info, | ||
69 | }, | ||
70 | }; | ||
71 | |||
72 | static struct mtd_partition nor_flash_partitions[] = { | ||
73 | { | ||
74 | .name = "loader", | ||
75 | .offset = 0x00000000, | ||
76 | .size = SZ_512K, | ||
77 | .mask_flags = MTD_WRITEABLE, /* Read-only */ | ||
78 | }, | ||
79 | { | ||
80 | .name = "bootenv", | ||
81 | .offset = MTDPART_OFS_APPEND, | ||
82 | .size = SZ_512K, | ||
83 | .mask_flags = MTD_WRITEABLE, /* Read-only */ | ||
84 | }, | ||
85 | { | ||
86 | .name = "kernel", | ||
87 | .offset = MTDPART_OFS_APPEND, | ||
88 | .size = SZ_4M, | ||
89 | }, | ||
90 | { | ||
91 | .name = "data", | ||
92 | .offset = MTDPART_OFS_APPEND, | ||
93 | .size = MTDPART_SIZ_FULL, | ||
94 | }, | ||
95 | }; | ||
96 | |||
97 | static struct physmap_flash_data nor_flash_data = { | ||
98 | .width = 2, | ||
99 | .parts = nor_flash_partitions, | ||
100 | .nr_parts = ARRAY_SIZE(nor_flash_partitions), | ||
101 | }; | ||
102 | |||
103 | static struct resource nor_flash_resources[] = { | ||
104 | [0] = { | ||
105 | .start = NOR_FLASH_ADDR, | ||
106 | .end = NOR_FLASH_ADDR + NOR_FLASH_SIZE - 1, | ||
107 | .flags = IORESOURCE_MEM, | ||
108 | } | ||
109 | }; | ||
110 | |||
111 | static struct platform_device nor_flash_device = { | ||
112 | .name = "physmap-flash", | ||
113 | .dev = { | ||
114 | .platform_data = &nor_flash_data, | ||
115 | }, | ||
116 | .num_resources = ARRAY_SIZE(nor_flash_resources), | ||
117 | .resource = nor_flash_resources, | ||
118 | }; | ||
119 | |||
120 | static struct platform_device *urquell_devices[] __initdata = { | ||
121 | &heartbeat_device, | ||
122 | &smc91x_eth_device, | ||
123 | &nor_flash_device, | ||
124 | }; | ||
125 | |||
126 | static int __init urquell_devices_setup(void) | ||
127 | { | ||
128 | /* USB */ | ||
129 | gpio_request(GPIO_FN_USB_OVC0, NULL); | ||
130 | gpio_request(GPIO_FN_USB_PENC0, NULL); | ||
131 | |||
132 | return platform_add_devices(urquell_devices, | ||
133 | ARRAY_SIZE(urquell_devices)); | ||
134 | } | ||
135 | device_initcall(urquell_devices_setup); | ||
136 | |||
137 | static void urquell_power_off(void) | ||
138 | { | ||
139 | __raw_writew(0xa5a5, UBOARDREG(SRSTR)); | ||
140 | } | ||
141 | |||
142 | static void __init urquell_init_irq(void) | ||
143 | { | ||
144 | plat_irq_setup_pins(IRQ_MODE_IRL3210_MASK); | ||
145 | } | ||
146 | |||
147 | /* Initialize the board */ | ||
148 | static void __init urquell_setup(char **cmdline_p) | ||
149 | { | ||
150 | printk(KERN_INFO "Renesas Technology Corp. Urquell support.\n"); | ||
151 | |||
152 | pm_power_off = urquell_power_off; | ||
153 | } | ||
154 | |||
155 | /* | ||
156 | * The Machine Vector | ||
157 | */ | ||
158 | static struct sh_machine_vector mv_urquell __initmv = { | ||
159 | .mv_name = "Urquell", | ||
160 | .mv_setup = urquell_setup, | ||
161 | .mv_init_irq = urquell_init_irq, | ||
162 | }; | ||
diff --git a/arch/sh/boards/mach-highlander/Kconfig b/arch/sh/boards/mach-highlander/Kconfig index 08057f62687b..def49cc0a7b9 100644 --- a/arch/sh/boards/mach-highlander/Kconfig +++ b/arch/sh/boards/mach-highlander/Kconfig | |||
@@ -18,7 +18,7 @@ config SH_R7780MP | |||
18 | config SH_R7785RP | 18 | config SH_R7785RP |
19 | bool "R7785RP board support" | 19 | bool "R7785RP board support" |
20 | depends on CPU_SUBTYPE_SH7785 | 20 | depends on CPU_SUBTYPE_SH7785 |
21 | select GENERIC_GPIO | 21 | select ARCH_REQUIRE_GPIOLIB |
22 | 22 | ||
23 | endchoice | 23 | endchoice |
24 | 24 | ||
diff --git a/arch/sh/boards/mach-hp6xx/pm_wakeup.S b/arch/sh/boards/mach-hp6xx/pm_wakeup.S index 44b648cf6f23..4f18d44e0541 100644 --- a/arch/sh/boards/mach-hp6xx/pm_wakeup.S +++ b/arch/sh/boards/mach-hp6xx/pm_wakeup.S | |||
@@ -10,47 +10,32 @@ | |||
10 | #include <linux/linkage.h> | 10 | #include <linux/linkage.h> |
11 | #include <cpu/mmu_context.h> | 11 | #include <cpu/mmu_context.h> |
12 | 12 | ||
13 | #define k0 r0 | ||
14 | #define k1 r1 | ||
15 | #define k2 r2 | ||
16 | #define k3 r3 | ||
17 | #define k4 r4 | ||
18 | |||
19 | /* | 13 | /* |
20 | * Kernel mode register usage: | 14 | * Kernel mode register usage: |
21 | * k0 scratch | 15 | * k0 scratch |
22 | * k1 scratch | 16 | * k1 scratch |
23 | * k2 scratch (Exception code) | 17 | * For more details, please have a look at entry.S |
24 | * k3 scratch (Return address) | ||
25 | * k4 scratch | ||
26 | * k5 reserved | ||
27 | * k6 Global Interrupt Mask (0--15 << 4) | ||
28 | * k7 CURRENT_THREAD_INFO (pointer to current thread info) | ||
29 | */ | 18 | */ |
30 | 19 | ||
20 | #define k0 r0 | ||
21 | #define k1 r1 | ||
22 | |||
31 | ENTRY(wakeup_start) | 23 | ENTRY(wakeup_start) |
32 | ! clear STBY bit | 24 | ! clear STBY bit |
33 | mov #-126, k2 | 25 | mov #-126, k1 |
34 | and #127, k0 | 26 | and #127, k0 |
35 | mov.b k0, @k2 | 27 | mov.b k0, @k1 |
36 | ! enable refresh | 28 | ! enable refresh |
37 | mov.l 5f, k1 | 29 | mov.l 5f, k1 |
38 | mov.w 6f, k0 | 30 | mov.w 6f, k0 |
39 | mov.w k0, @k1 | 31 | mov.w k0, @k1 |
40 | ! jump to handler | 32 | ! jump to handler |
41 | mov.l 2f, k2 | ||
42 | mov.l 3f, k3 | ||
43 | mov.l @k2, k2 | ||
44 | |||
45 | mov.l 4f, k1 | 33 | mov.l 4f, k1 |
46 | jmp @k1 | 34 | jmp @k1 |
47 | nop | 35 | nop |
48 | 36 | ||
49 | .align 2 | 37 | .align 2 |
50 | 1: .long EXPEVT | 38 | 4: .long handle_interrupt |
51 | 2: .long INTEVT | ||
52 | 3: .long ret_from_irq | ||
53 | 4: .long handle_exception | ||
54 | 5: .long 0xffffff68 | 39 | 5: .long 0xffffff68 |
55 | 6: .word 0x0524 | 40 | 6: .word 0x0524 |
56 | 41 | ||
diff --git a/arch/sh/boards/mach-hp6xx/setup.c b/arch/sh/boards/mach-hp6xx/setup.c index 746742bdc014..8f305b36358b 100644 --- a/arch/sh/boards/mach-hp6xx/setup.c +++ b/arch/sh/boards/mach-hp6xx/setup.c | |||
@@ -115,7 +115,6 @@ static struct sh_machine_vector mv_hp6xx __initmv = { | |||
115 | .mv_setup = hp6xx_setup, | 115 | .mv_setup = hp6xx_setup, |
116 | /* IRQ's : CPU(64) + CCHIP(16) + FREE_TO_USE(6) */ | 116 | /* IRQ's : CPU(64) + CCHIP(16) + FREE_TO_USE(6) */ |
117 | .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM + 6, | 117 | .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM + 6, |
118 | .mv_irq_demux = hd64461_irq_demux, | ||
119 | /* Enable IRQ0 -> IRQ3 in IRQ_MODE */ | 118 | /* Enable IRQ0 -> IRQ3 in IRQ_MODE */ |
120 | .mv_init_irq = hp6xx_init_irq, | 119 | .mv_init_irq = hp6xx_init_irq, |
121 | }; | 120 | }; |
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c index 28e56c5809a2..bc35b4cae6b3 100644 --- a/arch/sh/boards/mach-migor/setup.c +++ b/arch/sh/boards/mach-migor/setup.c | |||
@@ -450,6 +450,14 @@ static struct spi_board_info migor_spi_devices[] = { | |||
450 | 450 | ||
451 | static int __init migor_devices_setup(void) | 451 | static int __init migor_devices_setup(void) |
452 | { | 452 | { |
453 | |||
454 | #ifdef CONFIG_PM | ||
455 | /* Let D11 LED show STATUS0 */ | ||
456 | gpio_request(GPIO_FN_STATUS0, NULL); | ||
457 | |||
458 | /* Lit D12 LED show PDSTATUS */ | ||
459 | gpio_request(GPIO_FN_PDSTATUS, NULL); | ||
460 | #else | ||
453 | /* Lit D11 LED */ | 461 | /* Lit D11 LED */ |
454 | gpio_request(GPIO_PTJ7, NULL); | 462 | gpio_request(GPIO_PTJ7, NULL); |
455 | gpio_direction_output(GPIO_PTJ7, 1); | 463 | gpio_direction_output(GPIO_PTJ7, 1); |
@@ -459,6 +467,7 @@ static int __init migor_devices_setup(void) | |||
459 | gpio_request(GPIO_PTJ5, NULL); | 467 | gpio_request(GPIO_PTJ5, NULL); |
460 | gpio_direction_output(GPIO_PTJ5, 1); | 468 | gpio_direction_output(GPIO_PTJ5, 1); |
461 | gpio_export(GPIO_PTJ5, 0); | 469 | gpio_export(GPIO_PTJ5, 0); |
470 | #endif | ||
462 | 471 | ||
463 | /* SMC91C111 - Enable IRQ0, Setup CS4 for 16-bit fast access */ | 472 | /* SMC91C111 - Enable IRQ0, Setup CS4 for 16-bit fast access */ |
464 | gpio_request(GPIO_FN_IRQ0, NULL); | 473 | gpio_request(GPIO_FN_IRQ0, NULL); |
diff --git a/arch/sh/boards/mach-rsk/Kconfig b/arch/sh/boards/mach-rsk/Kconfig index bff095dffc02..aeff3b042205 100644 --- a/arch/sh/boards/mach-rsk/Kconfig +++ b/arch/sh/boards/mach-rsk/Kconfig | |||
@@ -10,7 +10,7 @@ config SH_RSK7201 | |||
10 | 10 | ||
11 | config SH_RSK7203 | 11 | config SH_RSK7203 |
12 | bool "RSK7203" | 12 | bool "RSK7203" |
13 | select GENERIC_GPIO | 13 | select ARCH_REQUIRE_GPIOLIB |
14 | depends on CPU_SUBTYPE_SH7203 | 14 | depends on CPU_SUBTYPE_SH7203 |
15 | 15 | ||
16 | endchoice | 16 | endchoice |
diff --git a/arch/sh/boards/mach-sh7763rdp/setup.c b/arch/sh/boards/mach-sh7763rdp/setup.c index 6f926fd2162b..390534a0b35c 100644 --- a/arch/sh/boards/mach-sh7763rdp/setup.c +++ b/arch/sh/boards/mach-sh7763rdp/setup.c | |||
@@ -63,15 +63,19 @@ static struct platform_device sh7763rdp_nor_flash_device = { | |||
63 | }, | 63 | }, |
64 | }; | 64 | }; |
65 | 65 | ||
66 | /* SH-Ether */ | 66 | /* |
67 | * SH-Ether | ||
68 | * | ||
69 | * SH Ether of SH7763 has multi IRQ handling. | ||
70 | * (57,58,59 -> 57) | ||
71 | */ | ||
67 | static struct resource sh_eth_resources[] = { | 72 | static struct resource sh_eth_resources[] = { |
68 | { | 73 | { |
69 | .start = 0xFEE00800, /* use eth1 */ | 74 | .start = 0xFEE00800, /* use eth1 */ |
70 | .end = 0xFEE00F7C - 1, | 75 | .end = 0xFEE00F7C - 1, |
71 | .flags = IORESOURCE_MEM, | 76 | .flags = IORESOURCE_MEM, |
72 | }, { | 77 | }, { |
73 | .start = 58, /* irq number */ | 78 | .start = 57, /* irq number */ |
74 | .end = 58, | ||
75 | .flags = IORESOURCE_IRQ, | 79 | .flags = IORESOURCE_IRQ, |
76 | }, | 80 | }, |
77 | }; | 81 | }; |