diff mbox series

[U-Boot,9/9] mmc: sunxi: Mark end of DM_MMC #ifdefs

Message ID 20190119013055.28023-10-andre.przywara@arm.com
State Superseded
Delegated to: Jagannadha Sutradharudu Teki
Headers show
Series sunxi: enable DM_MMC | expand

Commit Message

Andre Przywara Jan. 19, 2019, 1:30 a.m. UTC
The Allwinner MMC supports both the legacy approach and the driver model,
at the cost of quite some #ifdefs.

Mark the closing #endifs with their respective config symbol, to make it
more obvious where each part ends and begins.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 drivers/mmc/sunxi_mmc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Simon Glass Jan. 31, 2019, 10:04 a.m. UTC | #1
Hi Andre,

On Fri, 18 Jan 2019 at 18:33, Andre Przywara <andre.przywara@arm.com> wrote:
>
> The Allwinner MMC supports both the legacy approach and the driver model,
> at the cost of quite some #ifdefs.
>
> Mark the closing #endifs with their respective config symbol, to make it
> more obvious where each part ends and begins.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  drivers/mmc/sunxi_mmc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

We should be able to remove the non-DM_MMC code now.

Regards,
Simon
Andre Przywara Jan. 31, 2019, 2:55 p.m. UTC | #2
On Thu, 31 Jan 2019 03:04:21 -0700
Simon Glass <sjg@chromium.org> wrote:

> Hi Andre,
> 
> On Fri, 18 Jan 2019 at 18:33, Andre Przywara <andre.przywara@arm.com>
> wrote:
> >
> > The Allwinner MMC supports both the legacy approach and the driver
> > model, at the cost of quite some #ifdefs.
> >
> > Mark the closing #endifs with their respective config symbol, to
> > make it more obvious where each part ends and begins.
> >
> > Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> > ---
> >  drivers/mmc/sunxi_mmc.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)  
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> 
> We should be able to remove the non-DM_MMC code now.

Unfortunately not, since the SPL still uses the legacy interface. Not
sure we can easily fix that without blowing up the code, given that the
64-bit SPL is REALLY tight.
If you are around in Brussels on the weekend, we can have a chat about
that.

Cheers,
Andre.
diff mbox series

Patch

diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
index 374775194d..ee0bc9da89 100644
--- a/drivers/mmc/sunxi_mmc.c
+++ b/drivers/mmc/sunxi_mmc.c
@@ -104,7 +104,7 @@  static int mmc_resource_init(int sdc_no)
 
 	return ret;
 }
-#endif
+#endif	/* !DM_MMC */
 
 static int mmc_set_mod_clk(struct sunxi_mmc_priv *priv, unsigned int hz)
 {
@@ -566,7 +566,7 @@  struct mmc *sunxi_mmc_init(int sdc_no)
 
 	return mmc_create(cfg, priv);
 }
-#else
+#else	/* DM_MMC */
 
 static int sunxi_mmc_set_ios(struct udevice *dev)
 {
@@ -747,4 +747,4 @@  U_BOOT_DRIVER(sunxi_mmc_drv) = {
 	.platdata_auto_alloc_size = sizeof(struct sunxi_mmc_plat),
 	.priv_auto_alloc_size = sizeof(struct sunxi_mmc_priv),
 };
-#endif
+#endif	/* DM_MMC */