PKGBUILDs/alarm/uboot-odroid-c1/0008-arm-board-use-__weak.patch
2016-11-26 18:15:09 +00:00

67 lines
2.7 KiB
Diff

From cb23dda9dbd03a51839d3c01a08f95c70fb9ec8d Mon Sep 17 00:00:00 2001
From: Jeroen Hofstee <jeroen@myspectrum.nl>
Date: Wed, 8 Oct 2014 22:57:21 +0200
Subject: [PATCH 08/11] arm: board: use __weak
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
---
arch/arm/lib/board.c | 31 ++++++++++---------------------
1 file changed, 10 insertions(+), 21 deletions(-)
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index 79b839f..d233271 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -120,24 +120,15 @@ int __g_nTStep_4BC722B3__ = 0;
************************************************************************
* May be supplied by boards if desired
*/
-void inline __coloured_LED_init (void) {}
-void coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init")));
-void inline __red_LED_on (void) {}
-void red_LED_on (void) __attribute__((weak, alias("__red_LED_on")));
-void inline __red_LED_off(void) {}
-void red_LED_off(void) __attribute__((weak, alias("__red_LED_off")));
-void inline __green_LED_on(void) {}
-void green_LED_on(void) __attribute__((weak, alias("__green_LED_on")));
-void inline __green_LED_off(void) {}
-void green_LED_off(void) __attribute__((weak, alias("__green_LED_off")));
-void inline __yellow_LED_on(void) {}
-void yellow_LED_on(void) __attribute__((weak, alias("__yellow_LED_on")));
-void inline __yellow_LED_off(void) {}
-void yellow_LED_off(void) __attribute__((weak, alias("__yellow_LED_off")));
-void inline __blue_LED_on(void) {}
-void blue_LED_on(void) __attribute__((weak, alias("__blue_LED_on")));
-void inline __blue_LED_off(void) {}
-void blue_LED_off(void) __attribute__((weak, alias("__blue_LED_off")));
+__attribute__((__weak__)) void coloured_LED_init(void) {}
+__attribute__((__weak__)) void red_led_on(void) {}
+__attribute__((__weak__)) void red_led_off(void) {}
+__attribute__((__weak__)) void green_led_on(void) {}
+__attribute__((__weak__)) void green_led_off(void) {}
+__attribute__((__weak__)) void yellow_led_on(void) {}
+__attribute__((__weak__)) void yellow_led_off(void) {}
+__attribute__((__weak__)) void blue_led_on(void) {}
+__attribute__((__weak__)) void blue_led_off(void) {}
/************************************************************************
* Init Utilities *
@@ -259,13 +250,11 @@ typedef int (init_fnc_t) (void);
int print_cpuinfo (void);
-void __dram_init_banksize(void)
+__attribute__((__weak__)) void dram_init_banksize(void)
{
gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
gd->bd->bi_dram[0].size = gd->ram_size;
}
-void dram_init_banksize(void)
- __attribute__((weak, alias("__dram_init_banksize")));
#ifdef CONFIG_AML_EFUSE_INIT_PLUS
extern int efuse_aml_init_plus(void);
--
2.10.2