Re: [U-Boot] [PATCH 6/7] arm: ls102xa: Add SD boot support for LS1021AQDS board

2014-10-15 Thread Huan Wang
Hi, Albert,

 On Wed, 8 Oct 2014 09:53:03 +, Huan Wang alison.w...@freescale.com
 wrote:
 
  Hi, Albert,
 
   On Thu, 25 Sep 2014 06:45:00 +, Huan Wang
   alison.w...@freescale.com wrote:
  
Hi, Albert,
   
 On Mon, 22 Sep 2014 06:46:20 +, Huan Wang
 alison.w...@freescale.com wrote:

  Hi, Albert,
 
On Thu, 18 Sep 2014 13:47:18 +0800, Alison Wang
b18...@freescale.com
wrote:
   
 +
 + . = ALIGN(4);
 + .u_boot_list : {
 + KEEP(*(SORT(.u_boot_list*_i2c_*)));
 + }
   
IS this required? And if it is, could it not be added to
the arch/arm/cpu/u-boot-spl.lds file? This way you would
not need an .lds file at all.
   
[Alison Wang] Yes, it is required.
  
   Ok -- what for? :)
  [Alison Wang] In SPL part, DDR is initialized by reading SPD
  through
 I2C interface.
  For I2C, ll_entry_count() is called, and it returns the
 number
  of elements of a linker-generated array placed into
 subsection
  of .u_boot_list section specified by _list argument. So I
 need
  to
   add
 this to make I2C work in SPL.

 Understood. So your SPL code uses I2C, and for I2C, you need a
 linker list. But then:

I would like to add it in arch/arm/cpu/u-boot-spl.lds. I
was not sure adding it in arch/arm/cpu/u-boot-spl.lds is
acceptable or
 not.
  
   (assuming the reason why it is needed is valid) If it
 causes
   no change to boards which do not use it right now (and I
   mean 'no change' ad 'binary identical') then this is
   acceptable. Make sure you check the binary invariance and
   that you mention it in the
 commit.
  
  [Alison Wang] It will cause the binary is not identical for
  other
 board.

 Is this a prediction or an actual observation of compared
 builds
 with and without the I2C linker liste addition to the generic
   SPL .lds?
   
[Alison Wang] I use mx31pdk as example. I compared the binaries
with and Without the I2C linker list in
arch/arm/cpu/u-boot-spl.lds. The binaries are not identical.
  
   I have just checked mx31pdk: the u-boot binaries (u-boot,
   u-boot.bin, u-boot-with-spl.bin, u-boot.map, u-boot.srec) are
 indeed
   different, but that's just normal considering the repository state
   and build date and time are included in the binaries [1].
  
   OTOH, I see that the u-boot-spl.bin files are identical.
  
   The only change I made between the two builds was inserting
  
  . = ALIGN(4);
  +   .u_boot_list : {
  +   KEEP(*(SORT(.u_boot_list*_i2c_*)));
  +   }
  
   in arch/arm/cpu/u-boot-spl.lds at line 34.
  
   Can you re-check?
 
  [Alison Wang] Yes, you are right. u-boot-spl.bin files are identical.
  The u-boot binaries (u-boot, u-boot.bin, u-boot-with-spl.bin, u-
 boot.map, u-boot.srec) are different only in build date and time.
  
   [1] BTW, how do you folks out here proceed when trying to compare
 u-
   boot.bin files from different builds of the same target without the
   repo state or build date and time affecting the comparison? I use a
   patch to Makefile that fakes the commit and repo state, and I also
   use fakelib to force timestamps, but there might be a simpler way.
  
  [Alison Wang] Oh, your way is very good. I just used vimdiff.
 
 I'll run a larger-scale check today, to see which SPLs are affected by
 adding u-boot_list*, not just u_boot_list*_i2c_*, i.e., maybe we can
 make this identical in u-boot.lds and u-boot-spl.lds for ARM.
 
[Alison Wang] I can't agree with you more on making this identical in u-boot.lds
and u-boot-spl.lds for ARM. Anyway, I need to confirm it through your 
larger-scale
check result.


Best Regards,
Alison Wang
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 6/7] arm: ls102xa: Add SD boot support for LS1021AQDS board

2014-10-15 Thread Albert ARIBAUD
Hi Huan,

On Wed, 15 Oct 2014 06:56:37 +, Huan Wang
alison.w...@freescale.com wrote:

 Hi, Albert,
 
  On Wed, 8 Oct 2014 09:53:03 +, Huan Wang alison.w...@freescale.com
  wrote:
  
   Hi, Albert,
  
On Thu, 25 Sep 2014 06:45:00 +, Huan Wang
alison.w...@freescale.com wrote:
   
 Hi, Albert,

  On Mon, 22 Sep 2014 06:46:20 +, Huan Wang
  alison.w...@freescale.com wrote:
 
   Hi, Albert,
  
 On Thu, 18 Sep 2014 13:47:18 +0800, Alison Wang
 b18...@freescale.com
 wrote:

  +
  + . = ALIGN(4);
  + .u_boot_list : {
  + KEEP(*(SORT(.u_boot_list*_i2c_*)));
  + }

 IS this required? And if it is, could it not be added to
 the arch/arm/cpu/u-boot-spl.lds file? This way you would
 not need an .lds file at all.

 [Alison Wang] Yes, it is required.
   
