On 19 October 2019 at 01:40 am, Benjamin Herrenschmidt wrote:
Anywhere is fine but I think it's easy. Coherent DMA is for historical
reasons a function of the processor generation, and as such a CONFIG
option.
So setting it according to CONFIG_NOT_COHERENT_CACHE will probably work
just fine.
Well at least I think so ... unless I'm missing some broken HW
somewhere I am not aware of.
Cheers,
Ben.
Hi Ben,
Thanks a lot for your suggestion!
I had to create a patch because I wasn't able to select
"CONFIG_NOT_COHERENT_CACHE" in the kernel configuration (patch attached).
After patching I was able to select "CONFIG_NOT_COHERENT_CACHE" in the
kernel config. I compiled a new RC3 of kernel 5.4 with this kernel
config option yesterday.
The good news is, that the onboard SD card works! We successfully tested
it on two AmigaOnes (X5000/20 and X5000/40) yesterday but we need a new
patch
because of the possibility to select "CONFIG_NOT_COHERENT_CACHE" in the
kernel config.
Cheers,
Christian
--- a/arch/powerpc/platforms/Kconfig.cputype 2019-10-14 01:37:36.000000000 +0200
+++ b/arch/powerpc/platforms/Kconfig.cputype 2019-10-19 15:20:07.884007876 +0200
@@ -152,6 +152,7 @@ config POWER9_CPU
config E5500_CPU
bool "Freescale e5500"
depends on E500
+ select NOT_COHERENT_CACHE
config E6500_CPU
bool "Freescale e6500"
@@ -458,7 +459,7 @@ config NR_CPUS
config NOT_COHERENT_CACHE
bool
depends on 4xx || PPC_8xx || E200 || PPC_MPC512x || \
- GAMECUBE_COMMON || AMIGAONE
+ GAMECUBE_COMMON || AMIGAONE || E5500_CPU
select ARCH_HAS_DMA_COHERENT_TO_PFN
select ARCH_HAS_DMA_PREP_COHERENT
select ARCH_HAS_SYNC_DMA_FOR_DEVICE