Message ID | 1415007147-12562-2-git-send-email-grinberg@compulab.co.il |
---|---|
State | Changes Requested |
Delegated to: | Tom Rini |
Headers | show |
On Mon, Nov 03, 2014 at 11:32:17AM +0200, Igor Grinberg wrote: > 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; > } Which is a hard-coded 0 anyhow. Can you please update the comment to say something along the lines of "Return 0 for the ATAG REVISION tag value" along with making it weak and nuke BOARD_REV_ID from the header as well? Thanks!
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; }
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(-)