diff options
author | Grzegorz Jaszczyk <jaz@semihalf.com> | 2018-04-11 13:04:42 +0200 |
---|---|---|
committer | Kostya Porotchkin <kostap@marvell.com> | 2018-04-25 16:53:46 +0300 |
commit | 0064108e4d1f9b4b93298322938fd80cbcb29609 (patch) | |
tree | af129bdb9c634e3f75edfa3ba5ea03bbf399e28e | |
parent | ef28246fed76de7556fa500248b699a4124bc64a (diff) |
mvebu: cp110: allow to pass SD phys addr instead of COMPHY phys via SMC
Mainline Linux driver registers only SD address for comphy driver (the
COMPHY address is referenced as syscon regmap). To make the RT SVC more
flexible allow to pass SD address and convert it to COMPHY addr at the
beginning for each comphy FID.
Change-Id: I55af0b699188bae35d5251177a7ff5bdeb698d0d
Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
Reviewed-on: http://vgitil04.il.marvell.com:8080/53492
Tested-by: iSoC Platform CI <ykjenk@marvell.com>
Reviewed-by: Kostya Porotchkin <kostap@marvell.com>
-rw-r--r-- | plat/marvell/common/mrvl_sip_svc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plat/marvell/common/mrvl_sip_svc.c b/plat/marvell/common/mrvl_sip_svc.c index c14e6132..bdd33ad6 100644 --- a/plat/marvell/common/mrvl_sip_svc.c +++ b/plat/marvell/common/mrvl_sip_svc.c @@ -25,6 +25,7 @@ #define MAX_LANE_NR 6 #define MVEBU_COMPHY_OFFSET 0x441000 +#define MVEBU_SD_OFFSET 0x120000 /* This macro is used to identify COMPHY related calls from SMC function ID */ #define is_comphy_fid(fid) \ @@ -46,6 +47,12 @@ uint64_t mrvl_sip_smc_handler(uint32_t smc_fid, __func__, smc_fid, x1, x2, x3); if (is_comphy_fid(smc_fid)) { + /* some systems passes SD phys address instead of COMPHY phys + * address - convert it + */ + if (x1 & MVEBU_SD_OFFSET) + x1 = (x1 & ~0xffffff) + MVEBU_COMPHY_OFFSET; + if (!(x1 & MVEBU_COMPHY_OFFSET)) { ERROR("%s: Wrong smc (0x%x) address: %lx\n", __func__, smc_fid, x1); SMC_RET1(handle, SMC_UNK); |