summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2016-07-06 01:22:58 -0400
committerOlof Johansson <olof@lixom.net>2016-07-06 01:22:58 -0400
commitdf92d2e39313d0af510cacef27e82be6a002b889 (patch)
tree8eae9f5680e114ec79d751331c7605e0a172323e /sound
parentfa06f54a1837428e1b67ca3947fa939b7227c668 (diff)
parent44e7475d40eb26b8d3a6e2b2f7a5f12a5fe0942e (diff)
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.c21
-rw-r--r--sound/soc/omap/mcbsp.h3
-rw-r--r--sound/soc/omap/omap-mcbsp.c5
3 files changed, 21 insertions, 8 deletions
diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
index 4a16e778966b..76ce33199bf9 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)
257{ 257{
258 unsigned int w; 258 unsigned int w;
259 259
260 if (mcbsp->pdata->enable_st_clock) 260 if (mcbsp->pdata->force_ick_on)
261 mcbsp->pdata->enable_st_clock(mcbsp->id, 1); 261 mcbsp->pdata->force_ick_on(mcbsp->st_data->mcbsp_iclk, true);
262 262
263 /* Disable Sidetone clock auto-gating for normal operation */ 263 /* Disable Sidetone clock auto-gating for normal operation */
264 w = MCBSP_ST_READ(mcbsp, SYSCONFIG); 264 w = MCBSP_ST_READ(mcbsp, SYSCONFIG);
@@ -287,8 +287,8 @@ static void omap_st_off(struct omap_mcbsp *mcbsp)
287 w = MCBSP_ST_READ(mcbsp, SYSCONFIG); 287 w = MCBSP_ST_READ(mcbsp, SYSCONFIG);
288 MCBSP_ST_WRITE(mcbsp, SYSCONFIG, w | ST_AUTOIDLE); 288 MCBSP_ST_WRITE(mcbsp, SYSCONFIG, w | ST_AUTOIDLE);
289 289
290 if (mcbsp->pdata->enable_st_clock) 290 if (mcbsp->pdata->force_ick_on)
291 mcbsp->pdata->enable_st_clock(mcbsp->id, 0); 291 mcbsp->pdata->force_ick_on(mcbsp->st_data->mcbsp_iclk, false);
292} 292}
293 293
294static void omap_st_fir_write(struct omap_mcbsp *mcbsp, s16 *fir) 294static 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)
946 if (!st_data) 946 if (!st_data)
947 return -ENOMEM; 947 return -ENOMEM;
948 948
949 st_data->mcbsp_iclk = clk_get(mcbsp->dev, "ick");
950 if (IS_ERR(st_data->mcbsp_iclk)) {
951 dev_warn(mcbsp->dev,
952 "Failed to get ick, sidetone might be broken\n");
953 st_data->mcbsp_iclk = NULL;
954 }
955
949 st_data->io_base_st = devm_ioremap(mcbsp->dev, res->start, 956 st_data->io_base_st = devm_ioremap(mcbsp->dev, res->start,
950 resource_size(res)); 957 resource_size(res));
951 if (!st_data->io_base_st) 958 if (!st_data->io_base_st)
@@ -1088,11 +1095,13 @@ err_thres:
1088 return ret; 1095 return ret;
1089} 1096}
1090 1097
1091void omap_mcbsp_sysfs_remove(struct omap_mcbsp *mcbsp) 1098void omap_mcbsp_cleanup(struct omap_mcbsp *mcbsp)
1092{ 1099{
1093 if (mcbsp->pdata->buffer_size) 1100 if (mcbsp->pdata->buffer_size)
1094 sysfs_remove_group(&mcbsp->dev->kobj, &additional_attr_group); 1101 sysfs_remove_group(&mcbsp->dev->kobj, &additional_attr_group);
1095 1102
1096 if (mcbsp->st_data) 1103 if (mcbsp->st_data) {
1097 sysfs_remove_group(&mcbsp->dev->kobj, &sidetone_attr_group); 1104 sysfs_remove_group(&mcbsp->dev->kobj, &sidetone_attr_group);
1105 clk_put(mcbsp->st_data->mcbsp_iclk);
1106 }
1098} 1107}
diff --git a/sound/soc/omap/mcbsp.h b/sound/soc/omap/mcbsp.h
index 96d1b086bcf8..61e93b1c185d 100644
--- a/sound/soc/omap/mcbsp.h
+++ b/sound/soc/omap/mcbsp.h
@@ -280,6 +280,7 @@ struct omap_mcbsp_reg_cfg {
280 280
281struct omap_mcbsp_st_data { 281struct omap_mcbsp_st_data {
282 void __iomem *io_base_st; 282 void __iomem *io_base_st;
283 struct clk *mcbsp_iclk;
283 bool running; 284 bool running;
284 bool enabled; 285 bool enabled;
285 s16 taps[128]; /* Sidetone filter coefficients */ 286 s16 taps[128]; /* Sidetone filter coefficients */
@@ -349,6 +350,6 @@ int omap_st_disable(struct omap_mcbsp *mcbsp);
349int omap_st_is_enabled(struct omap_mcbsp *mcbsp); 350int omap_st_is_enabled(struct omap_mcbsp *mcbsp);
350 351
351int omap_mcbsp_init(struct platform_device *pdev); 352int omap_mcbsp_init(struct platform_device *pdev);
352void omap_mcbsp_sysfs_remove(struct omap_mcbsp *mcbsp); 353void omap_mcbsp_cleanup(struct omap_mcbsp *mcbsp);
353 354
354#endif /* __ASOC_MCBSP_H */ 355#endif /* __ASOC_MCBSP_H */
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index fd99d89de6a8..d018e966e533 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)
788 match = of_match_device(omap_mcbsp_of_match, &pdev->dev); 788 match = of_match_device(omap_mcbsp_of_match, &pdev->dev);
789 if (match) { 789 if (match) {
790 struct device_node *node = pdev->dev.of_node; 790 struct device_node *node = pdev->dev.of_node;
791 struct omap_mcbsp_platform_data *pdata_quirk = pdata;
791 int buffer_size; 792 int buffer_size;
792 793
793 pdata = devm_kzalloc(&pdev->dev, 794 pdata = devm_kzalloc(&pdev->dev,
@@ -799,6 +800,8 @@ static int asoc_mcbsp_probe(struct platform_device *pdev)
799 memcpy(pdata, match->data, sizeof(*pdata)); 800 memcpy(pdata, match->data, sizeof(*pdata));
800 if (!of_property_read_u32(node, "ti,buffer-size", &buffer_size)) 801 if (!of_property_read_u32(node, "ti,buffer-size", &buffer_size))
801 pdata->buffer_size = buffer_size; 802 pdata->buffer_size = buffer_size;
803 if (pdata_quirk)
804 pdata->force_ick_on = pdata_quirk->force_ick_on;
802 } else if (!pdata) { 805 } else if (!pdata) {
803 dev_err(&pdev->dev, "missing platform data.\n"); 806 dev_err(&pdev->dev, "missing platform data.\n");
804 return -EINVAL; 807 return -EINVAL;
@@ -832,7 +835,7 @@ static int asoc_mcbsp_remove(struct platform_device *pdev)
832 if (mcbsp->pdata->ops && mcbsp->pdata->ops->free) 835 if (mcbsp->pdata->ops && mcbsp->pdata->ops->free)
833 mcbsp->pdata->ops->free(mcbsp->id); 836 mcbsp->pdata->ops->free(mcbsp->id);
834 837
835 omap_mcbsp_sysfs_remove(mcbsp); 838 omap_mcbsp_cleanup(mcbsp);
836 839
837 clk_put(mcbsp->fclk); 840 clk_put(mcbsp->fclk);
838 841