fix ARM DCC support for ARMv7 based cores (e.g. CortexA)
cover fix ARM DCC support for ARMv7 based cores (e.g. CortexA)
arm_dcc.c supported ARMv4 (ARM7) to ARMv6 (ARM11) correctly. All recent CortexA/ARMv7 based cores share the mrc/mcr coprocessor calls of ARMv6. Due to the missing #ifdef the ARM7/ARMv4 calls are used as soon as CONFIG_CPU_V7 is defined. This results in an undefined instruction exception.
Alexander Merkle (1):
fix ARM DCC support for ARMv7 based cores (e.g. CortexA)
drivers/serial/arm_dcc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.1.4
PATCH 1/1 fix ARM DCC support for ARMv7 based cores (e.g. CortexA)
---
drivers/serial/arm_dcc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/serial/arm_dcc.c +2 -2
@@ -29,9 +29,9 @@#include <common.h> #include <serial.h> -#if defined(CONFIG_CPU_V6 ) +#if defined(CONFIG_CPU_V6 ) || defined(CONFIG_CPU_V7 )/* -* ARMV6 +* ARMV6 & ARMV7 */ #define DCC_RBIT (1 << 30)#define DCC_WBIT (1 << 29)
Signature · 1 line
2.1.4
cover fix ARM DCC support for ARMv7 based cores (e.g. CortexA)
In reply to Alexander MerkleHello Alexander,
Quoted 5 lines · Alexander Merkle
arm_dcc.csupported ARMv4 (ARM7) to ARMv6 (ARM11) correctly. All recent CortexA/ARMv7 based cores share the mrc/mcr coprocessor calls of ARMv6. Due to the missing #ifdef the ARM7/ARMv4 calls are used as soon asCONFIG_CPU_V7is defined. This results in an undefined instruction exception.
IIUC, the only board that uses ARM DCC serial is the Zynq, and it gets it to work by #define'ing CONFIG_CPU_V6 in its include config file despite being ARMv7. Am I right in assuming this #define was actually a hack to get around the issue you're fixing here, and that it can and should be removed from the Zinq include? If so, can you please post a v2 of your patch which does the removal too?
(BTW, no need for a cover letter when there's only one patch in the "series" IMO)
Amicalement,
Signature · 1 line
Albert.
cover fix ARM DCC support for ARMv7 based cores (e.g. CortexA)
Hello Alexander,
Quoted 17 lines · Albert ARIBAUD
Hello Alexander,
Quoted 5 lines · Alexander Merkle
arm_dcc.csupported ARMv4 (ARM7) to ARMv6 (ARM11) correctly. All recent CortexA/ARMv7 based cores share the mrc/mcr coprocessor calls of ARMv6. Due to the missing #ifdef the ARM7/ARMv4 calls are used as soon asCONFIG_CPU_V7is defined. This results in an undefined instruction exception.IIUC, the only board that uses ARM DCC serial is the Zynq, and it gets it to work by #define'ing
CONFIG_CPU_V6in its include config file despite being ARMv7. Am I right in assuming this #define was actually a hack to get around the issue you're fixing here, and that it can and should be removed from the Zinq include? If so, can you please post a v2 of your patch which does the removal too?
Quoted 2 lines
(BTW, no need for a cover letter when there's only one patch in the "series" IMO)
Ping.
Amicalement,
Signature · 1 line
Albert.