coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
sdhci.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * SD host controller specific definitions
4  */
5 #ifndef __COMMONLIB_SDHCI_H__
6 #define __COMMONLIB_SDHCI_H__
7 
9 
10 /* Driver specific capabilities */
11 #define DRVR_CAP_1V8_VDD 0x00010000
12 #define DRVR_CAP_32BIT_DMA_ADDR 0x00020000
13 #define DRVR_CAP_BROKEN_R1B 0x00040000
14 #define DRVR_CAP_NO_CD 0x00080000
15 #define DRVR_CAP_NO_HISPD_BIT 0x00100000
16 #define DRVR_CAP_NO_SIMULT_VDD_AND_POWER 0x00200000
17 #define DRVR_CAP_REG32_RW 0x00400000
18 #define DRVR_CAP_SPI 0x00800000
19 #define DRVR_CAP_WAIT_SEND_CMD 0x01000000
20 
21 /* ADMA packet descriptor */
22 struct sdhci_adma {
26 };
27 
28 struct sdhci_adma64 {
33 };
34 
35 struct sdhci_ctrlr {
37  void *ioaddr;
39 
40  /*
41  * Dynamically allocated array of ADMA descriptors to use for data
42  * transfers
43  */
46 
47  /* Number of ADMA descriptors currently in the array. */
49 };
50 
51 int add_sdhci(struct sdhci_ctrlr *sdhci_ctrlr);
52 int sdhci_controller_init(struct sdhci_ctrlr *sdhci_ctrlr, void *ioaddr);
55 
56 /* Add SDHCI controller from PCI */
58 
59 /* Add SDHCI controller with memory address */
60 struct sd_mmc_ctrlr *new_mem_sdhci_controller(void *ioaddr);
61 
62 #endif /* __COMMONLIB_SDHCI_H__ */
struct sd_mmc_ctrlr * new_mem_sdhci_controller(void *ioaddr)
Definition: pci_sdhci.c:20
struct sd_mmc_ctrlr * new_pci_sdhci_controller(uint32_t dev)
Definition: pci_sdhci.c:40
int sdhci_controller_init(struct sdhci_ctrlr *sdhci_ctrlr, void *ioaddr)
Definition: pci_sdhci.c:13
void sdhci_update_pointers(struct sdhci_ctrlr *sdhci_ctrlr)
Definition: sdhci.c:744
void sdhci_display_setup(struct sdhci_ctrlr *sdhci_ctrlr)
Definition: sdhci_display.c:92
int add_sdhci(struct sdhci_ctrlr *sdhci_ctrlr)
Definition: sdhci.c:755
unsigned int uint32_t
Definition: stdint.h:14
uint32_t u32
Definition: stdint.h:51
uint16_t u16
Definition: stdint.h:48
u32 addr_hi
Definition: sdhci.h:32
u16 length
Definition: sdhci.h:30
u32 addr
Definition: sdhci.h:31
u16 attributes
Definition: sdhci.h:29
u32 addr
Definition: sdhci.h:25
u16 length
Definition: sdhci.h:24
u16 attributes
Definition: sdhci.h:23
uint32_t b_max
Definition: sdhci.h:38
struct sdhci_adma * adma_descs
Definition: sdhci.h:44
struct sdhci_adma64 * adma64_descs
Definition: sdhci.h:45
void * ioaddr
Definition: sdhci.h:37
int adma_desc_count
Definition: sdhci.h:48