| From d662633cb8e90144969790b8abf047a3f777e47a Mon Sep 17 00:00:00 2001 |
| From: Rui Miguel Silva <rui.silva@linaro.org> |
| Date: Wed, 30 Nov 2022 15:37:22 +0000 |
| Subject: [PATCH 20/25] arm:corstone1000: add mmc for fvp |
| |
| Enable support mmc/sdcard for the corstone1000 FVP. |
| |
| Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com> |
| Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> |
| Upstream-Status: Pending [Not submitted to upstream yet] |
| --- |
| board/armltd/corstone1000/corstone1000.c | 28 +++++++++++++++++++----- |
| configs/corstone1000_defconfig | 8 ++++++- |
| include/configs/corstone1000.h | 4 +++- |
| 3 files changed, 32 insertions(+), 8 deletions(-) |
| |
| diff --git a/board/armltd/corstone1000/corstone1000.c b/board/armltd/corstone1000/corstone1000.c |
| index 76816f8f4e..d6ca6e8961 100644 |
| --- a/board/armltd/corstone1000/corstone1000.c |
| +++ b/board/armltd/corstone1000/corstone1000.c |
| @@ -38,19 +38,35 @@ static struct mm_region corstone1000_mem_map[] = { |
| }, { |
| /* USB */ |
| .virt = 0x40200000UL, |
| - .phys = 0x40200000UL, |
| + .phys = 0x40200000UL, |
| + .size = 0x00100000UL, |
| + .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| + PTE_BLOCK_NON_SHARE | |
| + PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| + }, { |
| + /* MMC0 */ |
| + .virt = 0x40300000UL, |
| + .phys = 0x40300000UL, |
| .size = 0x00100000UL, |
| .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| - PTE_BLOCK_NON_SHARE | |
| - PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| + PTE_BLOCK_NON_SHARE | |
| + PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| }, { |
| /* ethernet */ |
| .virt = 0x40100000UL, |
| - .phys = 0x40100000UL, |
| + .phys = 0x40100000UL, |
| + .size = 0x00100000UL, |
| + .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| + PTE_BLOCK_NON_SHARE | |
| + PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| + }, { |
| + /* MMC1 */ |
| + .virt = 0x50000000UL, |
| + .phys = 0x50000000UL, |
| .size = 0x00100000UL, |
| .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| - PTE_BLOCK_NON_SHARE | |
| - PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| + PTE_BLOCK_NON_SHARE | |
| + PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| }, { |
| /* OCVM */ |
| .virt = 0x80000000UL, |
| diff --git a/configs/corstone1000_defconfig b/configs/corstone1000_defconfig |
| index c72d027711..336da67a8d 100644 |
| --- a/configs/corstone1000_defconfig |
| +++ b/configs/corstone1000_defconfig |
| @@ -40,7 +40,13 @@ CONFIG_VERSION_VARIABLE=y |
| CONFIG_NET_RANDOM_ETHADDR=y |
| CONFIG_REGMAP=y |
| CONFIG_MISC=y |
| -# CONFIG_MMC is not set |
| +CONFIG_CLK=y |
| +CONFIG_CMD_MMC=y |
| +CONFIG_DM_MMC=y |
| +CONFIG_ARM_PL180_MMCI=y |
| +CONFIG_MMC_SDHCI_ADMA_HELPERS=y |
| +CONFIG_MMC_WRITE=y |
| +CONFIG_DM_GPIO=y |
| CONFIG_PHYLIB=y |
| CONFIG_PHY_SMSC=y |
| CONFIG_SMC911X=y |
| diff --git a/include/configs/corstone1000.h b/include/configs/corstone1000.h |
| index 4cf1170ffb..1f28a0f6c0 100644 |
| --- a/include/configs/corstone1000.h |
| +++ b/include/configs/corstone1000.h |
| @@ -58,7 +58,9 @@ |
| #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 |
| |
| #define BOOT_TARGET_DEVICES(func) \ |
| - func(USB, usb, 0) |
| + func(USB, usb, 0) \ |
| + func(MMC, mmc, 0) \ |
| + func(MMC, mmc, 1) |
| |
| #include <config_distro_bootcmd.h> |
| |
| -- |
| 2.17.1 |
| |