MX51: mx51evk: Use struct to access SRSR register instead of offset
PATCH 1/1 MX51: mx51evk: Use struct to access SRSR register instead of offset
--- board/freescale/mx51evk/mx51evk.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
board/freescale/mx51evk/mx51evk.c +5 -1
@@ -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 ;
Signature · 1 line
1.6.0.4
PATCH 1/1 MX51: mx51evk: Use struct to access SRSR register instead of offset
2011/4/13 Fabio Estevam <[email protected]>:
Quoted 10 lines
Signed-off-by Fabio Estevam <[email protected]>---
?board/freescale/mx51evk/mx51evk.c | ? ?6 +++++-
?1 files changed, 5 insertions(+), 1 deletions(-)board/freescale/mx51evk/mx51evk.c +0
-0
board/freescale/mx51evk/mx51evk.c int board_late_init(void) · line 436
Quoted 6 lines
board/freescale/mx51evk/mx51evk.c +3
-0@@ -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;
Would better to use __raw_readl(&src_regs->srsr) here.
Quoted 21 lines
board/freescale/mx51evk/mx51evk.c +2
-1+ ? ? ? ?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_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH 1/1 MX51: mx51evk: Use struct to access SRSR register instead of offset
In reply to Fabio EstevamHello.
Quoted 10 lines · Fabio Estevam
Signed-off-by Fabio Estevam<[email protected]>--- board/freescale/mx51evk/mx51evk.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)board/freescale/mx51evk/mx51evk.c +0
-0
board/freescale/mx51evk/mx51evk.c int board_late_init(void) · line 435
Quoted 5 lines
board/freescale/mx51evk/mx51evk.c +2
-0@@ -431,6 +431,10 @@ int board_late_init(void)int checkboard (void ) { +u32 reset; +struct src *src_regs = (struct src *)SRC_BASE_ADDR ;
Should be an emoty line here\.
board/freescale/mx51evk/mx51evk.c int board_late_init(void) · line 436
Quoted 1 line
board/freescale/mx51evk/mx51evk.c +1
-0+ reset = src_regs->srsr;
Why not declare this variable later than 'src_regs' and just initialize it?
WBR, Sergei