[U-Boot] [PATCH 01/11] am335x: make get_board_rev() function weak

Igor Grinberg
2014-11-03T09:32:17Z

Current get_board_rev() function returns a hard coded value which is
obviously incorrect for the majority of boards.
Allow boards to provide a correct implementation by making this
function weak.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
---
arch/arm/cpu/armv7/am33xx/sys_info.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/cpu/armv7/am33xx/sys_info.c b/arch/arm/cpu/armv7/am33xx/sys_info.c
index 2ce682f..c297fd8 100644
--- a/arch/arm/cpu/armv7/am33xx/sys_info.c
+++ b/arch/arm/cpu/armv7/am33xx/sys_info.c
@@ -18,6 +18,7 @@
#include <asm/arch/cpu.h>
#include <asm/arch/clock.h>
#include <power/tps65910.h>
+#include <linux/compiler.h>

struct ctrl_stat *cstat = (struct ctrl_stat *)CTRL_BASE;

@@ -53,7 +54,7 @@ u32 get_cpu_type(void)
* get_board_rev() - setup to pass kernel board revision information
* returns:(bit[0-3] sub version, higher bit[7-4] is higher version)
*/
-u32 get_board_rev(void)
+u32 __weak get_board_rev(void)
{
return BOARD_REV_ID;
}
--
2.0.4