Commit 8aac3b72 authored by Ben Avison's avatar Ben Avison Committed by ROOL

Enable SD controller

Detail:
* Efforts to get the faster EMMC2 controller working are ongoing. In the
  meantime, this enables the backward-compatible EMMC1 controller.
* The method required to control the activity LED appears to have changed,
  yet again. I haven't worked out how yet, so this is currently
  non-functional.
parent 068d02ad
...@@ -391,6 +391,7 @@ GPAFEDE1 * &8c ; GPIO Async falling edge detect enable 1 ...@@ -391,6 +391,7 @@ GPAFEDE1 * &8c ; GPIO Async falling edge detect enable 1
GPPUPDEN * &94 ; GPIO PullUp PullDown Enable GPPUPDEN * &94 ; GPIO PullUp PullDown Enable
GPPUDCK0 * &98 ; GPIO PullUp PullDown Clock 0 GPPUDCK0 * &98 ; GPIO PullUp PullDown Clock 0
GPPUDCK1 * &9c ; GPIO PullUp PullDown Clock 1 GPPUDCK1 * &9c ; GPIO PullUp PullDown Clock 1
GPPinMuxSD * &d0
; Auxio peripherals ; Auxio peripherals
; MiniUart uses TXD1 and RXD1 ; MiniUart uses TXD1 and RXD1
......
...@@ -319,6 +319,17 @@ SDHCI HALDeviceField GetWriteProtect ...@@ -319,6 +319,17 @@ SDHCI HALDeviceField GetWriteProtect
; Init the SDHCI HAL device ; Init the SDHCI HAL device
SDIO_InitDevices ROUT SDIO_InitDevices ROUT
Push "lr" Push "lr"
CPUDetect a1
BLS %FT00
; Pi 4 setup - select legacy emmc controller for now
LDR a1, PeriBase
MOV a2, #3
ADD a1, a1, #GPIO_Base
DoMemBarrier lr
STR a2, [a1, #GPPinMuxSD]
DoMemBarrier lr
00
BL MeasureSpeed BL MeasureSpeed
ADR a1, SDHCIDevice ADR a1, SDHCIDevice
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment