From: sinan at writeme.com <sinan@writeme.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 2/2] mpc8379erdb: Convert to DM_MMC
Date: Sat, 4 Apr 2020 01:16:47 -0400 [thread overview]
Message-ID: <20200404051647.10922-2-sinan@writeme.com> (raw)
In-Reply-To: <20200404051647.10922-1-sinan@writeme.com>
From: Sinan Akman <sinan@writeme.com>
Signed-off-by: Sinan Akman <sinan@writeme.com>
---
Changes for v2:
- Split patches for device tree and DM_MMC
board/freescale/mpc837xerdb/mpc837xerdb.c | 9 ++++++++-
configs/MPC837XERDB_defconfig | 5 ++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c
index 45038acf32..9321952674 100644
--- a/board/freescale/mpc837xerdb/mpc837xerdb.c
+++ b/board/freescale/mpc837xerdb/mpc837xerdb.c
@@ -136,8 +136,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 */
@@ -164,10 +164,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(bd_t *bd)
{
struct immap __iomem *im = (struct immap __iomem *)CONFIG_SYS_IMMR;
@@ -186,6 +192,7 @@ int board_mmc_init(bd_t *bd)
return fsl_esdhc_mmc_init(bd);
}
#endif
+#endif
/*
* Miscellaneous late-boot configurations
diff --git a/configs/MPC837XERDB_defconfig b/configs/MPC837XERDB_defconfig
index fd8335ee4e..8ef193a6e5 100644
--- a/configs/MPC837XERDB_defconfig
+++ b/configs/MPC837XERDB_defconfig
@@ -160,7 +160,11 @@ CONFIG_CMD_PING=y
CONFIG_CMD_DATE=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=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
@@ -174,4 +178,3 @@ CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
-CONFIG_OF_LIBFDT=y
--
2.14.5
next prev parent reply other threads:[~2020-04-04 5:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200403213919epcas1p24fa2f93b71ac22cbf2dfe334b0ac424d@epcas1p2.samsung.com>
2020-04-03 21:36 ` [PATCH] mpc8379erdb: Convert to DM_MMC sinan at writeme.com
2020-04-03 23:59 ` Jaehoon Chung
2020-04-04 0:08 ` Sinan Akman
2020-04-04 5:16 ` [PATCH v2 1/2] mpc8379erdb: Add device tree sinan at writeme.com
2020-04-04 5:16 ` sinan at writeme.com [this message]
2021-02-22 17:32 ` [PATCH v2 2/2] mpc8379erdb: Convert to DM_MMC Tom Rini
2021-02-22 17:32 ` [PATCH v2 1/2] mpc8379erdb: Add device tree Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200404051647.10922-2-sinan@writeme.com \
--to=sinan@writeme.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox