]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mpc8379erdb: Convert to DM_MMC
authorSinan Akman <sinan@writeme.com>
Sat, 4 Apr 2020 05:16:47 +0000 (01:16 -0400)
committerTom Rini <trini@konsulko.com>
Sun, 21 Feb 2021 23:46:41 +0000 (18:46 -0500)
Signed-off-by: Sinan Akman <sinan@writeme.com>
board/freescale/mpc837xerdb/mpc837xerdb.c
configs/MPC837XERDB_defconfig

index 81d31f19c4c1f2bb5c66a39105699236c7672c7b..624e92ef9c202bf577f1711f007a52969eeb8fae 100644 (file)
@@ -139,8 +139,8 @@ int checkboard(void)
 
 int board_early_init_f(void)
 {
-#ifdef CONFIG_FSL_SERDES
        immap_t *immr = (immap_t *)CONFIG_SYS_IMMR;
+#ifdef CONFIG_FSL_SERDES
        u32 spridr = in_be32(&immr->sysconf.spridr);
 
        /* we check only part num, and don't look for CPU revisions */
@@ -167,10 +167,16 @@ int board_early_init_f(void)
                break;
        }
 #endif /* CONFIG_FSL_SERDES */
+
+#ifdef CONFIG_FSL_ESDHC
+       clrsetbits_be32(&immr->sysconf.sicrl, SICRL_USB_B, SICRL_USB_B_SD);
+       clrsetbits_be32(&immr->sysconf.sicrh, SICRH_SPI, SICRH_SPI_SD);
+#endif
        return 0;
 }
 
 #ifdef CONFIG_FSL_ESDHC
+#if !(CONFIG_IS_ENABLED(DM_MMC))
 int board_mmc_init(struct bd_info *bd)
 {
        struct immap __iomem *im = (struct immap __iomem *)CONFIG_SYS_IMMR;
@@ -189,6 +195,7 @@ int board_mmc_init(struct bd_info *bd)
        return fsl_esdhc_mmc_init(bd);
 }
 #endif
+#endif
 
 /*
  * Miscellaneous late-boot configurations
index 0d8ec8e9cafddd29b35e937b1b6b58f7cc4479d2..0e61c59ace2703c88b832fa4180ec2bd57ed3605 100644 (file)
@@ -161,7 +161,11 @@ CONFIG_CMD_DATE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_ENV_OVERWRITE=y
+CONFIG_OF_CONTROL=y
+CONFIG_DEFAULT_DEVICE_TREE="mpc8379erdb"
 CONFIG_ENV_ADDR=0xFE080000
+CONFIG_DM=y
+CONFIG_DM_MMC=y
 CONFIG_FSL_SATA=y
 CONFIG_FSL_ESDHC=y
 CONFIG_MTD_NOR_FLASH=y
@@ -183,4 +187,3 @@ CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
-CONFIG_OF_LIBFDT=y