Unit BCMSDHOST
Return to Unit Reference
Description
Broadcom BCM27XX SDHOST driver
The SDHOST controller on the BCM27XX is a non SDHCI-compliant device which requires a specific driver.
It can be routed to GPIO pins 22 to 27 (ALT0) or 48 to 53 (ALT0) in order to control the SD card slot when the SDHCI device is being used for the on board WiFi.
Note that on the Raspberry Pi 4 the SD card is no longer connected to pins 48 to 53 so the SDHOST controller cannot control the primary SD card, there is an additional SDHCI controller (EMMC2) for that purpose.
Constants
To be documented
Type definitions
To be documented
Public variables
None defined
Function declarations
Initialization functions
procedure BCMSDHOSTInit;
Note | Called only during system startup |
---|
BCMSDHOST functions
function BCMSDHOSTCreate(Address:PtrUInt; const Name:String; IRQ,DREQ,ClockMinimum,ClockMaximum,GPIOFirst,GPIOLast,GPIOFunction:LongWord; EnableFIQ:Boolean):PSDHCIHost;
Address | The address of the BCMSDHOST registers |
---|---|
Name | The text description of this device which will show in the device list (Optional) |
IRQ | The interrupt number for the BCMSDHOST |
DREQ | The DMA data request ID for the BCMSDHOST |
ClockMinimum | The minimum frequency for the BCMSDHOST clock |
ClockMaximum | The maximum frequency for the BCMSDHOST clock |
GPIOFirst | The starting pin number for GPIO assignments (or GPIO_PIN_UNKNOWN if externally configured) |
GPIOLast | The ending pin number for GPIO assignments (or GPIO_PIN_UNKNOWN if externally configured) |
GPIOFunction | The function number for GPIO assignments (or GPIO_FUNCTION_UNKNOWN if externally configured) |
EnableFIQ | Enable fast interrupt support for the BCMSDHOST |
Return | Pointer to the new SDHCI device or nil if the SDHCI device could not be created |
function BCMSDHOSTDestroy(SDHCI:PSDHCIHost):LongWord;
SDHCI | The SDHCI device to destroy |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
BCMSDHOST MMC functions
function BCMSDHOSTSendCommand(MMC:PMMCDevice; Command:PMMCCommand):LongWord;
Note | Not intended to be called directly by applications, use MMCDeviceSendCommand instead. |
---|
function BCMSDHOSTSetIOS(MMC:PMMCDevice):LongWord;
Note | Not intended to be called directly by applications, use MMCDeviceSetIOS instead. |
---|
function BCMSDHOSTGetCardDetect(MMC:PMMCDevice):LongWord;
Note | Not intended to be called directly by applications, use MMCDeviceGetCardDetect instead. |
---|
function BCMSDHOSTGetWriteProtect(MMC:PMMCDevice):LongWord;
Note | Not intended to be called directly by applications, use MMCDeviceGetWriteProtect instead. |
---|
BCMSDHOST SDHCI functions
function BCMSDHOSTHostStart(SDHCI:PSDHCIHost):LongWord;
Note | Not intended to be called directly by applications, use SDHCIHostStart instead. |
---|
function BCMSDHOSTHostStop(SDHCI:PSDHCIHost):LongWord;
Note | Not intended to be called directly by applications, use SDHCIHostStop instead. |
---|
function BCMSDHOSTReset(SDHCI:PSDHCIHost; Mask:Byte):LongWord;
Note | Not intended to be called directly by applications, use SDHCIReset instead. |
---|
function BCMSDHOSTHardwareReset(SDHCI:PSDHCIHost):LongWord;
Note | Not intended to be called directly by applications, use SDHCIHardwareReset instead. |
---|
function BCMSDHOSTSetPower(SDHCI:PSDHCIHost; Power:Word):LongWord;
Note | Not intended to be called directly by applications, use SDHCISetPower instead. |
---|
function BCMSDHOSTSetClock(SDHCI:PSDHCIHost; Clock:LongWord):LongWord;
Note | Not intended to be called directly by applications, use SDHCISetClock instead. |
---|
procedure BCMSDHOSTCommandWaitWorker(SDHCI:PSDHCIHost);
Note | Not intended to be called directly by applications |
---|
procedure BCMSDHOSTDMARequestCompleted(Request:PDMARequest);
Note | Not intended to be called directly by applications |
---|
function BCMSDHOSTSharedInterruptHandler(Number,CPUID,Flags:LongWord; SDHCI:PSDHCIHost):LongWord;
Note | Not intended to be called directly by applications |
---|
BCMSDHOST helper functions
function BCMSDHOSTSetSDHostClock(var Clock,Value1,Value2:LongWord):LongWord;
Note | None documented |
---|
Return to Unit Reference