mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-26 14:40:41 +00:00
arm: Replace test for CONFIG_ARMV7 with CONFIG_CPU_V7
The arch/arm/lib/cache-cp15.c checks for CONFIG_ARMV7 and if this macro is set, it configures TTBR0 register. This register must be configured for the cache on ARMv7 to operate correctly. The problem is that noone actually sets the CONFIG_ARMV7 macro and thus the TTBR0 is not configured at all. On SoCFPGA, this produces all sorts of minor issues which are hard to replicate, for example certain USB sticks are not detected or QSPI NOR sometimes fails to write pages completely. The solution is to replace CONFIG_ARMV7 test with CONFIG_CPU_V7 one. This is correct because the code which added the test(s) for CONFIG_ARMV7 was added shortly after CONFIG_ARMV7 was replaced by CONFIG_CPU_V7 and this code was not adjusted correctly to reflect that change. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@konsulko.com> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
8cdae1dacd
commit
a592e6fb7f
2 changed files with 3 additions and 3 deletions
|
@ -259,7 +259,7 @@ static inline void set_dacr(unsigned int val)
|
||||||
isb();
|
isb();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ARMV7
|
#ifdef CONFIG_CPU_V7
|
||||||
/* Short-Descriptor Translation Table Level 1 Bits */
|
/* Short-Descriptor Translation Table Level 1 Bits */
|
||||||
#define TTB_SECT_NS_MASK (1 << 19)
|
#define TTB_SECT_NS_MASK (1 << 19)
|
||||||
#define TTB_SECT_NG_MASK (1 << 17)
|
#define TTB_SECT_NG_MASK (1 << 17)
|
||||||
|
@ -296,7 +296,7 @@ enum {
|
||||||
MMU_SECTION_SIZE = 1 << MMU_SECTION_SHIFT,
|
MMU_SECTION_SIZE = 1 << MMU_SECTION_SHIFT,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ARMV7
|
#ifdef CONFIG_CPU_V7
|
||||||
/* TTBR0 bits */
|
/* TTBR0 bits */
|
||||||
#define TTBR0_BASE_ADDR_MASK 0xFFFFC000
|
#define TTBR0_BASE_ADDR_MASK 0xFFFFC000
|
||||||
#define TTBR0_RGN_NC (0 << 3)
|
#define TTBR0_RGN_NC (0 << 3)
|
||||||
|
|
|
@ -96,7 +96,7 @@ static inline void mmu_setup(void)
|
||||||
dram_bank_mmu_setup(i);
|
dram_bank_mmu_setup(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ARMV7
|
#ifdef CONFIG_CPU_V7
|
||||||
/* Set TTBR0 */
|
/* Set TTBR0 */
|
||||||
reg = gd->arch.tlb_addr & TTBR0_BASE_ADDR_MASK;
|
reg = gd->arch.tlb_addr & TTBR0_BASE_ADDR_MASK;
|
||||||
#if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH)
|
#if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH)
|
||||||
|
|
Loading…
Reference in a new issue