Patchwork [U-Boot] CM4000: fix broken flash base for OpenGear boards

login
register
mail settings
Submitter Greg Ungerer
Date Sept. 9, 2011, 12:23 p.m.
Message ID <1315571014-564-1-git-send-email-greg.ungerer@opengear.com>
Download mbox | patch
Permalink /patch/114094/
State Accepted
Commit 297f18ac0fbeef30ba1c17fe131ca75f09a6e7cf
Headers show

Comments

Greg Ungerer - Sept. 9, 2011, 12:23 p.m.
Use _bss_start_ofs as the size of the boot loader code+data that we want
to protect in the flash. This replaces use of the no longer defined
_armboot_start.

Fixes:

flash.c: In function ‘flash_init’:
flash.c:75: error: ‘_bss_start’ undeclared (first use in this function)
flash.c:75: error: (Each undeclared identifier is reported only once
flash.c:75: error: for each function it appears in.)
flash.c:75: error: ‘_armboot_start’ undeclared (first use in this function)

Signed-off-by: <greg.ungerer@opengear.com>
---
 board/cm4008/flash.c |    2 +-
 board/cm41xx/flash.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Wolfgang Denk - Sept. 9, 2011, 10:13 p.m.
Dear Greg Ungerer,

In message <1315571014-564-1-git-send-email-greg.ungerer@opengear.com> you wrote:
> Use _bss_start_ofs as the size of the boot loader code+data that we want
> to protect in the flash. This replaces use of the no longer defined
> _armboot_start.
> 
> Fixes:
> 
> flash.c: In function `flash_init´:
> flash.c:75: error: `_bss_start´ undeclared (first use in this function)
> flash.c:75: error: (Each undeclared identifier is reported only once
> flash.c:75: error: for each function it appears in.)
> flash.c:75: error: `_armboot_start´ undeclared (first use in this function)
> 
> Signed-off-by: <greg.ungerer@opengear.com>
> ---
>  board/cm4008/flash.c |    2 +-
>  board/cm41xx/flash.c |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/board/cm4008/flash.c b/board/cm4008/flash.c
index d6fd519..2e1356f 100644
--- a/board/cm4008/flash.c
+++ b/board/cm4008/flash.c
@@ -72,7 +72,7 @@  unsigned long flash_init (void)
 	 */
 	flash_protect (FLAG_PROTECT_SET,
 		       CONFIG_SYS_FLASH_BASE,
-		       CONFIG_SYS_FLASH_BASE + _bss_start - _armboot_start,
+		       CONFIG_SYS_FLASH_BASE + _bss_start_ofs,
 		       &flash_info[0]);
 
 	return size;
diff --git a/board/cm41xx/flash.c b/board/cm41xx/flash.c
index d6fd519..2e1356f 100644
--- a/board/cm41xx/flash.c
+++ b/board/cm41xx/flash.c
@@ -72,7 +72,7 @@  unsigned long flash_init (void)
 	 */
 	flash_protect (FLAG_PROTECT_SET,
 		       CONFIG_SYS_FLASH_BASE,
-		       CONFIG_SYS_FLASH_BASE + _bss_start - _armboot_start,
+		       CONFIG_SYS_FLASH_BASE + _bss_start_ofs,
 		       &flash_info[0]);
 
 	return size;