|
@@ -1382,3 +1382,146 @@ static __init int da850_wl12xx_init(void)
|
|
|
{
|
|
|
int ret;
|
|
|
|
|
|
+ ret = davinci_cfg_reg_list(da850_wl12xx_pins);
|
|
|
+ if (ret) {
|
|
|
+ pr_err("wl12xx/mmc mux setup failed: %d\n", ret);
|
|
|
+ goto exit;
|
|
|
+ }
|
|
|
+
|
|
|
+ ret = da850_register_mmcsd1(&da850_wl12xx_mmc_config);
|
|
|
+ if (ret) {
|
|
|
+ pr_err("wl12xx/mmc registration failed: %d\n", ret);
|
|
|
+ goto exit;
|
|
|
+ }
|
|
|
+
|
|
|
+ ret = gpio_request_one(DA850_WLAN_EN, GPIOF_OUT_INIT_LOW, "wl12xx_en");
|
|
|
+ if (ret) {
|
|
|
+ pr_err("Could not request wl12xx enable gpio: %d\n", ret);
|
|
|
+ goto exit;
|
|
|
+ }
|
|
|
+
|
|
|
+ ret = gpio_request_one(DA850_WLAN_IRQ, GPIOF_IN, "wl12xx_irq");
|
|
|
+ if (ret) {
|
|
|
+ pr_err("Could not request wl12xx irq gpio: %d\n", ret);
|
|
|
+ goto free_wlan_en;
|
|
|
+ }
|
|
|
+
|
|
|
+ da850_wl12xx_wlan_data.irq = gpio_to_irq(DA850_WLAN_IRQ);
|
|
|
+
|
|
|
+ ret = wl12xx_set_platform_data(&da850_wl12xx_wlan_data);
|
|
|
+ if (ret) {
|
|
|
+ pr_err("Could not set wl12xx data: %d\n", ret);
|
|
|
+ goto free_wlan_irq;
|
|
|
+ }
|
|
|
+
|
|
|
+ return 0;
|
|
|
+
|
|
|
+free_wlan_irq:
|
|
|
+ gpio_free(DA850_WLAN_IRQ);
|
|
|
+
|
|
|
+free_wlan_en:
|
|
|
+ gpio_free(DA850_WLAN_EN);
|
|
|
+
|
|
|
+exit:
|
|
|
+ return ret;
|
|
|
+}
|
|
|
+
|
|
|
+#else /* CONFIG_DA850_WL12XX */
|
|
|
+
|
|
|
+static __init int da850_wl12xx_init(void)
|
|
|
+{
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+#endif /* CONFIG_DA850_WL12XX */
|
|
|
+
|
|
|
+#define DA850EVM_SATA_REFCLKPN_RATE (100 * 1000 * 1000)
|
|
|
+
|
|
|
+static __init void da850_evm_init(void)
|
|
|
+{
|
|
|
+ int ret;
|
|
|
+
|
|
|
+ ret = pmic_tps65070_init();
|
|
|
+ if (ret)
|
|
|
+ pr_warning("da850_evm_init: TPS65070 PMIC init failed: %d\n",
|
|
|
+ ret);
|
|
|
+
|
|
|
+ ret = da850_register_edma(da850_edma_rsv);
|
|
|
+ if (ret)
|
|
|
+ pr_warning("da850_evm_init: edma registration failed: %d\n",
|
|
|
+ ret);
|
|
|
+
|
|
|
+ ret = davinci_cfg_reg_list(da850_i2c0_pins);
|
|
|
+ if (ret)
|
|
|
+ pr_warning("da850_evm_init: i2c0 mux setup failed: %d\n",
|
|
|
+ ret);
|
|
|
+
|
|
|
+ ret = da8xx_register_i2c(0, &da850_evm_i2c_0_pdata);
|
|
|
+ if (ret)
|
|
|
+ pr_warning("da850_evm_init: i2c0 registration failed: %d\n",
|
|
|
+ ret);
|
|
|
+
|
|
|
+
|
|
|
+ ret = da8xx_register_watchdog();
|
|
|
+ if (ret)
|
|
|
+ pr_warning("da830_evm_init: watchdog registration failed: %d\n",
|
|
|
+ ret);
|
|
|
+
|
|
|
+ if (HAS_MMC) {
|
|
|
+ ret = davinci_cfg_reg_list(da850_evm_mmcsd0_pins);
|
|
|
+ if (ret)
|
|
|
+ pr_warning("da850_evm_init: mmcsd0 mux setup failed:"
|
|
|
+ " %d\n", ret);
|
|
|
+
|
|
|
+ ret = gpio_request(DA850_MMCSD_CD_PIN, "MMC CD\n");
|
|
|
+ if (ret)
|
|
|
+ pr_warning("da850_evm_init: can not open GPIO %d\n",
|
|
|
+ DA850_MMCSD_CD_PIN);
|
|
|
+ gpio_direction_input(DA850_MMCSD_CD_PIN);
|
|
|
+
|
|
|
+ ret = gpio_request(DA850_MMCSD_WP_PIN, "MMC WP\n");
|
|
|
+ if (ret)
|
|
|
+ pr_warning("da850_evm_init: can not open GPIO %d\n",
|
|
|
+ DA850_MMCSD_WP_PIN);
|
|
|
+ gpio_direction_input(DA850_MMCSD_WP_PIN);
|
|
|
+
|
|
|
+ ret = da8xx_register_mmcsd0(&da850_mmc_config);
|
|
|
+ if (ret)
|
|
|
+ pr_warning("da850_evm_init: mmcsd0 registration failed:"
|
|
|
+ " %d\n", ret);
|
|
|
+
|
|
|
+ ret = da850_wl12xx_init();
|
|
|
+ if (ret)
|
|
|
+ pr_warning("da850_evm_init: wl12xx initialization"
|
|
|
+ " failed: %d\n", ret);
|
|
|
+ }
|
|
|
+
|
|
|
+ davinci_serial_init(&da850_evm_uart_config);
|
|
|
+
|
|
|
+ i2c_register_board_info(1, da850_evm_i2c_devices,
|
|
|
+ ARRAY_SIZE(da850_evm_i2c_devices));
|
|
|
+
|
|
|
+ /*
|
|
|
+ * shut down uart 0 and 1; they are not used on the board and
|
|
|
+ * accessing them causes endless "too much work in irq53" messages
|
|
|
+ * with arago fs
|
|
|
+ */
|
|
|
+ __raw_writel(0, IO_ADDRESS(DA8XX_UART1_BASE) + 0x30);
|
|
|
+ __raw_writel(0, IO_ADDRESS(DA8XX_UART0_BASE) + 0x30);
|
|
|
+
|
|
|
+ ret = davinci_cfg_reg_list(da850_evm_mcasp_pins);
|
|
|
+ if (ret)
|
|
|
+ pr_warning("da850_evm_init: mcasp mux setup failed: %d\n",
|
|
|
+ ret);
|
|
|
+
|
|
|
+ da850_evm_snd_data.sram_pool = sram_get_gen_pool();
|
|
|
+ da8xx_register_mcasp(0, &da850_evm_snd_data);
|
|
|
+
|
|
|
+ ret = davinci_cfg_reg_list(da850_lcdcntl_pins);
|
|
|
+ if (ret)
|
|
|
+ pr_warning("da850_evm_init: lcdcntl mux setup failed: %d\n",
|
|
|
+ ret);
|
|
|
+
|
|
|
+ ret = da8xx_register_uio_pruss();
|
|
|
+ if (ret)
|
|
|
+ pr_warn("da850_evm_init: pruss initialization failed: %d\n",
|