From 08076575a2f7064b21fd14daa92496ead7e13e66 Mon Sep 17 00:00:00 2001 From: Robert Sprowson Date: Mon, 17 Feb 2020 22:01:04 +0000 Subject: [PATCH] Make a substitute for MPHI The MPHI is (ab)used by DWCDriver as a means to do a FIQ downgrade to IRQ, but Pi 4 has no MPHI, so instead we substitute the GIC (as the GICD_ISPENDRn can be used to cause an IRQ from software). --- s/USB | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/s/USB b/s/USB index 01f048d..54b3057 100644 --- a/s/USB +++ b/s/USB @@ -63,7 +63,11 @@ HAL_USBControllerInfo STR a4, [a2, #HALUSBControllerInfo_DevNo] LDR a4, FB_CacheMode STR a4, [a2, #HALUSBControllerInfo_DMAOffset] - ADD a4, ip, #MPHI_Base + CPUDetect a3 + ; Raspberry Pi 4 / BCM2838 has no MPHI to do FIQ downgrade, but + ; does have a GIC which can fulfil the same requirement + LDRHI a4, GICD_Base_Address + ADDLS a4, ip, #MPHI_Base STR a4, [a2, #HALUSBControllerInfo_HW_MPHI] MOV a4, #iDev_GPU_HostPort STR a4, [a2, #HALUSBControllerInfo_DevNo_MPHI] -- GitLab