Ok -- what for? :)
   [Alison Wang] In SPL part, DDR is initialized by reading SPD
   through
  I2C interface.
   For I2C, ll_entry_count() is called, and it returns the
  number
   of elements of a linker-generated array placed into
  subsection
   of .u_boot_list section specified by _list argument. So I
  need
   to
add
  this to make I2C work in SPL.
 
  Understood. So your SPL code uses I2C, and for I2C, you need a
  linker list. But then:
 
 I would like to add it in arch/arm/cpu/u-boot-spl.lds. I
 was not sure adding it in arch/arm/cpu/u-boot-spl.lds is
 acceptable or
  not.
   
(assuming the reason why it is needed is valid) If it
  causes
no change to boards which do not use it right now (and I
mean 'no change' ad 'binary identical') then this is
acceptable. Make sure you check the binary invariance and
that you mention it in the
  commit.
   
   [Alison Wang] It will cause the binary is not identical for
   other
  board.
 
  Is this a prediction or an actual observation of compared
  builds
  with and without the I2C linker liste addition to the generic
SPL .lds?

 [Alison Wang] I use mx31pdk as example. I compared the binaries
 with and Without the I2C linker list in
 arch/arm/cpu/u-boot-spl.lds. The binaries are not identical.
   
I have just checked mx31pdk: the u-boot binaries (u-boot,
u-boot.bin, u-boot-with-spl.bin, u-boot.map, u-boot.srec) are
  indeed
different, but that's just normal considering the repository state
and build date and time are included in the binaries [1].
   
OTOH, I see that the u-boot-spl.bin files are identical.
   
The only change I made between the two builds was inserting
   
 . = ALIGN(4);
 +   .u_boot_list : {
 +   KEEP(*(SORT(.u_boot_list*_i2c_*)));
 +   }
   
in arch/arm/cpu/u-boot-spl.lds at line 34.
   
Can you re-check?
  
   [Alison Wang] Yes, you are right. u-boot-spl.bin files are identical.
   The u-boot binaries (u-boot, u-boot.bin, u-boot-with-spl.bin, u-
  boot.map, u-boot.srec) are different only in build date and time.
   
[1] BTW, how do you folks out here proceed when trying to compare
  u-
boot.bin files from different builds of the same target without the
repo state or build date and time affecting the comparison? I use a
patch to Makefile that fakes the commit and repo state, and I also
use fakelib to force timestamps, but there might be a simpler way.
   
   [Alison Wang] Oh, your way is very good. I just used vimdiff.
  
  I'll run a larger-scale check today, to see which SPLs are affected by
  adding u-boot_list*, not just u_boot_list*_i2c_*, i.e., maybe we can
  make this identical in u-boot.lds and u-boot-spl.lds for ARM.
  
 [Alison Wang] I can't agree with you more on making this identical in 
 u-boot.lds
 and u-boot-spl.lds for ARM. Anyway, I need to confirm it through your 
 larger-scale
 check result.

I have been slightly side-tracked on this, but I'll run the test in a
few hours and publish the results in this thread.

 Best Regards,
 Alison Wang

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 6/7] arm: ls102xa: Add SD boot support for LS1021AQDS board

2014-10-11 Thread Albert ARIBAUD
Hi Huan,

On Wed, 8 Oct 2014 09:53:03 +, Huan Wang
alison.w...@freescale.com wrote:

 Hi, Albert,
 
  On Thu, 25 Sep 2014 06:45:00 +, Huan Wang
  alison.w...@freescale.com wrote:
  
   Hi, Albert,
  
On Mon, 22 Sep 2014 06:46:20 +, Huan Wang
alison.w...@freescale.com wrote:
   
 Hi, Albert,

   On Thu, 18 Sep 2014 13:47:18 +0800, Alison Wang
   b18...@freescale.com
   wrote:
  
+
+ . = ALIGN(4);
+ .u_boot_list : {
+ KEEP(*(SORT(.u_boot_list*_i2c_*)));
+ }
  
   IS this required? And if it is, could it not be added to the
   arch/arm/cpu/u-boot-spl.lds file? This way you would not need
   an .lds file at all.
  
   [Alison Wang] Yes, it is required.
 
  Ok -- what for? :)
 [Alison Wang] In SPL part, DDR is initialized by reading SPD
 through
I2C interface.
 For I2C, ll_entry_count() is called, and it returns the number of
 elements of a linker-generated array placed into subsection of
 .u_boot_list section specified by _list argument. So I need to
  add
this to make I2C work in SPL.
   
Understood. So your SPL code uses I2C, and for I2C, you need a
linker list. But then:
   
   I would like to add it in arch/arm/cpu/u-boot-spl.lds. I was
   not sure adding it in arch/arm/cpu/u-boot-spl.lds is
   acceptable or
