summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorSebastien Guiriec <s-guiriec@ti.com>2011-05-31 09:22:59 +0100
committerAndy Green <andy.green@linaro.org>2011-05-31 11:04:30 +0100
commit93093615124fd2137c57e50178bb5d23c89c2072 (patch)
tree37f4577796d9a693f9e34dcd1e0a7281a7a5e1a3 /sound
parent2a32c52684b0b62af1573ff0222f4b803610e2db (diff)
ASoC: McPDM: Enable wd reset for ES2.0
With revision ES2.0 a new bit is provide to enable the pdm watchdog logic. Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/omap/omap-mcpdm.c9
-rw-r--r--sound/soc/omap/omap-mcpdm.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c
index cb093fda272..145871f2045 100644
--- a/sound/soc/omap/omap-mcpdm.c
+++ b/sound/soc/omap/omap-mcpdm.c
@@ -386,6 +386,7 @@ static int omap_mcpdm_request(struct omap_mcpdm *mcpdm)
struct platform_device *pdev;
struct omap_mcpdm_platform_data *pdata;
int ret;
+ int ctrl;
pdev = container_of(mcpdm->dev, struct platform_device, dev);
pdata = pdev->dev.platform_data;
@@ -414,6 +415,14 @@ static int omap_mcpdm_request(struct omap_mcpdm *mcpdm)
dev_err(mcpdm->dev, "Request for McPDM IRQ failed\n");
goto err;
}
+
+ if (omap_rev() != OMAP4430_REV_ES1_0) {
+ /* Enable McPDM watch dog for ES above ES 1.0 to avoid saturation */
+ ctrl = omap_mcpdm_read(mcpdm, MCPDM_CTRL);
+ ctrl |= WD_EN;
+ omap_mcpdm_write(mcpdm, MCPDM_CTRL, ctrl);
+ }
+
return 0;
err:
diff --git a/sound/soc/omap/omap-mcpdm.h b/sound/soc/omap/omap-mcpdm.h
index d926cfe1ed0..d9b5fd6bdf1 100644
--- a/sound/soc/omap/omap-mcpdm.h
+++ b/sound/soc/omap/omap-mcpdm.h
@@ -85,6 +85,7 @@
#define STATUS_INT 0x0400
#define SW_UP_RST 0x0800
#define SW_DN_RST 0x1000
+#define WD_EN 0x4000
#define PDM_UP_MASK 0x007
#define PDM_DN_MASK 0x0F8
#define PDM_CMD_MASK 0x200