15 #include <linux/types.h>
25 #include <linux/i2c.h>
44 #include <asm/memblock.h>
45 #include <mach/common.h>
46 #include <mach/hardware.h>
55 static int __init pcm037_variant_setup(
char *
str)
59 else if (
strcmp(
"pcm970", str))
60 pr_warning(
"Unknown pcm037 baseboard variant %s\n", str);
66 __setup(
"pcm037_variant=", pcm037_variant_setup);
70 return pcm037_instance;
74 static unsigned int pcm037_uart1_handshake_pins[] = {
82 static unsigned int pcm037_uart1_pins[] = {
87 static unsigned int pcm037_pins[] = {
202 static struct resource pcm037_flash_resource = {
209 .name =
"physmap-flash",
212 .platform_data = &pcm037_flash_data,
214 .resource = &pcm037_flash_resource,
222 static struct resource smsc911x_resources[] = {
244 .num_resources =
ARRAY_SIZE(smsc911x_resources),
245 .resource = smsc911x_resources,
247 .platform_data = &smsc911x_info,
255 static struct resource pcm038_sram_resource = {
265 .platform_data = &pcm038_sram_data,
268 .resource = &pcm038_sram_resource,
272 pcm037_nand_board_info __initconst = {
291 static int pcm037_camera_power(
struct device *
dev,
int on)
308 .board_info = &pcm037_i2c_camera[1],
314 .power = pcm037_camera_power,
315 .board_info = &pcm037_i2c_camera[0],
322 .platform_data = &board_eeprom,
329 .name =
"soc-camera-pdrv",
332 .platform_data = &iclink_mt9t031,
337 .name =
"soc-camera-pdrv",
340 .platform_data = &iclink_mt9v022,
345 #ifdef PCM970_SDHC_RW_SWITCH
346 static int pcm970_sdhc1_get_ro(
struct device *dev)
352 #define SDHC1_GPIO_WP IOMUX_TO_GPIO(MX31_PIN_SFS6)
353 #define SDHC1_GPIO_DET IOMUX_TO_GPIO(MX31_PIN_SCK6)
366 #ifdef PCM970_SDHC_RW_SWITCH
375 "sdhc-detect", data);
377 goto err_gpio_free_2;
382 #ifdef PCM970_SDHC_RW_SWITCH
391 static void pcm970_sdhc1_exit(
struct device *dev,
void *
data)
399 #ifdef PCM970_SDHC_RW_SWITCH
400 .get_ro = pcm970_sdhc1_get_ro,
402 .init = pcm970_sdhc1_init,
403 .exit = pcm970_sdhc1_exit,
412 #define MX3_CAMERA_BUF_SIZE SZ_4M
414 static int __init pcm037_init_camera(
void)
420 return PTR_ERR(pdev);
423 mx3_camera_base, mx3_camera_base,
447 .name =
"Sharp-LQ035Q7DH06-QVGA",
498 .name =
"Sharp-LQ035Q7DH06-QVGA",
503 static struct resource pcm970_sja1000_resources[] = {
515 .osc_freq = 16000000,
521 .name =
"sja1000_platform",
525 .resource = pcm970_sja1000_resources,
526 .num_resources =
ARRAY_SIZE(pcm970_sja1000_resources),
535 .
init = pcm037_otg_init,
545 .
init = pcm037_usbh2_init,
558 if (!
strcmp(options,
"host"))
559 otg_mode_host =
true;
560 else if (!
strcmp(options,
"device"))
561 otg_mode_host =
false;
563 pr_info(
"otg_mode neither \"host\" nor \"device\". "
564 "Defaulting to device\n");
567 __setup(
"otg_mode=", pcm037_otg_mode);
577 static void __init pcm037_init(
void)
590 #define H2_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS \
591 | PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU)
608 ARRAY_SIZE(pcm037_uart1_pins),
"pcm037_uart1");
630 smsc911x_resources[1].
start =
632 smsc911x_resources[1].
end =
658 pcm037_init_camera();
660 pcm970_sja1000_resources[1].
start =
662 pcm970_sja1000_resources[1].
end =
683 static void __init pcm037_timer_init(
void)
689 .init = pcm037_timer_init,
692 static void __init pcm037_reserve(
void)
699 static void __init pcm037_init_late(
void)
706 .atag_offset = 0x100,
707 .reserve = pcm037_reserve,
712 .timer = &pcm037_timer,
713 .init_machine = pcm037_init,
714 .init_late = pcm037_init_late,