From: Sascha Hauer <sha@pengutronix.de>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v1 1/6] mci: atmel_mci: add PBL support
Date: Tue, 13 Apr 2021 06:58:10 +0200 [thread overview]
Message-ID: <20210413045810.GE6950@pengutronix.de> (raw)
In-Reply-To: <20210409131149.2184-2-o.rempel@pengutronix.de>
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.
Sascha
--
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-04-13 5:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-09 13:11 [PATCH v1 0/6] add multiimage support for sama5d3 based microchip-ksz9477-evb board Oleksij Rempel
2021-04-09 13:11 ` [PATCH v1 1/6] mci: atmel_mci: add PBL support Oleksij Rempel
2021-04-13 4:58 ` Sascha Hauer [this message]
2021-04-23 14:14 ` Oleksij Rempel
2021-05-03 11:39 ` Sascha Hauer
2021-04-09 13:11 ` [PATCH v1 2/6] ARM: at91: xload-mmc: add sama5d3_atmci_start_image() helper Oleksij Rempel
2021-04-13 5:01 ` Sascha Hauer
2021-04-09 13:11 ` [PATCH v1 3/6] ARM: at91: ddramc: add sama5d3_barebox_entry() handler Oleksij Rempel
2021-04-09 13:11 ` [PATCH v1 4/6] ARM: at91: add __sama5d3_stashed_bootrom_r4 helper Oleksij Rempel
2021-04-09 13:11 ` [PATCH v1 5/6] ARM: at91: add sama5d3_lowlevel_init() helpers Oleksij Rempel
2021-04-09 13:11 ` [PATCH v1 6/6] ARM: at91: sama5d3: add multiimage support for the microchip-ksz9477-evb Oleksij Rempel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210413045810.GE6950@pengutronix.de \
--to=sha@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=o.rempel@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox