[PATCH v2 05/11] mci: atmel_mci: Add PBL helper to configure highcapacity

Sam Ravnborg sam at ravnborg.org
Tue Jun 28 13:38:43 PDT 2022


Older atmel SoC's like at91sam9263 do not support highcapacity SD cards.
Add helper that can be used to disable highcapacity support
in the PBL code - as probing for the SD card type is not an option.

Suggested-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
---
 arch/arm/mach-at91/include/mach/xload.h | 1 +
 drivers/mci/atmel_mci_pbl.c             | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/arch/arm/mach-at91/include/mach/xload.h b/arch/arm/mach-at91/include/mach/xload.h
index e9336d59c..488279c1a 100644
--- a/arch/arm/mach-at91/include/mach/xload.h
+++ b/arch/arm/mach-at91/include/mach/xload.h
@@ -13,5 +13,6 @@ void __noreturn sama5d3_atmci_start_image(u32 r4, unsigned int clock,
 int at91_sdhci_bio_init(struct pbl_bio *bio, void __iomem *base);
 int at91_mci_bio_init(struct pbl_bio *bio, void __iomem *base,
 		      unsigned int clock, unsigned int slot);
+void at91_mci_bio_set_highcapacity(bool highcapacity_card);
 
 #endif /* __MACH_XLOAD_H */
diff --git a/drivers/mci/atmel_mci_pbl.c b/drivers/mci/atmel_mci_pbl.c
index 767d6f3ce..65d8b3632 100644
--- a/drivers/mci/atmel_mci_pbl.c
+++ b/drivers/mci/atmel_mci_pbl.c
@@ -114,3 +114,8 @@ int at91_mci_bio_init(struct pbl_bio *bio, void __iomem *base,
 
 	return 0;
 }
+
+void at91_mci_bio_set_highcapacity(bool highcapacity_card)
+{
+	atmci_sdcard.highcapacity_card = highcapacity_card;
+}
-- 
2.34.1




More information about the barebox mailing list