Re: [U-Boot] [PATCH v4 4/6] armv7: Use -march=armv7-a and thereby enable Thumb-2

2012-07-07 Thread Marek Vasut
Dear Aneesh V,

 Hi Marek,
 
 On 07/06/2012 04:32 PM, Tetsuyuki Kobayashi wrote:
  Hello,
  
  On 2012/07/07, at 8:02, Marek Vasut wrote:
  Dear Aneesh V,
  
  Enable -march=armv7-a for armv7 platforms if the tool-chain
  supports it. This in turn results in Thumb-2 code generated
  for these platforms if CONFIG_SYS_THUMB_BUILD is enabled.
  
  Signed-off-by: Aneesh Vane...@ti.com
  ---
  
  For some reason, this patch breaks USB EHCI on mx51 efika boards. The
  board just freezes instead of detecting USB devices. Reverting this
  patch fixes the issue.
  
  Note I use gcc 4.7.1 (!), might be compiler issue?
  
  Tom, can you try on one of your beagle-dogs please? :)
  
  Just for your information,
  I doubt unaligned access causes this problem.
  
  My investigation is here,
  http://lists.denx.de/pipermail/u-boot/2012-June/127020.html
  My patch
  [PATCH] arm: armv7: add compile option  -mno-unaligned-access if 
available
  http://lists.denx.de/pipermail/u-boot/2012-July/127260.html
 
 This makes sense. You might want to try this patch. Also, to be sure
 that it's nothing to do with Thumb you can make sure you are not
 enabling CONFIG_SYS_THUMB_BUILD.

Ok, I think the patch should be applied then ?

but what if the option isn't available?

 best regards,
 Aneesh

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 4/6] armv7: Use -march=armv7-a and thereby enable Thumb-2

2012-07-07 Thread Albert ARIBAUD
Hi Marek,

On Sat, 7 Jul 2012 09:59:52 +0200, Marek Vasut marek.va...@gmail.com wrote:
 Dear Aneesh V,
 
  Hi Marek,
  
  On 07/06/2012 04:32 PM, Tetsuyuki Kobayashi wrote:
   Hello,
   
   On 2012/07/07, at 8:02, Marek Vasut wrote:
   Dear Aneesh V,
   
   Enable -march=armv7-a for armv7 platforms if the tool-chain
   supports it. This in turn results in Thumb-2 code generated
   for these platforms if CONFIG_SYS_THUMB_BUILD is enabled.
   
   Signed-off-by: Aneesh Vane...@ti.com
   ---
   
   For some reason, this patch breaks USB EHCI on mx51 efika boards. The
   board just freezes instead of detecting USB devices. Reverting this
   patch fixes the issue.
   
   Note I use gcc 4.7.1 (!), might be compiler issue?
   
   Tom, can you try on one of your beagle-dogs please? :)
   
   Just for your information,
   I doubt unaligned access causes this problem.
   
   My investigation is here,
   http://lists.denx.de/pipermail/u-boot/2012-June/127020.html
   My patch
   [PATCH] arm: armv7: add compile option-mno-unaligned-access if 
 available
   http://lists.denx.de/pipermail/u-boot/2012-July/127260.html
  
  This makes sense. You might want to try this patch. Also, to be sure
  that it's nothing to do with Thumb you can make sure you are not
  enabling CONFIG_SYS_THUMB_BUILD.
 
 Ok, I think the patch should be applied then ?
 
 but what if the option isn't available?

If I am not mistaken, from an analysis standpoint, on compilers where the
option is unavailable, there is no issue regarding alignment; and from a
solution standpoint... We'll need to add the option only when cross-compiler
version is known to honor it.

 Best regards,
 Marek Vasut

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


Re: [U-Boot] [PATCH v4 4/6] armv7: Use -march=armv7-a and thereby enable Thumb-2

2012-07-06 Thread Marek Vasut
Dear Aneesh V,

 Enable -march=armv7-a for armv7 platforms if the tool-chain
 supports it. This in turn results in Thumb-2 code generated
 for these platforms if CONFIG_SYS_THUMB_BUILD is enabled.
 
 Signed-off-by: Aneesh V ane...@ti.com
 ---

For some reason, this patch breaks USB EHCI on mx51 efika boards. The board 
just 
freezes instead of detecting USB devices. Reverting this patch fixes the issue.

Note I use gcc 4.7.1 (!), might be compiler issue?

Tom, can you try on one of your beagle-dogs please? :)

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 4/6] armv7: Use -march=armv7-a and thereby enable Thumb-2

2012-07-06 Thread Tetsuyuki Kobayashi
Hello,

On 2012/07/07, at 8:02, Marek Vasut wrote:

 Dear Aneesh V,
 
 Enable -march=armv7-a for armv7 platforms if the tool-chain
 supports it. This in turn results in Thumb-2 code generated
 for these platforms if CONFIG_SYS_THUMB_BUILD is enabled.
 
 Signed-off-by: Aneesh V ane...@ti.com
 ---
 
 For some reason, this patch breaks USB EHCI on mx51 efika boards. The board 
 just 
 freezes instead of detecting USB devices. Reverting this patch fixes the 
 issue.
 
 Note I use gcc 4.7.1 (!), might be compiler issue?
 
 Tom, can you try on one of your beagle-dogs please? :)
 

Just for your information,
I doubt unaligned access causes this problem.

My investigation is here,
http://lists.denx.de/pipermail/u-boot/2012-June/127020.html
My patch
[PATCH] arm: armv7: add compile option  -mno-unaligned-access if available
http://lists.denx.de/pipermail/u-boot/2012-July/127260.html


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


Re: [U-Boot] [PATCH v4 4/6] armv7: Use -march=armv7-a and thereby enable Thumb-2

2012-07-06 Thread Aneesh V

Hi Marek,

On 07/06/2012 04:32 PM, Tetsuyuki Kobayashi wrote:

Hello,

On 2012/07/07, at 8:02, Marek Vasut wrote:


Dear Aneesh V,


Enable -march=armv7-a for armv7 platforms if the tool-chain
supports it. This in turn results in Thumb-2 code generated
for these platforms if CONFIG_SYS_THUMB_BUILD is enabled.

Signed-off-by: Aneesh Vane...@ti.com
---


For some reason, this patch breaks USB EHCI on mx51 efika boards. The board just
freezes instead of detecting USB devices. Reverting this patch fixes the issue.

Note I use gcc 4.7.1 (!), might be compiler issue?

Tom, can you try on one of your beagle-dogs please? :)



Just for your information,
I doubt unaligned access causes this problem.

My investigation is here,
http://lists.denx.de/pipermail/u-boot/2012-June/127020.html
My patch
[PATCH] arm: armv7: add compile option  -mno-unaligned-access if available
http://lists.denx.de/pipermail/u-boot/2012-July/127260.html


This makes sense. You might want to try this patch. Also, to be sure
that it's nothing to do with Thumb you can make sure you are not
enabling CONFIG_SYS_THUMB_BUILD.

best regards,
Aneesh
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 4/6] armv7: Use -march=armv7-a and thereby enable Thumb-2

2012-05-24 Thread Thierry Reding
* Stephen Warren wrote:
 On 05/23/2012 09:01 AM, Thierry Reding wrote:
  * Aneesh V wrote:
  Enable -march=armv7-a for armv7 platforms if the tool-chain 
  supports it. This in turn results in Thumb-2 code generated for
  these platforms if CONFIG_SYS_THUMB_BUILD is enabled.
  
  Signed-off-by: Aneesh V ane...@ti.com --- I believe armv7-a is
  fine for all the SoCs except Tegra2 and I see that Tegra2 is
  already making the necessary exception in
  .../armv7/tegra2/config.mk
  
  Let me know if any other SoC has a problem with armv7-a
  
  I haven't been able to boot any Tegra2 boards with this patch
  applied. I'm guessing that some exceptions for Tegra2 code are
  still missing, though they shouldn't work with armv5 either since
  the AVP is armv4 only. For now I've conditionalized the
  -march=armv7-a on !CONFIG_TEGRA2.
 
 I have the following patch locally, courtesy of Allen Martin. Allen,
 are you going to (or did you) post the final version here?

Allen's final patch did make it into the Tegra tree and I can confirm that
the issue is gone now. Thanks.

Thierry


pgpIJZqA2R8Lp.pgp
Description: PGP signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 4/6] armv7: Use -march=armv7-a and thereby enable Thumb-2

2012-05-23 Thread Thierry Reding
* Aneesh V wrote:
 Enable -march=armv7-a for armv7 platforms if the tool-chain
 supports it. This in turn results in Thumb-2 code generated
 for these platforms if CONFIG_SYS_THUMB_BUILD is enabled.
 
 Signed-off-by: Aneesh V ane...@ti.com
 ---
 I believe armv7-a is fine for all the SoCs except Tegra2
 and I see that Tegra2 is already making the necessary
 exception in .../armv7/tegra2/config.mk
 
 Let me know if any other SoC has a problem with armv7-a

I haven't been able to boot any Tegra2 boards with this patch applied. I'm
guessing that some exceptions for Tegra2 code are still missing, though they
shouldn't work with armv5 either since the AVP is armv4 only. For now I've
conditionalized the -march=armv7-a on !CONFIG_TEGRA2.

Maybe somebody else can shed some light on this. Or perhaps this will be
resolved with Allen's patches anyway?

Thierry


pgpWW3dLbcwx8.pgp
Description: PGP signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 4/6] armv7: Use -march=armv7-a and thereby enable Thumb-2

2012-05-23 Thread Stephen Warren
On 05/23/2012 09:01 AM, Thierry Reding wrote:
 * Aneesh V wrote:
 Enable -march=armv7-a for armv7 platforms if the tool-chain 
 supports it. This in turn results in Thumb-2 code generated for
 these platforms if CONFIG_SYS_THUMB_BUILD is enabled.
 
 Signed-off-by: Aneesh V ane...@ti.com --- I believe armv7-a is
 fine for all the SoCs except Tegra2 and I see that Tegra2 is
 already making the necessary exception in
 .../armv7/tegra2/config.mk
 
 Let me know if any other SoC has a problem with armv7-a
 
 I haven't been able to boot any Tegra2 boards with this patch
 applied. I'm guessing that some exceptions for Tegra2 code are
 still missing, though they shouldn't work with armv5 either since
 the AVP is armv4 only. For now I've conditionalized the
 -march=armv7-a on !CONFIG_TEGRA2.

I have the following patch locally, courtesy of Allen Martin. Allen,
are you going to (or did you) post the final version here?

 diff --git a/arch/arm/cpu/armv7/tegra2/config.mk
 b/arch/arm/cpu/armv7/tegra2/config.mk index fe9ef5b..f3ba6f5
 100644 --- a/arch/arm/cpu/armv7/tegra2/config.mk +++
 b/arch/arm/cpu/armv7/tegra2/config.mk @@ -24,10 +24,12 @@ # MA
 02111-1307 USA #
 
 -# Tegra has an ARMv4T CPU which runs board_init_f(), so we must
 build this -# file with compatible flags +# Tegra has an ARMv4T CPU
 which runs board_init_f(), so we must build these +# files with
 compatible flags ifdef CONFIG_TEGRA2 CFLAGS_arch/arm/lib/board.o +=
 -march=armv4t +CFLAGS_common/cmd_nvedit.o += -march=armv4t 
 +CFLAGS_lib/string.o += -march=armv4t endif
 
 USE_PRIVATE_LIBGCC = yes
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot