aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2011-10-25 21:36:12 -0700
committerZiyann <jaraidaniel@gmail.com>2014-10-01 12:55:42 +0200
commit46d19d00254362566a9ad81e5bd1ee50e768156f (patch)
tree125d87f3d1fbf9742dbed693575835c588b6e912
parentf02d476e197fd2405d78718480fae7358a803e4b (diff)
downloadkernel_samsung_tuna-46d19d00254362566a9ad81e5bd1ee50e768156f.zip
kernel_samsung_tuna-46d19d00254362566a9ad81e5bd1ee50e768156f.tar.gz
kernel_samsung_tuna-46d19d00254362566a9ad81e5bd1ee50e768156f.tar.bz2
plat-omap: mcbsp: Move WAKEUPEN configuration to omap_mcbsp_config
Configure the WAKEUPEN register at the same time we configure the rest of the McBSP registers. In case of OMAP2+, if the sysclock has been reconfigured we are going to disable McBSP for the duration of the clock change, which will reset the McBSP registers. The WAKEUPEN register need to be configured later, so the changes will be effective during runtime. Change-Id: I4085feb2c73a71856aaca47f3ecce06518ffb401 Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
-rw-r--r--arch/arm/plat-omap/mcbsp.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index e02baa4..eb1ae5b 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -225,6 +225,7 @@ void omap_mcbsp_config(unsigned int id, const struct omap_mcbsp_reg_cfg *config)
if (cpu_is_omap2430() || cpu_is_omap34xx() || cpu_is_omap44xx()) {
MCBSP_WRITE(mcbsp, XCCR, config->xccr);
MCBSP_WRITE(mcbsp, RCCR, config->rccr);
+ MCBSP_WRITE(mcbsp, WAKEUPEN, XRDYEN | RRDYEN);
}
}
EXPORT_SYMBOL(omap_mcbsp_config);
@@ -725,20 +726,6 @@ int omap_mcbsp_get_dma_op_mode(unsigned int id)
}
EXPORT_SYMBOL(omap_mcbsp_get_dma_op_mode);
-static inline void omap34xx_mcbsp_request(struct omap_mcbsp *mcbsp)
-{
- struct omap_device *od;
-
- od = find_omap_device_by_dev(mcbsp->dev);
- /*
- * Enable wakup behavior, smart idle and all wakeups
- * REVISIT: some wakeups may be unnecessary
- */
- if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
- MCBSP_WRITE(mcbsp, WAKEUPEN, XRDYEN | RRDYEN);
- }
-}
-
static inline void omap34xx_mcbsp_free(struct omap_mcbsp *mcbsp)
{
struct omap_device *od;
@@ -759,7 +746,6 @@ static inline void omap34xx_mcbsp_free(struct omap_mcbsp *mcbsp)
}
}
#else
-static inline void omap34xx_mcbsp_request(struct omap_mcbsp *mcbsp) {}
static inline void omap34xx_mcbsp_free(struct omap_mcbsp *mcbsp) {}
#endif
@@ -828,9 +814,6 @@ int omap_mcbsp_request(unsigned int id)
pm_runtime_get_sync(mcbsp->dev);
- /* Do procedure specific to omap34xx arch, if applicable */
- omap34xx_mcbsp_request(mcbsp);
-
/*
* Make sure that transmitter, receiver and sample-rate generator are
* not running before activating IRQs.