not.
 
  (assuming the reason why it is needed is valid) If it causes no
  change to boards which do not use it right now (and I mean 'no
  change' ad 'binary identical') then this is acceptable. Make
  sure you check the binary invariance and that you mention it in
  the
commit.
 
 [Alison Wang] It will cause the binary is not identical for other
board.
   
Is this a prediction or an actual observation of compared builds
with and without the I2C linker liste addition to the generic
  SPL .lds?
  
   [Alison Wang] I use mx31pdk as example. I compared the binaries with
   and Without the I2C linker list in arch/arm/cpu/u-boot-spl.lds. The
   binaries are not identical.
  
  I have just checked mx31pdk: the u-boot binaries (u-boot, u-boot.bin,
  u-boot-with-spl.bin, u-boot.map, u-boot.srec) are indeed different, but
  that's just normal considering the repository state and build date and
  time are included in the binaries [1].
  
  OTOH, I see that the u-boot-spl.bin files are identical.
  
  The only change I made between the two builds was inserting
  
   . = ALIGN(4);
   +   .u_boot_list : {
   +   KEEP(*(SORT(.u_boot_list*_i2c_*)));
   +   }
  
  in arch/arm/cpu/u-boot-spl.lds at line 34.
  
  Can you re-check?
 
 [Alison Wang] Yes, you are right. u-boot-spl.bin files are identical. The 
 u-boot binaries
 (u-boot, u-boot.bin, u-boot-with-spl.bin, u-boot.map, u-boot.srec) are 
 different only in build date and time.
  
  [1] BTW, how do you folks out here proceed when trying to compare u-
  boot.bin files from different builds of the same target without the
  repo state or build date and time affecting the comparison? I use a
  patch to Makefile that fakes the commit and repo state, and I also use
  fakelib to force timestamps, but there might be a simpler way.
  
 [Alison Wang] Oh, your way is very good. I just used vimdiff.

I'll run a larger-scale check today, to see which SPLs are affected by
adding u-boot_list*, not just u_boot_list*_i2c_*, i.e., maybe we can
make this identical in u-boot.lds and u-boot-spl.lds for ARM.

 Best Regards,
 Alison Wang

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 6/7] arm: ls102xa: Add SD boot support for LS1021AQDS board

2014-10-08 Thread Huan Wang
Hi, Albert,

 On Thu, 25 Sep 2014 06:45:00 +, Huan Wang
 alison.w...@freescale.com wrote:
 
  Hi, Albert,
 
   On Mon, 22 Sep 2014 06:46:20 +, Huan Wang
   alison.w...@freescale.com wrote:
  
Hi, Albert,
   
  On Thu, 18 Sep 2014 13:47:18 +0800, Alison Wang
  b18...@freescale.com
  wrote:
 
   +
   + . = ALIGN(4);
   + .u_boot_list : {
   + KEEP(*(SORT(.u_boot_list*_i2c_*)));
   + }
 
  IS this required? And if it is, could it not be added to the
  arch/arm/cpu/u-boot-spl.lds file? This way you would not need
  an .lds file at all.
 
  [Alison Wang] Yes, it is required.

 Ok -- what for? :)
[Alison Wang] In SPL part, DDR is initialized by reading SPD
through
   I2C interface.
For I2C, ll_entry_count() is called, and it returns the number of
elements of a linker-generated array placed into subsection of
.u_boot_list section specified by _list argument. So I need to
 add
   this to make I2C work in SPL.
  
   Understood. So your SPL code uses I2C, and for I2C, you need a
   linker list. But then:
  
  I would like to add it in arch/arm/cpu/u-boot-spl.lds. I was
  not sure adding it in arch/arm/cpu/u-boot-spl.lds is
  acceptable or
   not.

 (assuming the reason why it is needed is valid) If it causes no
 change to boards which do not use it right now (and I mean 'no
 change' ad 'binary identical') then this is acceptable. Make
 sure you check the binary invariance and that you mention it in
 the
   commit.

[Alison Wang] It will cause the binary is not identical for other
   board.
  
   Is this a prediction or an actual observation of compared builds
   with and without the I2C linker liste addition to the generic
 SPL .lds?
 
  [Alison Wang] I use mx31pdk as example. I compared the binaries with
  and Without the I2C linker list in arch/arm/cpu/u-boot-spl.lds. The
  binaries are not identical.
 
 I have just checked mx31pdk: the u-boot binaries (u-boot, u-boot.bin,
 u-boot-with-spl.bin, u-boot.map, u-boot.srec) are indeed different, but
 that's just normal considering the repository state and build date and
 time are included in the binaries [1].
 
 OTOH, I see that the u-boot-spl.bin files are identical.
 
 The only change I made between the two builds was inserting
 
. = ALIGN(4);
+   .u_boot_list : {
+   KEEP(*(SORT(.u_boot_list*_i2c_*)));
+   }
 
 in arch/arm/cpu/u-boot-spl.lds at line 34.
 
 Can you re-check?

[Alison Wang] Yes, you are right. u-boot-spl.bin files are identical. The 
u-boot binaries
(u-boot, u-boot.bin, u-boot-with-spl.bin, u-boot.map, u-boot.srec) are 
different only in build date and time.
 
 [1] BTW, how do you folks out here proceed when trying to compare u-
 boot.bin files from different builds of the same target without the
 repo state or build date and time affecting the comparison? I use a
 patch to Makefile that fakes the commit and repo state, and I also use
 fakelib to force timestamps, but there might be a simpler way.
 
[Alison Wang] Oh, your way is very good. I just used vimdiff.


Best Regards,
Alison Wang
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 6/7] arm: ls102xa: Add SD boot support for LS1021AQDS board

