MX5: factor out boot cause funciton to common code
Subsystems (2)
PATCH v4 1/2 MX5: factor out boot cause funciton to common code
From: Liu Hui-R64343 <[email protected]>
factor out boot cause funciton to common code to avoid the duplicate code in each board support package
---
changes since v3:
- add full boot reset cause
--- arch/arm/cpu/armv7/mx5/soc.c | 27 +++++++++++++++++++++++++++ arch/arm/include/asm/arch-mx5/sys_proto.h | 1 + 2 files changed, 28 insertions(+), 0 deletions(-)
arch/arm/cpu/armv7/mx5/soc.c +27 -0
@@ -77,6 +77,33 @@ u32 get_cpu_rev(void)return system_rev; } +char *get_reset_cause (void ) +{ +u32 cause; +struct src *src_regs = (struct src *)SRC_BASE_ADDR ; + + cause =readl (&src_regs->srsr); +writel (cause, &src_regs->srsr); + +switch (cause) { +case 0x00001 : +return "POR" ; +case 0x00004 : +return "CSU" ; +case 0x00008 : +return "IPP USER" ; +case 0x00010 : +return "WDOG" ; +case 0x00020 : +return "JTAG HIGH-Z" ; +case 0x00040 : +return "JTAG SW" ; +case 0x10000 : +return "WARM BOOT" ; +default : +return "unknown reset" ; + } +}#if defined(CONFIG_DISPLAY_CPUINFO )int print_cpuinfo (void )
arch/arm/include/asm/arch-mx5/sys_proto.h +1 -0
@@ -27,5 +27,6 @@u32 get_cpu_rev (void );#define is_soc_rev (rev) ((get_cpu_rev() & 0xFF) - rev)void sdelay (unsigned long ); +char *get_reset_cause (void );#endif
Signature · 1 line
1.7.1
PATCH v4 2/2 MX53: support for freescale MX53LOCO board
From: Liu Hui-R64343 <[email protected]>
This patch add initial support for freescale MX53LOCO board. Network(FEC),SD/MMC, UART have been supported by this patch.
---
changes since v3:
- include other two small patch into this commit,
mx53loco: set mmc env to MMC slot1
MX5: Enable flat-device-tree support on mx53 loco board
changes since V2:
-factor out the boot cause function to common code, -fix gd->ram_size with full memory size
-remove the '1' from all #defines that just enable features -correct memory test end address value
--- MAINTAINERS | 1 + board/freescale/mx53loco/Makefile | 47 +++++ board/freescale/mx53loco/imximage.cfg | 96 +++++++++++ board/freescale/mx53loco/mx53loco.c | 301 +++++++++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/mx53loco.h | 199 ++++++++++++++++++++++ 6 files changed, 645 insertions(+), 0 deletions(-)
MAINTAINERS +1 -0
@@ -567,6 +567,7 @@ Stefano Babic <[email protected]> Jason Liu <[email protected]> mx53evk i.MX53 + mx53loco i.MX53 Enric Balletbo i Serra <[email protected]>
board/freescale/mx53loco/Makefile new file +47 -0
47 lines not on this page · raw message
board/freescale/mx53loco/imximage.cfg new file +96 -0
96 lines not on this page · raw message
board/freescale/mx53loco/mx53loco.c new file +301 -0
301 lines not on this page · raw message
boards.cfg +1 -0
@@ -110,6 +110,7 @@ ca9x4_ct_vxp arm armv7 vexpress armltd efikamx arm armv7 efikamx - mx5 mx51evk arm armv7 mx51evk freescale mx5 mx51evk:IMX_CONFIG=board/freescale/mx51evk/imximage.cfg mx53evk arm armv7 mx53evk freescale mx5 mx53evk:IMX_CONFIG=board/freescale/mx53evk/imximage.cfg +mx53loco arm armv7 mx53loco freescale mx5 mx53loco:IMX_CONFIG=board/freescale/mx53loco/imximage.cfg vision2 arm armv7 vision2 ttcontrol mx5 cm_t35 arm armv7 cm_t35 - omap3 omap3_overo arm armv7 overo - omap3
include/configs/mx53loco.h new file +199 -0
199 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH v4 2/2 MX53: support for freescale MX53LOCO board
Hi, Stefano,
2011/4/16 Jason Liu <[email protected]>:
Quoted 14 lines
From: Liu Hui-R64343 <[email protected]>
This patch add initial support for freescale MX53LOCO board. Network(FEC),SD/MMC, UART have been supported by this patch.
Signed-off-by Jason Liu <[email protected]>---
changes since v3:
- include other two small patch into this commit,
mx53loco: set mmc env to MMC slot1
MX5: Enable flat-device-tree support on mx53 loco boardchanges since V2:
Review
Quoted 4 lines
(quoted diff) +0
-4-factor out the boot cause function to common code, -fix gd->ram_size with full memory size -remove the '1' from all #defines that just enable features -correct memory test end address value
Ping, any comments?
Quoted 7 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH v4 1/2 MX5: factor out boot cause funciton to common code
In reply to Jason LiuHi, Stefano,
2011/4/16 Jason Liu <[email protected]>:
Quoted 9 lines
From: Liu Hui-R64343 <[email protected]>
factor out boot cause funciton to common code to avoid the duplicate code in each board support package
Signed-off-by Jason Liu <[email protected]>---
changes since v3:
- add full boot reset cause
Ping, any comments?
Quoted 8 lines
1.7.1
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot