All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "mmc: davinci: drop struct davinci_mmc_plat"
@ 2020-01-03 18:17 Tom Rini
  2020-01-03 18:42 ` Adam Ford
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tom Rini @ 2020-01-03 18:17 UTC (permalink / raw)
  To: u-boot

Adam Ford reports that this change breaks booting on da850-evm and
Bartosz Golaszewski agrees that with the impending release we should
revert the change for now.  With that noted:

This reverts commit 21a4d80a710c79053ac1deaa65ff9b69e6c031d4.

Cc: Adam Ford <aford173@gmail.com>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
 drivers/mmc/davinci_mmc.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c
index c3f7b57665d3..ef5cd4e7234f 100644
--- a/drivers/mmc/davinci_mmc.c
+++ b/drivers/mmc/davinci_mmc.c
@@ -32,6 +32,10 @@ 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;
 };
@@ -480,8 +484,9 @@ 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 = &priv->cfg;
+ 	struct mmc_config *cfg = &plat->cfg;
 #ifdef CONFIG_SPL_BUILD
 	int ret;
 #endif
@@ -502,7 +507,7 @@ 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 = &priv->mmc;
+	upriv->mmc = &plat->mmc;
 
 #ifdef CONFIG_SPL_BUILD
 	/*
@@ -513,7 +518,7 @@ static int davinci_mmc_probe(struct udevice *dev)
 	 * support in SPL, hence the hard-coded base register address.
 	 */
 	priv->reg_base = (struct davinci_mmc_regs *)DAVINCI_MMC_SD0_BASE;
-	ret = mmc_bind(dev, &priv->mmc, &priv->cfg);
+	ret = mmc_bind(dev, &plat->mmc, &plat->cfg);
 	if (ret)
 		return ret;
 #endif
@@ -523,9 +528,9 @@ static int davinci_mmc_probe(struct udevice *dev)
 
 static int davinci_mmc_bind(struct udevice *dev)
 {
-	struct davinci_mmc_priv *priv = dev_get_priv(dev);
+	struct davinci_mmc_plat *plat = dev_get_platdata(dev);
 
-	return mmc_bind(dev, &priv->mmc, &priv->cfg);
+	return mmc_bind(dev, &plat->mmc, &plat->cfg);
 }
 
 static const struct udevice_id davinci_mmc_ids[] = {
@@ -542,6 +547,7 @@ 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.17.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] Revert "mmc: davinci: drop struct davinci_mmc_plat"
  2020-01-03 18:17 [PATCH] Revert "mmc: davinci: drop struct davinci_mmc_plat" Tom Rini
@ 2020-01-03 18:42 ` Adam Ford
  2020-01-03 18:56 ` Adam Ford
  2020-01-05 13:36 ` Tom Rini
  2 siblings, 0 replies; 4+ messages in thread
From: Adam Ford @ 2020-01-03 18:42 UTC (permalink / raw)
  To: u-boot

On Fri, Jan 3, 2020 at 12:17 PM Tom Rini <trini@konsulko.com> wrote:
>
> Adam Ford reports that this change breaks booting on da850-evm and
> Bartosz Golaszewski agrees that with the impending release we should
> revert the change for now.  With that noted:
>

Is patchwork working?  I tried to go there and I am not seeing any
patches newer than 1 Jan 2020.

I was going to pull the patch and test this.

adam
> This reverts commit 21a4d80a710c79053ac1deaa65ff9b69e6c031d4.
>
> Cc: Adam Ford <aford173@gmail.com>
> Cc: Bartosz Golaszewski <brgl@bgdev.pl>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
>  drivers/mmc/davinci_mmc.c | 16 +++++++++++-----
>  1 file changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c
> index c3f7b57665d3..ef5cd4e7234f 100644
> --- a/drivers/mmc/davinci_mmc.c
> +++ b/drivers/mmc/davinci_mmc.c
> @@ -32,6 +32,10 @@ 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;
>  };
> @@ -480,8 +484,9 @@ 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 = &priv->cfg;
> +       struct mmc_config *cfg = &plat->cfg;
>  #ifdef CONFIG_SPL_BUILD
>         int ret;
>  #endif
> @@ -502,7 +507,7 @@ 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 = &priv->mmc;
> +       upriv->mmc = &plat->mmc;
>
>  #ifdef CONFIG_SPL_BUILD
>         /*
> @@ -513,7 +518,7 @@ static int davinci_mmc_probe(struct udevice *dev)
>          * support in SPL, hence the hard-coded base register address.
>          */
>         priv->reg_base = (struct davinci_mmc_regs *)DAVINCI_MMC_SD0_BASE;
> -       ret = mmc_bind(dev, &priv->mmc, &priv->cfg);
> +       ret = mmc_bind(dev, &plat->mmc, &plat->cfg);
>         if (ret)
>                 return ret;
>  #endif
> @@ -523,9 +528,9 @@ static int davinci_mmc_probe(struct udevice *dev)
>
>  static int davinci_mmc_bind(struct udevice *dev)
>  {
> -       struct davinci_mmc_priv *priv = dev_get_priv(dev);
> +       struct davinci_mmc_plat *plat = dev_get_platdata(dev);
>
> -       return mmc_bind(dev, &priv->mmc, &priv->cfg);
> +       return mmc_bind(dev, &plat->mmc, &plat->cfg);
>  }
>
>  static const struct udevice_id davinci_mmc_ids[] = {
> @@ -542,6 +547,7 @@ 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.17.1
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Revert "mmc: davinci: drop struct davinci_mmc_plat"
  2020-01-03 18:17 [PATCH] Revert "mmc: davinci: drop struct davinci_mmc_plat" Tom Rini
  2020-01-03 18:42 ` Adam Ford
@ 2020-01-03 18:56 ` Adam Ford
  2020-01-05 13:36 ` Tom Rini
  2 siblings, 0 replies; 4+ messages in thread
From: Adam Ford @ 2020-01-03 18:56 UTC (permalink / raw)
  To: u-boot

On Fri, Jan 3, 2020 at 12:17 PM Tom Rini <trini@konsulko.com> wrote:
>
> Adam Ford reports that this change breaks booting on da850-evm and
> Bartosz Golaszewski agrees that with the impending release we should
> revert the change for now.  With that noted:
>
> This reverts commit 21a4d80a710c79053ac1deaa65ff9b69e6c031d4.
>

Tested-by: Adam Ford <aford173@gmail.com>

> Cc: Adam Ford <aford173@gmail.com>
> Cc: Bartosz Golaszewski <brgl@bgdev.pl>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---


>  drivers/mmc/davinci_mmc.c | 16 +++++++++++-----
>  1 file changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c
> index c3f7b57665d3..ef5cd4e7234f 100644
> --- a/drivers/mmc/davinci_mmc.c
> +++ b/drivers/mmc/davinci_mmc.c
> @@ -32,6 +32,10 @@ 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;
>  };
> @@ -480,8 +484,9 @@ 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 = &priv->cfg;
> +       struct mmc_config *cfg = &plat->cfg;
>  #ifdef CONFIG_SPL_BUILD
>         int ret;
>  #endif
> @@ -502,7 +507,7 @@ 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 = &priv->mmc;
> +       upriv->mmc = &plat->mmc;
>
>  #ifdef CONFIG_SPL_BUILD
>         /*
> @@ -513,7 +518,7 @@ static int davinci_mmc_probe(struct udevice *dev)
>          * support in SPL, hence the hard-coded base register address.
>          */
>         priv->reg_base = (struct davinci_mmc_regs *)DAVINCI_MMC_SD0_BASE;
> -       ret = mmc_bind(dev, &priv->mmc, &priv->cfg);
> +       ret = mmc_bind(dev, &plat->mmc, &plat->cfg);
>         if (ret)
>                 return ret;
>  #endif
> @@ -523,9 +528,9 @@ static int davinci_mmc_probe(struct udevice *dev)
>
>  static int davinci_mmc_bind(struct udevice *dev)
>  {
> -       struct davinci_mmc_priv *priv = dev_get_priv(dev);
> +       struct davinci_mmc_plat *plat = dev_get_platdata(dev);
>
> -       return mmc_bind(dev, &priv->mmc, &priv->cfg);
> +       return mmc_bind(dev, &plat->mmc, &plat->cfg);
>  }
>
>  static const struct udevice_id davinci_mmc_ids[] = {
> @@ -542,6 +547,7 @@ 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.17.1
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Revert "mmc: davinci: drop struct davinci_mmc_plat"
  2020-01-03 18:17 [PATCH] Revert "mmc: davinci: drop struct davinci_mmc_plat" Tom Rini
  2020-01-03 18:42 ` Adam Ford
  2020-01-03 18:56 ` Adam Ford
@ 2020-01-05 13:36 ` Tom Rini
  2 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2020-01-05 13:36 UTC (permalink / raw)
  To: u-boot

On Fri, Jan 03, 2020 at 01:17:07PM -0500, Tom Rini wrote:

> Adam Ford reports that this change breaks booting on da850-evm and
> Bartosz Golaszewski agrees that with the impending release we should
> revert the change for now.  With that noted:
> 
> This reverts commit 21a4d80a710c79053ac1deaa65ff9b69e6c031d4.
> 
> Cc: Bartosz Golaszewski <brgl@bgdev.pl>
> Tested-by: Adam Ford <aford173@gmail.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200105/9abf7932/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-01-05 13:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-03 18:17 [PATCH] Revert "mmc: davinci: drop struct davinci_mmc_plat" Tom Rini
2020-01-03 18:42 ` Adam Ford
2020-01-03 18:56 ` Adam Ford
2020-01-05 13:36 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.