2014-10-01 Thread Albert ARIBAUD
Hi Huan,

On Thu, 25 Sep 2014 06:45:00 +, Huan Wang
alison.w...@freescale.com wrote:

 Hi, Albert,
 
  On Mon, 22 Sep 2014 06:46:20 +, Huan Wang
  alison.w...@freescale.com wrote:
  
   Hi, Albert,
  
 On Thu, 18 Sep 2014 13:47:18 +0800, Alison Wang
 b18...@freescale.com
 wrote:

  +
  + . = ALIGN(4);
  + .u_boot_list : {
  + KEEP(*(SORT(.u_boot_list*_i2c_*)));
  + }

 IS this required? And if it is, could it not be added to the
 arch/arm/cpu/u-boot-spl.lds file? This way you would not need an
 .lds file at all.

 [Alison Wang] Yes, it is required.
   
Ok -- what for? :)
   [Alison Wang] In SPL part, DDR is initialized by reading SPD through
  I2C interface.
   For I2C, ll_entry_count() is called, and it returns the number of
   elements of a linker-generated array placed into subsection of
   .u_boot_list section specified by _list argument. So I need to add
  this to make I2C work in SPL.
  
  Understood. So your SPL code uses I2C, and for I2C, you need a linker
  list. But then:
  
 I would like to add it in arch/arm/cpu/u-boot-spl.lds. I was not
 sure adding it in arch/arm/cpu/u-boot-spl.lds is acceptable or
  not.
   
(assuming the reason why it is needed is valid) If it causes no
change to boards which do not use it right now (and I mean 'no
change' ad 'binary identical') then this is acceptable. Make sure
you check the binary invariance and that you mention it in the
  commit.
   
   [Alison Wang] It will cause the binary is not identical for other
  board.
  
  Is this a prediction or an actual observation of compared builds with
  and without the I2C linker liste addition to the generic SPL .lds?
 
 [Alison Wang] I use mx31pdk as example. I compared the binaries with and
 Without the I2C linker list in arch/arm/cpu/u-boot-spl.lds. The binaries
 are not identical.

I have just checked mx31pdk: the u-boot binaries (u-boot, u-boot.bin,
u-boot-with-spl.bin, u-boot.map, u-boot.srec) are indeed different, but
that's just normal considering the repository state and build date and
time are included in the binaries [1].

OTOH, I see that the u-boot-spl.bin files are identical.

The only change I made between the two builds was inserting

 . = ALIGN(4);
 +   .u_boot_list : {
 +   KEEP(*(SORT(.u_boot_list*_i2c_*)));
 +   }  

in arch/arm/cpu/u-boot-spl.lds at line 34.

Can you re-check?

 Best Regards,
 Alison Wang

[1] BTW, how do you folks out here proceed when trying to compare
u-boot.bin files from different builds of the same target without
the repo state or build date and time affecting the comparison? I use a
patch to Makefile that fakes the commit and repo state, and I also use
fakelib to force timestamps, but there might be a simpler way.

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 6/7] arm: ls102xa: Add SD boot support for LS1021AQDS board

2014-09-25 Thread Huan Wang
Hi, Albert,

 On Mon, 22 Sep 2014 06:46:20 +, Huan Wang
 alison.w...@freescale.com wrote:
 
  Hi, Albert,
 
On Thu, 18 Sep 2014 13:47:18 +0800, Alison Wang
b18...@freescale.com
wrote:
   
 +
 + . = ALIGN(4);
 + .u_boot_list : {
 + KEEP(*(SORT(.u_boot_list*_i2c_*)));
 + }
   
IS this required? And if it is, could it not be added to the
arch/arm/cpu/u-boot-spl.lds file? This way you would not need an
.lds file at all.
   
[Alison Wang] Yes, it is required.
  
   Ok -- what for? :)
  [Alison Wang] In SPL part, DDR is initialized by reading SPD through
 I2C interface.
  For I2C, ll_entry_count() is called, and it returns the number of
  elements of a linker-generated array placed into subsection of
  .u_boot_list section specified by _list argument. So I need to add
 this to make I2C work in SPL.
 
 Understood. So your SPL code uses I2C, and for I2C, you need a linker
 list. But then:
 
I would like to add it in arch/arm/cpu/u-boot-spl.lds. I was not
sure adding it in arch/arm/cpu/u-boot-spl.lds is acceptable or
 not.
  
   (assuming the reason why it is needed is valid) If it causes no
   change to boards which do not use it right now (and I mean 'no
   change' ad 'binary identical') then this is acceptable. Make sure
   you check the binary invariance and that you mention it in the
 commit.
  
  [Alison Wang] It will cause the binary is not identical for other
 board.
 
 Is this a prediction or an actual observation of compared builds with
 and without the I2C linker liste addition to the generic SPL .lds?

[Alison Wang] I use mx31pdk as example. I compared the binaries with and
Without the I2C linker list in arch/arm/cpu/u-boot-spl.lds. The binaries
are not identical.
 
  I think
  it may be not good to add in arch/arm/cpu/u-boot-spl.lds. What's your
 opinion about it?
 
 If there are SPLs which use I2C linker lists *and* the generic .lds and
 build without an error, then this should be fixed, because it means the
 build process should complain when an input section is not mapped to an
 output section.
 
 (and that should be fixed even though in this case, adding the I2C
 linker lists in the .lds would 'fix' the build, but they would actually
 paper over the real issue of sections being mapped without control)
 

Best Regards,
Alison Wang
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 6/7] arm: ls102xa: Add SD boot support for LS1021AQDS board

