All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm: stm32mp: Fix compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled
@ 2021-02-24 12:53 Patrice Chotard
  2021-03-12  9:52 ` Patrick DELAUNAY
  0 siblings, 1 reply; 3+ messages in thread
From: Patrice Chotard @ 2021-02-24 12:53 UTC (permalink / raw)
  To: u-boot

From: Patrice Chotard <patrice.chotard@st.com>

Fix following compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS
are enabled :

arch/arm/mach-stm32mp/cpu.c: In function ?early_enable_caches?:
arch/arm/mach-stm32mp/cpu.c:223:10: error: ?volatile struct arch_global_data? has no member named ?tlb_size?
  223 |  gd->arch.tlb_size = PGTABLE_SIZE;
      |          ^
arch/arm/mach-stm32mp/cpu.c:224:10: error: ?volatile struct arch_global_data? has no member named ?tlb_addr?
  224 |  gd->arch.tlb_addr = (unsigned long)&early_tlb;
      |          ^

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
---

 arch/arm/mach-stm32mp/cpu.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
index 3faa4ec18a..cd503b7294 100644
--- a/arch/arm/mach-stm32mp/cpu.c
+++ b/arch/arm/mach-stm32mp/cpu.c
@@ -223,8 +223,10 @@ static void early_enable_caches(void)
 	if (CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
 		return;
 
-	gd->arch.tlb_size = PGTABLE_SIZE;
-	gd->arch.tlb_addr = (unsigned long)&early_tlb;
+	if (!(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))) {
+		gd->arch.tlb_size = PGTABLE_SIZE;
+		gd->arch.tlb_addr = (unsigned long)&early_tlb;
+	}
 
 	dcache_enable();
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] arm: stm32mp: Fix compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled
  2021-02-24 12:53 [PATCH] arm: stm32mp: Fix compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled Patrice Chotard
@ 2021-03-12  9:52 ` Patrick DELAUNAY
  2021-03-12 12:13   ` Patrice CHOTARD
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick DELAUNAY @ 2021-03-12  9:52 UTC (permalink / raw)
  To: u-boot

Hi Patrice,

On 2/24/21 1:53 PM, Patrice Chotard wrote:
> From: Patrice Chotard <patrice.chotard@st.com>
>
> Fix following compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS
> are enabled :
>
> arch/arm/mach-stm32mp/cpu.c: In function ?early_enable_caches?:
> arch/arm/mach-stm32mp/cpu.c:223:10: error: ?volatile struct arch_global_data? has no member named ?tlb_size?
>    223 |  gd->arch.tlb_size = PGTABLE_SIZE;
>        |          ^
> arch/arm/mach-stm32mp/cpu.c:224:10: error: ?volatile struct arch_global_data? has no member named ?tlb_addr?
>    224 |  gd->arch.tlb_addr = (unsigned long)&early_tlb;
>        |          ^
>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
> ---
>
>   arch/arm/mach-stm32mp/cpu.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>


Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>

Thanks
Patrick

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] arm: stm32mp: Fix compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled
  2021-03-12  9:52 ` Patrick DELAUNAY
@ 2021-03-12 12:13   ` Patrice CHOTARD
  0 siblings, 0 replies; 3+ messages in thread
From: Patrice CHOTARD @ 2021-03-12 12:13 UTC (permalink / raw)
  To: u-boot

Hi

On 3/12/21 10:52 AM, Patrick DELAUNAY wrote:
> Hi Patrice,
> 
> On 2/24/21 1:53 PM, Patrice Chotard wrote:
>> From: Patrice Chotard <patrice.chotard@st.com>
>>
>> Fix following compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS
>> are enabled :
>>
>> arch/arm/mach-stm32mp/cpu.c: In function ?early_enable_caches?:
>> arch/arm/mach-stm32mp/cpu.c:223:10: error: ?volatile struct arch_global_data? has no member named ?tlb_size?
>> ?? 223 |? gd->arch.tlb_size = PGTABLE_SIZE;
>> ?????? |????????? ^
>> arch/arm/mach-stm32mp/cpu.c:224:10: error: ?volatile struct arch_global_data? has no member named ?tlb_addr?
>> ?? 224 |? gd->arch.tlb_addr = (unsigned long)&early_tlb;
>> ?????? |????????? ^
>>
>> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
>> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
>> ---
>>
>> ? arch/arm/mach-stm32mp/cpu.c | 6 ++++--
>> ? 1 file changed, 4 insertions(+), 2 deletions(-)
>>
> 
> 
> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> 
> Thanks
> Patrick

Applied to u-boot-stm/next

Thanks

Patrice

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-12 12:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-24 12:53 [PATCH] arm: stm32mp: Fix compilation issue when SYS_DCACHE_OFF and/or SYS_DCACHE_SYS are enabled Patrice Chotard
2021-03-12  9:52 ` Patrick DELAUNAY
2021-03-12 12:13   ` Patrice CHOTARD

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.