summaryrefslogtreecommitdiff
authorShuai Li <shuai.li@amlogic.com>2019-01-16 03:31:17 (GMT)
committer Luan Yuan <luan.yuan@amlogic.com>2019-01-23 09:00:37 (GMT)
commit355b5ee7c759921f983b603a175d1623186a1f67 (patch)
tree2ef13dbb954e3b5d299926b72f09b5ca898ddbe8
parentfbb3db9e191fb7930ea5c44ad9597289b79228ab (diff)
downloadmedia_modules-355b5ee7c759921f983b603a175d1623186a1f67.zip
media_modules-355b5ee7c759921f983b603a175d1623186a1f67.tar.gz
media_modules-355b5ee7c759921f983b603a175d1623186a1f67.tar.bz2
audio: fix wrong uio info map data [1/1]
PD#SWPL-4004 Problem: Wrong uio info map data cause dcv lib crash. Solution: Fix the wrong uio info map. Verify: Local tested. Change-Id: If6caf37c2b730275a98963c0a2d478a2bca5ecd3 Signed-off-by: Shuai Li <shuai.li@amlogic.com>
Diffstat
-rw-r--r--drivers/stream_input/amports/adec.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/stream_input/amports/adec.c b/drivers/stream_input/amports/adec.c
index 9b84d96..ce014e1 100644
--- a/drivers/stream_input/amports/adec.c
+++ b/drivers/stream_input/amports/adec.c
@@ -160,6 +160,9 @@ static struct class astream_class = {
#define CBUS_REG_OFFSET(reg) ((reg) << 2)
#define IO_SECBUS_PHY_BASE 0xda000000ULL
+
+#define IO_AOBUS_PHY_BASE_AFTER_G12A 0xff800000ULL
+
static struct uio_info astream_uio_info = {
.name = "astream_uio",
.version = "0.1",
@@ -358,9 +361,11 @@ s32 astream_dev_register(void)
astream_dev->offset = -0x100;
/*need to offset -0x180 in g12a.*/
- if (AM_MESON_CPU_MAJOR_ID_G12A <= get_cpu_major_id())
+ if (AM_MESON_CPU_MAJOR_ID_G12A <= get_cpu_major_id()) {
astream_dev->offset = -0x180;
-
+ /* after G12A chip, the aobus base addr changed */
+ astream_uio_info.mem[4].addr = IO_AOBUS_PHY_BASE_AFTER_G12A;
+ }
astream_uio_info.mem[0].addr =
(cbus_base + CBUS_REG_OFFSET(AIU_AIFIFO_CTRL +
astream_dev->offset)) & (PAGE_MASK);