diff options
Diffstat (limited to 'arch/sh/boards')
-rw-r--r-- | arch/sh/boards/Kconfig | 1 | ||||
-rw-r--r-- | arch/sh/boards/board-ap325rxa.c | 54 | ||||
-rw-r--r-- | arch/sh/boards/board-sh7785lcr.c | 14 | ||||
-rw-r--r-- | arch/sh/boards/board-urquell.c | 7 | ||||
-rw-r--r-- | arch/sh/boards/mach-highlander/setup.c | 64 | ||||
-rw-r--r-- | arch/sh/boards/mach-migor/setup.c | 81 | ||||
-rw-r--r-- | arch/sh/boards/mach-rsk/devices-rsk7203.c | 8 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/7206/io.c | 2 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/7724/setup.c | 157 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/7780/irq.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-x3proto/setup.c | 12 |
11 files changed, 330 insertions, 71 deletions
diff --git a/arch/sh/boards/Kconfig b/arch/sh/boards/Kconfig index 1c91b1f565d5..2b1af0eefa6a 100644 --- a/arch/sh/boards/Kconfig +++ b/arch/sh/boards/Kconfig | |||
@@ -175,6 +175,7 @@ config SH_URQUELL | |||
175 | bool "Urquell" | 175 | bool "Urquell" |
176 | depends on CPU_SUBTYPE_SH7786 | 176 | depends on CPU_SUBTYPE_SH7786 |
177 | select ARCH_REQUIRE_GPIOLIB | 177 | select ARCH_REQUIRE_GPIOLIB |
178 | select SYS_SUPPORTS_PCI | ||
178 | 179 | ||
179 | config SH_MIGOR | 180 | config SH_MIGOR |
180 | bool "Migo-R" | 181 | bool "Migo-R" |
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c index 1c4d83ef2a47..b9c88cc519e2 100644 --- a/arch/sh/boards/board-ap325rxa.c +++ b/arch/sh/boards/board-ap325rxa.c | |||
@@ -349,15 +349,6 @@ static int ov7725_power(struct device *dev, int mode) | |||
349 | return 0; | 349 | return 0; |
350 | } | 350 | } |
351 | 351 | ||
352 | static struct ov772x_camera_info ov7725_info = { | ||
353 | .buswidth = SOCAM_DATAWIDTH_8, | ||
354 | .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP, | ||
355 | .edgectrl = OV772X_AUTO_EDGECTRL(0xf, 0), | ||
356 | .link = { | ||
357 | .power = ov7725_power, | ||
358 | }, | ||
359 | }; | ||
360 | |||
361 | static struct sh_mobile_ceu_info sh_mobile_ceu_info = { | 352 | static struct sh_mobile_ceu_info sh_mobile_ceu_info = { |
362 | .flags = SH_CEU_FLAG_USE_8BIT_BUS, | 353 | .flags = SH_CEU_FLAG_USE_8BIT_BUS, |
363 | }; | 354 | }; |
@@ -402,25 +393,48 @@ static struct platform_device sdcard_cn3_device = { | |||
402 | }, | 393 | }, |
403 | }; | 394 | }; |
404 | 395 | ||
405 | static struct platform_device *ap325rxa_devices[] __initdata = { | ||
406 | &smsc9118_device, | ||
407 | &ap325rxa_nor_flash_device, | ||
408 | &lcdc_device, | ||
409 | &ceu_device, | ||
410 | &nand_flash_device, | ||
411 | &sdcard_cn3_device, | ||
412 | }; | ||
413 | |||
414 | static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = { | 396 | static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = { |
415 | { | 397 | { |
416 | I2C_BOARD_INFO("pcf8563", 0x51), | 398 | I2C_BOARD_INFO("pcf8563", 0x51), |
417 | }, | 399 | }, |
400 | }; | ||
401 | |||
402 | static struct i2c_board_info ap325rxa_i2c_camera[] = { | ||
418 | { | 403 | { |
419 | I2C_BOARD_INFO("ov772x", 0x21), | 404 | I2C_BOARD_INFO("ov772x", 0x21), |
420 | .platform_data = &ov7725_info, | ||
421 | }, | 405 | }, |
422 | }; | 406 | }; |
423 | 407 | ||
408 | static struct ov772x_camera_info ov7725_info = { | ||
409 | .buswidth = SOCAM_DATAWIDTH_8, | ||
410 | .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP, | ||
411 | .edgectrl = OV772X_AUTO_EDGECTRL(0xf, 0), | ||
412 | .link = { | ||
413 | .power = ov7725_power, | ||
414 | .board_info = &ap325rxa_i2c_camera[0], | ||
415 | .i2c_adapter_id = 0, | ||
416 | .module_name = "ov772x", | ||
417 | }, | ||
418 | }; | ||
419 | |||
420 | static struct platform_device ap325rxa_camera = { | ||
421 | .name = "soc-camera-pdrv", | ||
422 | .id = 0, | ||
423 | .dev = { | ||
424 | .platform_data = &ov7725_info.link, | ||
425 | }, | ||
426 | }; | ||
427 | |||
428 | static struct platform_device *ap325rxa_devices[] __initdata = { | ||
429 | &smsc9118_device, | ||
430 | &ap325rxa_nor_flash_device, | ||
431 | &lcdc_device, | ||
432 | &ceu_device, | ||
433 | &nand_flash_device, | ||
434 | &sdcard_cn3_device, | ||
435 | &ap325rxa_camera, | ||
436 | }; | ||
437 | |||
424 | static struct spi_board_info ap325rxa_spi_devices[] = { | 438 | static struct spi_board_info ap325rxa_spi_devices[] = { |
425 | { | 439 | { |
426 | .modalias = "mmc_spi", | 440 | .modalias = "mmc_spi", |
@@ -533,7 +547,7 @@ static int __init ap325rxa_devices_setup(void) | |||
533 | return platform_add_devices(ap325rxa_devices, | 547 | return platform_add_devices(ap325rxa_devices, |
534 | ARRAY_SIZE(ap325rxa_devices)); | 548 | ARRAY_SIZE(ap325rxa_devices)); |
535 | } | 549 | } |
536 | device_initcall(ap325rxa_devices_setup); | 550 | arch_initcall(ap325rxa_devices_setup); |
537 | 551 | ||
538 | /* Return the board specific boot mode pin configuration */ | 552 | /* Return the board specific boot mode pin configuration */ |
539 | static int ap325rxa_mode_pins(void) | 553 | static int ap325rxa_mode_pins(void) |
diff --git a/arch/sh/boards/board-sh7785lcr.c b/arch/sh/boards/board-sh7785lcr.c index 7be56fb06c1f..42410a15d255 100644 --- a/arch/sh/boards/board-sh7785lcr.c +++ b/arch/sh/boards/board-sh7785lcr.c | |||
@@ -15,16 +15,18 @@ | |||
15 | #include <linux/fb.h> | 15 | #include <linux/fb.h> |
16 | #include <linux/mtd/physmap.h> | 16 | #include <linux/mtd/physmap.h> |
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/interrupt.h> | ||
18 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
19 | #include <linux/i2c-pca-platform.h> | 20 | #include <linux/i2c-pca-platform.h> |
20 | #include <linux/i2c-algo-pca.h> | 21 | #include <linux/i2c-algo-pca.h> |
22 | #include <linux/usb/r8a66597.h> | ||
21 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
22 | #include <linux/clk.h> | 24 | #include <linux/clk.h> |
23 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
24 | #include <mach/sh7785lcr.h> | 26 | #include <mach/sh7785lcr.h> |
27 | #include <cpu/sh7785.h> | ||
25 | #include <asm/heartbeat.h> | 28 | #include <asm/heartbeat.h> |
26 | #include <asm/clock.h> | 29 | #include <asm/clock.h> |
27 | #include <cpu/sh7785.h> | ||
28 | 30 | ||
29 | /* | 31 | /* |
30 | * NOTE: This board has 2 physical memory maps. | 32 | * NOTE: This board has 2 physical memory maps. |
@@ -98,18 +100,21 @@ static struct platform_device nor_flash_device = { | |||
98 | .resource = nor_flash_resources, | 100 | .resource = nor_flash_resources, |
99 | }; | 101 | }; |
100 | 102 | ||
103 | static struct r8a66597_platdata r8a66597_data = { | ||
104 | .xtal = R8A66597_PLATDATA_XTAL_12MHZ, | ||
105 | .vif = 1, | ||
106 | }; | ||
107 | |||
101 | static struct resource r8a66597_usb_host_resources[] = { | 108 | static struct resource r8a66597_usb_host_resources[] = { |
102 | [0] = { | 109 | [0] = { |
103 | .name = "r8a66597_hcd", | ||
104 | .start = R8A66597_ADDR, | 110 | .start = R8A66597_ADDR, |
105 | .end = R8A66597_ADDR + R8A66597_SIZE - 1, | 111 | .end = R8A66597_ADDR + R8A66597_SIZE - 1, |
106 | .flags = IORESOURCE_MEM, | 112 | .flags = IORESOURCE_MEM, |
107 | }, | 113 | }, |
108 | [1] = { | 114 | [1] = { |
109 | .name = "r8a66597_hcd", | ||
110 | .start = 2, | 115 | .start = 2, |
111 | .end = 2, | 116 | .end = 2, |
112 | .flags = IORESOURCE_IRQ, | 117 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW, |
113 | }, | 118 | }, |
114 | }; | 119 | }; |
115 | 120 | ||
@@ -119,6 +124,7 @@ static struct platform_device r8a66597_usb_host_device = { | |||
119 | .dev = { | 124 | .dev = { |
120 | .dma_mask = NULL, | 125 | .dma_mask = NULL, |
121 | .coherent_dma_mask = 0xffffffff, | 126 | .coherent_dma_mask = 0xffffffff, |
127 | .platform_data = &r8a66597_data, | ||
122 | }, | 128 | }, |
123 | .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources), | 129 | .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources), |
124 | .resource = r8a66597_usb_host_resources, | 130 | .resource = r8a66597_usb_host_resources, |
diff --git a/arch/sh/boards/board-urquell.c b/arch/sh/boards/board-urquell.c index beb88c4da2c1..36b8bac9b124 100644 --- a/arch/sh/boards/board-urquell.c +++ b/arch/sh/boards/board-urquell.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * Renesas Technology Corp. SH7786 Urquell Support. | 2 | * Renesas Technology Corp. SH7786 Urquell Support. |
3 | * | 3 | * |
4 | * Copyright (C) 2008 Kuninori Morimoto <morimoto.kuninori@renesas.com> | 4 | * Copyright (C) 2008 Kuninori Morimoto <morimoto.kuninori@renesas.com> |
5 | * Copyright (C) 2009 Paul Mundt | ||
5 | * | 6 | * |
6 | * Based on board-sh7785lcr.c | 7 | * Based on board-sh7785lcr.c |
7 | * Copyright (C) 2008 Yoshihiro Shimoda | 8 | * Copyright (C) 2008 Yoshihiro Shimoda |
@@ -178,6 +179,11 @@ static void __init urquell_init_irq(void) | |||
178 | plat_irq_setup_pins(IRQ_MODE_IRL3210_MASK); | 179 | plat_irq_setup_pins(IRQ_MODE_IRL3210_MASK); |
179 | } | 180 | } |
180 | 181 | ||
182 | static int urquell_mode_pins(void) | ||
183 | { | ||
184 | return __raw_readw(UBOARDREG(MDSWMR)); | ||
185 | } | ||
186 | |||
181 | /* Initialize the board */ | 187 | /* Initialize the board */ |
182 | static void __init urquell_setup(char **cmdline_p) | 188 | static void __init urquell_setup(char **cmdline_p) |
183 | { | 189 | { |
@@ -193,4 +199,5 @@ static struct sh_machine_vector mv_urquell __initmv = { | |||
193 | .mv_name = "Urquell", | 199 | .mv_name = "Urquell", |
194 | .mv_setup = urquell_setup, | 200 | .mv_setup = urquell_setup, |
195 | .mv_init_irq = urquell_init_irq, | 201 | .mv_init_irq = urquell_init_irq, |
202 | .mv_mode_pins = urquell_mode_pins, | ||
196 | }; | 203 | }; |
diff --git a/arch/sh/boards/mach-highlander/setup.c b/arch/sh/boards/mach-highlander/setup.c index 20fe72c515d5..1639f8915000 100644 --- a/arch/sh/boards/mach-highlander/setup.c +++ b/arch/sh/boards/mach-highlander/setup.c | |||
@@ -17,8 +17,11 @@ | |||
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/ata_platform.h> | 18 | #include <linux/ata_platform.h> |
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/mtd/physmap.h> | ||
20 | #include <linux/i2c.h> | 21 | #include <linux/i2c.h> |
21 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
23 | #include <linux/interrupt.h> | ||
24 | #include <linux/usb/r8a66597.h> | ||
22 | #include <net/ax88796.h> | 25 | #include <net/ax88796.h> |
23 | #include <asm/machvec.h> | 26 | #include <asm/machvec.h> |
24 | #include <mach/highlander.h> | 27 | #include <mach/highlander.h> |
@@ -27,18 +30,21 @@ | |||
27 | #include <asm/io.h> | 30 | #include <asm/io.h> |
28 | #include <asm/io_trapped.h> | 31 | #include <asm/io_trapped.h> |
29 | 32 | ||
33 | static struct r8a66597_platdata r8a66597_data = { | ||
34 | .xtal = R8A66597_PLATDATA_XTAL_12MHZ, | ||
35 | .vif = 1, | ||
36 | }; | ||
37 | |||
30 | static struct resource r8a66597_usb_host_resources[] = { | 38 | static struct resource r8a66597_usb_host_resources[] = { |
31 | [0] = { | 39 | [0] = { |
32 | .name = "r8a66597_hcd", | ||
33 | .start = 0xA4200000, | 40 | .start = 0xA4200000, |
34 | .end = 0xA42000FF, | 41 | .end = 0xA42000FF, |
35 | .flags = IORESOURCE_MEM, | 42 | .flags = IORESOURCE_MEM, |
36 | }, | 43 | }, |
37 | [1] = { | 44 | [1] = { |
38 | .name = "r8a66597_hcd", | ||
39 | .start = IRQ_EXT1, /* irq number */ | 45 | .start = IRQ_EXT1, /* irq number */ |
40 | .end = IRQ_EXT1, | 46 | .end = IRQ_EXT1, |
41 | .flags = IORESOURCE_IRQ, | 47 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW, |
42 | }, | 48 | }, |
43 | }; | 49 | }; |
44 | 50 | ||
@@ -48,6 +54,7 @@ static struct platform_device r8a66597_usb_host_device = { | |||
48 | .dev = { | 54 | .dev = { |
49 | .dma_mask = NULL, /* don't use dma */ | 55 | .dma_mask = NULL, /* don't use dma */ |
50 | .coherent_dma_mask = 0xffffffff, | 56 | .coherent_dma_mask = 0xffffffff, |
57 | .platform_data = &r8a66597_data, | ||
51 | }, | 58 | }, |
52 | .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources), | 59 | .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources), |
53 | .resource = r8a66597_usb_host_resources, | 60 | .resource = r8a66597_usb_host_resources, |
@@ -178,6 +185,53 @@ static struct platform_device ax88796_device = { | |||
178 | .resource = ax88796_resources, | 185 | .resource = ax88796_resources, |
179 | }; | 186 | }; |
180 | 187 | ||
188 | static struct mtd_partition nor_flash_partitions[] = { | ||
189 | { | ||
190 | .name = "loader", | ||
191 | .offset = 0x00000000, | ||
192 | .size = 512 * 1024, | ||
193 | }, | ||
194 | { | ||
195 | .name = "bootenv", | ||
196 | .offset = MTDPART_OFS_APPEND, | ||
197 | .size = 512 * 1024, | ||
198 | }, | ||
199 | { | ||
200 | .name = "kernel", | ||
201 | .offset = MTDPART_OFS_APPEND, | ||
202 | .size = 4 * 1024 * 1024, | ||
203 | }, | ||
204 | { | ||
205 | .name = "data", | ||
206 | .offset = MTDPART_OFS_APPEND, | ||
207 | .size = MTDPART_SIZ_FULL, | ||
208 | }, | ||
209 | }; | ||
210 | |||
211 | static struct physmap_flash_data nor_flash_data = { | ||
212 | .width = 4, | ||
213 | .parts = nor_flash_partitions, | ||
214 | .nr_parts = ARRAY_SIZE(nor_flash_partitions), | ||
215 | }; | ||
216 | |||
217 | /* This config is flash board for mass production. */ | ||
218 | static struct resource nor_flash_resources[] = { | ||
219 | [0] = { | ||
220 | .start = PA_NORFLASH_ADDR, | ||
221 | .end = PA_NORFLASH_ADDR + PA_NORFLASH_SIZE - 1, | ||
222 | .flags = IORESOURCE_MEM, | ||
223 | } | ||
224 | }; | ||
225 | |||
226 | static struct platform_device nor_flash_device = { | ||
227 | .name = "physmap-flash", | ||
228 | .dev = { | ||
229 | .platform_data = &nor_flash_data, | ||
230 | }, | ||
231 | .num_resources = ARRAY_SIZE(nor_flash_resources), | ||
232 | .resource = nor_flash_resources, | ||
233 | }; | ||
234 | |||
181 | static struct resource smbus_resources[] = { | 235 | static struct resource smbus_resources[] = { |
182 | [0] = { | 236 | [0] = { |
183 | .start = PA_SMCR, | 237 | .start = PA_SMCR, |
@@ -209,6 +263,7 @@ static struct platform_device *r7780rp_devices[] __initdata = { | |||
209 | &m66592_usb_peripheral_device, | 263 | &m66592_usb_peripheral_device, |
210 | &heartbeat_device, | 264 | &heartbeat_device, |
211 | &smbus_device, | 265 | &smbus_device, |
266 | &nor_flash_device, | ||
212 | #ifndef CONFIG_SH_R7780RP | 267 | #ifndef CONFIG_SH_R7780RP |
213 | &ax88796_device, | 268 | &ax88796_device, |
214 | #endif | 269 | #endif |
@@ -247,9 +302,10 @@ device_initcall(r7780rp_devices_setup); | |||
247 | /* | 302 | /* |
248 | * Platform specific clocks | 303 | * Platform specific clocks |
249 | */ | 304 | */ |
250 | static void ivdr_clk_enable(struct clk *clk) | 305 | static int ivdr_clk_enable(struct clk *clk) |
251 | { | 306 | { |
252 | ctrl_outw(ctrl_inw(PA_IVDRCTL) | (1 << IVDR_CK_ON), PA_IVDRCTL); | 307 | ctrl_outw(ctrl_inw(PA_IVDRCTL) | (1 << IVDR_CK_ON), PA_IVDRCTL); |
308 | return 0; | ||
253 | } | 309 | } |
254 | 310 | ||
255 | static void ivdr_clk_disable(struct clk *clk) | 311 | static void ivdr_clk_disable(struct clk *clk) |
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c index 6ed401cd3156..f9b2e4df35b9 100644 --- a/arch/sh/boards/mach-migor/setup.c +++ b/arch/sh/boards/mach-migor/setup.c | |||
@@ -381,21 +381,6 @@ static struct platform_device migor_ceu_device = { | |||
381 | }, | 381 | }, |
382 | }; | 382 | }; |
383 | 383 | ||
384 | static struct ov772x_camera_info ov7725_info = { | ||
385 | .buswidth = SOCAM_DATAWIDTH_8, | ||
386 | .link = { | ||
387 | .power = ov7725_power, | ||
388 | }, | ||
389 | }; | ||
390 | |||
391 | static struct tw9910_video_info tw9910_info = { | ||
392 | .buswidth = SOCAM_DATAWIDTH_8, | ||
393 | .mpout = TW9910_MPO_FIELD, | ||
394 | .link = { | ||
395 | .power = tw9910_power, | ||
396 | } | ||
397 | }; | ||
398 | |||
399 | struct spi_gpio_platform_data sdcard_cn9_platform_data = { | 384 | struct spi_gpio_platform_data sdcard_cn9_platform_data = { |
400 | .sck = GPIO_PTD0, | 385 | .sck = GPIO_PTD0, |
401 | .mosi = GPIO_PTD1, | 386 | .mosi = GPIO_PTD1, |
@@ -410,16 +395,6 @@ static struct platform_device sdcard_cn9_device = { | |||
410 | }, | 395 | }, |
411 | }; | 396 | }; |
412 | 397 | ||
413 | static struct platform_device *migor_devices[] __initdata = { | ||
414 | &smc91x_eth_device, | ||
415 | &sh_keysc_device, | ||
416 | &migor_lcdc_device, | ||
417 | &migor_ceu_device, | ||
418 | &migor_nor_flash_device, | ||
419 | &migor_nand_flash_device, | ||
420 | &sdcard_cn9_device, | ||
421 | }; | ||
422 | |||
423 | static struct i2c_board_info migor_i2c_devices[] = { | 398 | static struct i2c_board_info migor_i2c_devices[] = { |
424 | { | 399 | { |
425 | I2C_BOARD_INFO("rs5c372b", 0x32), | 400 | I2C_BOARD_INFO("rs5c372b", 0x32), |
@@ -428,16 +403,66 @@ static struct i2c_board_info migor_i2c_devices[] = { | |||
428 | I2C_BOARD_INFO("migor_ts", 0x51), | 403 | I2C_BOARD_INFO("migor_ts", 0x51), |
429 | .irq = 38, /* IRQ6 */ | 404 | .irq = 38, /* IRQ6 */ |
430 | }, | 405 | }, |
406 | }; | ||
407 | |||
408 | static struct i2c_board_info migor_i2c_camera[] = { | ||
431 | { | 409 | { |
432 | I2C_BOARD_INFO("ov772x", 0x21), | 410 | I2C_BOARD_INFO("ov772x", 0x21), |
433 | .platform_data = &ov7725_info, | ||
434 | }, | 411 | }, |
435 | { | 412 | { |
436 | I2C_BOARD_INFO("tw9910", 0x45), | 413 | I2C_BOARD_INFO("tw9910", 0x45), |
437 | .platform_data = &tw9910_info, | ||
438 | }, | 414 | }, |
439 | }; | 415 | }; |
440 | 416 | ||
417 | static struct ov772x_camera_info ov7725_info = { | ||
418 | .buswidth = SOCAM_DATAWIDTH_8, | ||
419 | .link = { | ||
420 | .power = ov7725_power, | ||
421 | .board_info = &migor_i2c_camera[0], | ||
422 | .i2c_adapter_id = 0, | ||
423 | .module_name = "ov772x", | ||
424 | }, | ||
425 | }; | ||
426 | |||
427 | static struct tw9910_video_info tw9910_info = { | ||
428 | .buswidth = SOCAM_DATAWIDTH_8, | ||
429 | .mpout = TW9910_MPO_FIELD, | ||
430 | .link = { | ||
431 | .power = tw9910_power, | ||
432 | .board_info = &migor_i2c_camera[1], | ||
433 | .i2c_adapter_id = 0, | ||
434 | .module_name = "tw9910", | ||
435 | } | ||
436 | }; | ||
437 | |||
438 | static struct platform_device migor_camera[] = { | ||
439 | { | ||
440 | .name = "soc-camera-pdrv", | ||
441 | .id = 0, | ||
442 | .dev = { | ||
443 | .platform_data = &ov7725_info.link, | ||
444 | }, | ||
445 | }, { | ||
446 | .name = "soc-camera-pdrv", | ||
447 | .id = 1, | ||
448 | .dev = { | ||
449 | .platform_data = &tw9910_info.link, | ||
450 | }, | ||
451 | }, | ||
452 | }; | ||
453 | |||
454 | static struct platform_device *migor_devices[] __initdata = { | ||
455 | &smc91x_eth_device, | ||
456 | &sh_keysc_device, | ||
457 | &migor_lcdc_device, | ||
458 | &migor_ceu_device, | ||
459 | &migor_nor_flash_device, | ||
460 | &migor_nand_flash_device, | ||
461 | &sdcard_cn9_device, | ||
462 | &migor_camera[0], | ||
463 | &migor_camera[1], | ||
464 | }; | ||
465 | |||
441 | static struct spi_board_info migor_spi_devices[] = { | 466 | static struct spi_board_info migor_spi_devices[] = { |
442 | { | 467 | { |
443 | .modalias = "mmc_spi", | 468 | .modalias = "mmc_spi", |
@@ -583,7 +608,7 @@ static int __init migor_devices_setup(void) | |||
583 | 608 | ||
584 | return platform_add_devices(migor_devices, ARRAY_SIZE(migor_devices)); | 609 | return platform_add_devices(migor_devices, ARRAY_SIZE(migor_devices)); |
585 | } | 610 | } |
586 | __initcall(migor_devices_setup); | 611 | arch_initcall(migor_devices_setup); |
587 | 612 | ||
588 | /* Return the board specific boot mode pin configuration */ | 613 | /* Return the board specific boot mode pin configuration */ |
589 | static int migor_mode_pins(void) | 614 | static int migor_mode_pins(void) |
diff --git a/arch/sh/boards/mach-rsk/devices-rsk7203.c b/arch/sh/boards/mach-rsk/devices-rsk7203.c index d8a65ea91665..4af3a771c058 100644 --- a/arch/sh/boards/mach-rsk/devices-rsk7203.c +++ b/arch/sh/boards/mach-rsk/devices-rsk7203.c | |||
@@ -26,13 +26,13 @@ static struct smsc911x_platform_config smsc911x_config = { | |||
26 | .phy_interface = PHY_INTERFACE_MODE_MII, | 26 | .phy_interface = PHY_INTERFACE_MODE_MII, |
27 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | 27 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, |
28 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, | 28 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, |
29 | .flags = SMSC911X_USE_16BIT, | 29 | .flags = SMSC911X_USE_32BIT | SMSC911X_SWAP_FIFO, |
30 | }; | 30 | }; |
31 | 31 | ||
32 | static struct resource smsc911x_resources[] = { | 32 | static struct resource smsc911x_resources[] = { |
33 | [0] = { | 33 | [0] = { |
34 | .start = 0x24000000, | 34 | .start = 0x24000000, |
35 | .end = 0x24000000 + 0x100, | 35 | .end = 0x240000ff, |
36 | .flags = IORESOURCE_MEM, | 36 | .flags = IORESOURCE_MEM, |
37 | }, | 37 | }, |
38 | [1] = { | 38 | [1] = { |
@@ -99,6 +99,10 @@ static int __init rsk7203_devices_setup(void) | |||
99 | gpio_request(GPIO_FN_TXD0, NULL); | 99 | gpio_request(GPIO_FN_TXD0, NULL); |
100 | gpio_request(GPIO_FN_RXD0, NULL); | 100 | gpio_request(GPIO_FN_RXD0, NULL); |
101 | 101 | ||
102 | /* Setup LAN9118: CS1 in 16-bit Big Endian Mode, IRQ0 at Port B */ | ||
103 | ctrl_outl(0x36db0400, 0xfffc0008); /* CS1BCR */ | ||
104 | gpio_request(GPIO_FN_IRQ0_PB, NULL); | ||
105 | |||
102 | return platform_add_devices(rsk7203_devices, | 106 | return platform_add_devices(rsk7203_devices, |
103 | ARRAY_SIZE(rsk7203_devices)); | 107 | ARRAY_SIZE(rsk7203_devices)); |
104 | } | 108 | } |
diff --git a/arch/sh/boards/mach-se/7206/io.c b/arch/sh/boards/mach-se/7206/io.c index 9c3a33210d61..180455642a43 100644 --- a/arch/sh/boards/mach-se/7206/io.c +++ b/arch/sh/boards/mach-se/7206/io.c | |||
@@ -50,7 +50,7 @@ unsigned char se7206_inb_p(unsigned long port) | |||
50 | 50 | ||
51 | unsigned short se7206_inw(unsigned long port) | 51 | unsigned short se7206_inw(unsigned long port) |
52 | { | 52 | { |
53 | return *port2adr(port);; | 53 | return *port2adr(port); |
54 | } | 54 | } |
55 | 55 | ||
56 | void se7206_outb(unsigned char value, unsigned long port) | 56 | void se7206_outb(unsigned char value, unsigned long port) |
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c index 9cd04bd558b8..15456a0773bf 100644 --- a/arch/sh/boards/mach-se/7724/setup.c +++ b/arch/sh/boards/mach-se/7724/setup.c | |||
@@ -19,10 +19,13 @@ | |||
19 | #include <linux/smc91x.h> | 19 | #include <linux/smc91x.h> |
20 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
21 | #include <linux/input.h> | 21 | #include <linux/input.h> |
22 | #include <linux/usb/r8a66597.h> | ||
22 | #include <video/sh_mobile_lcdc.h> | 23 | #include <video/sh_mobile_lcdc.h> |
23 | #include <media/sh_mobile_ceu.h> | 24 | #include <media/sh_mobile_ceu.h> |
24 | #include <asm/io.h> | 25 | #include <asm/io.h> |
25 | #include <asm/heartbeat.h> | 26 | #include <asm/heartbeat.h> |
27 | #include <asm/sh_eth.h> | ||
28 | #include <asm/clock.h> | ||
26 | #include <asm/sh_keysc.h> | 29 | #include <asm/sh_keysc.h> |
27 | #include <cpu/sh7724.h> | 30 | #include <cpu/sh7724.h> |
28 | #include <mach-se/mach/se7724.h> | 31 | #include <mach-se/mach/se7724.h> |
@@ -235,7 +238,7 @@ static struct platform_device ceu1_device = { | |||
235 | }, | 238 | }, |
236 | }; | 239 | }; |
237 | 240 | ||
238 | /* KEYSC */ | 241 | /* KEYSC in SoC (Needs SW33-2 set to ON) */ |
239 | static struct sh_keysc_info keysc_info = { | 242 | static struct sh_keysc_info keysc_info = { |
240 | .mode = SH_KEYSC_MODE_1, | 243 | .mode = SH_KEYSC_MODE_1, |
241 | .scan_timing = 10, | 244 | .scan_timing = 10, |
@@ -252,12 +255,13 @@ static struct sh_keysc_info keysc_info = { | |||
252 | 255 | ||
253 | static struct resource keysc_resources[] = { | 256 | static struct resource keysc_resources[] = { |
254 | [0] = { | 257 | [0] = { |
255 | .start = 0x1a204000, | 258 | .name = "KEYSC", |
256 | .end = 0x1a20400f, | 259 | .start = 0x044b0000, |
260 | .end = 0x044b000f, | ||
257 | .flags = IORESOURCE_MEM, | 261 | .flags = IORESOURCE_MEM, |
258 | }, | 262 | }, |
259 | [1] = { | 263 | [1] = { |
260 | .start = IRQ0_KEY, | 264 | .start = 79, |
261 | .flags = IORESOURCE_IRQ, | 265 | .flags = IORESOURCE_IRQ, |
262 | }, | 266 | }, |
263 | }; | 267 | }; |
@@ -272,6 +276,62 @@ static struct platform_device keysc_device = { | |||
272 | }, | 276 | }, |
273 | }; | 277 | }; |
274 | 278 | ||
279 | /* SH Eth */ | ||
280 | static struct resource sh_eth_resources[] = { | ||
281 | [0] = { | ||
282 | .start = SH_ETH_ADDR, | ||
283 | .end = SH_ETH_ADDR + 0x1FC, | ||
284 | .flags = IORESOURCE_MEM, | ||
285 | }, | ||
286 | [1] = { | ||
287 | .start = 91, | ||
288 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
289 | }, | ||
290 | }; | ||
291 | |||
292 | struct sh_eth_plat_data sh_eth_plat = { | ||
293 | .phy = 0x1f, /* SMSC LAN8187 */ | ||
294 | .edmac_endian = EDMAC_LITTLE_ENDIAN, | ||
295 | }; | ||
296 | |||
297 | static struct platform_device sh_eth_device = { | ||
298 | .name = "sh-eth", | ||
299 | .id = 0, | ||
300 | .dev = { | ||
301 | .platform_data = &sh_eth_plat, | ||
302 | }, | ||
303 | .num_resources = ARRAY_SIZE(sh_eth_resources), | ||
304 | .resource = sh_eth_resources, | ||
305 | }; | ||
306 | |||
307 | static struct r8a66597_platdata sh7724_usb0_host_data = { | ||
308 | }; | ||
309 | |||
310 | static struct resource sh7724_usb0_host_resources[] = { | ||
311 | [0] = { | ||
312 | .start = 0xa4d80000, | ||
313 | .end = 0xa4d800ff, | ||
314 | .flags = IORESOURCE_MEM, | ||
315 | }, | ||
316 | [1] = { | ||
317 | .start = 65, | ||
318 | .end = 65, | ||
319 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW, | ||
320 | }, | ||
321 | }; | ||
322 | |||
323 | static struct platform_device sh7724_usb0_host_device = { | ||
324 | .name = "r8a66597_hcd", | ||
325 | .id = 0, | ||
326 | .dev = { | ||
327 | .dma_mask = NULL, /* not use dma */ | ||
328 | .coherent_dma_mask = 0xffffffff, | ||
329 | .platform_data = &sh7724_usb0_host_data, | ||
330 | }, | ||
331 | .num_resources = ARRAY_SIZE(sh7724_usb0_host_resources), | ||
332 | .resource = sh7724_usb0_host_resources, | ||
333 | }; | ||
334 | |||
275 | static struct platform_device *ms7724se_devices[] __initdata = { | 335 | static struct platform_device *ms7724se_devices[] __initdata = { |
276 | &heartbeat_device, | 336 | &heartbeat_device, |
277 | &smc91x_eth_device, | 337 | &smc91x_eth_device, |
@@ -280,11 +340,62 @@ static struct platform_device *ms7724se_devices[] __initdata = { | |||
280 | &ceu0_device, | 340 | &ceu0_device, |
281 | &ceu1_device, | 341 | &ceu1_device, |
282 | &keysc_device, | 342 | &keysc_device, |
343 | &sh_eth_device, | ||
344 | &sh7724_usb0_host_device, | ||
283 | }; | 345 | }; |
284 | 346 | ||
347 | #define EEPROM_OP 0xBA206000 | ||
348 | #define EEPROM_ADR 0xBA206004 | ||
349 | #define EEPROM_DATA 0xBA20600C | ||
350 | #define EEPROM_STAT 0xBA206010 | ||
351 | #define EEPROM_STRT 0xBA206014 | ||
352 | static int __init sh_eth_is_eeprom_ready(void) | ||
353 | { | ||
354 | int t = 10000; | ||
355 | |||
356 | while (t--) { | ||
357 | if (!ctrl_inw(EEPROM_STAT)) | ||
358 | return 1; | ||
359 | cpu_relax(); | ||
360 | } | ||
361 | |||
362 | printk(KERN_ERR "ms7724se can not access to eeprom\n"); | ||
363 | return 0; | ||
364 | } | ||
365 | |||
366 | static void __init sh_eth_init(void) | ||
367 | { | ||
368 | int i; | ||
369 | u16 mac[3]; | ||
370 | |||
371 | /* check EEPROM status */ | ||
372 | if (!sh_eth_is_eeprom_ready()) | ||
373 | return; | ||
374 | |||
375 | /* read MAC addr from EEPROM */ | ||
376 | for (i = 0 ; i < 3 ; i++) { | ||
377 | ctrl_outw(0x0, EEPROM_OP); /* read */ | ||
378 | ctrl_outw(i*2, EEPROM_ADR); | ||
379 | ctrl_outw(0x1, EEPROM_STRT); | ||
380 | if (!sh_eth_is_eeprom_ready()) | ||
381 | return; | ||
382 | |||
383 | mac[i] = ctrl_inw(EEPROM_DATA); | ||
384 | mac[i] = ((mac[i] & 0xFF) << 8) | (mac[i] >> 8); /* swap */ | ||
385 | } | ||
386 | |||
387 | /* reset sh-eth */ | ||
388 | ctrl_outl(0x1, SH_ETH_ADDR + 0x0); | ||
389 | |||
390 | /* set MAC addr */ | ||
391 | ctrl_outl(((mac[0] << 16) | (mac[1])), SH_ETH_MAHR); | ||
392 | ctrl_outl((mac[2]), SH_ETH_MALR); | ||
393 | } | ||
394 | |||
285 | #define SW4140 0xBA201000 | 395 | #define SW4140 0xBA201000 |
286 | #define FPGA_OUT 0xBA200400 | 396 | #define FPGA_OUT 0xBA200400 |
287 | #define PORT_HIZA 0xA4050158 | 397 | #define PORT_HIZA 0xA4050158 |
398 | #define PORT_MSELCRB 0xA4050182 | ||
288 | 399 | ||
289 | #define SW41_A 0x0100 | 400 | #define SW41_A 0x0100 |
290 | #define SW41_B 0x0200 | 401 | #define SW41_B 0x0200 |
@@ -294,6 +405,7 @@ static struct platform_device *ms7724se_devices[] __initdata = { | |||
294 | #define SW41_F 0x2000 | 405 | #define SW41_F 0x2000 |
295 | #define SW41_G 0x4000 | 406 | #define SW41_G 0x4000 |
296 | #define SW41_H 0x8000 | 407 | #define SW41_H 0x8000 |
408 | |||
297 | static int __init devices_setup(void) | 409 | static int __init devices_setup(void) |
298 | { | 410 | { |
299 | u16 sw = ctrl_inw(SW4140); /* select camera, monitor */ | 411 | u16 sw = ctrl_inw(SW4140); /* select camera, monitor */ |
@@ -302,9 +414,16 @@ static int __init devices_setup(void) | |||
302 | ctrl_outw(ctrl_inw(FPGA_OUT) & | 414 | ctrl_outw(ctrl_inw(FPGA_OUT) & |
303 | ~((1 << 1) | /* LAN */ | 415 | ~((1 << 1) | /* LAN */ |
304 | (1 << 6) | /* VIDEO DAC */ | 416 | (1 << 6) | /* VIDEO DAC */ |
305 | (1 << 12)), /* USB0 */ | 417 | (1 << 12) | /* USB0 */ |
418 | (1 << 14)), /* RMII */ | ||
306 | FPGA_OUT); | 419 | FPGA_OUT); |
307 | 420 | ||
421 | /* turn on USB clocks, use external clock */ | ||
422 | ctrl_outw((ctrl_inw(PORT_MSELCRB) & ~0xc000) | 0x8000, PORT_MSELCRB); | ||
423 | |||
424 | /* enable USB0 port */ | ||
425 | ctrl_outw(0x0600, 0xa40501d4); | ||
426 | |||
308 | /* enable IRQ 0,1,2 */ | 427 | /* enable IRQ 0,1,2 */ |
309 | gpio_request(GPIO_FN_INTC_IRQ0, NULL); | 428 | gpio_request(GPIO_FN_INTC_IRQ0, NULL); |
310 | gpio_request(GPIO_FN_INTC_IRQ1, NULL); | 429 | gpio_request(GPIO_FN_INTC_IRQ1, NULL); |
@@ -374,7 +493,7 @@ static int __init devices_setup(void) | |||
374 | gpio_request(GPIO_FN_VIO0_CLK, NULL); | 493 | gpio_request(GPIO_FN_VIO0_CLK, NULL); |
375 | gpio_request(GPIO_FN_VIO0_FLD, NULL); | 494 | gpio_request(GPIO_FN_VIO0_FLD, NULL); |
376 | gpio_request(GPIO_FN_VIO0_HD, NULL); | 495 | gpio_request(GPIO_FN_VIO0_HD, NULL); |
377 | platform_resource_setup_memory(&ceu0_device, "ceu", 4 << 20); | 496 | platform_resource_setup_memory(&ceu0_device, "ceu0", 4 << 20); |
378 | 497 | ||
379 | /* enable CEU1 */ | 498 | /* enable CEU1 */ |
380 | gpio_request(GPIO_FN_VIO1_D7, NULL); | 499 | gpio_request(GPIO_FN_VIO1_D7, NULL); |
@@ -389,7 +508,7 @@ static int __init devices_setup(void) | |||
389 | gpio_request(GPIO_FN_VIO1_HD, NULL); | 508 | gpio_request(GPIO_FN_VIO1_HD, NULL); |
390 | gpio_request(GPIO_FN_VIO1_VD, NULL); | 509 | gpio_request(GPIO_FN_VIO1_VD, NULL); |
391 | gpio_request(GPIO_FN_VIO1_CLK, NULL); | 510 | gpio_request(GPIO_FN_VIO1_CLK, NULL); |
392 | platform_resource_setup_memory(&ceu1_device, "ceu", 4 << 20); | 511 | platform_resource_setup_memory(&ceu1_device, "ceu1", 4 << 20); |
393 | 512 | ||
394 | /* KEYSC */ | 513 | /* KEYSC */ |
395 | gpio_request(GPIO_FN_KEYOUT5_IN5, NULL); | 514 | gpio_request(GPIO_FN_KEYOUT5_IN5, NULL); |
@@ -404,6 +523,28 @@ static int __init devices_setup(void) | |||
404 | gpio_request(GPIO_FN_KEYOUT1, NULL); | 523 | gpio_request(GPIO_FN_KEYOUT1, NULL); |
405 | gpio_request(GPIO_FN_KEYOUT0, NULL); | 524 | gpio_request(GPIO_FN_KEYOUT0, NULL); |
406 | 525 | ||
526 | /* | ||
527 | * enable SH-Eth | ||
528 | * | ||
529 | * please remove J33 pin from your board !! | ||
530 | * | ||
531 | * ms7724 board should not use GPIO_FN_LNKSTA pin | ||
532 | * So, This time PTX5 is set to input pin | ||
533 | */ | ||
534 | gpio_request(GPIO_FN_RMII_RXD0, NULL); | ||
535 | gpio_request(GPIO_FN_RMII_RXD1, NULL); | ||
536 | gpio_request(GPIO_FN_RMII_TXD0, NULL); | ||
537 | gpio_request(GPIO_FN_RMII_TXD1, NULL); | ||
538 | gpio_request(GPIO_FN_RMII_REF_CLK, NULL); | ||
539 | gpio_request(GPIO_FN_RMII_TX_EN, NULL); | ||
540 | gpio_request(GPIO_FN_RMII_RX_ER, NULL); | ||
541 | gpio_request(GPIO_FN_RMII_CRS_DV, NULL); | ||
542 | gpio_request(GPIO_FN_MDIO, NULL); | ||
543 | gpio_request(GPIO_FN_MDC, NULL); | ||
544 | gpio_request(GPIO_PTX5, NULL); | ||
545 | gpio_direction_input(GPIO_PTX5); | ||
546 | sh_eth_init(); | ||
547 | |||
407 | if (sw & SW41_B) { | 548 | if (sw & SW41_B) { |
408 | /* SVGA */ | 549 | /* SVGA */ |
409 | lcdc_info.ch[0].lcd_cfg.xres = 800; | 550 | lcdc_info.ch[0].lcd_cfg.xres = 800; |
@@ -437,7 +578,7 @@ static int __init devices_setup(void) | |||
437 | } | 578 | } |
438 | 579 | ||
439 | return platform_add_devices(ms7724se_devices, | 580 | return platform_add_devices(ms7724se_devices, |
440 | ARRAY_SIZE(ms7724se_devices)); | 581 | ARRAY_SIZE(ms7724se_devices)); |
441 | } | 582 | } |
442 | device_initcall(devices_setup); | 583 | device_initcall(devices_setup); |
443 | 584 | ||
diff --git a/arch/sh/boards/mach-se/7780/irq.c b/arch/sh/boards/mach-se/7780/irq.c index b8d43b638fcf..121744c08714 100644 --- a/arch/sh/boards/mach-se/7780/irq.c +++ b/arch/sh/boards/mach-se/7780/irq.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/irq.h> | 13 | #include <linux/irq.h> |
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/irq.h> | ||
16 | #include <linux/io.h> | 15 | #include <linux/io.h> |
17 | #include <mach-se/mach/se7780.h> | 16 | #include <mach-se/mach/se7780.h> |
18 | 17 | ||
diff --git a/arch/sh/boards/mach-x3proto/setup.c b/arch/sh/boards/mach-x3proto/setup.c index a340492087fa..8913ae39a802 100644 --- a/arch/sh/boards/mach-x3proto/setup.c +++ b/arch/sh/boards/mach-x3proto/setup.c | |||
@@ -15,6 +15,8 @@ | |||
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/smc91x.h> | 16 | #include <linux/smc91x.h> |
17 | #include <linux/irq.h> | 17 | #include <linux/irq.h> |
18 | #include <linux/interrupt.h> | ||
19 | #include <linux/usb/r8a66597.h> | ||
18 | #include <asm/ilsel.h> | 20 | #include <asm/ilsel.h> |
19 | 21 | ||
20 | static struct resource heartbeat_resources[] = { | 22 | static struct resource heartbeat_resources[] = { |
@@ -58,17 +60,20 @@ static struct platform_device smc91x_device = { | |||
58 | }, | 60 | }, |
59 | }; | 61 | }; |
60 | 62 | ||
63 | static struct r8a66597_platdata r8a66597_data = { | ||
64 | .xtal = R8A66597_PLATDATA_XTAL_12MHZ, | ||
65 | .vif = 1, | ||
66 | }; | ||
67 | |||
61 | static struct resource r8a66597_usb_host_resources[] = { | 68 | static struct resource r8a66597_usb_host_resources[] = { |
62 | [0] = { | 69 | [0] = { |
63 | .name = "r8a66597_hcd", | ||
64 | .start = 0x18040000, | 70 | .start = 0x18040000, |
65 | .end = 0x18080000 - 1, | 71 | .end = 0x18080000 - 1, |
66 | .flags = IORESOURCE_MEM, | 72 | .flags = IORESOURCE_MEM, |
67 | }, | 73 | }, |
68 | [1] = { | 74 | [1] = { |
69 | .name = "r8a66597_hcd", | ||
70 | /* Filled in by ilsel */ | 75 | /* Filled in by ilsel */ |
71 | .flags = IORESOURCE_IRQ, | 76 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW, |
72 | }, | 77 | }, |
73 | }; | 78 | }; |
74 | 79 | ||
@@ -78,6 +83,7 @@ static struct platform_device r8a66597_usb_host_device = { | |||
78 | .dev = { | 83 | .dev = { |
79 | .dma_mask = NULL, /* don't use dma */ | 84 | .dma_mask = NULL, /* don't use dma */ |
80 | .coherent_dma_mask = 0xffffffff, | 85 | .coherent_dma_mask = 0xffffffff, |
86 | .platform_data = &r8a66597_data, | ||
81 | }, | 87 | }, |
82 | .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources), | 88 | .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources), |
83 | .resource = r8a66597_usb_host_resources, | 89 | .resource = r8a66597_usb_host_resources, |