summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-layerscape/lowlevel-ls1046a.c
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2024-01-10 17:01:12 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-01-11 18:55:10 +0100
commit249e8047be1627aa6ff473fabc179d6ce71087bf (patch)
tree379f64c478e66bdc13a066aed57fcbed7e1588d3 /arch/arm/mach-layerscape/lowlevel-ls1046a.c
parent2ff6f65ba7de3ea068bee653ed99279a0f06731d (diff)
downloadbarebox-249e8047be1627aa6ff473fabc179d6ce71087bf.tar.gz
barebox-249e8047be1627aa6ff473fabc179d6ce71087bf.tar.xz
ARM: layerscape: configure all DMA masters to be cache-coherent
Upstream device tree now has /soc/dma-coherent, which breaks USB in Linux v6.1 when kernel is booted with barebox. Fix this by: - setting the snoop bits for the DMA masters, so we properly support Linux >= v6.1 DTs - fixing up cache coherency setting into kernel DT whenever barebox DT has /soc/dma-coherent to support older device trees The latter is done automatically when OF_DMA_COHERENCY is selected, so add the missing snoop bits here. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240110160112.4134162-11-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-layerscape/lowlevel-ls1046a.c')
-rw-r--r--arch/arm/mach-layerscape/lowlevel-ls1046a.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/mach-layerscape/lowlevel-ls1046a.c b/arch/arm/mach-layerscape/lowlevel-ls1046a.c
index 3393dc4903..1307c05eaf 100644
--- a/arch/arm/mach-layerscape/lowlevel-ls1046a.c
+++ b/arch/arm/mach-layerscape/lowlevel-ls1046a.c
@@ -229,11 +229,13 @@ void ls1046a_init_lowlevel(void)
set_cntfrq(25000000);
syscnt_enable(IOMEM(LSCH2_SYS_COUNTER_ADDR));
- /* Make SEC reads and writes snoopable */
+ /* Make DMA master reads and writes snoopable */
setbits_be32(&scfg->snpcnfgcr, SCFG_SNPCNFGCR_SECRDSNP |
- SCFG_SNPCNFGCR_SECWRSNP |
- SCFG_SNPCNFGCR_SATARDSNP |
- SCFG_SNPCNFGCR_SATAWRSNP);
+ SCFG_SNPCNFGCR_SECWRSNP | SCFG_SNPCNFGCR_USB1RDSNP |
+ SCFG_SNPCNFGCR_USB1WRSNP | SCFG_SNPCNFGCR_USB2RDSNP |
+ SCFG_SNPCNFGCR_USB2WRSNP | SCFG_SNPCNFGCR_USB3RDSNP |
+ SCFG_SNPCNFGCR_USB3WRSNP | SCFG_SNPCNFGCR_SATARDSNP |
+ SCFG_SNPCNFGCR_SATAWRSNP | SCFG_SNPCNFGCR_EDMASNP);
/*
* Enable snoop requests and DVM message requests for