diff options
author | Olof Johansson <olof@lixom.net> | 2016-07-05 22:22:58 -0700 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2016-07-05 22:22:58 -0700 |
commit | df92d2e39313d0af510cacef27e82be6a002b889 (patch) | |
tree | 8eae9f5680e114ec79d751331c7605e0a172323e /sound | |
parent | fa06f54a1837428e1b67ca3947fa939b7227c668 (diff) | |
parent | 44e7475d40eb26b8d3a6e2b2f7a5f12a5fe0942e (diff) | |
download | op-kernel-dev-df92d2e39313d0af510cacef27e82be6a002b889.zip op-kernel-dev-df92d2e39313d0af510cacef27e82be6a002b889.tar.gz |
Merge tag 'omap-for-v4.8/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc
SoC related changes for omaps for v4.8 merge window:
- A series of DSS platform_data fixes to prepare for DSS driver changes
- Add tblck clck aliases for PWM
- A series of trivial spelling corrections
- Remove bogus eQEP, ePWM and eCAP hwmod entries
- A series of McBSP sidetone fixes
- Remove QSPI and DSS addresses from hwmod, these come from dts
- Fix RSTST register offset for pruss
- Make ti81xx_rtc_hwmod static
- Remove wrongly defined RSTST offset for PER Domain, note
that the subject for this one wrongly has "dts" in the
subject
- Add support for omap5 and dra7 workaround for 801819
- A series of patches to make kexec work for SMP omaps
* tag 'omap-for-v4.8/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (30 commits)
ARM: OMAP2+: Fix build if CONFIG_SMP is not set
ARM: OMAP4+: Allow kexec on SMP variants
ARM: OMAP4+: Reset CPU1 properly for kexec
ARM: OMAP4+: Prevent CPU1 related hang with kexec
ARM: OMAP4+: Initialize SAR RAM base early for proper CPU1 reset for kexec
ARM: dts: am43xx: Remove wrongly defined RSTST offset for PER Domain
ARM: OMAP: make ti81xx_rtc_hwmod static
ARM: AM43XX: hwmod: Fix RSTST register offset for pruss
ARM: DRA7: hwmod: remove DSS addresses from hwmod
ARM: DRA7: hwmod: Remove QSPI address space entry from hwmod
ARM: OMAP2+: McBSP: Remove the old iclk allow/deny idle code
ASoC: omap-mcbsp: sidetone: Use the new callback for iclk handling
ASoC: omap-mcbsp: Rename omap_mcbsp_sysfs_remove() to omap_mcbsp_cleanup()
ARM: OMAP3: pdata-quirks: Add support for McBSP2/3 sidetone handling
ARM: OMAP3: McBSP: New callback for McBSP2/3 ICLK idle configuration
ARM: OMAP3: hwmod data: Fix McBSP2/3 sidetone data
ARM: AM335x/AM437x: hwmod: Remove eQEP, ePWM and eCAP hwmod entries
ARM: OMAP2+: Fix typo in sdrc.h
ARM: OMAP2+: Fix typo in omap_device.c
ARM: OMAP2+: Fix typo in omap4-common.c
...
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/omap/mcbsp.c | 21 | ||||
-rw-r--r-- | sound/soc/omap/mcbsp.h | 3 | ||||
-rw-r--r-- | sound/soc/omap/omap-mcbsp.c | 5 |
3 files changed, 21 insertions, 8 deletions
diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c index 4a16e77..76ce331 100644 --- a/sound/soc/omap/mcbsp.c +++ b/sound/soc/omap/mcbsp.c @@ -257,8 +257,8 @@ static void omap_st_on(struct omap_mcbsp *mcbsp) { unsigned int w; - if (mcbsp->pdata->enable_st_clock) - mcbsp->pdata->enable_st_clock(mcbsp->id, 1); + if (mcbsp->pdata->force_ick_on) + mcbsp->pdata->force_ick_on(mcbsp->st_data->mcbsp_iclk, true); /* Disable Sidetone clock auto-gating for normal operation */ w = MCBSP_ST_READ(mcbsp, SYSCONFIG); @@ -287,8 +287,8 @@ static void omap_st_off(struct omap_mcbsp *mcbsp) w = MCBSP_ST_READ(mcbsp, SYSCONFIG); MCBSP_ST_WRITE(mcbsp, SYSCONFIG, w | ST_AUTOIDLE); - if (mcbsp->pdata->enable_st_clock) - mcbsp->pdata->enable_st_clock(mcbsp->id, 0); + if (mcbsp->pdata->force_ick_on) + mcbsp->pdata->force_ick_on(mcbsp->st_data->mcbsp_iclk, false); } static void omap_st_fir_write(struct omap_mcbsp *mcbsp, s16 *fir) @@ -946,6 +946,13 @@ static int omap_st_add(struct omap_mcbsp *mcbsp, struct resource *res) if (!st_data) return -ENOMEM; + st_data->mcbsp_iclk = clk_get(mcbsp->dev, "ick"); + if (IS_ERR(st_data->mcbsp_iclk)) { + dev_warn(mcbsp->dev, + "Failed to get ick, sidetone might be broken\n"); + st_data->mcbsp_iclk = NULL; + } + st_data->io_base_st = devm_ioremap(mcbsp->dev, res->start, resource_size(res)); if (!st_data->io_base_st) @@ -1088,11 +1095,13 @@ err_thres: return ret; } -void omap_mcbsp_sysfs_remove(struct omap_mcbsp *mcbsp) +void omap_mcbsp_cleanup(struct omap_mcbsp *mcbsp) { if (mcbsp->pdata->buffer_size) sysfs_remove_group(&mcbsp->dev->kobj, &additional_attr_group); - if (mcbsp->st_data) + if (mcbsp->st_data) { sysfs_remove_group(&mcbsp->dev->kobj, &sidetone_attr_group); + clk_put(mcbsp->st_data->mcbsp_iclk); + } } diff --git a/sound/soc/omap/mcbsp.h b/sound/soc/omap/mcbsp.h index 96d1b08..61e93b1 100644 --- a/sound/soc/omap/mcbsp.h +++ b/sound/soc/omap/mcbsp.h @@ -280,6 +280,7 @@ struct omap_mcbsp_reg_cfg { struct omap_mcbsp_st_data { void __iomem *io_base_st; + struct clk *mcbsp_iclk; bool running; bool enabled; s16 taps[128]; /* Sidetone filter coefficients */ @@ -349,6 +350,6 @@ int omap_st_disable(struct omap_mcbsp *mcbsp); int omap_st_is_enabled(struct omap_mcbsp *mcbsp); int omap_mcbsp_init(struct platform_device *pdev); -void omap_mcbsp_sysfs_remove(struct omap_mcbsp *mcbsp); +void omap_mcbsp_cleanup(struct omap_mcbsp *mcbsp); #endif /* __ASOC_MCBSP_H */ diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index fd99d89..d018e96 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c @@ -788,6 +788,7 @@ static int asoc_mcbsp_probe(struct platform_device *pdev) match = of_match_device(omap_mcbsp_of_match, &pdev->dev); if (match) { struct device_node *node = pdev->dev.of_node; + struct omap_mcbsp_platform_data *pdata_quirk = pdata; int buffer_size; pdata = devm_kzalloc(&pdev->dev, @@ -799,6 +800,8 @@ static int asoc_mcbsp_probe(struct platform_device *pdev) memcpy(pdata, match->data, sizeof(*pdata)); if (!of_property_read_u32(node, "ti,buffer-size", &buffer_size)) pdata->buffer_size = buffer_size; + if (pdata_quirk) + pdata->force_ick_on = pdata_quirk->force_ick_on; } else if (!pdata) { dev_err(&pdev->dev, "missing platform data.\n"); return -EINVAL; @@ -832,7 +835,7 @@ static int asoc_mcbsp_remove(struct platform_device *pdev) if (mcbsp->pdata->ops && mcbsp->pdata->ops->free) mcbsp->pdata->ops->free(mcbsp->id); - omap_mcbsp_sysfs_remove(mcbsp); + omap_mcbsp_cleanup(mcbsp); clk_put(mcbsp->fclk); |