[U-Boot] [PATCH] MX51: mx51evk: Use struct to access SRSR register instead of offset

Fabio Estevam festevam at gmail.com
Wed Apr 13 05:02:05 CEST 2011


Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
---
 board/freescale/mx51evk/mx51evk.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c
index 02a765d..3f2217c 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -431,6 +431,10 @@ int board_late_init(void)
 
 int checkboard(void)
 {
+	u32 reset;
+	struct src *src_regs = (struct src *)SRC_BASE_ADDR;
+	reset = src_regs->srsr;
+
 	puts("Board: MX51EVK ");
 
 	switch (system_rev & 0xff) {
@@ -452,7 +456,7 @@ int checkboard(void)
 		break;
 	}
 
-	switch (__raw_readl(SRC_BASE_ADDR + 0x8)) {
+	switch (reset) {
 	case 0x0001:
 		puts("POR");
 		break;
-- 
1.6.0.4



More information about the U-Boot mailing list