summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGreg Malysa <[email protected]>2024-03-25 22:28:08 -0400
committerJaehoon Chung <[email protected]>2024-04-26 15:31:11 +0900
commit5359cd1135d069a3033bda65d3e72a3c4a76160d (patch)
tree750c7da4bfb8a9e56e536208bcdd4edd69a4dcae /include
parent5f0714496869b95e57a8b72192089e7df18c94cf (diff)
mmc: Support 32-bit only ADMA on 64-bit platforms
Some arm64 platforms may include SDIO host controllers that only support 32-bit ADMA. While the Linux kernel detects which size is supported and adjusts the descriptor size used dynamically, the previous u-boot implementation statically selected between the two depending on whether DMA_ADDR_T_64BIT was defined. Because the static selection is already in place and effective for most platforms, this patch logically separates "64 bit addresses are used for DMA on this platform" and "64 bit addresses are used by the SDIO host controller for ADMA" in order to support the small number of platforms where these statements are not equivalent. Using 32 bits is opt-in and existing 64 bit platforms should be unaffected by this change. Co-developed-by: Nathan Barrett-Morrison <[email protected]> Signed-off-by: Nathan Barrett-Morrison <[email protected]> Co-developed-by: Ian Roberts <[email protected]> Signed-off-by: Ian Roberts <[email protected]> Signed-off-by: Greg Malysa <[email protected]> Reviewed-by: Jaehoon Chung <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/sdhci.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/sdhci.h b/include/sdhci.h
index 2dd13b4c714..78ef0d1c088 100644
--- a/include/sdhci.h
+++ b/include/sdhci.h
@@ -300,7 +300,7 @@ struct sdhci_ops {
};
#define ADMA_MAX_LEN 65532
-#ifdef CONFIG_DMA_ADDR_T_64BIT
+#ifdef CONFIG_MMC_SDHCI_ADMA_64BIT
#define ADMA_DESC_LEN 16
#else
#define ADMA_DESC_LEN 8
@@ -325,7 +325,7 @@ struct sdhci_adma_desc {
u8 reserved;
u16 len;
u32 addr_lo;
-#ifdef CONFIG_DMA_ADDR_T_64BIT
+#ifdef CONFIG_MMC_SDHCI_ADMA_64BIT
u32 addr_hi;
#endif
} __packed;