Whilst adding NOR support for Juno and FVP models, I encountered a 
problem in cfi_flash.c.  It is using "unsigned long" to represent a 
32-bit value.  This does not work on 64-bit systems such as vexpress64.

I fixed it up in patch 1/3, however, I'm not convinced that my mod is
the correct one.  I'd appreciate some help with that one and will respin 
after feedback.

Patch 2/3 may also be unsuitable.  Once I'd added the CFI flash support,
the build failed because tools/envcrc.c includes include/config.h, which 
in turn includes include/configs/vexpress_aemv8a.h, but without a board
defined.  Perhaps there is something missing from the global config that 
means the #errors should not be triggered?  Again, feedback would be 
appreciated here.

The last patch relies on the two previous ones to build and work 
successfully.  I believe it to be the correct approach but welcome 
suggested improvements.

I tested it on Juno R0, R1 and FVP AEMv8 models version "Fast Models
[0.8.6302 (Feb  4 2015)]".  I also tested on Foundation Model version
"ARM V8 Foundation Model r0p0 (model build 9.2.28)", where it failed
gracefully.

[PATCH 1/3] cfi_flash: use specific length types for cword
[PATCH 2/3] vexpress64: remove #error
[PATCH 3/3] vexpress64: store env in flash

 configs/vexpress_aemv8a_dram_defconfig |  1 +
 configs/vexpress_aemv8a_semi_defconfig |  1 +
 drivers/mtd/cfi_flash.c                |  4 ++--
 include/configs/vexpress_aemv8a.h      | 43 
+++++++++++++++++++++++--------------------
 include/mtd/cfi_flash.h                |  8 ++++----
 5 files changed, 31 insertions(+), 26 deletions(-)

This series is also available in a public GIT tree:
    
https://git.linaro.org/landing-teams/working/arm/u-boot.git/shortlog/refs/tags/vexpress64-nor-upstream-v1
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to