static void __init mxc_board_init(void) { mxc_iomux_v3_setup_multiple_pads(mx51efikamx_pads, ARRAY_SIZE(mx51efikamx_pads)); mx51_efikamx_board_id(); mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); mxc_init_imx_uart(); imx51_add_sdhci_esdhc_imx(0, NULL); /* on < 1.2 boards both SD controllers are used */ if (system_rev < 0x12) { imx51_add_sdhci_esdhc_imx(1, NULL); mx51_efikamx_leds[2].default_trigger = "mmc1"; } platform_device_register(&mx51_efikamx_leds_device); imx51_add_gpio_keys(&mx51_efikamx_powerkey_data); spi_register_board_info(mx51_efikamx_spi_board_info, ARRAY_SIZE(mx51_efikamx_spi_board_info)); imx51_add_ecspi(0, &mx51_efikamx_spi_pdata); if (system_rev == 0x11) { gpio_request(EFIKAMX_RESET1_1, "reset"); gpio_direction_output(EFIKAMX_RESET1_1, 1); } else { gpio_request(EFIKAMX_RESET, "reset"); gpio_direction_output(EFIKAMX_RESET, 1); } }
static void __init mx51_efikamx_board_init(void) { mxc_cpu_common_init(); mxc_register_gpios(); CONFIG_IOMUX(mx51_efikamx_general_iomux_pins); /* do ID pins first! */ if (machine_is_mx51_efikamx()) { CONFIG_IOMUX(mx51_efikamx_id_iomux_pins); } else if (machine_is_mx51_efikasb()) { CONFIG_IOMUX(mx51_efikasb_id_iomux_pins); CONFIG_IOMUX(mx51_efikasb_general_iomux_pins); } /* common platform configuration for all boards */ mx51_efikamx_init_uart(); mx51_efikamx_init_soc(); mx51_efikamx_init_nor(); mx51_efikamx_init_spi(); mx51_efikamx_init_i2c(); mx51_efikamx_init_pata(); /* we do board id late because it takes time to settle */ mx51_efikamx_board_id(); /* these all depend on board id */ mx51_efikamx_init_display(); mx51_efikamx_init_audio(); mx51_efikamx_init_pmic(); mx51_efikamx_init_mmc(); mx51_efikamx_init_leds(); mx51_efikamx_init_periph(); mx51_efikamx_init_usb(); pm_power_off = mx51_efikamx_power_off; if (machine_is_mx51_efikamx()) { mxc_free_iomux(MX51_PIN_GPIO1_2, IOMUX_CONFIG_ALT2); mxc_free_iomux(MX51_PIN_GPIO1_3, IOMUX_CONFIG_ALT2); mxc_free_iomux(MX51_PIN_EIM_LBA, IOMUX_CONFIG_GPIO); DBG(("Smarttop Revision 1.%u", mx51_efikamx_revision() )); } else if (machine_is_mx51_efikasb()) { mx51_efikamx_init_battery(); /* dastardly code to give us 1.3 or 2.0 out of "1" or "2" */ DBG(("Smartbook Revision %u.%u\n", mx51_efikamx_revision(), ((mx51_efikamx_revision() == 1) ? 3 : 0) )); DBG(("Memory type %s\n", mx51_efikamx_memory() )); } }
static void __init mx51_efikamx_init(void) { imx51_soc_init(); mxc_iomux_v3_setup_multiple_pads(mx51efikamx_pads, ARRAY_SIZE(mx51efikamx_pads)); efika_board_common_init(); mx51_efikamx_board_id(); /* on < 1.2 boards both SD controllers are used */ if (system_rev < 0x12) { imx51_add_sdhci_esdhc_imx(0, NULL); imx51_add_sdhci_esdhc_imx(1, &sd_pdata); mx51_efikamx_leds[2].default_trigger = "mmc1"; } else imx51_add_sdhci_esdhc_imx(0, &sd_pdata); gpio_led_register_device(-1, &mx51_efikamx_leds_data); imx_add_gpio_keys(&mx51_efikamx_powerkey_data); if (system_rev == 0x11) { gpio_request(EFIKAMX_RESET1_1, "reset"); gpio_direction_output(EFIKAMX_RESET1_1, 1); } else { gpio_request(EFIKAMX_RESET, "reset"); gpio_direction_output(EFIKAMX_RESET, 1); } /* * enable wifi by default only on mx * sb and mx have same wlan pin but the value to enable it are * different :/ */ gpio_request(EFIKA_WLAN_EN, "wlan_en"); gpio_direction_output(EFIKA_WLAN_EN, 0); msleep(10); gpio_request(EFIKA_WLAN_RESET, "wlan_rst"); gpio_direction_output(EFIKA_WLAN_RESET, 0); msleep(10); gpio_set_value(EFIKA_WLAN_RESET, 1); }