static void __init omap3beagle_flash_init(void) { u8 cs = 0; u8 nandcs = GPMC_CS_NUM + 1; /* find out the chip-select on which NAND exists */ while (cs < GPMC_CS_NUM) { u32 ret = 0; ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1); if ((ret & 0xC00) == 0x800) { printk(KERN_INFO "Found NAND on CS%d\n", cs); if (nandcs > GPMC_CS_NUM) nandcs = cs; } cs++; } if (nandcs > GPMC_CS_NUM) { printk(KERN_INFO "NAND: Unable to find configuration " "in GPMC\n "); return; } if (nandcs < GPMC_CS_NUM) { printk(KERN_INFO "Registering NAND on CS%d\n", nandcs); board_nand_init(omap3beagle_nand_partitions, ARRAY_SIZE(omap3beagle_nand_partitions), nandcs, NAND_BUSWIDTH_16); } }
static void nand_init_chip(struct mtd_info *mtd, struct nand_chip *nand, ulong base_addr) { int maxchips = CONFIG_SYS_NAND_MAX_CHIPS; int __attribute__((unused)) i = 0; if (maxchips < 1) maxchips = 1; mtd->priv = nand; nand->IO_ADDR_R = nand->IO_ADDR_W = (void __iomem *)base_addr; if (board_nand_init(nand) == 0) { if (nand_scan(mtd, maxchips) == 0) { if (!mtd->name) mtd->name = (char *)default_nand_name; #ifdef CONFIG_MTD_DEVICE /* * Add MTD device so that we can reference it later * via the mtdcore infrastructure (e.g. ubi). */ sprintf(dev_name[i], "nand%d", i); mtd->name = dev_name[i++]; add_mtd_device(mtd); #endif } else mtd->name = NULL; } else { mtd->name = NULL; mtd->size = 0; } }
void nand_init(void) { uint32_t val; board_nand_init(); val = readl(SUNXI_NFC_BASE + NFC_CTL); /* enable and reset CTL */ writel(val | NFC_CTL_EN | NFC_CTL_RESET, SUNXI_NFC_BASE + NFC_CTL); if (!check_value_negated(SUNXI_NFC_BASE + NFC_CTL, NFC_CTL_RESET, DEFAULT_TIMEOUT_US)) { printf("Couldn't initialize nand\n"); } /* reset NAND */ writel(NFC_ST_CMD_INT_FLAG, SUNXI_NFC_BASE + NFC_ST); writel(NFC_SEND_CMD1 | NFC_WAIT_FLAG | NAND_CMD_RESET, SUNXI_NFC_BASE + NFC_CMD); if (!check_value(SUNXI_NFC_BASE + NFC_ST, NFC_ST_CMD_INT_FLAG, DEFAULT_TIMEOUT_US)) { printf("Error timeout waiting for nand reset\n"); return; } writel(NFC_ST_CMD_INT_FLAG, SUNXI_NFC_BASE + NFC_ST); }
static void __init omap_zoom_init(void) { if (machine_is_omap_zoom2()) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); } else if (machine_is_omap_zoom3()) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); omap_mux_init_gpio(ZOOM3_EHCI_RESET_GPIO, OMAP_PIN_OUTPUT); usbhs_init(&usbhs_bdata); } board_nand_init(zoom_nand_partitions, ARRAY_SIZE(zoom_nand_partitions), ZOOM_NAND_CS, NAND_BUSWIDTH_16, nand_default_timings); zoom_debugboard_init(); zoom_peripherals_init(); if (machine_is_omap_zoom2()) omap_sdrc_init(mt46h32m32lf6_sdrc_params, mt46h32m32lf6_sdrc_params); else if (machine_is_omap_zoom3()) omap_sdrc_init(h8mbx00u0mer0em_sdrc_params, h8mbx00u0mer0em_sdrc_params); zoom_display_init(); }
static void __init devkit8000_init(void) { omap3_mux_init(board_mux, OMAP_PACKAGE_CUS); omap_serial_init(); omap_sdrc_init(mt46h32m32lf6_sdrc_params, mt46h32m32lf6_sdrc_params); omap_dm9000_init(); omap_hsmmc_init(mmc); devkit8000_i2c_init(); omap_dm9000_resources[2].start = gpio_to_irq(OMAP_DM9000_GPIO_IRQ); platform_add_devices(devkit8000_devices, ARRAY_SIZE(devkit8000_devices)); omap_display_init(&devkit8000_dss_data); omap_ads7846_init(2, OMAP3_DEVKIT_TS_GPIO, 0, NULL); usb_musb_init(NULL); usbhs_init(&usbhs_bdata); board_nand_init(devkit8000_nand_partitions, ARRAY_SIZE(devkit8000_nand_partitions), NAND_CS, NAND_BUSWIDTH_16, NULL); omap_twl4030_audio_init("omap3beagle"); /* Ensure SDRC pins are mux'd for self-refresh */ omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); }
static void __init am3517_crane_init(void) { int ret; omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); omap_serial_init(); omap_sdrc_init(NULL, NULL); board_nand_init(crane_nand_partitions, ARRAY_SIZE(crane_nand_partitions), 0, NAND_BUSWIDTH_16, NULL); am3517_crane_i2c_init(); /* Configure GPIO for EHCI port */ if (omap_mux_init_gpio(GPIO_USB_NRESET, OMAP_PIN_OUTPUT)) { pr_err("Can not configure mux for GPIO_USB_NRESET %d\n", GPIO_USB_NRESET); return; } if (omap_mux_init_gpio(GPIO_USB_POWER, OMAP_PIN_OUTPUT)) { pr_err("Can not configure mux for GPIO_USB_POWER %d\n", GPIO_USB_POWER); return; } ret = gpio_request_one(GPIO_USB_POWER, GPIOF_OUT_INIT_HIGH, "usb_ehci_enable"); if (ret < 0) { pr_err("Can not request GPIO %d\n", GPIO_USB_POWER); return; } usbhs_init(&usbhs_bdata); am35xx_emac_init(AM35XX_DEFAULT_MDIO_FREQUENCY, 1); }
static void __init overo_init(void) { int ret; regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); overo_i2c_init(); omap_hsmmc_init(mmc); omap_display_init(&overo_dss_data); omap_serial_init(); omap_sdrc_init(mt46h32m32lf6_sdrc_params, mt46h32m32lf6_sdrc_params); board_nand_init(overo_nand_partitions, ARRAY_SIZE(overo_nand_partitions), NAND_CS, 0, NULL); usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); usb_musb_init(NULL); usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data)); usbhs_init(&usbhs_bdata); overo_spi_init(); overo_init_smsc911x(); overo_init_led(); overo_init_keys(); omap_twl4030_audio_init("overo", NULL); /* Ensure SDRC pins are mux'd for self-refresh */ omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); ret = gpio_request_one(OVERO_GPIO_W2W_NRESET, GPIOF_OUT_INIT_HIGH, "OVERO_GPIO_W2W_NRESET"); if (ret == 0) { gpio_export(OVERO_GPIO_W2W_NRESET, 0); gpio_set_value(OVERO_GPIO_W2W_NRESET, 0); udelay(10); gpio_set_value(OVERO_GPIO_W2W_NRESET, 1); } else { pr_err("could not obtain gpio for OVERO_GPIO_W2W_NRESET\n"); } ret = gpio_request_array(overo_bt_gpios, ARRAY_SIZE(overo_bt_gpios)); if (ret) { pr_err("%s: could not obtain BT gpios\n", __func__); } else { gpio_export(OVERO_GPIO_BT_XGATE, 0); gpio_export(OVERO_GPIO_BT_NRESET, 0); gpio_set_value(OVERO_GPIO_BT_NRESET, 0); mdelay(6); gpio_set_value(OVERO_GPIO_BT_NRESET, 1); } ret = gpio_request_one(OVERO_GPIO_USBH_CPEN, GPIOF_OUT_INIT_HIGH, "OVERO_GPIO_USBH_CPEN"); if (ret == 0) gpio_export(OVERO_GPIO_USBH_CPEN, 0); else pr_err("could not obtain gpio for OVERO_GPIO_USBH_CPEN\n"); }
void nand_init(void) { struct sunxi_ccm_reg * const ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE; struct sunxi_nand * const nand = (struct sunxi_nand *)SUNXI_NFC_BASE; u32 val; board_nand_init(); /* "un-gate" NAND clock and clock source * This assumes that the clock was already correctly configured by * BootROM */ setbits_le32(&ccm->ahb_gate0, (1 << AHB_GATE_OFFSET_NAND0)); #ifdef CONFIG_MACH_SUN9I setbits_le32(&ccm->ahb_gate1, (1 << AHB_GATE_OFFSET_DMA)); #else setbits_le32(&ccm->ahb_gate0, (1 << AHB_GATE_OFFSET_DMA)); #endif setbits_le32(&ccm->nand0_clk_cfg, 0x80000000); val = readl(&nand->ctl); val |= SUNXI_NAND_CTL_RST; writel(val, &nand->ctl); /* Wait until reset pin is deasserted */ do { val = readl(&nand->ctl); if (!(val & SUNXI_NAND_CTL_RST)) break; } while (1); /** \todo Chip select, currently kind of static */ val = readl(&nand->ctl); val &= 0xf0fff0f2; val |= SUNXI_NAND_CTL_EN; val |= SUNXI_NAND_CTL_PAGE_SIZE(CONFIG_NAND_SUNXI_PAGE_SIZE); writel(val, &nand->ctl); writel(0x100, &nand->timing_ctl); writel(0x7ff, &nand->timing_cfg); /* reset CMD */ val = SUNXI_NAND_CMD_SEND_CMD1 | SUNXI_NAND_CMD_WAIT_FLAG | NAND_CMD_RESET; writel(val, &nand->cmd); do { val = readl(&nand->st); if (val & (1<<1)) break; udelay(1000); } while (1); printf("Nand initialised\n"); }
static void __init omap3_devkit8500_init(void) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); omap_hsmmc_init(mmc); //HS MMC omap3_devkit8500_i2c_init(); //require recheck for omap3_devkit8500_i2c_init() /*[OMAP_DISPLAY DISABLED]*/ omap_display_init(&devkit8500_dss_data); /* * Platform Devices Registeration * Leds, Keys, .... */ platform_add_devices(omap3_devkit8500_devices, ARRAY_SIZE(omap3_devkit8500_devices)); /* [TOUCH SCREEN CONTROLLER] */ //omap_ads7846_init(2, OMAP3_DEVKIT8500_TS_GPIO, 0xA, NULL); /* in datasheet SPI2_CS0 */ /* [SERIAL PORTS] */ omap_serial_init(); /* [RAM Initialization] */ omap_sdrc_init(mt46h32m32lf6_sdrc_params,mt46h32m32lf6_sdrc_params); /* [NAND Init] */ board_nand_init(devkit8500_nand_partitions, ARRAY_SIZE(devkit8500_nand_partitions), NAND_CS, NAND_BUSWIDTH_16, NULL); omap_twl4030_audio_init("omap3devkit8500", NULL); /* [USB HOST] */ usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data)); usbhs_init(&usbhs_bdata); /* [USB OTG] */ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); usb_musb_init(NULL); /* Ensure SDRC pins are mux'd for self-refresh */ omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); /* [ETHERNET] */ omap_dm9000_init(); }
static void nand_init_chip(struct mtd_info *mtd, struct nand_chip *nand, ulong base_addr) { mtd->priv = nand; nand->IO_ADDR_R = nand->IO_ADDR_W = (void __iomem *)base_addr; board_nand_init(nand); if (nand_scan(mtd, 1) == 0) { if (!mtd->name) mtd->name = (char *)default_nand_name; } else mtd->name = NULL; }
static void __init omap_ldp_init(void) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); ldp_init_smsc911x(); omap_i2c_init(); platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices)); omap_ads7846_init(1, 54, 310, NULL); omap_serial_init(); usb_musb_init(NULL); board_nand_init(ldp_nand_partitions, ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0); omap2_hsmmc_init(mmc); ldp_display_init(); }
static void __init omap_zoom_init(void) { if (machine_is_omap_zoom2()) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); } else if (machine_is_omap_zoom3()) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); omap_mux_init_gpio(ZOOM3_EHCI_RESET_GPIO, OMAP_PIN_OUTPUT); usbhs_init(&usbhs_bdata); } board_nand_init(zoom_nand_partitions, ARRAY_SIZE(zoom_nand_partitions), ZOOM_NAND_CS, NAND_BUSWIDTH_16); zoom_debugboard_init(); zoom_peripherals_init(); zoom_display_init(); }
static void __init igep_flash_init(void) { u32 mux; mux = igep_get_sysboot_value(); if (mux == IGEP_SYSBOOT_NAND) { pr_info("IGEP: initializing NAND memory device\n"); board_nand_init(igep_flash_partitions, ARRAY_SIZE(igep_flash_partitions), 0, NAND_BUSWIDTH_16, nand_default_timings); } else if (mux == IGEP_SYSBOOT_ONENAND) { pr_info("IGEP: initializing OneNAND memory device\n"); board_onenand_init(igep_flash_partitions, ARRAY_SIZE(igep_flash_partitions), 0); } else { pr_err("IGEP: Flash: unsupported sysboot sequence found\n"); } }
static void __init omap_ldp_init(void) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); omap_board_config = ldp_config; omap_board_config_size = ARRAY_SIZE(ldp_config); ldp_init_smsc911x(); omap_i2c_init(); platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices)); omap_ads7846_init(1, 54, 310, NULL); omap_serial_init(); usb_musb_init(NULL); board_nand_init(ldp_nand_partitions, ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0); omap2_hsmmc_init(mmc); /* link regulators to MMC adapters */ ldp_vmmc1_supply.dev = mmc[0].dev; }
static void __init omap_ldp_init(void) { regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); ldp_init_smsc911x(); omap_i2c_init(); platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices)); omap_ads7846_init(1, 54, 310, NULL); omap_serial_init(); omap_sdrc_init(NULL, NULL); usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); usb_musb_init(NULL); board_nand_init(ldp_nand_partitions, ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0, nand_default_timings); omap_hsmmc_init(mmc); ldp_display_init(); }
static void __init ti8148_evm_init(void) { ti814x_mux_init(board_mux); omap_serial_init(); ti814x_evm_i2c_init(); ti81xx_register_mcasp(0, &ti8148_evm_snd_data); omap2_hsmmc_init(mmc); board_nand_init(ti814x_nand_partitions, ARRAY_SIZE(ti814x_nand_partitions), 0, NAND_BUSWIDTH_16); /* initialize usb */ usb_musb_init(&musb_board_data); ti8148_spi_init(); ti814x_vpss_init(); ti814x_hdmi_init(); regulator_use_dummy_regulator(); }
static void __init omap3_beagle_init(void) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); omap3_beagle_init_rev(); if (gpio_is_valid(beagle_config.mmc1_gpio_wp)) omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT); mmc[0].caps = beagle_config.mmc_caps; omap_hsmmc_init(mmc); omap3_beagle_i2c_init(); gpio_buttons[0].gpio = beagle_config.usr_button_gpio; platform_add_devices(omap3_beagle_devices, ARRAY_SIZE(omap3_beagle_devices)); if (gpio_is_valid(beagle_config.dvi_pd_gpio)) omap_mux_init_gpio(beagle_config.dvi_pd_gpio, OMAP_PIN_OUTPUT); omap_display_init(&beagle_dss_data); omap_serial_init(); omap_sdrc_init(mt46h32m32lf6_sdrc_params, mt46h32m32lf6_sdrc_params); usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); usb_musb_init(NULL); usbhs_init(&usbhs_bdata); board_nand_init(omap3beagle_nand_partitions, ARRAY_SIZE(omap3beagle_nand_partitions), NAND_CS, NAND_BUSWIDTH_16, NULL); omap_twl4030_audio_init("omap3beagle", NULL); /* Ensure msecure is mux'd to be able to set the RTC. */ omap_mux_init_signal("sys_drm_msecure", OMAP_PIN_OFF_OUTPUT_HIGH); /* Ensure SDRC pins are mux'd for self-refresh */ omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); pwm_add_table(pwm_lookup, ARRAY_SIZE(pwm_lookup)); }
void nand_init(void) { #ifdef CONFIG_SYS_NAND_SELF_INIT board_nand_init(); #else int i; for (i = 0; i < CONFIG_SYS_MAX_NAND_DEVICE; i++) nand_init_chip(i); #endif printf("%lu MiB\n", total_nand_size / 1024); #ifdef CONFIG_SYS_NAND_SELECT_DEVICE /* * Select the chip in the board/cpu specific driver */ board_nand_select_device(nand_info[nand_curr_device].priv, nand_curr_device); #endif }
static void __init omap_ldp_init(void) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); ldp_init_smsc911x(); omap_i2c_init(); platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices)); ts_gpio = 54; ldp_spi_board_info[0].irq = gpio_to_irq(ts_gpio); spi_register_board_info(ldp_spi_board_info, ARRAY_SIZE(ldp_spi_board_info)); ads7846_dev_init(); omap_serial_init(); usb_musb_init(&musb_board_data); board_nand_init(ldp_nand_partitions, ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS); omap2_hsmmc_init(mmc); /* link regulators to MMC adapters */ ldp_vmmc1_supply.dev = mmc[0].dev; }
static void __init rhino_init(void) { /* Initialize MUX overrides */ omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); /* Initialize I2C lines */ rhino_i2c_init(); /* Add all platform devices */ platform_add_devices(rhino_devices, ARRAY_SIZE(rhino_devices)); /* Initialize the serial device */ omap_serial_init(); /* Configure GPIO for EHCI port */ omap_mux_init_gpio(57, OMAP_PIN_OUTPUT); usb_ehci_init(&ehci_pdata); rhino_hecc_init(&rhino_hecc_pdata); /* Initialize the NAND flash */ board_nand_init(rhino_nand_partitions, ARRAY_SIZE(rhino_nand_partitions), 0, NAND_BUSWIDTH_16); /* Configure the RTC */ omap_mux_init_gpio(GPIO_RTCDS1390_IRQ, OMAP_PIN_INPUT_PULLDOWN); if (gpio_request(GPIO_RTCDS1390_IRQ, "rtcs35390a-irq") < 0) printk(KERN_WARNING "failed to request GPIO#%d\n", GPIO_RTCDS1390_IRQ); if (gpio_direction_input(GPIO_RTCDS1390_IRQ)) printk(KERN_WARNING "GPIO#%d cannot be configured as input\n", GPIO_RTCDS1390_IRQ); rhino_spi_board_info[0].irq = gpio_to_irq(GPIO_RTCDS1390_IRQ); /* Initialize SPI devices */ rhino_spi_init(); /* Initialize Ethernet */ rhino_ethernet_init(&rhino_emac_pdata); rhino_musb_init(); /* MMC init function */ omap2_hsmmc_init(mmc); }
static void nand_init_chip(int i) { struct mtd_info *mtd = &nand_info[i]; struct nand_chip *nand = &nand_chip[i]; ulong base_addr = base_address[i]; int maxchips = CONFIG_SYS_NAND_MAX_CHIPS; if (maxchips < 1) maxchips = 1; mtd->priv = nand; nand->IO_ADDR_R = nand->IO_ADDR_W = (void __iomem *)base_addr; if (board_nand_init(nand)) return; if (nand_scan(mtd, maxchips)) return; nand_register(i); }
static void __init omap3_touchbook_init(void) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); pm_power_off = omap3_touchbook_poweroff; if (system_rev >= 0x20 && system_rev <= 0x34301000) { omap_mux_init_gpio(23, OMAP_PIN_INPUT); mmc[0].gpio_wp = 23; } else { omap_mux_init_gpio(29, OMAP_PIN_INPUT); } omap_hsmmc_init(mmc); omap3_touchbook_i2c_init(); platform_add_devices(omap3_touchbook_devices, ARRAY_SIZE(omap3_touchbook_devices)); omap_serial_init(); omap_sdrc_init(mt46h32m32lf6_sdrc_params, mt46h32m32lf6_sdrc_params); omap_mux_init_gpio(170, OMAP_PIN_INPUT); /* REVISIT leave DVI powered down until it's needed ... */ gpio_request_one(176, GPIOF_OUT_INIT_HIGH, "DVI_nPD"); /* Touchscreen and accelerometer */ omap_ads7846_init(4, OMAP3_TS_GPIO, 310, &ads7846_pdata); usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); usb_musb_init(NULL); usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data)); usbhs_init(&usbhs_bdata); board_nand_init(omap3touchbook_nand_partitions, ARRAY_SIZE(omap3touchbook_nand_partitions), NAND_CS, NAND_BUSWIDTH_16, NULL); /* Ensure SDRC pins are mux'd for self-refresh */ omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); }
static void __init omap_zoom_init(void) { if (machine_is_omap_zoom2()) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); } else if (machine_is_omap_zoom3()) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); omap_mux_init_gpio(ZOOM3_EHCI_RESET_GPIO, OMAP_PIN_OUTPUT); omap_mux_init_gpio(ZOOM3_McBSP3_BT_GPIO, OMAP_PIN_OUTPUT); usbhs_init(&usbhs_bdata); } board_nand_init(zoom_nand_partitions, ARRAY_SIZE(zoom_nand_partitions), ZOOM_NAND_CS, NAND_BUSWIDTH_16); zoom3_wifi_init(); zoom_debugboard_init(); zoom_peripherals_init(); zoom_display_init(); omap_register_ion(); /* Added to register zoom devices */ platform_add_devices(zoom_devices, ARRAY_SIZE(zoom_devices)); wl127x_vio_leakage_fix(); }
static void __init omap3_evm_init(void) { struct omap_board_mux *obm; omap3_evm_get_revision(); regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); obm = (cpu_is_omap3630()) ? omap36x_board_mux : omap35x_board_mux; omap3_mux_init(obm, OMAP_PACKAGE_CBB); omap_mux_init_gpio(63, OMAP_PIN_INPUT); omap_hsmmc_init(mmc); if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) omap3evm_twldata.vaux2 = &omap3evm_vaux2; omap3_evm_i2c_init(); omap_display_init(&omap3_evm_dss_data); platform_device_register(&omap3_evm_lcd_device); platform_device_register(&omap3_evm_tfp410_device); platform_device_register(&omap3_evm_dvi_connector_device); platform_device_register(&omap3_evm_tv_connector_device); omap_serial_init(); omap_sdrc_init(mt46h32m32lf6_sdrc_params, NULL); /* OMAP3EVM uses ISP1504 phy and so register nop transceiver */ usb_nop_xceiv_register(); if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) { /* enable EHCI VBUS using GPIO22 */ omap_mux_init_gpio(OMAP3_EVM_EHCI_VBUS, OMAP_PIN_INPUT_PULLUP); /* Select EHCI port on main board */ omap_mux_init_gpio(OMAP3_EVM_EHCI_SELECT, OMAP_PIN_INPUT_PULLUP); gpio_request_array(omap3_evm_ehci_gpios, ARRAY_SIZE(omap3_evm_ehci_gpios)); /* setup EHCI phy reset config */ omap_mux_init_gpio(21, OMAP_PIN_INPUT_PULLUP); phy_data[0].reset_gpio = 21; /* EVM REV >= E can supply 500mA with EXTVBUS programming */ musb_board_data.power = 500; musb_board_data.extvbus = 1; } else { /* setup EHCI phy reset on MDC */ omap_mux_init_gpio(135, OMAP_PIN_OUTPUT); phy_data[0].reset_gpio = 135; } usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb"); usb_musb_init(&musb_board_data); usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data)); usbhs_init(&usbhs_bdata); board_nand_init(omap3evm_nand_partitions, ARRAY_SIZE(omap3evm_nand_partitions), NAND_CS, NAND_BUSWIDTH_16, NULL); omap_ads7846_init(1, OMAP3_EVM_TS_GPIO, 310, NULL); omap3evm_init_smsc911x(); #ifdef CONFIG_BROKEN omap3_evm_display_init(); #endif omap3_evm_wl12xx_init(); omap_twl4030_audio_init("omap3evm", NULL); }
static void __init omap3_evm_init(void) { omap3_evm_get_revision(); if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) omap3evm_twldata.vaux2 = &omap3evm_vaux2; else omap3evm_twldata.vusb = &omap3_evm_vusb; if (cpu_is_omap3630()) omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB); else omap3_mux_init(omap35x_board_mux, OMAP_PACKAGE_CBB); omap3_evm_i2c_init(); platform_add_devices(omap3_evm_devices, ARRAY_SIZE(omap3_evm_devices)); spi_register_board_info(omap3evm_spi_board_info, ARRAY_SIZE(omap3evm_spi_board_info)); omap_serial_init(); /* OMAP3EVM uses ISP1504 phy and so register nop transceiver */ usb_nop_xceiv_register(0); if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) { /* enable EHCI VBUS using GPIO22 */ omap_mux_init_gpio(22, OMAP_PIN_INPUT_PULLUP); gpio_request(OMAP3_EVM_EHCI_VBUS, "enable EHCI VBUS"); gpio_direction_output(OMAP3_EVM_EHCI_VBUS, 0); gpio_set_value(OMAP3_EVM_EHCI_VBUS, 1); /* Select EHCI port on main board */ omap_mux_init_gpio(61, OMAP_PIN_INPUT_PULLUP); gpio_request(OMAP3_EVM_EHCI_SELECT, "select EHCI port"); gpio_direction_output(OMAP3_EVM_EHCI_SELECT, 0); gpio_set_value(OMAP3_EVM_EHCI_SELECT, 0); /* setup EHCI phy reset config */ omap_mux_init_gpio(21, OMAP_PIN_INPUT_PULLUP); ehci_pdata.reset_gpio_port[1] = 21; /* EVM REV >= E can supply 500mA with EXTVBUS programming */ musb_board_data.power = 500; musb_board_data.extvbus = 1; } else { /* setup EHCI phy reset on MDC */ omap_mux_init_gpio(135, OMAP_PIN_OUTPUT); ehci_pdata.reset_gpio_port[1] = 135; } usb_musb_init(&musb_board_data); usb_ehci_init(&ehci_pdata); ads7846_dev_init(); omap3evm_init_smsc911x(); omap3_evm_display_init(); /* NAND */ board_nand_init(omap3_evm_nand_partitions, ARRAY_SIZE(omap3_evm_nand_partitions), 0, NAND_BUSWIDTH_16); board_onenand_init(omap3_evm_onenand_partitions, ARRAY_SIZE(omap3_evm_onenand_partitions), 0); }