2014-09-22 Thread Huan Wang
Hi, Albert,

  On Thu, 18 Sep 2014 13:47:18 +0800, Alison Wang b18...@freescale.com
  wrote:
 
   +
   + . = ALIGN(4);
   + .u_boot_list : {
   + KEEP(*(SORT(.u_boot_list*_i2c_*)));
   + }
 
  IS this required? And if it is, could it not be added to the
  arch/arm/cpu/u-boot-spl.lds file? This way you would not need an .lds
  file at all.
 
  [Alison Wang] Yes, it is required.
 
 Ok -- what for? :)
[Alison Wang] In SPL part, DDR is initialized by reading SPD through I2C 
interface.
For I2C, ll_entry_count() is called, and it returns the number of elements of a
linker-generated array placed into subsection of .u_boot_list section specified
by _list argument. So I need to add this to make I2C work in SPL.

 
  I would like to add it in arch/arm/cpu/u-boot-spl.lds. I was not sure
  adding it in arch/arm/cpu/u-boot-spl.lds is acceptable or not.
 
 (assuming the reason why it is needed is valid) If it causes no change
 to boards which do not use it right now (and I mean 'no change' ad
 'binary identical') then this is acceptable. Make sure you check the
 binary invariance and that you mention it in the commit.
 
[Alison Wang] It will cause the binary is not identical for other board. I think
it may be not good to add in arch/arm/cpu/u-boot-spl.lds. What's your opinion 
about it?

Best Regards,
Alison Wang
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 6/7] arm: ls102xa: Add SD boot support for LS1021AQDS board

2014-09-22 Thread Albert ARIBAUD
Hi Huan,

On Mon, 22 Sep 2014 06:46:20 +, Huan Wang
alison.w...@freescale.com wrote:

 Hi, Albert,
 
   On Thu, 18 Sep 2014 13:47:18 +0800, Alison Wang b18...@freescale.com
   wrote:
  
+
+ . = ALIGN(4);
+ .u_boot_list : {
+ KEEP(*(SORT(.u_boot_list*_i2c_*)));
+ }
  
   IS this required? And if it is, could it not be added to the
   arch/arm/cpu/u-boot-spl.lds file? This way you would not need an .lds
   file at all.
  
   [Alison Wang] Yes, it is required.
  
  Ok -- what for? :)
 [Alison Wang] In SPL part, DDR is initialized by reading SPD through I2C 
 interface.
 For I2C, ll_entry_count() is called, and it returns the number of elements of 
 a
 linker-generated array placed into subsection of .u_boot_list section 
 specified
 by _list argument. So I need to add this to make I2C work in SPL.

Understood. So your SPL code uses I2C, and for I2C, you need a linker
list. But then:

   I would like to add it in arch/arm/cpu/u-boot-spl.lds. I was not sure
   adding it in arch/arm/cpu/u-boot-spl.lds is acceptable or not.
  
  (assuming the reason why it is needed is valid) If it causes no change
  to boards which do not use it right now (and I mean 'no change' ad
  'binary identical') then this is acceptable. Make sure you check the
  binary invariance and that you mention it in the commit.
  
 [Alison Wang] It will cause the binary is not identical for other board.

Is this a prediction or an actual observation of compared builds with
and without the I2C linker liste addition to the generic SPL .lds?

 I think
 it may be not good to add in arch/arm/cpu/u-boot-spl.lds. What's your opinion 
 about it?

If there are SPLs which use I2C linker lists *and* the generic .lds and
build without an error, then this should be fixed, because it means the
build process should complain when an input section is not mapped to an
output section.

(and that should be fixed even though in this case, adding the I2C
linker lists in the .lds would 'fix' the build, but they would actually
paper over the real issue of sections being mapped without control)

 Best Regards,
 Alison Wang

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 6/7] arm: ls102xa: Add SD boot support for LS1021AQDS board

2014-09-19 Thread Albert ARIBAUD
Hi Huan,

On Thu, 18 Sep 2014 15:15:54 +, Huan Wang
alison.w...@freescale.com wrote:

 Hi, Albert,
 
 On Thu, 18 Sep 2014 13:47:18 +0800, Alison Wang b18...@freescale.com
 wrote:
 
  +
  + . = ALIGN(4);
  + .u_boot_list : {
  + KEEP(*(SORT(.u_boot_list*_i2c_*)));
  + }
 
 IS this required? And if it is, could it not be added to the
 arch/arm/cpu/u-boot-spl.lds file? This way you would not need an .lds
 file at all.
 
 [Alison Wang] Yes, it is required.

Ok -- what for? :)

 I would like to add it in arch/arm/cpu/u-boot-spl.lds. I was not sure
 adding it in arch/arm/cpu/u-boot-spl.lds is acceptable or not.

