Re: [PATCH 2/4] mmc: davinci: drop struct davinci_mmc_plat

2020-01-04 Thread Adam Ford
On Fri, Jan 3, 2020 at 10:59 AM Tom Rini  wrote:
>
> On Fri, Jan 03, 2020 at 05:50:38PM +0100, Bartosz Golaszewski wrote:
> > pt., 3 sty 2020 o 17:01 Adam Ford  napisał(a):
> > >
> > > On Thu, Nov 14, 2019 at 9:10 AM Bartosz Golaszewski  wrote:
> > > >
> > > > From: Bartosz Golaszewski 
> > > >
> > > > 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.
> > >
> > > This patch appears to break the da850-evm.
> > >
> > > With the pending release of 2020.01, is there any way we can revert
> > > before release and try to apply this going forward with more time to
> > > test?
> > >
> > > As of now, the da850-evm cannot read/write from the MMC card from
> > > U-Boot which includes MMC booting.
> > >
> >
> > This is strange, this change doesn't seem to affect the logic.
> >
> > This isn't revertible automatically anymore, due to other patches that
> > came before and after. We can probably try to revert it manually.
>
> Doing a git revert and fixing up the one hunk that didn't go cleanly is
> easy, should I push that?

That would make me happy.  :-)  I don't know about Bartosz.

If you have a patch, I can quickly test it today.

adam
>
> --
> Tom


Re: [PATCH 2/4] mmc: davinci: drop struct davinci_mmc_plat

2020-01-04 Thread Bartosz Golaszewski
pt., 3 sty 2020 o 17:01 Adam Ford  napisał(a):
>
> On Thu, Nov 14, 2019 at 9:10 AM Bartosz Golaszewski  wrote:
> >
> > From: Bartosz Golaszewski 
> >
> > 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.
>
> This patch appears to break the da850-evm.
>
> With the pending release of 2020.01, is there any way we can revert
> before release and try to apply this going forward with more time to
> test?
>
> As of now, the da850-evm cannot read/write from the MMC card from
> U-Boot which includes MMC booting.
>

This is strange, this change doesn't seem to affect the logic.

This isn't revertible automatically anymore, due to other patches that
came before and after. We can probably try to revert it manually.

Bart


Re: [PATCH 2/4] mmc: davinci: drop struct davinci_mmc_plat

2020-01-04 Thread Tom Rini
On Fri, Jan 03, 2020 at 05:50:38PM +0100, Bartosz Golaszewski wrote:
> pt., 3 sty 2020 o 17:01 Adam Ford  napisał(a):
> >
> > On Thu, Nov 14, 2019 at 9:10 AM Bartosz Golaszewski  wrote:
> > >
> > > From: Bartosz Golaszewski 
> > >
> > > 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.
> >
> > This patch appears to break the da850-evm.
> >
> > With the pending release of 2020.01, is there any way we can revert
> > before release and try to apply this going forward with more time to
> > test?
> >
> > As of now, the da850-evm cannot read/write from the MMC card from
> > U-Boot which includes MMC booting.
> >
> 
> This is strange, this change doesn't seem to affect the logic.
> 
> This isn't revertible automatically anymore, due to other patches that
> came before and after. We can probably try to revert it manually.

Doing a git revert and fixing up the one hunk that didn't go cleanly is
easy, should I push that?

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH 2/4] mmc: davinci: drop struct davinci_mmc_plat

2020-01-04 Thread Adam Ford
On Thu, Nov 14, 2019 at 9:10 AM Bartosz Golaszewski  wrote:
>
> From: Bartosz Golaszewski 
>
> 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.

This patch appears to break the da850-evm.

With the pending release of 2020.01, is there any way we can revert
before release and try to apply this going forward with more time to
test?

As of now, the da850-evm cannot read/write from the MMC card from
U-Boot which includes MMC booting.

adam



>
> Signed-off-by: Bartosz Golaszewski 
> ---
>  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 = 20;
> cfg->f_max = 2500;
> @@ -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
>


Re: [U-Boot] [PATCH 2/4] mmc: davinci: drop struct davinci_mmc_plat

2019-12-03 Thread Tom Rini
On Thu, Nov 14, 2019 at 04:10:29PM +0100, Bartosz Golaszewski wrote:

> From: Bartosz Golaszewski 
> 
> 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 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: PGP signature


[U-Boot] [PATCH 2/4] mmc: davinci: drop struct davinci_mmc_plat

2019-11-14 Thread Bartosz Golaszewski
From: Bartosz Golaszewski 

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 
---
 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 = 20;
cfg->f_max = 2500;
@@ -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

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot