diff options
author | Tom Rini <trini@konsulko.com> | 2021-01-23 00:01:27 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-01-23 00:01:27 +0300 |
commit | abd95385e7dfcb633abc9073740caa9f014e8fc7 (patch) | |
tree | 386af963fb97f68f3e91063f5abad5a76f0bd686 | |
parent | 184aa6504143b452132e28cd3ebecc7b941cdfa1 (diff) | |
parent | 0a80955fc6e03ebbe1f98c5fa3c89fb33f23c23e (diff) | |
download | u-boot-abd95385e7dfcb633abc9073740caa9f014e8fc7.tar.xz |
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-samsung.git
-rw-r--r-- | arch/arm/mach-exynos/include/mach/dwmmc.h | 2 | ||||
-rw-r--r-- | board/samsung/arndale/arndale.c | 13 | ||||
-rw-r--r-- | drivers/mmc/exynos_dw_mmc.c | 56 |
3 files changed, 0 insertions, 71 deletions
diff --git a/arch/arm/mach-exynos/include/mach/dwmmc.h b/arch/arm/mach-exynos/include/mach/dwmmc.h index 5654a0ea6b..59c28ed54c 100644 --- a/arch/arm/mach-exynos/include/mach/dwmmc.h +++ b/arch/arm/mach-exynos/include/mach/dwmmc.h @@ -25,5 +25,3 @@ /* CLKSEL Register */ #define DWMCI_DIVRATIO_BIT 24 #define DWMCI_DIVRATIO_MASK 0x7 - -int exynos_dwmmc_init(const void *blob); diff --git a/board/samsung/arndale/arndale.c b/board/samsung/arndale/arndale.c index 91813763ce..d283ef6275 100644 --- a/board/samsung/arndale/arndale.c +++ b/board/samsung/arndale/arndale.c @@ -73,19 +73,6 @@ int dram_init_banksize(void) return 0; } -#ifdef CONFIG_MMC -int board_mmc_init(struct bd_info *bis) -{ - int ret; - /* dwmmc initializattion for available channels */ - ret = exynos_dwmmc_init(gd->fdt_blob); - if (ret) - debug("dwmmc init failed\n"); - - return ret; -} -#endif - static int board_uart_init(void) { int err = 0, uart_id; diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c index 2fc1ef18c7..b4ff1c3fb4 100644 --- a/drivers/mmc/exynos_dw_mmc.c +++ b/drivers/mmc/exynos_dw_mmc.c @@ -135,8 +135,6 @@ static int exynos_dwmci_core_init(struct dwmci_host *host) return 0; } -static struct dwmci_host dwmci_host[DWMMC_MAX_CH_NUM]; - static int do_dwmci_init(struct dwmci_host *host) { int flag, err; @@ -208,60 +206,6 @@ static int exynos_dwmci_get_config(const void *blob, int node, return 0; } -static int exynos_dwmci_process_node(const void *blob, - int node_list[], int count) -{ - struct dwmci_exynos_priv_data *priv; - struct dwmci_host *host; - int i, node, err; - - for (i = 0; i < count; i++) { - node = node_list[i]; - if (node <= 0) - continue; - host = &dwmci_host[i]; - - priv = malloc(sizeof(struct dwmci_exynos_priv_data)); - if (!priv) { - pr_err("dwmci_exynos_priv_data malloc fail!\n"); - return -ENOMEM; - } - - err = exynos_dwmci_get_config(blob, node, host, priv); - if (err) { - printf("%s: failed to decode dev %d\n", __func__, i); - free(priv); - return err; - } - host->priv = priv; - - do_dwmci_init(host); - } - return 0; -} - -int exynos_dwmmc_init(const void *blob) -{ - int node_list[DWMMC_MAX_CH_NUM]; - int boot_dev_node; - int err = 0, count; - - count = fdtdec_find_aliases_for_id(blob, "mmc", - COMPAT_SAMSUNG_EXYNOS_DWMMC, node_list, - DWMMC_MAX_CH_NUM); - - /* For DWMMC always set boot device as mmc 0 */ - if (count >= 3 && get_boot_mode() == BOOT_MODE_SD) { - boot_dev_node = node_list[2]; - node_list[2] = node_list[0]; - node_list[0] = boot_dev_node; - } - - err = exynos_dwmci_process_node(blob, node_list, count); - - return err; -} - #ifdef CONFIG_DM_MMC static int exynos_dwmmc_probe(struct udevice *dev) { |