(assuming the reason why it is needed is valid) If it causes no change
to boards which do not use it right now (and I mean 'no change' ad
'binary identical') then this is acceptable. Make sure you check the
binary invariance and that you mention it in the commit.

 Best Regards,
 Alison Wang

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 6/7] arm: ls102xa: Add SD boot support for LS1021AQDS board

2014-09-18 Thread Alison Wang
This patch adds SD boot support for LS1021AQDS board. SPL
framework is used. PBL initialize the internal RAM and copy
SPL to it, then SPL initialize DDR using SPD and copy u-boot
from SD card to DDR, finally SPL transfer control to u-boot.

Signed-off-by: Alison Wang alison.w...@freescale.com
Signed-off-by: Jason Jin jason@freescale.com
---
 arch/arm/cpu/armv7/ls102xa/Makefile   |  1 +
 arch/arm/cpu/armv7/ls102xa/spl.c  | 35 +++
 arch/arm/cpu/armv7/ls102xa/u-boot-spl.lds | 89 +++
 arch/arm/include/asm/arch-ls102xa/spl.h   | 20 ++
 board/freescale/ls1021aqds/MAINTAINERS|  1 +
 board/freescale/ls1021aqds/ddr.c  |  5 +-
 board/freescale/ls1021aqds/ls1021aqds.c   | 31 ++
 board/freescale/ls1021aqds/ls102xa_pbi.cfg|  8 +++
 board/freescale/ls1021aqds/ls102xa_rcw_sd.cfg | 14 +
 configs/ls1021aqds_sdcard_defconfig   |  4 ++
 include/configs/ls1021aqds.h  | 67 
 11 files changed, 274 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/cpu/armv7/ls102xa/spl.c
 create mode 100644 arch/arm/cpu/armv7/ls102xa/u-boot-spl.lds
 create mode 100644 arch/arm/include/asm/arch-ls102xa/spl.h
 create mode 100644 board/freescale/ls1021aqds/ls102xa_pbi.cfg
 create mode 100644 board/freescale/ls1021aqds/ls102xa_rcw_sd.cfg
 create mode 100644 configs/ls1021aqds_sdcard_defconfig

diff --git a/arch/arm/cpu/armv7/ls102xa/Makefile 
b/arch/arm/cpu/armv7/ls102xa/Makefile
index d82ce8d..56ef3a7 100644
--- a/arch/arm/cpu/armv7/ls102xa/Makefile
+++ b/arch/arm/cpu/armv7/ls102xa/Makefile
@@ -10,3 +10,4 @@ obj-y += timer.o
 
 obj-$(CONFIG_OF_LIBFDT) += fdt.o
 obj-$(CONFIG_SYS_HAS_SERDES) += fsl_ls1_serdes.o ls102xa_serdes.o
+obj-$(CONFIG_SPL) += spl.o
diff --git a/arch/arm/cpu/armv7/ls102xa/spl.c b/arch/arm/cpu/armv7/ls102xa/spl.c
new file mode 100644
index 000..77ea1ee
--- /dev/null
+++ b/arch/arm/cpu/armv7/ls102xa/spl.c
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include common.h
+#include spl.h
+
+u32 spl_boot_device(void)
+{
+#ifdef CONFIG_SPL_MMC_SUPPORT
+   return BOOT_DEVICE_MMC1;
+#endif
+   return BOOT_DEVICE_NAND;
+}
+
+u32 spl_boot_mode(void)
+{
+   switch (spl_boot_device()) {
+   case BOOT_DEVICE_MMC1:
+#ifdef CONFIG_SPL_FAT_SUPPORT
+   return MMCSD_MODE_FAT;
+#else
+   return MMCSD_MODE_RAW;
+#endif
+   break;
+   case BOOT_DEVICE_NAND:
+   return 0;
+   break;
+   default:
+   puts(spl: error: unsupported device\n);
+   hang();
+   }
+}
diff --git a/arch/arm/cpu/armv7/ls102xa/u-boot-spl.lds 
b/arch/arm/cpu/armv7/ls102xa/u-boot-spl.lds
new file mode 100644
index 000..10671e7
--- /dev/null
+++ b/arch/arm/cpu/armv7/ls102xa/u-boot-spl.lds
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2004-2008 Texas Instruments
+ *
+ * (C) Copyright 2002
+ * Gary Jennejohn, DENX Software Engineering, ga...@denx.de
+ *
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+OUTPUT_FORMAT(elf32-littlearm, elf32-littlearm, elf32-littlearm)
+OUTPUT_ARCH(arm)
+ENTRY(_start)
+SECTIONS
+{
+   . = 0x;
+
+   . = ALIGN(4);
+   .text :
+   {
+   __image_copy_start = .;
+   *(.vectors)
+   CPUDIR/start.o (.text*)
+   *(.text*)
+   }
+
+   . = ALIGN(4);
+   .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
+
+   . = ALIGN(4);
+   .data : {
+   *(.data*)
+   }
+
+   . = ALIGN(4);
+   .u_boot_list : {
+   KEEP(*(SORT(.u_boot_list*_i2c_*)));
+   }
+
+   . = .;
+
+   __image_copy_end = .;
+
+   .rel.dyn : {
+   __rel_dyn_start = .;
+   *(.rel*)
+   __rel_dyn_end = .;
+   }
+
+   .end :
+   {
+   *(.__end)
+   }
+
+   _image_binary_end = .;
+
+   .bss __rel_dyn_start (OVERLAY) : {
+   __bss_start = .;
+   *(.bss*)
+. = ALIGN(4);
+   __bss_end = .;
+   }
+
+   .dynsym _image_binary_end : { *(.dynsym) }
+   .dynbss : { *(.dynbss) }
+   .dynstr : { *(.dynstr*) }
+   .dynamic : { *(.dynamic*) }
+   .hash : { *(.hash*) }
+   .plt : { *(.plt*) }
+   .interp : { *(.interp*) }
+   .gnu : { *(.gnu*) }
+   .ARM.exidx : { *(.ARM.exidx*) }
+}
+
+#if defined(CONFIG_SPL_MAX_SIZE)
+ASSERT(__image_copy_end - __image_copy_start  (CONFIG_SPL_MAX_SIZE), \
+   SPL image too big);
+#endif
+
+#if defined(CONFIG_SPL_BSS_MAX_SIZE)
+ASSERT(__bss_end - __bss_start  (CONFIG_SPL_BSS_MAX_SIZE), \
+   SPL image BSS too big);
+#endif
+
+#if defined(CONFIG_SPL_MAX_FOOTPRINT)
+ASSERT(__bss_end - _start  (CONFIG_SPL_MAX_FOOTPRINT), \
+   SPL image plus BSS too big);
+#endif
diff --git 

