avr32: disable branch folding
PATCH 1/1 avr32: disable branch folding
From: Andreas Bie?mann <[email protected]>
Due to a hardware bug mentioned in latest AP7000 datasheet errata (revision M from 09.09) branch folding is unreliable. This patch disables CPUCR.FE bitfield as stated in datasheet.
--- arch/avr32/cpu/start.S | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
arch/avr32/cpu/start.S +4 -3
@@ -27,9 +27,10 @@ #define SYSREG_MMUCR_S_OFFSET 4 #define SR_INIT (SYSREG_BIT(GM) | SYSREG_BIT(EM) | SYSREG_BIT(M0)) -#define CPUCR_INIT (SYSREG_BIT(BI) | SYSREG_BIT(BE) \ - | SYSREG_BIT(FE) | SYSREG_BIT(RE) \ - | SYSREG_BIT(IBE) | SYSREG_BIT(IEE)) +// due to errata (unreliable branch folding) set FE bit to '0' +#define CPUCR_INIT ((SYSREG_BIT(BI) | SYSREG_BIT(BE) \ + | SYSREG_BIT(RE) | SYSREG_BIT(IBE) \ + | SYSREG_BIT(IEE)) & ~SYSREG_BIT(FE)) /* * To save some space, we use the same entry point for
Signature · 1 line
1.7.1
PATCH v2 1/1 avr32: disable branch folding
Due to a hardware bug mentioned in latest AP7000 datasheet errata (revision M from 09.09) branch folding is unreliable. This patch disables CPUCR.FE bitfield as stated in datasheet.
---
Changes since v1:
- fix comment
arch/avr32/cpu/start.S | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
arch/avr32/cpu/start.S +4 -3
@@ -27,9 +27,10 @@ #define SYSREG_MMUCR_S_OFFSET 4 #define SR_INIT (SYSREG_BIT(GM) | SYSREG_BIT(EM) | SYSREG_BIT(M0)) -#define CPUCR_INIT (SYSREG_BIT(BI) | SYSREG_BIT(BE) \ - | SYSREG_BIT(FE) | SYSREG_BIT(RE) \ - | SYSREG_BIT(IBE) | SYSREG_BIT(IEE)) +/* due to errata (unreliable branch folding) clear FE bit explicitly */ +#define CPUCR_INIT ((SYSREG_BIT(BI) | SYSREG_BIT(BE) \ + | SYSREG_BIT(RE) | SYSREG_BIT(IBE) \ + | SYSREG_BIT(IEE)) & ~SYSREG_BIT(FE)) /* * To save some space, we use the same entry point for
Signature · 1 line
1.7.1
Wolfgang Denk
AppliedPATCH v2 1/1 avr32: disable branch folding
Dear =?UTF-8?q?Andreas=20Bie=C3=9Fmann?=,
Quoted 5 lines · In message <[email protected]> you wrote:
Due to a hardware bug mentioned in latest AP7000 datasheet errata (revision M from 09.09) branch folding is unreliable. This patch disables CPUCR.FE bitfield as stated in datasheet.
Quoted 8 lines
Signed-off-by Andreas Bie?mann <[email protected]>---
Changes since v1:
- fix commentarch/avr32/cpu/start.S | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
Applied to "next" branch. Thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition. - Isaac Asimov