Loading Documentation/devicetree/bindings/mmc/sdhci-msm.txt +13 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,19 @@ In the following, <supply> can be vdd (flash core voltage) or vdd-io (I/O voltag - pinctrl-names - pinctrl-0, pinctrl-1,.. pinctrl-n - qcom,cpu-affinity: this is a string that specifies the pm QoS request type. The supported cpu affinity modes are : "all_cores" - PM_QOS_REQ_ALL_CORES is applicable to all CPU cores that are online and this would have a power impact when there are more number of CPUs. "affine_irq" - PM_QOS_REQ_AFFINE_IRQ request type shall update/apply the vote only to that CPU to which this IRQ's affinity is set to. "affine_cores" - PM_QOS_REQ_AFFINE_CORES request type is used for targets that have little cluster and will update/apply the vote to all the cores in the little cluster. The default CPU affinity mode is PM_QOS_REQ_AFFINE_IRQ to maintain backward compatibility. Example: aliases { Loading drivers/mmc/host/sdhci-msm.c +28 −0 Original line number Diff line number Diff line Loading @@ -311,6 +311,7 @@ struct sdhci_msm_pltfm_data { unsigned char sup_clk_cnt; int mpm_sdiowakeup_int; int sdiowakeup_irq; enum pm_qos_req_type cpu_affinity_type; }; struct sdhci_msm_bus_vote { Loading Loading @@ -1450,6 +1451,30 @@ out: return ret; } #ifdef CONFIG_SMP static void sdhci_msm_populate_affinity_type(struct sdhci_msm_pltfm_data *pdata, struct device_node *np) { const char *cpu_affinity = NULL; pdata->cpu_affinity_type = PM_QOS_REQ_AFFINE_IRQ; if (!of_property_read_string(np, "qcom,cpu-affinity", &cpu_affinity)) { if (!strcmp(cpu_affinity, "all_cores")) pdata->cpu_affinity_type = PM_QOS_REQ_ALL_CORES; else if (!strcmp(cpu_affinity, "affine_cores")) pdata->cpu_affinity_type = PM_QOS_REQ_AFFINE_CORES; else if (!strcmp(cpu_affinity, "affine_irq")) pdata->cpu_affinity_type = PM_QOS_REQ_AFFINE_IRQ; } } #else static void sdhci_msm_populate_affinity_type(struct sdhci_msm_pltfm_data *pdata, struct device_node *np) { } #endif /* Parse platform data */ static struct sdhci_msm_pltfm_data *sdhci_msm_populate_pdata(struct device *dev) { Loading Loading @@ -1562,6 +1587,8 @@ static struct sdhci_msm_pltfm_data *sdhci_msm_populate_pdata(struct device *dev) else pdata->mpm_sdiowakeup_int = -1; sdhci_msm_populate_affinity_type(pdata, np); return pdata; out: return NULL; Loading Loading @@ -3251,6 +3278,7 @@ static int sdhci_msm_probe(struct platform_device *pdev) msm_host->mmc->caps2 |= MMC_CAP2_NONHOTPLUG; host->cpu_dma_latency_us = msm_host->pdata->cpu_dma_latency_us; host->pm_qos_req_dma.type = msm_host->pdata->cpu_affinity_type; init_completion(&msm_host->pwr_irq_completion); Loading drivers/mmc/host/sdhci.c +7 −3 Original line number Diff line number Diff line Loading @@ -3401,7 +3401,6 @@ static int sdhci_is_adma2_64bit(struct sdhci_host *host) #ifdef CONFIG_SMP static void sdhci_set_pmqos_req_type(struct sdhci_host *host) { /* * The default request type PM_QOS_REQ_ALL_CORES is * applicable to all CPU cores that are online and Loading @@ -3409,8 +3408,13 @@ static void sdhci_set_pmqos_req_type(struct sdhci_host *host) * number of CPUs. This new PM_QOS_REQ_AFFINE_IRQ request * type shall update/apply the vote only to that CPU to * which this IRQ's affinity is set to. * PM_QOS_REQ_AFFINE_CORES request type is used for targets that have * little cluster and will update/apply the vote to all the cores in * the little cluster. */ host->pm_qos_req_dma.type = PM_QOS_REQ_AFFINE_IRQ; if (host->pm_qos_req_dma.type == PM_QOS_REQ_AFFINE_CORES) host->pm_qos_req_dma.cpus_affine.bits[0] = 0x0F; else if (host->pm_qos_req_dma.type == PM_QOS_REQ_AFFINE_IRQ) host->pm_qos_req_dma.irq = host->irq; } #else Loading Loading
Documentation/devicetree/bindings/mmc/sdhci-msm.txt +13 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,19 @@ In the following, <supply> can be vdd (flash core voltage) or vdd-io (I/O voltag - pinctrl-names - pinctrl-0, pinctrl-1,.. pinctrl-n - qcom,cpu-affinity: this is a string that specifies the pm QoS request type. The supported cpu affinity modes are : "all_cores" - PM_QOS_REQ_ALL_CORES is applicable to all CPU cores that are online and this would have a power impact when there are more number of CPUs. "affine_irq" - PM_QOS_REQ_AFFINE_IRQ request type shall update/apply the vote only to that CPU to which this IRQ's affinity is set to. "affine_cores" - PM_QOS_REQ_AFFINE_CORES request type is used for targets that have little cluster and will update/apply the vote to all the cores in the little cluster. The default CPU affinity mode is PM_QOS_REQ_AFFINE_IRQ to maintain backward compatibility. Example: aliases { Loading
drivers/mmc/host/sdhci-msm.c +28 −0 Original line number Diff line number Diff line Loading @@ -311,6 +311,7 @@ struct sdhci_msm_pltfm_data { unsigned char sup_clk_cnt; int mpm_sdiowakeup_int; int sdiowakeup_irq; enum pm_qos_req_type cpu_affinity_type; }; struct sdhci_msm_bus_vote { Loading Loading @@ -1450,6 +1451,30 @@ out: return ret; } #ifdef CONFIG_SMP static void sdhci_msm_populate_affinity_type(struct sdhci_msm_pltfm_data *pdata, struct device_node *np) { const char *cpu_affinity = NULL; pdata->cpu_affinity_type = PM_QOS_REQ_AFFINE_IRQ; if (!of_property_read_string(np, "qcom,cpu-affinity", &cpu_affinity)) { if (!strcmp(cpu_affinity, "all_cores")) pdata->cpu_affinity_type = PM_QOS_REQ_ALL_CORES; else if (!strcmp(cpu_affinity, "affine_cores")) pdata->cpu_affinity_type = PM_QOS_REQ_AFFINE_CORES; else if (!strcmp(cpu_affinity, "affine_irq")) pdata->cpu_affinity_type = PM_QOS_REQ_AFFINE_IRQ; } } #else static void sdhci_msm_populate_affinity_type(struct sdhci_msm_pltfm_data *pdata, struct device_node *np) { } #endif /* Parse platform data */ static struct sdhci_msm_pltfm_data *sdhci_msm_populate_pdata(struct device *dev) { Loading Loading @@ -1562,6 +1587,8 @@ static struct sdhci_msm_pltfm_data *sdhci_msm_populate_pdata(struct device *dev) else pdata->mpm_sdiowakeup_int = -1; sdhci_msm_populate_affinity_type(pdata, np); return pdata; out: return NULL; Loading Loading @@ -3251,6 +3278,7 @@ static int sdhci_msm_probe(struct platform_device *pdev) msm_host->mmc->caps2 |= MMC_CAP2_NONHOTPLUG; host->cpu_dma_latency_us = msm_host->pdata->cpu_dma_latency_us; host->pm_qos_req_dma.type = msm_host->pdata->cpu_affinity_type; init_completion(&msm_host->pwr_irq_completion); Loading
drivers/mmc/host/sdhci.c +7 −3 Original line number Diff line number Diff line Loading @@ -3401,7 +3401,6 @@ static int sdhci_is_adma2_64bit(struct sdhci_host *host) #ifdef CONFIG_SMP static void sdhci_set_pmqos_req_type(struct sdhci_host *host) { /* * The default request type PM_QOS_REQ_ALL_CORES is * applicable to all CPU cores that are online and Loading @@ -3409,8 +3408,13 @@ static void sdhci_set_pmqos_req_type(struct sdhci_host *host) * number of CPUs. This new PM_QOS_REQ_AFFINE_IRQ request * type shall update/apply the vote only to that CPU to * which this IRQ's affinity is set to. * PM_QOS_REQ_AFFINE_CORES request type is used for targets that have * little cluster and will update/apply the vote to all the cores in * the little cluster. */ host->pm_qos_req_dma.type = PM_QOS_REQ_AFFINE_IRQ; if (host->pm_qos_req_dma.type == PM_QOS_REQ_AFFINE_CORES) host->pm_qos_req_dma.cpus_affine.bits[0] = 0x0F; else if (host->pm_qos_req_dma.type == PM_QOS_REQ_AFFINE_IRQ) host->pm_qos_req_dma.irq = host->irq; } #else Loading