On 28.06.22 22:38, Sam Ravnborg wrote: > 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. Reviewed-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> > > Suggested-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> > Signed-off-by: Sam Ravnborg <sam@xxxxxxxxxxxx> > --- > 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; > +} -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |