summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorChen Liangjun <b36089@freescale.com>2012-05-04 17:30:13 +0800
committerChen Liangjun <b36089@freescale.com>2012-05-04 17:39:54 +0800
commite7ec0bf77f82ed82ec8f82b6562f559b9e37bf58 (patch)
tree235a03d996b31672e542e75e1744f69f7582438a /sound
parent7108119175e835535ba6142764d04a38d1b6166c (diff)
ENGR00181693 HDMI:threshold and INCR type config
Configure information for threshold and incr: CHIP + CHANNEL THRESHOLD INCRTYPE ARIK + 2 126 4 ARIK + 4,6,8 124 4 RIGEL + 2,4,6,8 128 8 Signed-off-by: Chen Liangjun <b36089@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/imx/imx-hdmi-dma.c46
1 files changed, 33 insertions, 13 deletions
diff --git a/sound/soc/imx/imx-hdmi-dma.c b/sound/soc/imx/imx-hdmi-dma.c
index da9c2f776988..ac7ac5d6e3fb 100644
--- a/sound/soc/imx/imx-hdmi-dma.c
+++ b/sound/soc/imx/imx-hdmi-dma.c
@@ -652,25 +652,45 @@ static void hdmi_dma_enable_channels(int channels)
}
}
-static void hdmi_dma_configure_dma(int channels)
+static void hdmi_dma_set_thrsld_incrtype(int channels)
{
- hdmi_dma_enable_hlock(1);
-
- switch (channels) {
- case 2:
- hdmi_dma_set_incr_type(HDMI_DMA_BURST_INCR4);
- hdmi_writeb(126, HDMI_AHB_DMA_THRSLD);
+ int rev = hdmi_readb(HDMI_REVISION_ID);
+
+ switch (rev) {
+ case 0x0a:
+ {
+ switch (channels) {
+ case 2:
+ hdmi_dma_set_incr_type(HDMI_DMA_BURST_INCR4);
+ hdmi_writeb(126, HDMI_AHB_DMA_THRSLD);
+ break;
+ case 4:
+ case 6:
+ case 8:
+ hdmi_dma_set_incr_type(HDMI_DMA_BURST_INCR4);
+ hdmi_writeb(124, HDMI_AHB_DMA_THRSLD);
+ break;
+ default:
+ pr_debug("unsupport channel!\r\n");
+ }
+ }
break;
- case 4:
- case 6:
- case 8:
- hdmi_dma_set_incr_type(HDMI_DMA_BURST_INCR4);
- hdmi_writeb(124, HDMI_AHB_DMA_THRSLD);
+ case 0x1a:
+ hdmi_writeb(128, HDMI_AHB_DMA_THRSLD);
+ hdmi_dma_set_incr_type(HDMI_DMA_BURST_INCR8);
break;
default:
- pr_err("%s %dunsupport channel!\r\n", __func__, __LINE__);
+ pr_debug("error:unrecognized hdmi controller!\r\n");
+ break;
}
+ pr_debug("HDMI_AHB_DMA_THRSLD 0x%02x\n", hdmi_readb(HDMI_AHB_DMA_THRSLD));
+}
+
+static void hdmi_dma_configure_dma(int channels)
+{
+ hdmi_dma_enable_hlock(1);
+ hdmi_dma_set_thrsld_incrtype(channels);
hdmi_dma_enable_channels(channels);
}