]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
mmc: Remove unused kona_sdhci driver
authorTom Rini <trini@konsulko.com>
Fri, 11 Jul 2025 15:20:01 +0000 (09:20 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 17 Jul 2025 17:39:07 +0000 (11:39 -0600)
As no platforms use this driver anymore, remove it.

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/mmc/Kconfig
drivers/mmc/Makefile
drivers/mmc/kona_sdhci.c [deleted file]

index 14f6f61fd55e001ef717c50e99e747b2f50906eb..382ede3f831e57082f430e53e076bff72a0372f9 100644 (file)
@@ -661,16 +661,6 @@ config MMC_SDHCI_F_SDH30
          If you have a controller with this interface, say Y here.
          If unsure, say N.
 
-config MMC_SDHCI_KONA
-       bool "SDHCI support on Broadcom KONA platform"
-       depends on MMC_SDHCI
-       help
-         This selects the Broadcom Kona Secure Digital Host Controller
-         Interface(SDHCI) support.
-         This is used in Broadcom mobile SoCs.
-
-         If you have a controller with this interface, say Y here.
-
 config MMC_SDHCI_MSM
        bool "Qualcomm SDHCI controller"
        depends on MMC_SDHCI && ARCH_SNAPDRAGON
index 360706f53d2bec3000c9f4f2ac6e7ab5a400ff3d..9c934b69a07a1c148892c4c82e77d95a2bef1d55 100644 (file)
@@ -64,7 +64,6 @@ obj-$(CONFIG_MMC_SDHCI_CADENCE)               += sdhci-cadence6.o
 obj-$(CONFIG_MMC_SDHCI_CV1800B)                += cv1800b_sdhci.o
 obj-$(CONFIG_MMC_SDHCI_AM654)          += am654_sdhci.o
 obj-$(CONFIG_MMC_SDHCI_IPROC)          += iproc_sdhci.o
-obj-$(CONFIG_MMC_SDHCI_KONA)           += kona_sdhci.o
 obj-$(CONFIG_MMC_SDHCI_MSM)            += msm_sdhci.o
 obj-$(CONFIG_MMC_SDHCI_MV)             += mv_sdhci.o
 obj-$(CONFIG_MMC_SDHCI_NPCM)            += npcm_sdhci.o
diff --git a/drivers/mmc/kona_sdhci.c b/drivers/mmc/kona_sdhci.c
deleted file mode 100644 (file)
index 83f1412..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright 2013 Broadcom Corporation.
- */
-
-#include <malloc.h>
-#include <sdhci.h>
-#include <linux/delay.h>
-#include <linux/errno.h>
-#include <asm/kona-common/clk.h>
-
-#define SDHCI_CORECTRL_OFFSET          0x00008000
-#define SDHCI_CORECTRL_EN              0x01
-#define SDHCI_CORECTRL_RESET           0x02
-
-#define SDHCI_CORESTAT_OFFSET          0x00008004
-#define SDHCI_CORESTAT_CD_SW           0x01
-
-#define SDHCI_COREIMR_OFFSET           0x00008008
-#define SDHCI_COREIMR_IP               0x01
-
-static int init_kona_mmc_core(struct sdhci_host *host)
-{
-       unsigned int mask;
-       unsigned int timeout;
-
-       if (sdhci_readb(host, SDHCI_SOFTWARE_RESET) & SDHCI_RESET_ALL) {
-               printf("%s: sd host controller reset error\n", __func__);
-               return -EBUSY;
-       }
-
-       /* For kona a hardware reset before anything else. */
-       mask = sdhci_readl(host, SDHCI_CORECTRL_OFFSET) | SDHCI_CORECTRL_RESET;
-       sdhci_writel(host, mask, SDHCI_CORECTRL_OFFSET);
-
-       /* Wait max 100 ms */
-       timeout = 1000;
-       do {
-               if (timeout == 0) {
-                       printf("%s: reset timeout error\n", __func__);
-                       return -ETIMEDOUT;
-               }
-               timeout--;
-               udelay(100);
-       } while (0 ==
-                (sdhci_readl(host, SDHCI_CORECTRL_OFFSET) &
-                 SDHCI_CORECTRL_RESET));
-
-       /* Clear the reset bit. */
-       mask = mask & ~SDHCI_CORECTRL_RESET;
-       sdhci_writel(host, mask, SDHCI_CORECTRL_OFFSET);
-
-       /* Enable AHB clock */
-       mask = sdhci_readl(host, SDHCI_CORECTRL_OFFSET);
-       sdhci_writel(host, mask | SDHCI_CORECTRL_EN, SDHCI_CORECTRL_OFFSET);
-
-       /* Enable interrupts */
-       sdhci_writel(host, SDHCI_COREIMR_IP, SDHCI_COREIMR_OFFSET);
-
-       /* Make sure Card is detected in controller */
-       mask = sdhci_readl(host, SDHCI_CORESTAT_OFFSET);
-       sdhci_writel(host, mask | SDHCI_CORESTAT_CD_SW, SDHCI_CORESTAT_OFFSET);
-
-       /* Wait max 100 ms */
-       timeout = 1000;
-       while (!(sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT)) {
-               if (timeout == 0) {
-                       printf("%s: CARD DETECT timeout error\n", __func__);
-                       return -ETIMEDOUT;
-               }
-               timeout--;
-               udelay(100);
-       }
-       return 0;
-}
-
-int kona_sdhci_init(int dev_index, u32 min_clk, u32 quirks)
-{
-       int ret = 0;
-       u32 max_clk;
-       void *reg_base;
-       struct sdhci_host *host = NULL;
-
-       host = (struct sdhci_host *)malloc(sizeof(struct sdhci_host));
-       if (!host) {
-               printf("%s: sdhci host malloc fail!\n", __func__);
-               return -ENOMEM;
-       }
-       switch (dev_index) {
-       case 0:
-               reg_base = (void *)CONFIG_SYS_SDIO_BASE0;
-               ret = clk_sdio_enable(reg_base, CONFIG_SYS_SDIO0_MAX_CLK,
-                                     &max_clk);
-               break;
-       case 1:
-               reg_base = (void *)CONFIG_SYS_SDIO_BASE1;
-               ret = clk_sdio_enable(reg_base, CONFIG_SYS_SDIO1_MAX_CLK,
-                                     &max_clk);
-               break;
-       case 2:
-               reg_base = (void *)CONFIG_SYS_SDIO_BASE2;
-               ret = clk_sdio_enable(reg_base, CONFIG_SYS_SDIO2_MAX_CLK,
-                                     &max_clk);
-               break;
-       case 3:
-               reg_base = (void *)CONFIG_SYS_SDIO_BASE3;
-               ret = clk_sdio_enable(reg_base, CONFIG_SYS_SDIO3_MAX_CLK,
-                                     &max_clk);
-               break;
-       default:
-               printf("%s: sdio dev index %d not supported\n",
-                      __func__, dev_index);
-               ret = -EINVAL;
-       }
-       if (ret) {
-               free(host);
-               return ret;
-       }
-
-       host->name = "kona-sdhci";
-       host->ioaddr = reg_base;
-       host->quirks = quirks;
-       host->max_clk = max_clk;
-
-       if (init_kona_mmc_core(host)) {
-               free(host);
-               return -EINVAL;
-       }
-
-       add_sdhci(host, 0, min_clk);
-       return ret;
-}