fix(imx8m): fix CSU_SA_REG to work with all sa registers

The csu found in the imx8mp has 3 csu_sa registers, before the fix not
all of them could be addressed.

The defines itself was imported from NXP's downstream version of the
trusted-firmware-a version 2.8[1].

[1]: https://github.com/nxp-imx/imx-atf/commit/0c52279fc4

Change-Id: Ia3653118bba82df9244c819a5c5f37bdc4e89c49
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Signed-off-by: Stefan Kerkmann <s.kerkmann@pengutronix.de>
This commit is contained in:
Stefan Kerkmann 2024-02-28 16:38:04 +01:00
parent 27b0440a8f
commit c13016bac6

View file

@ -31,7 +31,7 @@
#define CSU_HP_LOCK(x) ((0x1 << (((x) % 16) * 2 + 1)))
#define CSU_HP_CFG(x, n) ((x) << (((n) % 16) * 2))
#define CSU_SA_REG(x) (IMX_CSU_BASE + 0x218)
#define CSU_SA_REG(x) (IMX_CSU_BASE + (((x) / 16) * 4) + 0x218)
#define CSU_SA_LOCK(x) ((0x1 << (((x) % 16) * 2 + 1)))
#define CSU_SA_CFG(x, n) ((x) << (((n) % 16) * 2))