On Tue, Apr 13, 2021 at 06:58:10AM +0200, Sascha Hauer wrote: > On Fri, Apr 09, 2021 at 03:11:44PM +0200, Oleksij Rempel wrote: > > +int at91_mci_bio_init(struct pbl_bio *bio, void __iomem *base, > > + unsigned int clock, unsigned int slot) > > +{ > > + struct atmel_mci_priv *priv = &atmci_sdcard; > > + struct atmel_mci *host = &priv->host; > > + struct mci_ios ios = { .bus_width = MMC_BUS_WIDTH_4, .clock = 25000000 }; > > + > > + bio->priv = priv; > > + bio->read = at91_mci_bio_read; > > + > > + host->regs = base; > > + > > + atmci_get_cap(host); > > + > > + /* get real HZ */ > > + host->bus_hz = clock; > > + > > + host->slot_b = slot; > > + if (host->slot_b) > > + host->sdc_reg = ATMCI_SDCSEL_SLOT_B; > > + else > > + host->sdc_reg = ATMCI_SDCSEL_SLOT_A; > > + > > + atmci_writel(host, ATMCI_DTOR, 0x7f); > > + > > + atmci_common_set_ios(host, &ios); > > Is it necessary to call this? The ROM should have already configured the > controller. By relying on this you could drop the controller > initialization code from PBL. We get MCI controller in disabled state. I do not see any way to avoid reconfiguration. Regards, Oleksij -- 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 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox