From: Bartosz Golaszewski <brgl@bgdev.pl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/4] mmc: davinci: drop struct davinci_mmc_plat
Date: Thu, 14 Nov 2019 16:10:29 +0100 [thread overview]
Message-ID: <20191114151031.25309-3-brgl@bgdev.pl> (raw)
In-Reply-To: <20191114151031.25309-1-brgl@bgdev.pl>
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
struct mmc_config & struct mmc don't need to be exported over platform
data, but can instead be private in the driver.
Remove struct davinci_mmc_plat.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
drivers/mmc/davinci_mmc.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c
index 370b18cc78..a27a039f9b 100644
--- a/drivers/mmc/davinci_mmc.c
+++ b/drivers/mmc/davinci_mmc.c
@@ -32,10 +32,6 @@ struct davinci_mmc_priv {
uint input_clk; /* Input clock to MMC controller */
struct gpio_desc cd_gpio; /* Card Detect GPIO */
struct gpio_desc wp_gpio; /* Write Protect GPIO */
-};
-
-struct davinci_mmc_plat
-{
struct mmc_config cfg;
struct mmc mmc;
};
@@ -484,9 +480,8 @@ int davinci_mmc_init(bd_t *bis, struct davinci_mmc *host)
static int davinci_mmc_probe(struct udevice *dev)
{
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
- struct davinci_mmc_plat *plat = dev_get_platdata(dev);
struct davinci_mmc_priv *priv = dev_get_priv(dev);
- struct mmc_config *cfg = &plat->cfg;
+ struct mmc_config *cfg = &priv->cfg;
cfg->f_min = 200000;
cfg->f_max = 25000000;
@@ -504,16 +499,16 @@ static int davinci_mmc_probe(struct udevice *dev)
gpio_request_by_name(dev, "wp-gpios", 0, &priv->wp_gpio, GPIOD_IS_IN);
#endif
- upriv->mmc = &plat->mmc;
+ upriv->mmc = &priv->mmc;
return davinci_dm_mmc_init(dev);
}
static int davinci_mmc_bind(struct udevice *dev)
{
- struct davinci_mmc_plat *plat = dev_get_platdata(dev);
+ struct davinci_mmc_priv *priv = dev_get_priv(dev);
- return mmc_bind(dev, &plat->mmc, &plat->cfg);
+ return mmc_bind(dev, &priv->mmc, &priv->cfg);
}
static const struct udevice_id davinci_mmc_ids[] = {
@@ -530,7 +525,6 @@ U_BOOT_DRIVER(davinci_mmc_drv) = {
#endif
.probe = davinci_mmc_probe,
.ops = &davinci_mmc_ops,
- .platdata_auto_alloc_size = sizeof(struct davinci_mmc_plat),
.priv_auto_alloc_size = sizeof(struct davinci_mmc_priv),
};
#endif
--
2.23.0
next prev parent reply other threads:[~2019-11-14 15:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-14 15:10 [U-Boot] [PATCH 0/4] omapl138_lcdk: fix MMC boot Bartosz Golaszewski
2019-11-14 15:10 ` [U-Boot] [PATCH 1/4] mmc: davinci: drop support for ti,dm6441-mmc Bartosz Golaszewski
2019-12-04 4:01 ` [U-Boot] [PATCH 1/4] mmc: davinci: drop support for ti, dm6441-mmc Tom Rini
2019-11-14 15:10 ` Bartosz Golaszewski [this message]
2019-12-04 4:01 ` [U-Boot] [PATCH 2/4] mmc: davinci: drop struct davinci_mmc_plat Tom Rini
2020-01-03 16:01 ` Adam Ford
2020-01-03 16:50 ` Bartosz Golaszewski
2020-01-03 16:59 ` Tom Rini
2020-01-03 17:26 ` Adam Ford
2019-11-14 15:10 ` [U-Boot] [PATCH 3/4] board: omapl138_lcdk: add the mmc device to SPL Bartosz Golaszewski
2019-12-04 4:02 ` Tom Rini
2019-11-14 15:10 ` [U-Boot] [PATCH 4/4] mmc: davinci: fix mmc boot in SPL Bartosz Golaszewski
2019-12-04 4:02 ` Tom Rini
2019-12-02 9:32 ` [U-Boot] [PATCH 0/4] omapl138_lcdk: fix MMC boot Bartosz Golaszewski
2019-12-02 11:54 ` Adam Ford
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=20191114151031.25309-3-brgl@bgdev.pl \
--to=brgl@bgdev.pl \
--cc=u-boot@lists.denx.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