* [PATCH 1/3] mmc: mv_sdhci: Simplify call to sdhci_mvebu_mbus_config()
@ 2023-02-10 12:23 ` Stefan Roese
2023-02-10 12:23 ` [PATCH 2/3] mmc: mv_sdhci: Remove CONFIG_MMC_SDHCI_IO_ACCESSORS support Stefan Roese
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Stefan Roese @ 2023-02-10 12:23 UTC (permalink / raw)
To: u-boot; +Cc: Tom Rini, Simon Glass, Peng Fan, Jaehoon Chung
This driver already depends on CONFIG_ARCH_MVEBU, so there is no need
to have some checks for this Kconfig symbol in the driver itself. Let's
remove these superfluous checks.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
---
drivers/mmc/mv_sdhci.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/mmc/mv_sdhci.c b/drivers/mmc/mv_sdhci.c
index 336ebf141026..50d03b703ed7 100644
--- a/drivers/mmc/mv_sdhci.c
+++ b/drivers/mmc/mv_sdhci.c
@@ -64,10 +64,8 @@ int mv_sdh_init(unsigned long regbase, u32 max_clk, u32 min_clk, u32 quirks)
host->ops = &mv_ops;
#endif
- if (CONFIG_IS_ENABLED(ARCH_MVEBU)) {
- /* Configure SDHCI MBUS mbus bridge windows */
- sdhci_mvebu_mbus_config((void __iomem *)regbase);
- }
+ /* Configure SDHCI MBUS mbus bridge windows */
+ sdhci_mvebu_mbus_config((void __iomem *)regbase);
return add_sdhci(host, 0, min_clk);
}
@@ -103,10 +101,8 @@ static int mv_sdhci_probe(struct udevice *dev)
if (ret)
return ret;
- if (CONFIG_IS_ENABLED(ARCH_MVEBU)) {
- /* Configure SDHCI MBUS mbus bridge windows */
- sdhci_mvebu_mbus_config(host->ioaddr);
- }
+ /* Configure SDHCI MBUS mbus bridge windows */
+ sdhci_mvebu_mbus_config(host->ioaddr);
upriv->mmc = host->mmc;
--
2.39.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/3] mmc: mv_sdhci: Remove CONFIG_MMC_SDHCI_IO_ACCESSORS support
2023-02-10 12:23 ` [PATCH 1/3] mmc: mv_sdhci: Simplify call to sdhci_mvebu_mbus_config() Stefan Roese
@ 2023-02-10 12:23 ` Stefan Roese
2023-02-16 7:21 ` Jaehoon Chung
2023-03-10 2:48 ` Jaehoon Chung
2023-02-10 12:23 ` [PATCH 3/3] mmc: mv_sdhci: Depend on DM_MMC Stefan Roese
` (2 subsequent siblings)
3 siblings, 2 replies; 10+ messages in thread
From: Stefan Roese @ 2023-02-10 12:23 UTC (permalink / raw)
To: u-boot; +Cc: Tom Rini, Simon Glass, Peng Fan, Jaehoon Chung
CONFIG_MMC_SDHCI_IO_ACCESSORS is not supported and/or used by this
driver so let's remove these unused parts completely.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
---
drivers/mmc/mv_sdhci.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/mmc/mv_sdhci.c b/drivers/mmc/mv_sdhci.c
index 50d03b703ed7..42fa735f3160 100644
--- a/drivers/mmc/mv_sdhci.c
+++ b/drivers/mmc/mv_sdhci.c
@@ -42,10 +42,6 @@ static void sdhci_mvebu_mbus_config(void __iomem *base)
#ifndef CONFIG_DM_MMC
-#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
-static struct sdhci_ops mv_ops;
-#endif /* CONFIG_MMC_SDHCI_IO_ACCESSORS */
-
int mv_sdh_init(unsigned long regbase, u32 max_clk, u32 min_clk, u32 quirks)
{
struct sdhci_host *host = NULL;
@@ -59,10 +55,6 @@ int mv_sdh_init(unsigned long regbase, u32 max_clk, u32 min_clk, u32 quirks)
host->ioaddr = (void *)regbase;
host->quirks = quirks;
host->max_clk = max_clk;
-#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
- memset(&mv_ops, 0, sizeof(struct sdhci_ops));
- host->ops = &mv_ops;
-#endif
/* Configure SDHCI MBUS mbus bridge windows */
sdhci_mvebu_mbus_config((void __iomem *)regbase);
--
2.39.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/3] mmc: mv_sdhci: Depend on DM_MMC
2023-02-10 12:23 ` [PATCH 1/3] mmc: mv_sdhci: Simplify call to sdhci_mvebu_mbus_config() Stefan Roese
2023-02-10 12:23 ` [PATCH 2/3] mmc: mv_sdhci: Remove CONFIG_MMC_SDHCI_IO_ACCESSORS support Stefan Roese
@ 2023-02-10 12:23 ` Stefan Roese
2023-02-10 16:05 ` Simon Glass
` (2 more replies)
2023-02-16 7:21 ` [PATCH 1/3] mmc: mv_sdhci: Simplify call to sdhci_mvebu_mbus_config() Jaehoon Chung
2023-03-10 2:47 ` Jaehoon Chung
3 siblings, 3 replies; 10+ messages in thread
From: Stefan Roese @ 2023-02-10 12:23 UTC (permalink / raw)
To: u-boot; +Cc: Tom Rini, Simon Glass, Peng Fan, Jaehoon Chung
All build targets using this driver already use DM_MMC. So let's depend
this driver on this Kconfig symbol and remove the non-DM driver part.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
---
drivers/mmc/Kconfig | 1 +
drivers/mmc/mv_sdhci.c | 39 +++++++--------------------------------
2 files changed, 8 insertions(+), 32 deletions(-)
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index 878f867c627b..3f5f61503fb6 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -621,6 +621,7 @@ config MMC_SDHCI_MV
bool "SDHCI support on Marvell platform"
depends on ARCH_MVEBU
depends on MMC_SDHCI
+ depends on DM_MMC
help
This selects the Secure Digital Host Controller Interface on
Marvell platform.
diff --git a/drivers/mmc/mv_sdhci.c b/drivers/mmc/mv_sdhci.c
index 42fa735f3160..dbdd671c88bc 100644
--- a/drivers/mmc/mv_sdhci.c
+++ b/drivers/mmc/mv_sdhci.c
@@ -15,6 +15,13 @@
#define SDHCI_WINDOW_CTRL(win) (0x4080 + ((win) << 4))
#define SDHCI_WINDOW_BASE(win) (0x4084 + ((win) << 4))
+DECLARE_GLOBAL_DATA_PTR;
+
+struct mv_sdhci_plat {
+ struct mmc_config cfg;
+ struct mmc mmc;
+};
+
static void sdhci_mvebu_mbus_config(void __iomem *base)
{
const struct mbus_dram_target_info *dram;
@@ -40,37 +47,6 @@ static void sdhci_mvebu_mbus_config(void __iomem *base)
}
}
-#ifndef CONFIG_DM_MMC
-
-int mv_sdh_init(unsigned long regbase, u32 max_clk, u32 min_clk, u32 quirks)
-{
- struct sdhci_host *host = NULL;
- host = calloc(1, sizeof(*host));
- if (!host) {
- printf("sdh_host malloc fail!\n");
- return -ENOMEM;
- }
-
- host->name = MVSDH_NAME;
- host->ioaddr = (void *)regbase;
- host->quirks = quirks;
- host->max_clk = max_clk;
-
- /* Configure SDHCI MBUS mbus bridge windows */
- sdhci_mvebu_mbus_config((void __iomem *)regbase);
-
- return add_sdhci(host, 0, min_clk);
-}
-
-#else
-
-DECLARE_GLOBAL_DATA_PTR;
-
-struct mv_sdhci_plat {
- struct mmc_config cfg;
- struct mmc mmc;
-};
-
static int mv_sdhci_probe(struct udevice *dev)
{
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
@@ -123,4 +99,3 @@ U_BOOT_DRIVER(mv_sdhci_drv) = {
.priv_auto = sizeof(struct sdhci_host),
.plat_auto = sizeof(struct mv_sdhci_plat),
};
-#endif /* CONFIG_DM_MMC */
--
2.39.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] mmc: mv_sdhci: Depend on DM_MMC
2023-02-10 12:23 ` [PATCH 3/3] mmc: mv_sdhci: Depend on DM_MMC Stefan Roese
@ 2023-02-10 16:05 ` Simon Glass
2023-02-16 7:21 ` Jaehoon Chung
2023-03-10 2:48 ` Jaehoon Chung
2 siblings, 0 replies; 10+ messages in thread
From: Simon Glass @ 2023-02-10 16:05 UTC (permalink / raw)
To: Stefan Roese; +Cc: u-boot, Tom Rini, Peng Fan, Jaehoon Chung
On Fri, 10 Feb 2023 at 05:24, Stefan Roese <sr@denx.de> wrote:
>
> All build targets using this driver already use DM_MMC. So let's depend
> this driver on this Kconfig symbol and remove the non-DM driver part.
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Jaehoon Chung <jh80.chung@samsung.com>
> ---
> drivers/mmc/Kconfig | 1 +
> drivers/mmc/mv_sdhci.c | 39 +++++++--------------------------------
> 2 files changed, 8 insertions(+), 32 deletions(-)
>
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/3] mmc: mv_sdhci: Simplify call to sdhci_mvebu_mbus_config()
2023-02-10 12:23 ` [PATCH 1/3] mmc: mv_sdhci: Simplify call to sdhci_mvebu_mbus_config() Stefan Roese
2023-02-10 12:23 ` [PATCH 2/3] mmc: mv_sdhci: Remove CONFIG_MMC_SDHCI_IO_ACCESSORS support Stefan Roese
2023-02-10 12:23 ` [PATCH 3/3] mmc: mv_sdhci: Depend on DM_MMC Stefan Roese
@ 2023-02-16 7:21 ` Jaehoon Chung
2023-03-10 2:47 ` Jaehoon Chung
3 siblings, 0 replies; 10+ messages in thread
From: Jaehoon Chung @ 2023-02-16 7:21 UTC (permalink / raw)
To: Stefan Roese, u-boot; +Cc: Tom Rini, Simon Glass, Peng Fan, Jaehoon Chung
On 2/10/23 21:23, Stefan Roese wrote:
> This driver already depends on CONFIG_ARCH_MVEBU, so there is no need
> to have some checks for this Kconfig symbol in the driver itself. Let's
> remove these superfluous checks.
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Best Regards,
Jaehoon Chung
> ---
> drivers/mmc/mv_sdhci.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/mmc/mv_sdhci.c b/drivers/mmc/mv_sdhci.c
> index 336ebf141026..50d03b703ed7 100644
> --- a/drivers/mmc/mv_sdhci.c
> +++ b/drivers/mmc/mv_sdhci.c
> @@ -64,10 +64,8 @@ int mv_sdh_init(unsigned long regbase, u32 max_clk, u32 min_clk, u32 quirks)
> host->ops = &mv_ops;
> #endif
>
> - if (CONFIG_IS_ENABLED(ARCH_MVEBU)) {
> - /* Configure SDHCI MBUS mbus bridge windows */
> - sdhci_mvebu_mbus_config((void __iomem *)regbase);
> - }
> + /* Configure SDHCI MBUS mbus bridge windows */
> + sdhci_mvebu_mbus_config((void __iomem *)regbase);
>
> return add_sdhci(host, 0, min_clk);
> }
> @@ -103,10 +101,8 @@ static int mv_sdhci_probe(struct udevice *dev)
> if (ret)
> return ret;
>
> - if (CONFIG_IS_ENABLED(ARCH_MVEBU)) {
> - /* Configure SDHCI MBUS mbus bridge windows */
> - sdhci_mvebu_mbus_config(host->ioaddr);
> - }
> + /* Configure SDHCI MBUS mbus bridge windows */
> + sdhci_mvebu_mbus_config(host->ioaddr);
>
> upriv->mmc = host->mmc;
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/3] mmc: mv_sdhci: Remove CONFIG_MMC_SDHCI_IO_ACCESSORS support
2023-02-10 12:23 ` [PATCH 2/3] mmc: mv_sdhci: Remove CONFIG_MMC_SDHCI_IO_ACCESSORS support Stefan Roese
@ 2023-02-16 7:21 ` Jaehoon Chung
2023-03-10 2:48 ` Jaehoon Chung
1 sibling, 0 replies; 10+ messages in thread
From: Jaehoon Chung @ 2023-02-16 7:21 UTC (permalink / raw)
To: Stefan Roese, u-boot; +Cc: Tom Rini, Simon Glass, Peng Fan, Jaehoon Chung
On 2/10/23 21:23, Stefan Roese wrote:
> CONFIG_MMC_SDHCI_IO_ACCESSORS is not supported and/or used by this
> driver so let's remove these unused parts completely.
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Best Regards,
Jaehoon Chung
> ---
> drivers/mmc/mv_sdhci.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/drivers/mmc/mv_sdhci.c b/drivers/mmc/mv_sdhci.c
> index 50d03b703ed7..42fa735f3160 100644
> --- a/drivers/mmc/mv_sdhci.c
> +++ b/drivers/mmc/mv_sdhci.c
> @@ -42,10 +42,6 @@ static void sdhci_mvebu_mbus_config(void __iomem *base)
>
> #ifndef CONFIG_DM_MMC
>
> -#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
> -static struct sdhci_ops mv_ops;
> -#endif /* CONFIG_MMC_SDHCI_IO_ACCESSORS */
> -
> int mv_sdh_init(unsigned long regbase, u32 max_clk, u32 min_clk, u32 quirks)
> {
> struct sdhci_host *host = NULL;
> @@ -59,10 +55,6 @@ int mv_sdh_init(unsigned long regbase, u32 max_clk, u32 min_clk, u32 quirks)
> host->ioaddr = (void *)regbase;
> host->quirks = quirks;
> host->max_clk = max_clk;
> -#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
> - memset(&mv_ops, 0, sizeof(struct sdhci_ops));
> - host->ops = &mv_ops;
> -#endif
>
> /* Configure SDHCI MBUS mbus bridge windows */
> sdhci_mvebu_mbus_config((void __iomem *)regbase);
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] mmc: mv_sdhci: Depend on DM_MMC
2023-02-10 12:23 ` [PATCH 3/3] mmc: mv_sdhci: Depend on DM_MMC Stefan Roese
2023-02-10 16:05 ` Simon Glass
@ 2023-02-16 7:21 ` Jaehoon Chung
2023-03-10 2:48 ` Jaehoon Chung
2 siblings, 0 replies; 10+ messages in thread
From: Jaehoon Chung @ 2023-02-16 7:21 UTC (permalink / raw)
To: Stefan Roese, u-boot; +Cc: Tom Rini, Simon Glass, Peng Fan, Jaehoon Chung
On 2/10/23 21:23, Stefan Roese wrote:
> All build targets using this driver already use DM_MMC. So let's depend
> this driver on this Kconfig symbol and remove the non-DM driver part.
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Best Regards,
Jaehoon Chung
> ---
> drivers/mmc/Kconfig | 1 +
> drivers/mmc/mv_sdhci.c | 39 +++++++--------------------------------
> 2 files changed, 8 insertions(+), 32 deletions(-)
>
> diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
> index 878f867c627b..3f5f61503fb6 100644
> --- a/drivers/mmc/Kconfig
> +++ b/drivers/mmc/Kconfig
> @@ -621,6 +621,7 @@ config MMC_SDHCI_MV
> bool "SDHCI support on Marvell platform"
> depends on ARCH_MVEBU
> depends on MMC_SDHCI
> + depends on DM_MMC
> help
> This selects the Secure Digital Host Controller Interface on
> Marvell platform.
> diff --git a/drivers/mmc/mv_sdhci.c b/drivers/mmc/mv_sdhci.c
> index 42fa735f3160..dbdd671c88bc 100644
> --- a/drivers/mmc/mv_sdhci.c
> +++ b/drivers/mmc/mv_sdhci.c
> @@ -15,6 +15,13 @@
> #define SDHCI_WINDOW_CTRL(win) (0x4080 + ((win) << 4))
> #define SDHCI_WINDOW_BASE(win) (0x4084 + ((win) << 4))
>
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +struct mv_sdhci_plat {
> + struct mmc_config cfg;
> + struct mmc mmc;
> +};
> +
> static void sdhci_mvebu_mbus_config(void __iomem *base)
> {
> const struct mbus_dram_target_info *dram;
> @@ -40,37 +47,6 @@ static void sdhci_mvebu_mbus_config(void __iomem *base)
> }
> }
>
> -#ifndef CONFIG_DM_MMC
> -
> -int mv_sdh_init(unsigned long regbase, u32 max_clk, u32 min_clk, u32 quirks)
> -{
> - struct sdhci_host *host = NULL;
> - host = calloc(1, sizeof(*host));
> - if (!host) {
> - printf("sdh_host malloc fail!\n");
> - return -ENOMEM;
> - }
> -
> - host->name = MVSDH_NAME;
> - host->ioaddr = (void *)regbase;
> - host->quirks = quirks;
> - host->max_clk = max_clk;
> -
> - /* Configure SDHCI MBUS mbus bridge windows */
> - sdhci_mvebu_mbus_config((void __iomem *)regbase);
> -
> - return add_sdhci(host, 0, min_clk);
> -}
> -
> -#else
> -
> -DECLARE_GLOBAL_DATA_PTR;
> -
> -struct mv_sdhci_plat {
> - struct mmc_config cfg;
> - struct mmc mmc;
> -};
> -
> static int mv_sdhci_probe(struct udevice *dev)
> {
> struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
> @@ -123,4 +99,3 @@ U_BOOT_DRIVER(mv_sdhci_drv) = {
> .priv_auto = sizeof(struct sdhci_host),
> .plat_auto = sizeof(struct mv_sdhci_plat),
> };
> -#endif /* CONFIG_DM_MMC */
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/3] mmc: mv_sdhci: Simplify call to sdhci_mvebu_mbus_config()
2023-02-10 12:23 ` [PATCH 1/3] mmc: mv_sdhci: Simplify call to sdhci_mvebu_mbus_config() Stefan Roese
` (2 preceding siblings ...)
2023-02-16 7:21 ` [PATCH 1/3] mmc: mv_sdhci: Simplify call to sdhci_mvebu_mbus_config() Jaehoon Chung
@ 2023-03-10 2:47 ` Jaehoon Chung
3 siblings, 0 replies; 10+ messages in thread
From: Jaehoon Chung @ 2023-03-10 2:47 UTC (permalink / raw)
To: Stefan Roese, u-boot; +Cc: Tom Rini, Simon Glass, Peng Fan
On 2/10/23 21:23, Stefan Roese wrote:
> This driver already depends on CONFIG_ARCH_MVEBU, so there is no need
> to have some checks for this Kconfig symbol in the driver itself. Let's
> remove these superfluous checks.
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Jaehoon Chung <jh80.chung@samsung.com>
> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Applied to u-boot-mmc/master.
Best Regards,
Jaehoon Chung
> ---
> drivers/mmc/mv_sdhci.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/mmc/mv_sdhci.c b/drivers/mmc/mv_sdhci.c
> index 336ebf141026..50d03b703ed7 100644
> --- a/drivers/mmc/mv_sdhci.c
> +++ b/drivers/mmc/mv_sdhci.c
> @@ -64,10 +64,8 @@ int mv_sdh_init(unsigned long regbase, u32 max_clk, u32 min_clk, u32 quirks)
> host->ops = &mv_ops;
> #endif
>
> - if (CONFIG_IS_ENABLED(ARCH_MVEBU)) {
> - /* Configure SDHCI MBUS mbus bridge windows */
> - sdhci_mvebu_mbus_config((void __iomem *)regbase);
> - }
> + /* Configure SDHCI MBUS mbus bridge windows */
> + sdhci_mvebu_mbus_config((void __iomem *)regbase);
>
> return add_sdhci(host, 0, min_clk);
> }
> @@ -103,10 +101,8 @@ static int mv_sdhci_probe(struct udevice *dev)
> if (ret)
> return ret;
>
> - if (CONFIG_IS_ENABLED(ARCH_MVEBU)) {
> - /* Configure SDHCI MBUS mbus bridge windows */
> - sdhci_mvebu_mbus_config(host->ioaddr);
> - }
> + /* Configure SDHCI MBUS mbus bridge windows */
> + sdhci_mvebu_mbus_config(host->ioaddr);
>
> upriv->mmc = host->mmc;
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/3] mmc: mv_sdhci: Remove CONFIG_MMC_SDHCI_IO_ACCESSORS support
2023-02-10 12:23 ` [PATCH 2/3] mmc: mv_sdhci: Remove CONFIG_MMC_SDHCI_IO_ACCESSORS support Stefan Roese
2023-02-16 7:21 ` Jaehoon Chung
@ 2023-03-10 2:48 ` Jaehoon Chung
1 sibling, 0 replies; 10+ messages in thread
From: Jaehoon Chung @ 2023-03-10 2:48 UTC (permalink / raw)
To: Stefan Roese, u-boot; +Cc: Tom Rini, Simon Glass, Peng Fan
On 2/10/23 21:23, Stefan Roese wrote:
> CONFIG_MMC_SDHCI_IO_ACCESSORS is not supported and/or used by this
> driver so let's remove these unused parts completely.
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Jaehoon Chung <jh80.chung@samsung.com>
> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Applied to u-boot-mmc/master.
Best Regards,
Jaehoon Chung
> ---
> drivers/mmc/mv_sdhci.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/drivers/mmc/mv_sdhci.c b/drivers/mmc/mv_sdhci.c
> index 50d03b703ed7..42fa735f3160 100644
> --- a/drivers/mmc/mv_sdhci.c
> +++ b/drivers/mmc/mv_sdhci.c
> @@ -42,10 +42,6 @@ static void sdhci_mvebu_mbus_config(void __iomem *base)
>
> #ifndef CONFIG_DM_MMC
>
> -#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
> -static struct sdhci_ops mv_ops;
> -#endif /* CONFIG_MMC_SDHCI_IO_ACCESSORS */
> -
> int mv_sdh_init(unsigned long regbase, u32 max_clk, u32 min_clk, u32 quirks)
> {
> struct sdhci_host *host = NULL;
> @@ -59,10 +55,6 @@ int mv_sdh_init(unsigned long regbase, u32 max_clk, u32 min_clk, u32 quirks)
> host->ioaddr = (void *)regbase;
> host->quirks = quirks;
> host->max_clk = max_clk;
> -#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
> - memset(&mv_ops, 0, sizeof(struct sdhci_ops));
> - host->ops = &mv_ops;
> -#endif
>
> /* Configure SDHCI MBUS mbus bridge windows */
> sdhci_mvebu_mbus_config((void __iomem *)regbase);
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] mmc: mv_sdhci: Depend on DM_MMC
2023-02-10 12:23 ` [PATCH 3/3] mmc: mv_sdhci: Depend on DM_MMC Stefan Roese
2023-02-10 16:05 ` Simon Glass
2023-02-16 7:21 ` Jaehoon Chung
@ 2023-03-10 2:48 ` Jaehoon Chung
2 siblings, 0 replies; 10+ messages in thread
From: Jaehoon Chung @ 2023-03-10 2:48 UTC (permalink / raw)
To: Stefan Roese, u-boot; +Cc: Tom Rini, Simon Glass, Peng Fan
On 2/10/23 21:23, Stefan Roese wrote:
> All build targets using this driver already use DM_MMC. So let's depend
> this driver on this Kconfig symbol and remove the non-DM driver part.
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Jaehoon Chung <jh80.chung@samsung.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Applied to u-boot-mmc/master.
Best Regards,
Jaehoon Chung
> ---
> drivers/mmc/Kconfig | 1 +
> drivers/mmc/mv_sdhci.c | 39 +++++++--------------------------------
> 2 files changed, 8 insertions(+), 32 deletions(-)
>
> diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
> index 878f867c627b..3f5f61503fb6 100644
> --- a/drivers/mmc/Kconfig
> +++ b/drivers/mmc/Kconfig
> @@ -621,6 +621,7 @@ config MMC_SDHCI_MV
> bool "SDHCI support on Marvell platform"
> depends on ARCH_MVEBU
> depends on MMC_SDHCI
> + depends on DM_MMC
> help
> This selects the Secure Digital Host Controller Interface on
> Marvell platform.
> diff --git a/drivers/mmc/mv_sdhci.c b/drivers/mmc/mv_sdhci.c
> index 42fa735f3160..dbdd671c88bc 100644
> --- a/drivers/mmc/mv_sdhci.c
> +++ b/drivers/mmc/mv_sdhci.c
> @@ -15,6 +15,13 @@
> #define SDHCI_WINDOW_CTRL(win) (0x4080 + ((win) << 4))
> #define SDHCI_WINDOW_BASE(win) (0x4084 + ((win) << 4))
>
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +struct mv_sdhci_plat {
> + struct mmc_config cfg;
> + struct mmc mmc;
> +};
> +
> static void sdhci_mvebu_mbus_config(void __iomem *base)
> {
> const struct mbus_dram_target_info *dram;
> @@ -40,37 +47,6 @@ static void sdhci_mvebu_mbus_config(void __iomem *base)
> }
> }
>
> -#ifndef CONFIG_DM_MMC
> -
> -int mv_sdh_init(unsigned long regbase, u32 max_clk, u32 min_clk, u32 quirks)
> -{
> - struct sdhci_host *host = NULL;
> - host = calloc(1, sizeof(*host));
> - if (!host) {
> - printf("sdh_host malloc fail!\n");
> - return -ENOMEM;
> - }
> -
> - host->name = MVSDH_NAME;
> - host->ioaddr = (void *)regbase;
> - host->quirks = quirks;
> - host->max_clk = max_clk;
> -
> - /* Configure SDHCI MBUS mbus bridge windows */
> - sdhci_mvebu_mbus_config((void __iomem *)regbase);
> -
> - return add_sdhci(host, 0, min_clk);
> -}
> -
> -#else
> -
> -DECLARE_GLOBAL_DATA_PTR;
> -
> -struct mv_sdhci_plat {
> - struct mmc_config cfg;
> - struct mmc mmc;
> -};
> -
> static int mv_sdhci_probe(struct udevice *dev)
> {
> struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
> @@ -123,4 +99,3 @@ U_BOOT_DRIVER(mv_sdhci_drv) = {
> .priv_auto = sizeof(struct sdhci_host),
> .plat_auto = sizeof(struct mv_sdhci_plat),
> };
> -#endif /* CONFIG_DM_MMC */
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-03-10 2:48 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20230310024755epcas1p1e3b655c49596f9555add5e260e10512b@epcas1p1.samsung.com>
2023-02-10 12:23 ` [PATCH 1/3] mmc: mv_sdhci: Simplify call to sdhci_mvebu_mbus_config() Stefan Roese
2023-02-10 12:23 ` [PATCH 2/3] mmc: mv_sdhci: Remove CONFIG_MMC_SDHCI_IO_ACCESSORS support Stefan Roese
2023-02-16 7:21 ` Jaehoon Chung
2023-03-10 2:48 ` Jaehoon Chung
2023-02-10 12:23 ` [PATCH 3/3] mmc: mv_sdhci: Depend on DM_MMC Stefan Roese
2023-02-10 16:05 ` Simon Glass
2023-02-16 7:21 ` Jaehoon Chung
2023-03-10 2:48 ` Jaehoon Chung
2023-02-16 7:21 ` [PATCH 1/3] mmc: mv_sdhci: Simplify call to sdhci_mvebu_mbus_config() Jaehoon Chung
2023-03-10 2:47 ` Jaehoon Chung
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox