From d2eae43ba803cff75b44a07d08d718ecdecdee94 Mon Sep 17 00:00:00 2001 From: Andreas Bießmann Date: Thu, 18 Apr 2013 22:48:50 +0000 Subject: lib: consolidate hang() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Delete all occurrences of hang() and provide a generic function. Signed-off-by: Andreas Bießmann Acked-by: Albert ARIBAUD [trini: Modify check around puts() in hang.c slightly] Signed-off-by: Tom Rini --- arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 7 ------- arch/arm/cpu/arm926ejs/spear/spl.c | 7 ------- 2 files changed, 14 deletions(-) (limited to 'arch/arm/cpu') diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c index 7e7044033e..ed525e58f3 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c @@ -148,10 +148,3 @@ inline void board_init_r(gd_t *id, ulong dest_addr) for (;;) ; } - -void hang(void) __attribute__ ((noreturn)); -void hang(void) -{ - for (;;) - ; -} diff --git a/arch/arm/cpu/arm926ejs/spear/spl.c b/arch/arm/cpu/arm926ejs/spear/spl.c index 48e6efbc47..0101c5dd12 100644 --- a/arch/arm/cpu/arm926ejs/spear/spl.c +++ b/arch/arm/cpu/arm926ejs/spear/spl.c @@ -31,13 +31,6 @@ #include #include -inline void hang(void) -{ - serial_puts("### ERROR ### Please RESET the board ###\n"); - for (;;) - ; -} - static void ddr_clock_init(void) { struct misc_regs *misc_p = (struct misc_regs *)CONFIG_SPEAR_MISCBASE; -- cgit From 2ac2bb7ad2d24eff461762219bb3d76c58c7384b Mon Sep 17 00:00:00 2001 From: Łukasz Dałek Date: Sat, 12 Jan 2013 15:32:32 +0000 Subject: pxa: Add weak attribute to reset_cpu() function This commit allows pxa2xx based boards to reimplement reset_cpu() function with board specific reset sequence. Signed-off-by: Lukasz Dalek --- arch/arm/cpu/pxa/pxa2xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/cpu') diff --git a/arch/arm/cpu/pxa/pxa2xx.c b/arch/arm/cpu/pxa/pxa2xx.c index 09e8177f7b..0c186101ec 100644 --- a/arch/arm/cpu/pxa/pxa2xx.c +++ b/arch/arm/cpu/pxa/pxa2xx.c @@ -284,7 +284,7 @@ void i2c_clk_enable(void) writel(readl(CKEN) | CKEN14_I2C, CKEN); } -void reset_cpu(ulong ignored) __attribute__((noreturn)); +void __attribute__((weak)) reset_cpu(ulong ignored) __attribute__((noreturn)); void reset_cpu(ulong ignored) { -- cgit