Re: [U-Boot] [PATCH 6/7] arm: ls102xa: Add SD boot support for LS1021AQDS board

2014-09-18 Thread Albert ARIBAUD
Hi Alison,

On Thu, 18 Sep 2014 13:47:18 +0800, Alison Wang b18...@freescale.com
wrote:

 This patch adds SD boot support for LS1021AQDS board. SPL
 framework is used. PBL initialize the internal RAM and copy
 SPL to it, then SPL initialize DDR using SPD and copy u-boot
 from SD card to DDR, finally SPL transfer control to u-boot.
 
 Signed-off-by: Alison Wang alison.w...@freescale.com
 Signed-off-by: Jason Jin jason@freescale.com
 ---
  arch/arm/cpu/armv7/ls102xa/Makefile   |  1 +
  arch/arm/cpu/armv7/ls102xa/spl.c  | 35 +++
  arch/arm/cpu/armv7/ls102xa/u-boot-spl.lds | 89 
 +++
  arch/arm/include/asm/arch-ls102xa/spl.h   | 20 ++
  board/freescale/ls1021aqds/MAINTAINERS|  1 +
  board/freescale/ls1021aqds/ddr.c  |  5 +-
  board/freescale/ls1021aqds/ls1021aqds.c   | 31 ++
  board/freescale/ls1021aqds/ls102xa_pbi.cfg|  8 +++
  board/freescale/ls1021aqds/ls102xa_rcw_sd.cfg | 14 +
  configs/ls1021aqds_sdcard_defconfig   |  4 ++
  include/configs/ls1021aqds.h  | 67 
  11 files changed, 274 insertions(+), 1 deletion(-)
  create mode 100644 arch/arm/cpu/armv7/ls102xa/spl.c
  create mode 100644 arch/arm/cpu/armv7/ls102xa/u-boot-spl.lds
  create mode 100644 arch/arm/include/asm/arch-ls102xa/spl.h
  create mode 100644 board/freescale/ls1021aqds/ls102xa_pbi.cfg
  create mode 100644 board/freescale/ls1021aqds/ls102xa_rcw_sd.cfg
  create mode 100644 configs/ls1021aqds_sdcard_defconfig
 
 diff --git a/arch/arm/cpu/armv7/ls102xa/Makefile 
 b/arch/arm/cpu/armv7/ls102xa/Makefile
 index d82ce8d..56ef3a7 100644
 --- a/arch/arm/cpu/armv7/ls102xa/Makefile
 +++ b/arch/arm/cpu/armv7/ls102xa/Makefile
 @@ -10,3 +10,4 @@ obj-y   += timer.o
  
  obj-$(CONFIG_OF_LIBFDT) += fdt.o
  obj-$(CONFIG_SYS_HAS_SERDES) += fsl_ls1_serdes.o ls102xa_serdes.o
 +obj-$(CONFIG_SPL) += spl.o
 diff --git a/arch/arm/cpu/armv7/ls102xa/spl.c 
 b/arch/arm/cpu/armv7/ls102xa/spl.c
 new file mode 100644
 index 000..77ea1ee
 --- /dev/null
 +++ b/arch/arm/cpu/armv7/ls102xa/spl.c
 @@ -0,0 +1,35 @@
 +/*
 + * Copyright 2014 Freescale Semiconductor, Inc.
 + *
 + * SPDX-License-Identifier:  GPL-2.0+
 + */
 +
 +#include common.h
 +#include spl.h
 +
 +u32 spl_boot_device(void)
 +{
 +#ifdef CONFIG_SPL_MMC_SUPPORT
 + return BOOT_DEVICE_MMC1;
 +#endif
 + return BOOT_DEVICE_NAND;
 +}
 +
 +u32 spl_boot_mode(void)
 +{
 + switch (spl_boot_device()) {
 + case BOOT_DEVICE_MMC1:
 +#ifdef CONFIG_SPL_FAT_SUPPORT
 + return MMCSD_MODE_FAT;
 +#else
 + return MMCSD_MODE_RAW;
 +#endif
 + break;
 + case BOOT_DEVICE_NAND:
 + return 0;
 + break;
 + default:
 + puts(spl: error: unsupported device\n);
 + hang();
 + }
 +}
 diff --git a/arch/arm/cpu/armv7/ls102xa/u-boot-spl.lds 
 b/arch/arm/cpu/armv7/ls102xa/u-boot-spl.lds
 new file mode 100644
 index 000..10671e7
 --- /dev/null
 +++ b/arch/arm/cpu/armv7/ls102xa/u-boot-spl.lds
 @@ -0,0 +1,89 @@
 +/*
 + * Copyright (c) 2004-2008 Texas Instruments
 + *
 + * (C) Copyright 2002
 + * Gary Jennejohn, DENX Software Engineering, ga...@denx.de
 + *
 + * Copyright 2014 Freescale Semiconductor, Inc.
 + *
 + * SPDX-License-Identifier:  GPL-2.0+
 + */
 +
 +OUTPUT_FORMAT(elf32-littlearm, elf32-littlearm, elf32-littlearm)
 +OUTPUT_ARCH(arm)
 +ENTRY(_start)
 +SECTIONS
 +{
 + . = 0x;
 +
 + . = ALIGN(4);
 + .text :
 + {
 + __image_copy_start = .;
 + *(.vectors)
 + CPUDIR/start.o (.text*)
 + *(.text*)
 + }
 +
 + . = ALIGN(4);
 + .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
 +
 + . = ALIGN(4);
 + .data : {
 + *(.data*)
 + }
 +
 + . = ALIGN(4);
 + .u_boot_list : {
 + KEEP(*(SORT(.u_boot_list*_i2c_*)));
 + }

IS this required? And if it is, could it not be added to the
arch/arm/cpu/u-boot-spl.lds file? This way you would not need an .lds
file at all.

 + . = .;
 +
 + __image_copy_end = .;
 +
 + .rel.dyn : {
 + __rel_dyn_start = .;
 + *(.rel*)
 + __rel_dyn_end = .;
 + }
 +
 + .end :
 + {
 + *(.__end)
 + }
 +
 + _image_binary_end = .;
 +
 + .bss __rel_dyn_start (OVERLAY) : {
 + __bss_start = .;
 + *(.bss*)
 +  . = ALIGN(4);
 + __bss_end = .;
 + }
 +
 + .dynsym _image_binary_end : { *(.dynsym) }
 + .dynbss : { *(.dynbss) }
 + .dynstr : { *(.dynstr*) }
 + .dynamic : { *(.dynamic*) }
 + .hash : { *(.hash*) }
 + .plt : { *(.plt*) }
 + .interp : { *(.interp*) }
 + .gnu : { *(.gnu*) }
 + .ARM.exidx : { *(.ARM.exidx*) }
 +}
 +
 +#if defined(CONFIG_SPL_MAX_SIZE)
 +ASSERT(__image_copy_end - __image_copy_start  (CONFIG_SPL_MAX_SIZE), \
 + SPL image too big);
 +#endif
 +
 +#if 

