Skip to content

Commit

Permalink
compilation fix #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmed Hady committed Jul 30, 2018
1 parent 579a025 commit bd86e5e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 176 deletions.
2 changes: 1 addition & 1 deletion drivers/cpufreq/cpufreq_interactive.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ static int cpufreq_interactive_speedchange_task(void *data)
unsigned int j;
unsigned int max_freq = 0;
struct cpufreq_interactive_cpuinfo *pjcpu;
u64 hvt;
u64 hvt = 0;

pcpu = &per_cpu(cpuinfo, cpu);
if (!down_read_trylock(&pcpu->enable_sem))
Expand Down
7 changes: 0 additions & 7 deletions drivers/cpuidle/lpm-workarounds.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

static struct work_struct lpm_wa_work;
static struct workqueue_struct *lpm_wa_wq;
static bool lpm_wa_cx_turbo_unvote;
static bool skip_l2_spm;
static bool enable_dynamic_clock_gating;
static bool is_l1_l2_gcc_secure;
Expand Down Expand Up @@ -140,12 +139,6 @@ static void process_lpm_workarounds(struct work_struct *w)
}
}

bool lpm_wa_get_skip_l2_spm(void)
{
return skip_l2_spm;
}
EXPORT_SYMBOL(lpm_wa_get_skip_l2_spm);

