Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1408855 > unrolled thread
| Started by | Peter Ujfalusi <peter.ujfalusi@ti.com> |
|---|---|
| First post | 2016-05-30 10:30 +0200 |
| Last post | 2016-05-30 10:30 +0200 |
| Articles | 4 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH v5 0/7] ARM/ASoC: OMAP3: Fix McBSP2/3 sidetone support Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-05-30 10:30 +0200
[PATCH v5 7/7] ARM: OMAP2+: McBSP: Remove the old iclk allow/deny idle code Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-05-30 10:30 +0200
[PATCH v5 5/7] ASoC: omap-mcbsp: Rename omap_mcbsp_sysfs_remove() to omap_mcbsp_cleanup() Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-05-30 10:30 +0200
[PATCH v5 2/7] ARM: OMAP3: hwmod data: Fix McBSP2/3 sidetone data Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-05-30 10:30 +0200
| From | Peter Ujfalusi <peter.ujfalusi@ti.com> |
|---|---|
| Date | 2016-05-30 10:30 +0200 |
| Subject | [PATCH v5 0/7] ARM/ASoC: OMAP3: Fix McBSP2/3 sidetone support |
| Message-ID | <rEqKd-1Gi-5@gated-at.bofh.it> |
Hi,
Changes since v4:
- Moved DTS patch as the first in the series
- rebased on top of 4.7-rc1
Changes since v3:
- Rebased on next-20160525 [1] to apply cleanly
- Fixed subject line for patch5
- Added Mark's acked-by to the ASoC patches
[1] "ASoC: omap-mcbsp: Enable/disable sidetone block auto clock
gating for omap3" is gone missing from linux-next - it was in next-20160517 and
I'm not sure when it got dropped.
Tony: since Paul did not replied to the series, I'm sending the v4 now, I hope
he will have time to look at this.
Commit message from v3:
Based on the ongoing discussion on v2 (ARM: OMAP3: Fix McBSP2/3 hwmod setup for
sidetone) I have dropped the removal of the sidetone hwmod and only corrected
it. The series now includes all related changes needed to have correct sidetone
support whenever we boot in legacy or in DT mode.
This time the ASoC part have dependency on earlier patches so they can not be
applied separately.
Regards,
Peter
---
Peter Ujfalusi (7):
ARM: dts: omap3: Add clocks to McBSP nodes
ARM: OMAP3: hwmod data: Fix McBSP2/3 sidetone data
ARM: OMAP3: McBSP: New callback for McBSP2/3 ICLK idle configuration
ARM: OMAP3: pdata-quirks: Add support for McBSP2/3 sidetone handling
ASoC: omap-mcbsp: Rename omap_mcbsp_sysfs_remove() to
omap_mcbsp_cleanup()
ASoC: omap-mcbsp: sidetone: Use the new callback for iclk handling
ARM: OMAP2+: McBSP: Remove the old iclk allow/deny idle code
arch/arm/boot/dts/omap3.dtsi | 10 ++++++++++
arch/arm/mach-omap2/mcbsp.c | 31 ++++++++++++++++-------------
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 24 ++++------------------
arch/arm/mach-omap2/pdata-quirks.c | 18 +++++++++++++++++
include/linux/platform_data/asoc-ti-mcbsp.h | 4 +++-
sound/soc/omap/mcbsp.c | 21 +++++++++++++------
sound/soc/omap/mcbsp.h | 3 ++-
sound/soc/omap/omap-mcbsp.c | 5 ++++-
8 files changed, 73 insertions(+), 43 deletions(-)
--
2.8.3
[toc] | [next] | [standalone]
| From | Peter Ujfalusi <peter.ujfalusi@ti.com> |
|---|---|
| Date | 2016-05-30 10:30 +0200 |
| Subject | [PATCH v5 7/7] ARM: OMAP2+: McBSP: Remove the old iclk allow/deny idle code |
| Message-ID | <rEqKe-1Gi-47@gated-at.bofh.it> |
| In reply to | #1408855 |
The new pdata callback (force_ick_on) is now used by the driver and the old
callback related code can be removed.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
arch/arm/mach-omap2/mcbsp.c | 18 ------------------
include/linux/platform_data/asoc-ti-mcbsp.h | 1 -
2 files changed, 19 deletions(-)
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
index edf4f41c0135..fc04be74e064 100644
--- a/arch/arm/mach-omap2/mcbsp.c
+++ b/arch/arm/mach-omap2/mcbsp.c
@@ -34,20 +34,6 @@
#include "cm3xxx.h"
#include "cm-regbits-34xx.h"
-static struct clk *mcbsp_iclks[5];
-
-static int omap3_enable_st_clock(unsigned int id, bool enable)
-{
- /*
- * Sidetone uses McBSP ICLK - which must not idle when sidetones
- * are enabled or sidetones start sounding ugly.
- */
- if (enable)
- return omap2_clk_deny_idle(mcbsp_iclks[id]);
- else
- return omap2_clk_allow_idle(mcbsp_iclks[id]);
-}
-
static int omap3_mcbsp_force_ick_on(struct clk *clk, bool force_on)
{
if (!clk)
@@ -75,7 +61,6 @@ static int __init omap_init_mcbsp(struct omap_hwmod *oh, void *unused)
struct omap_hwmod *oh_device[2];
struct omap_mcbsp_platform_data *pdata = NULL;
struct platform_device *pdev;
- char clk_name[11];
sscanf(oh->name, "mcbsp%d", &id);
@@ -116,10 +101,7 @@ static int __init omap_init_mcbsp(struct omap_hwmod *oh, void *unused)
if (oh->dev_attr) {
oh_device[1] = omap_hwmod_lookup((
(struct omap_mcbsp_dev_attr *)(oh->dev_attr))->sidetone);
- pdata->enable_st_clock = omap3_enable_st_clock;
pdata->force_ick_on = omap3_mcbsp_force_ick_on;
- sprintf(clk_name, "mcbsp%d_ick", id);
- mcbsp_iclks[id] = clk_get(NULL, clk_name);
count++;
}
pdev = omap_device_build_ss(name, id, oh_device, count, pdata,
diff --git a/include/linux/platform_data/asoc-ti-mcbsp.h b/include/linux/platform_data/asoc-ti-mcbsp.h
index 5530971abf4d..e684543254f3 100644
--- a/include/linux/platform_data/asoc-ti-mcbsp.h
+++ b/include/linux/platform_data/asoc-ti-mcbsp.h
@@ -44,7 +44,6 @@ struct omap_mcbsp_platform_data {
/* McBSP platform and instance specific features */
bool has_wakeup; /* Wakeup capability */
bool has_ccr; /* Transceiver has configuration control registers */
- int (*enable_st_clock)(unsigned int, bool);
int (*force_ick_on)(struct clk *clk, bool force_on);
};
--
2.8.3
[toc] | [prev] | [next] | [standalone]
| From | Peter Ujfalusi <peter.ujfalusi@ti.com> |
|---|---|
| Date | 2016-05-30 10:30 +0200 |
| Subject | [PATCH v5 5/7] ASoC: omap-mcbsp: Rename omap_mcbsp_sysfs_remove() to omap_mcbsp_cleanup() |
| Message-ID | <rEqKe-1Gi-25@gated-at.bofh.it> |
| In reply to | #1408855 |
The function will do more then removing the sysfs files in the future.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@kernel.org>
---
sound/soc/omap/mcbsp.c | 2 +-
sound/soc/omap/mcbsp.h | 2 +-
sound/soc/omap/omap-mcbsp.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
index 4a16e778966b..ace73b97769f 100644
--- a/sound/soc/omap/mcbsp.c
+++ b/sound/soc/omap/mcbsp.c
@@ -1088,7 +1088,7 @@ 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);
diff --git a/sound/soc/omap/mcbsp.h b/sound/soc/omap/mcbsp.h
index 96d1b086bcf8..ce6cbbf923a4 100644
--- a/sound/soc/omap/mcbsp.h
+++ b/sound/soc/omap/mcbsp.h
@@ -349,6 +349,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 fd99d89de6a8..db07debb4a9c 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -832,7 +832,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);
--
2.8.3
[toc] | [prev] | [next] | [standalone]
| From | Peter Ujfalusi <peter.ujfalusi@ti.com> |
|---|---|
| Date | 2016-05-30 10:30 +0200 |
| Subject | [PATCH v5 2/7] ARM: OMAP3: hwmod data: Fix McBSP2/3 sidetone data |
| Message-ID | <rEqKe-1Gi-41@gated-at.bofh.it> |
| In reply to | #1408855 |
The McBSPLP's sidetone main clock is the McBSPLP's ICLK, not FCLK as the
sidetone only receives the ICLK from the main McBSP module.
Since the McBSP and sidetone is using the very same clock from PRCM level
the sidetone must not have the prcm section to check the clock status since
the sidetone is only used when McBSP is already configured.
If two separate hwmods looking at the same bit and they would use
pm_runtime in nested way (as it must happen with McBSP and it's ST module)
the hwmod would warn, because the idlest will not match what it is expected
after enable/disable of the clocks.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 24 ++++--------------------
1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 9869a75c5d96..d72ee6185d5e 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -1322,16 +1322,8 @@ static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
.name = "mcbsp2_sidetone",
.class = &omap3xxx_mcbsp_sidetone_hwmod_class,
.mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs,
- .main_clk = "mcbsp2_fck",
- .prcm = {
- .omap2 = {
- .prcm_reg_id = 1,
- .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
- .module_offs = OMAP3430_PER_MOD,
- .idlest_reg_id = 1,
- .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
- },
- },
+ .main_clk = "mcbsp2_ick",
+ .flags = HWMOD_NO_IDLEST,
};
/* mcbsp3_sidetone */
@@ -1344,16 +1336,8 @@ static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
.name = "mcbsp3_sidetone",
.class = &omap3xxx_mcbsp_sidetone_hwmod_class,
.mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs,
- .main_clk = "mcbsp3_fck",
- .prcm = {
- .omap2 = {
- .prcm_reg_id = 1,
- .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
- .module_offs = OMAP3430_PER_MOD,
- .idlest_reg_id = 1,
- .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
- },
- },
+ .main_clk = "mcbsp3_ick",
+ .flags = HWMOD_NO_IDLEST,
};
/* SR common */
--
2.8.3
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web