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

Tom Rini trini at ti.com
Tue Nov 4 17:45:06 CET 2014


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 at 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!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141104/da70b493/attachment.pgp>


More information about the U-Boot mailing list