Re: [U-Boot] [PATCH 6/7] arm: ls102xa: Add SD boot support for LS1021AQDS board

2014-09-18 Thread Alison Wang
Hi, Albert,

On Thu, 18 Sep 2014 13:47:18 +0800, Alison Wang b18...@freescale.com
wrote:

 +
 + . = ALIGN(4);
 + .u_boot_list : {
 + KEEP(*(SORT(.u_boot_list*_i2c_*)));
 + }

IS this required? And if it is, could it not be added to the
arch/arm/cpu/u-boot-spl.lds file? This way you would not need an .lds file
at all.

[Alison Wang] Yes, it is required. I would like to add it in
arch/arm/cpu/u-boot-spl.lds. I was not sure adding it in
arch/arm/cpu/u-boot-spl.lds is acceptable or not.

Alison



--
View this message in context: 
http://u-boot.10912.n7.nabble.com/PATCH-0-7-Add-SD-boot-support-for-LS1021AQDS-TWR-board-tp189678p189759.html
Sent from the U-Boot mailing list archive at Nabble.com.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 6/7] arm: ls102xa: Add SD boot support for LS1021AQDS board

2014-09-18 Thread Huan Wang
Hi, Albert,

  +   . = ALIGN(4);
  +   .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
  +
  +   . = ALIGN(4);
  +   .data : {
  +   *(.data*)
  +   }
  +
  +   . = ALIGN(4);
  +   .u_boot_list : {
  +   KEEP(*(SORT(.u_boot_list*_i2c_*)));
  +   }
 
 IS this required? And if it is, could it not be added to the
 arch/arm/cpu/u-boot-spl.lds file? This way you would not need an .lds
 file at all.
 
[Alison Wang] Yes, it is required. I would like to add it in 
arch/arm/cpu/u-boot-spl.lds. I was not sure adding it in 
arch/arm/cpu/u-boot-spl.lds is acceptable or not.


Best Regards,
Alison Wang
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot