[U-Boot] [PATCH v3 4/4] rk3288: Convert register defines to const uintptr_t

Carlo Caione carlo at caione.org
Mon Jun 11 19:00:51 UTC 2018


From: Carlo Caione <carlo at endlessm.com>

No functional change but at least we can now guarantee type safety.

Signed-off-by: Carlo Caione <carlo at endlessm.com>
---
 arch/arm/mach-rockchip/rk3288-board.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-rockchip/rk3288-board.c b/arch/arm/mach-rockchip/rk3288-board.c
index 0e83c0a947..9c4f7f219f 100644
--- a/arch/arm/mach-rockchip/rk3288-board.c
+++ b/arch/arm/mach-rockchip/rk3288-board.c
@@ -317,11 +317,10 @@ U_BOOT_CMD(
 	""
 );
 
-#define GRF_SOC_CON0 0xff770244
-#define GRF_SOC_CON2 0xff77024c
-
 int board_early_init_f(void)
 {
+	const uintptr_t GRF_SOC_CON0 = 0xff770244;
+	const uintptr_t GRF_SOC_CON2 = 0xff77024c;
 	struct udevice *pinctrl;
 	struct udevice *dev;
 	int ret;
-- 
2.17.1



More information about the U-Boot mailing list