From 4d1f1ffb271c45c8a6c136b23d29d169424fd311 Mon Sep 17 00:00:00 2001 From: "live.li" Date: Sat, 20 Oct 2018 10:51:19 +0800 Subject: [PATCH] media_module: adec: 32bit&64bit kernel compatible [1/1] PD#SWPL-841 Problem: R311 32bit kernel audio cant output Solution: R311 32bit kernel adec driver can't get cbus base addr correct, fix it Verify: R311 32bit kernel Change-Id: Ia6da4726aa49078e8d1a65002bde17555601728d Signed-off-by: live.li Signed-off-by: Jian Xu --- .../amlogic/media_modules/stream_input/amports/adec.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/amlogic/media_modules/stream_input/amports/adec.c b/drivers/amlogic/media_modules/stream_input/amports/adec.c index 130286ac51e8..9b84d9645c69 100644 --- a/drivers/amlogic/media_modules/stream_input/amports/adec.c +++ b/drivers/amlogic/media_modules/stream_input/amports/adec.c @@ -155,10 +155,10 @@ static struct class astream_class = { }; #if 1 -#define IO_CBUS_PHY_BASE 0xc1100000 -#define IO_AOBUS_PHY_BASE 0xc8100000 +#define IO_CBUS_PHY_BASE 0xc1100000ULL +#define IO_AOBUS_PHY_BASE 0xc8100000ULL #define CBUS_REG_OFFSET(reg) ((reg) << 2) -#define IO_SECBUS_PHY_BASE 0xda000000 +#define IO_SECBUS_PHY_BASE 0xda000000ULL static struct uio_info astream_uio_info = { .name = "astream_uio", @@ -344,7 +344,11 @@ s32 astream_dev_register(void) goto err_1; } +#ifdef CONFIG_ARM64_A32 + r = of_property_read_u32_index(node, "reg", 0, &cbus_base); +#else r = of_property_read_u32_index(node, "reg", 1, &cbus_base); +#endif if (r) { pr_info("No find node.\n"); goto err_1;