void __init deluxe_j_init_mmc(void) { wifi_status_cb = NULL; printk(KERN_INFO "deluxe_j: %s\n", __func__); /* initial WL_REG_ON */ wl_reg_on_gpio.config.output_value = 0; pm8xxx_gpio_config(wl_reg_on_gpio.gpio, &wl_reg_on_gpio.config); wl_dev_wake_gpio.config.output_value = 0; pm8xxx_gpio_config(wl_dev_wake_gpio.gpio, &wl_dev_wake_gpio.config); /* PM QoS for wifi*/ deluxe_j_wifi_data.cpu_dma_latency = msm_rpm_get_swfi_latency(); apq8064_add_sdcc(1, deluxe_j_sdc1_pdata); if (system_rev <= XB) { apq8064_add_sdcc(3, &deluxe_j_wifi_data); //reg_set_l7_optimum_mode(); } else { apq8064_add_sdcc(3, deluxe_j_sdc3_pdata); apq8064_add_sdcc(4, &deluxe_j_wifi_data); } }
void __init apq8064_init_mmc(void) { if (apq8064_sdc1_pdata) { /* 8064 v2 supports upto 200MHz clock on SDC1 slot */ if (SOCINFO_VERSION_MAJOR(socinfo_get_version()) >= 2) { apq8064_sdc1_pdata->sup_clk_table = sdc1_sup_clk_rates_all; apq8064_sdc1_pdata->sup_clk_cnt = ARRAY_SIZE(sdc1_sup_clk_rates_all); } apq8064_add_sdcc(1, apq8064_sdc1_pdata); apq8064_add_uio(); } if (apq8064_sdc2_pdata) apq8064_add_sdcc(2, apq8064_sdc2_pdata); if (apq8064_sdc3_pdata) { if (!machine_is_apq8064_cdp()) { apq8064_sdc3_pdata->wpswitch_gpio = 0; apq8064_sdc3_pdata->is_wpswitch_active_low = false; } if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() || machine_is_mpq8064_dtv()) { int rc; struct pm_gpio sd_card_det_init_cfg = { .direction = PM_GPIO_DIR_IN, .output_buffer = PM_GPIO_OUT_BUF_CMOS, .pull = PM_GPIO_PULL_UP_30, .vin_sel = PM_GPIO_VIN_S4, .out_strength = PM_GPIO_STRENGTH_NO, .function = PM_GPIO_FUNC_NORMAL, }; apq8064_sdc3_pdata->status_gpio = PM8921_GPIO_PM_TO_SYS(31); apq8064_sdc3_pdata->status_irq = PM8921_GPIO_IRQ(PM8921_IRQ_BASE, 31); rc = pm8xxx_gpio_config(apq8064_sdc3_pdata->status_gpio, &sd_card_det_init_cfg); if (rc) { pr_info("%s: SD_CARD_DET GPIO%d config " "failed(%d)\n", __func__, apq8064_sdc3_pdata->status_gpio, rc); apq8064_sdc3_pdata->status_gpio = 0; apq8064_sdc3_pdata->status_irq = 0; } } if (machine_is_apq8064_cdp()) { int i; for (i = 0; i < apq8064_sdc3_pdata->pin_data->pad_data->\ drv->size; i++) apq8064_sdc3_pdata->pin_data->pad_data->\ drv->on[i].val = GPIO_CFG_10MA; } apq8064_add_sdcc(3, apq8064_sdc3_pdata); }
void __init apq8064_init_mmc(void) { if ((machine_is_apq8064_rumi3()) || machine_is_apq8064_sim()) { if (apq8064_sdc1_pdata) { if (machine_is_apq8064_sim()) apq8064_sdc1_pdata->disable_bam = true; apq8064_sdc1_pdata->disable_runtime_pm = true; apq8064_sdc1_pdata->disable_cmd23 = true; } if (apq8064_sdc3_pdata) { if (machine_is_apq8064_sim()) apq8064_sdc3_pdata->disable_bam = true; apq8064_sdc3_pdata->disable_runtime_pm = true; apq8064_sdc3_pdata->disable_cmd23 = true; } } if (apq8064_sdc1_pdata) apq8064_add_sdcc(1, apq8064_sdc1_pdata); if (apq8064_sdc3_pdata) { if (!machine_is_apq8064_cdp()) { apq8064_sdc3_pdata->wpswitch_gpio = 0; apq8064_sdc3_pdata->wpswitch_polarity = 0; } if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() || machine_is_mpq8064_dtv()) { apq8064_sdc3_pdata->status_gpio = PM8921_GPIO_PM_TO_SYS(31); apq8064_sdc3_pdata->status_irq = PM8921_GPIO_IRQ(PM8921_IRQ_BASE, 31); } apq8064_add_sdcc(3, apq8064_sdc3_pdata); } }
void __init dlxp_ul_init_mmc(void) { wifi_status_cb = NULL; printk(KERN_INFO "dlxp_ul: %s\n", __func__); wl_reg_on_gpio.config.output_value = 0; pm8xxx_gpio_config(wl_reg_on_gpio.gpio, &wl_reg_on_gpio.config); #if 0 wl_dev_wake_gpio.config.output_value = 0; pm8xxx_gpio_config(wl_dev_wake_gpio.gpio, &wl_dev_wake_gpio.config); #endif #if 0 dlxp_ul_wifi_data.swfi_latency = msm_rpm_get_swfi_latency(); #endif if (system_rev >= XC) { sdc4_sdslot_data.status_gpio = PM8921_GPIO_PM_TO_SYS(uSD_CD_XC); sdc4_sdslot_data.status_irq = PM8921_GPIO_IRQ(PM8921_IRQ_BASE, uSD_CD_XC); } apq8064_add_sdcc(1, dlxp_ul_sdc1_pdata); apq8064_add_sdcc(3, &dlxp_ul_wifi_data); apq8064_add_sdcc(4, &sdc4_sdslot_data); }
void __init apq8064_init_mmc(void) { if (apq8064_sdc1_pdata) apq8064_add_sdcc(1, apq8064_sdc1_pdata); if (apq8064_sdc2_pdata) apq8064_add_sdcc(2, apq8064_sdc2_pdata); if (apq8064_sdc3_pdata) { if (!machine_is_apq8064_cdp()) { apq8064_sdc3_pdata->wpswitch_gpio = 0; apq8064_sdc3_pdata->is_wpswitch_active_low = false; } if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() || machine_is_mpq8064_dtv()) { int rc; struct pm_gpio sd_card_det_init_cfg = { .direction = PM_GPIO_DIR_IN, .output_buffer = PM_GPIO_OUT_BUF_CMOS, .pull = PM_GPIO_PULL_UP_30, .vin_sel = PM_GPIO_VIN_S4, .out_strength = PM_GPIO_STRENGTH_NO, .function = PM_GPIO_FUNC_NORMAL, }; apq8064_sdc3_pdata->status_gpio = PM8921_GPIO_PM_TO_SYS(31); apq8064_sdc3_pdata->status_irq = PM8921_GPIO_IRQ(PM8921_IRQ_BASE, 31); rc = pm8xxx_gpio_config(apq8064_sdc3_pdata->status_gpio, &sd_card_det_init_cfg); if (rc) { pr_info("%s: SD_CARD_DET GPIO%d config " "failed(%d)\n", __func__, apq8064_sdc3_pdata->status_gpio, rc); apq8064_sdc3_pdata->status_gpio = 0; apq8064_sdc3_pdata->status_irq = 0; } } if (machine_is_apq8064_cdp()) { int i; for (i = 0; i < apq8064_sdc3_pdata->pin_data->pad_data->\ drv->size; i++) apq8064_sdc3_pdata->pin_data->pad_data->\ drv->on[i].val = GPIO_CFG_10MA; } apq8064_add_sdcc(3, apq8064_sdc3_pdata); }
static void __init apq8064_init_mmc(void) { if ((machine_is_apq8064_rumi3()) || machine_is_apq8064_sim()) { if (apq8064_sdc1_pdata) { apq8064_sdc1_pdata->disable_bam = true; apq8064_sdc1_pdata->disable_runtime_pm = true; apq8064_sdc1_pdata->disable_cmd23 = true; } if (apq8064_sdc3_pdata) { apq8064_sdc3_pdata->disable_bam = true; apq8064_sdc3_pdata->disable_runtime_pm = true; apq8064_sdc3_pdata->disable_cmd23 = true; } } apq8064_add_sdcc(1, apq8064_sdc1_pdata); apq8064_add_sdcc(3, apq8064_sdc3_pdata); }
void __init deluxe_ub1_init_mmc(void) { wifi_status_cb = NULL; printk(KERN_INFO "deluxe_ub1: %s\n", __func__); wl_reg_on_gpio.config.output_value = 0; pm8xxx_gpio_config(wl_reg_on_gpio.gpio, &wl_reg_on_gpio.config); wl_dev_wake_gpio.config.output_value = 0; pm8xxx_gpio_config(wl_dev_wake_gpio.gpio, &wl_dev_wake_gpio.config); deluxe_ub1_wifi_data.cpu_dma_latency = msm_rpm_get_swfi_latency(); apq8064_add_sdcc(1, deluxe_ub1_sdc1_pdata); apq8064_add_sdcc(3, deluxe_ub1_sdc3_pdata); apq8064_add_sdcc(4, &deluxe_ub1_wifi_data); }
void __init m7_init_mmc(void) { wifi_status_cb = NULL; printk(KERN_INFO "m7: %s\n", __func__); wl_reg_on_gpio.config.output_value = 0; pm8xxx_gpio_config(wl_reg_on_gpio.gpio, &wl_reg_on_gpio.config); #if 0 wl_dev_wake_gpio.config.output_value = 0; pm8xxx_gpio_config(wl_dev_wake_gpio.gpio, &wl_dev_wake_gpio.config); #endif #if 0 m7_wifi_data.swfi_latency = msm_rpm_get_swfi_latency(); #endif apq8064_add_sdcc(1, m7_sdc1_pdata); apq8064_add_sdcc(3, &m7_wifi_data); }
void __init apq8064_init_mmc(void) { if (apq8064_sdc1_pdata) { /* 8064 v2 supports upto 200MHz clock on SDC1 slot */ if (SOCINFO_VERSION_MAJOR(socinfo_get_version()) >= 2) { apq8064_sdc1_pdata->sup_clk_table = sdc1_sup_clk_rates_all; apq8064_sdc1_pdata->sup_clk_cnt = ARRAY_SIZE(sdc1_sup_clk_rates_all); } apq8064_add_sdcc(1, apq8064_sdc1_pdata); } #if defined(CONFIG_MACH_JFVE_EUR) apq8064_sdc2_pdata = NULL; apq8064_sdc4_pdata = NULL; // SDC3 is used for External memory Card if (apq8064_sdc3_pdata) { apq8064_sdc3_pdata->status_gpio = PM8921_GPIO_PM_TO_SYS(33); apq8064_sdc3_pdata->status_irq = PM8921_GPIO_IRQ(PM8921_IRQ_BASE, 33); apq8064_add_sdcc(3, apq8064_sdc3_pdata); } #else /* if (apq8064_sdc2_pdata) apq8064_add_sdcc(2, apq8064_sdc2_pdata); */ /* system_rev 0x05 or more * SDC3 is used for WIFI SDC4 is used for External memory Card */ if (apq8064_sdc3_pdata) { #ifdef CONFIG_MMC_MSM_SDC4_SUPPORT mmc_vdd_reg_data[SDCC3].high_vol_level = 1800000; mmc_vdd_reg_data[SDCC3].low_vol_level = 1800000; mmc_slot_vreg_data[SDCC3].vdd_io_data = NULL; apq8064_sdc3_pdata->status_irq = 0; apq8064_sdc3_pdata->status_gpio = 0; #endif #if !defined(CONFIG_BCM4335) && !defined(CONFIG_BCM4335_MODULE) if (!machine_is_apq8064_cdp()) { apq8064_sdc3_pdata->wpswitch_gpio = 0; apq8064_sdc3_pdata->is_wpswitch_active_low = false; } if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() || machine_is_mpq8064_dtv()) { int rc; struct pm_gpio sd_card_det_init_cfg = { .direction = PM_GPIO_DIR_IN, .output_buffer = PM_GPIO_OUT_BUF_CMOS, .pull = PM_GPIO_PULL_UP_30, .vin_sel = PM_GPIO_VIN_S4, .out_strength = PM_GPIO_STRENGTH_NO, .function = PM_GPIO_FUNC_NORMAL, }; apq8064_sdc3_pdata->status_gpio = PM8921_GPIO_PM_TO_SYS(31); apq8064_sdc3_pdata->status_irq = PM8921_GPIO_IRQ(PM8921_IRQ_BASE, 31); rc = pm8xxx_gpio_config(apq8064_sdc3_pdata->status_gpio, &sd_card_det_init_cfg); if (rc) { pr_info("%s: SD_CARD_DET GPIO%d config " "failed(%d)\n", __func__, apq8064_sdc3_pdata->status_gpio, rc); apq8064_sdc3_pdata->status_gpio = 0; apq8064_sdc3_pdata->status_irq = 0; } } if (machine_is_apq8064_cdp()) { int i; for (i = 0; i < apq8064_sdc3_pdata->pin_data->pad_data->\ drv->size; i++) apq8064_sdc3_pdata->pin_data->pad_data->\ drv->on[i].val = GPIO_CFG_10MA; } #endif apq8064_add_sdcc(3, apq8064_sdc3_pdata); }