[U-Boot] [PATCH v1 3/9] MIPS: vct: fix I/O accessor calls

Daniel Schwierzeck daniel.schwierzeck at gmail.com
Sat Jan 9 17:32:46 CET 2016


Use void pointers as address argument for readl( and writel()).
This is required for the upcoming MIPS asm header file and I/O
accessor update.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
---

 board/micronas/vct/vct.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/board/micronas/vct/vct.h b/board/micronas/vct/vct.h
index 0a1c5fc..67da6a8 100644
--- a/board/micronas/vct/vct.h
+++ b/board/micronas/vct/vct.h
@@ -80,12 +80,14 @@ void vct_pin_mux_initialize(void);
  */
 static inline void reg_write(u32 addr, u32 data)
 {
-	__raw_writel(data, addr + REG_GLOBAL_START_ADDR);
+	void *reg = (void *)(addr + REG_GLOBAL_START_ADDR);
+	__raw_writel(data, reg);
 }
 
 static inline u32 reg_read(u32 addr)
 {
-	return __raw_readl(addr + REG_GLOBAL_START_ADDR);
+	const void *reg = (const void *)(addr + REG_GLOBAL_START_ADDR);
+	return __raw_readl(reg);
 }
 
 #endif /* _VCT_H */
-- 
2.5.0



More information about the U-Boot mailing list