static ssize_t store_clock_gating_enabled(struct kobject *kobj,
struct kobj_attribute *attr, const char *buf, size_t count)
{
Expand Down
163 changes: 0 additions & 163 deletions drivers/mmc/host/sdhci-msm.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ struct sdhci_msm_pltfm_data {
u32 *cpu_dma_latency_us;
unsigned int cpu_dma_latency_tbl_sz;
u8 drv_types;
u32 *cpu_dma_latency_us;
int status_gpio; /* card detection GPIO that is configured as IRQ */
struct sdhci_msm_bus_voting_data *voting_data;
u32 *sup_clk_table;
Expand Down Expand Up @@ -1660,122 +1659,6 @@ static int sdhci_msm_populate_qos(struct device *dev,
return -EINVAL;
}
/* Parse platform data */
static struct sdhci_msm_pltfm_data *sdhci_msm_populate_pdata(struct device *dev,
struct sdhci_host *host)
{
struct device_node *np = dev->of_node;
u32 drv_types = 0;
u32 prop_val = 0;
bool skip_qos_from_dt = false;
int qos_planes = 0, i;
char *qos_planes_name[SDHCI_QOS_MAX_POLICY] = {
"qcom,cpu-dma-latency-us",
"qcom,cpu-dma-latency-us-r",
"qcom,cpu-dma-latency-us-w"};
char *qos_affinity_name[SDHCI_QOS_MAX_POLICY] = {
"qcom,cpu-affinity",
"qcom,cpu-affinity-r",
"qcom,cpu-affinity-w"};
char *qos_affinity_mask[SDHCI_QOS_MAX_POLICY] = {
"qcom,cpu-affinity-mask",
"qcom,cpu-affinity-mask-r",
"qcom,cpu-affinity-mask-w"};

if (of_property_read_u32(np, "qcom,qos-planes", &qos_planes))
qos_planes = SDHCI_QOS_MAX_POLICY;

if (qos_planes > SDHCI_QOS_MAX_POLICY)
goto out;
}

pdata->status_gpio = of_get_named_gpio_flags(np, "cd-gpios", 0, &flags);
if (gpio_is_valid(pdata->status_gpio) & !(flags & OF_GPIO_ACTIVE_LOW))
pdata->caps2 |= MMC_CAP2_CD_ACTIVE_HIGH;

of_property_read_u32(np, "qcom,bus-width", &bus_width);
if (bus_width == 8)
pdata->mmc_bus_width = MMC_CAP_8_BIT_DATA;
else if (bus_width == 4)
pdata->mmc_bus_width = MMC_CAP_4_BIT_DATA;
else {
dev_notice(dev, "invalid bus-width, default to 1-bit mode\n");
pdata->mmc_bus_width = 0;
}
if (sdhci_msm_populate_qos(dev, pdata, host))
goto out;

of_property_read_u32(np, "qcom,drv-types", &drv_types);
#if defined(CONFIG_MMC_SDHCI_MSM_DEBUG)
if (debug_drv_types)
drv_types = debug_drv_types;
#endif
if (drv_types) {
if (drv_types & MMC_DRIVER_TYPE_1)
pdata->caps |= MMC_CAP_DRIVER_TYPE_A;
if (drv_types & MMC_DRIVER_TYPE_2)
pdata->caps |= MMC_CAP_DRIVER_TYPE_C;
if (drv_types & MMC_DRIVER_TYPE_3)
pdata->caps |= MMC_CAP_DRIVER_TYPE_D;
if (drv_types & MMC_DRIVER_TYPE_4)
pdata->caps2 |= MMC_CAP2_DRIVER_TYPE_4;

/* More caps bits may be set by sdhci, so don't forget. */
pdata->drv_types = drv_types;
}

for (i = 0; i < qos_planes; i++) {
if (of_get_property(np, qos_planes_name[i],
&prop_val)) {

pdata->cpu_dma_latency_tbl_sz =
prop_val/sizeof(*pdata->cpu_dma_latency_us);

if (!(pdata->cpu_dma_latency_tbl_sz == 1 ||
pdata->cpu_dma_latency_tbl_sz == 3)) {
dev_warn(dev, "incorrect Qos param passed from DT: %d\n",
pdata->cpu_dma_latency_tbl_sz);
skip_qos_from_dt = true;
} else {
pdata->cpu_dma_latency_us = devm_kzalloc(dev,
sizeof(*pdata->cpu_dma_latency_us) *
pdata->cpu_dma_latency_tbl_sz,
GFP_KERNEL);
if (!pdata->cpu_dma_latency_us)
goto out;
if (of_property_read_u32_array(np,
qos_planes_name[i],
pdata->cpu_dma_latency_us,
pdata->cpu_dma_latency_tbl_sz)) {
dev_err(dev, "failed to parse cpu-dma-latency\n");
goto out;
}
}
} else {
dev_info(dev, "no %s property found\n",
qos_planes_name[i]);
skip_qos_from_dt = true;
}

if (skip_qos_from_dt) {
pdata->cpu_dma_latency_tbl_sz = 1;
pdata->cpu_dma_latency_us = devm_kzalloc(dev,
sizeof(*pdata->cpu_dma_latency_us) *
pdata->cpu_dma_latency_tbl_sz,
GFP_KERNEL);
if (!pdata->cpu_dma_latency_us)
goto out;
pdata->cpu_dma_latency_us[0] = MSM_MMC_DEFAULT_CPU_DMA_LATENCY;
}
sdhci_msm_populate_affinity(pdata, np,
qos_affinity_name[i], qos_affinity_mask[i]);
sdhci_msm_update_host_qos_data(pdata, host, i);
}

return 0;
out:
return -EINVAL;
}
/* Parse platform data */
static struct sdhci_msm_pltfm_data *sdhci_msm_populate_pdata(struct device *dev,
struct sdhci_host *host)
{
Expand Down Expand Up @@ -1912,11 +1795,6 @@ static struct sdhci_msm_pltfm_data *sdhci_msm_populate_pdata(struct device *dev,
else
pdata->mpm_sdiowakeup_int = -1;

if (of_property_read_bool(np, "qcom,wakeup-on-idle"))
host->mmc->wakeup_on_idle = true;

sdhci_msm_populate_affinity(pdata, np);

if (of_get_property(np, "qcom,emmc", NULL))
pdata->is_emmc = true;

Expand Down Expand Up @@ -3382,47 +3260,6 @@ void sdhci_msm_dump_vendor_regs(struct sdhci_host *host)
CORE_TESTBUS_CONFIG);
}

void sdhci_msm_reset_workaround(struct sdhci_host *host, u32 enable)
{
u32 vendor_func2;
unsigned long timeout;

vendor_func2 = readl_relaxed(host->ioaddr + CORE_VENDOR_SPEC_FUNC2);

if (enable) {
writel_relaxed(vendor_func2 | HC_SW_RST_REQ, host->ioaddr +
CORE_VENDOR_SPEC_FUNC2);
timeout = 10000;
while (readl_relaxed(host->ioaddr + CORE_VENDOR_SPEC_FUNC2) &
HC_SW_RST_REQ) {
if (timeout == 0) {
pr_info("%s: Applying wait idle disable workaround\n",
mmc_hostname(host->mmc));
/*
* Apply the reset workaround to not wait for
* pending data transfers on AXI before
* resetting the controller. This could be
* risky if the transfers were stuck on the
* AXI bus.
*/
vendor_func2 = readl_relaxed(host->ioaddr +
CORE_VENDOR_SPEC_FUNC2);
writel_relaxed(vendor_func2 |
HC_SW_RST_WAIT_IDLE_DIS,
host->ioaddr + CORE_VENDOR_SPEC_FUNC2);
host->reset_wa_t = ktime_get();
return;
}
timeout--;
udelay(10);
}
pr_info("%s: waiting for SW_RST_REQ is successful\n",
mmc_hostname(host->mmc));
} else {
writel_relaxed(vendor_func2 & ~HC_SW_RST_WAIT_IDLE_DIS,
host->ioaddr + CORE_VENDOR_SPEC_FUNC2);
}
}
#if defined(CONFIG_MMC_SDHCI_MSM_DEBUG)
static char *debugfs_pull[] = {
"pad_pull_clk", "pad_pull_cmd", "pad_pull_dat", "pad_pull_rclk", NULL };
Expand Down
1 change: 0 additions & 1 deletion include/uapi/linux/rtnetlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ enum rtattr_type_t {
RTA_MARK,
RTA_UID,
RTA_MFC_STATS,
RTA_UID,
__RTA_MAX
};

Expand Down
12 changes: 9 additions & 3 deletions sound/soc/codecs/fsa8500-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* 02111-1307, USA
*/

#ifndef __FSA8500_CORE_H__
//#ifndef __FSA8500_CORE_H__
#define __FSA8500_CORE_H__

#include <linux/ioctl.h>
Expand Down Expand Up @@ -59,11 +59,17 @@
#define FSA8500_MAX_REGISTER_VAL 0x17

/* Reset bits */
#define FSA8500_RESET 0x03
#define FSA8500_RESET_GLOBAL 0x01
#define FSA8500_RESET_DETECT 0x02
#define FSA8500_RESET (FSA8500_RESET_GLOBAL| \
FSA8500_RESET_DETECT)

/* Disable UART detection bit */
#define FSA8500_UART_OFF 0x08

/* Disable UART detection bit */
#define FSA8500_LINT_OFF 0x02

/* amp states */
#define FSA8500_AMP_DISABLED 0
#define FSA8500_AMP_ENABLED 1
Expand All @@ -79,4 +85,4 @@ extern int fsa8500_hs_detect(struct snd_soc_codec *codec);

extern void fsa8500_hp_event(int event);
extern void fsa8500_mic_event(int event);
#endif /* __FSA8500_CORE_H__ */
//#endif /* __FSA8500_CORE_H__ */
2 changes: 1 addition & 1 deletion sound/soc/msm/msm8x16.c
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ static int msm_audrx_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_sync(dapm);

#ifdef CONFIG_SND_SOC_FSA8500
ret = fsa8500_hs_detect(codec);
//ret = fsa8500_hs_detect(codec);
if (!ret) {
pr_info("%s:fsa8500 hs det mechanism is used\n", __func__);
} else {
Expand Down

0 comments on commit bd86e5e

Please sign in to comment.