Commit 0d6ff642 authored by Ben Avison's avatar Ben Avison
Browse files

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 72381d68
...@@ -4,18 +4,18 @@ ...@@ -4,18 +4,18 @@
* *
*/ */
#define Module_MajorVersion_CMHG 0.82 #define Module_MajorVersion_CMHG 0.82
#define Module_MinorVersion_CMHG Pi4.3 #define Module_MinorVersion_CMHG Pi4.4
#define Module_Date_CMHG 18 Feb 2020 #define Module_Date_CMHG 18 Feb 2020
#define Module_MajorVersion "0.82" #define Module_MajorVersion "0.82"
#define Module_Version 82 #define Module_Version 82
#define Module_MinorVersion "Pi4.3" #define Module_MinorVersion "Pi4.4"
#define Module_Date "18 Feb 2020" #define Module_Date "18 Feb 2020"
#define Module_ApplicationDate "18-Feb-20" #define Module_ApplicationDate "18-Feb-20"
#define Module_ComponentName "HAL_BCM2835" #define Module_ComponentName "HAL_BCM2835"
#define Module_FullVersion "0.82 (Pi4.3)" #define Module_FullVersion "0.82 (Pi4.4)"
#define Module_HelpVersion "0.82 (18 Feb 2020) Pi4.3" #define Module_HelpVersion "0.82 (18 Feb 2020) Pi4.4"
#define Module_LibraryVersionInfo "0:82" #define Module_LibraryVersionInfo "0:82"
...@@ -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