diff mbox series

[v1,17/24] mmc: Remove static qualifier on mmc_power_init

Message ID 20200724100856.1482324-18-sr@denx.de
State Superseded
Delegated to: Stefan Roese
Headers show
Series arm: Introduce Marvell/Cavium OcteonTX/TX2 | expand

Commit Message

Stefan Roese July 24, 2020, 10:08 a.m. UTC
From: Suneel Garapati <sgarapati@marvell.com>

For platforms with multiple slot support like OcteonTX,
this is invoked per slot.

Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
Cc: Peng Fan <peng.fan@nxp.com>

Signed-off-by: Stefan Roese <sr@denx.de>
---

Changes in v1:
- Change patch subject

 drivers/mmc/mmc.c | 2 +-
 include/mmc.h     | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Simon Glass July 28, 2020, 7:01 p.m. UTC | #1
Hi Stefan,

On Fri, 24 Jul 2020 at 04:09, Stefan Roese <sr@denx.de> wrote:
>
> From: Suneel Garapati <sgarapati@marvell.com>
>
> For platforms with multiple slot support like OcteonTX,
> this is invoked per slot.
>
> Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
> Cc: Peng Fan <peng.fan@nxp.com>
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> ---
>
> Changes in v1:
> - Change patch subject
>
>  drivers/mmc/mmc.c | 2 +-
>  include/mmc.h     | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index f36d11ddc8..b26df59b91 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -2683,7 +2683,7 @@ __weak void board_mmc_power_init(void)
>  }
>  #endif
>
> -static int mmc_power_init(struct mmc *mmc)
> +int mmc_power_init(struct mmc *mmc)

Shouldn't multi-slot be a core MMC featuren then?

>  {
>  #if CONFIG_IS_ENABLED(DM_MMC)
>  #if CONFIG_IS_ENABLED(DM_REGULATOR)
> diff --git a/include/mmc.h b/include/mmc.h
> index 82562193cc..e05c59713c 100644
> --- a/include/mmc.h
> +++ b/include/mmc.h
> @@ -747,6 +747,7 @@ int mmc_unbind(struct udevice *dev);
>  int mmc_initialize(struct bd_info *bis);
>  int mmc_init_device(int num);
>  int mmc_init(struct mmc *mmc);
> +int mmc_power_init(struct mmc *mmc);

This badly needs a comment to explain what it is for and when to call it.

>  int mmc_send_tuning(struct mmc *mmc, u32 opcode, int *cmd_error);
>
>  #if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \
> --
> 2.27.0
>

Regards,
Simon
diff mbox series

Patch

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index f36d11ddc8..b26df59b91 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -2683,7 +2683,7 @@  __weak void board_mmc_power_init(void)
 }
 #endif
 
-static int mmc_power_init(struct mmc *mmc)
+int mmc_power_init(struct mmc *mmc)
 {
 #if CONFIG_IS_ENABLED(DM_MMC)
 #if CONFIG_IS_ENABLED(DM_REGULATOR)
diff --git a/include/mmc.h b/include/mmc.h
index 82562193cc..e05c59713c 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -747,6 +747,7 @@  int mmc_unbind(struct udevice *dev);
 int mmc_initialize(struct bd_info *bis);
 int mmc_init_device(int num);
 int mmc_init(struct mmc *mmc);
+int mmc_power_init(struct mmc *mmc);
 int mmc_send_tuning(struct mmc *mmc, u32 opcode, int *cmd_error);
 
 #if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \