public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Trevor Woerner <twoerner@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 2/2] mx23_olinuxino: convert MMC to driver model
Date: Mon, 22 Mar 2021 11:31:29 -0400	[thread overview]
Message-ID: <20210322153129.23026-2-twoerner@gmail.com> (raw)
In-Reply-To: <20210322153129.23026-1-twoerner@gmail.com>

Convert the Olimex Olinuxino board's support for MMC to driver model following
Fabio Estevam's excellent example from:

	commit: 23013aa9619881290dbeb6217f1fab863869050e:
	mx23evk: Convert to driver model

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---

Changes in v2:
- Create an imx23-olinuxino-u-boot.dtsi with the u-boot-specific changes
  instead of modifying the imx23-olinuxino.dts file (which comes directly from
  the Linux kernel). This helps preserve the ability to directly import the
  Linux kernel device tree files into U-Boot without modification.
---
 arch/arm/dts/imx23-olinuxino-u-boot.dtsi     |  5 +++++
 board/olimex/mx23_olinuxino/mx23_olinuxino.c | 12 ------------
 configs/mx23_olinuxino_defconfig             |  4 +++-
 3 files changed, 8 insertions(+), 13 deletions(-)
 create mode 100644 arch/arm/dts/imx23-olinuxino-u-boot.dtsi

diff --git a/arch/arm/dts/imx23-olinuxino-u-boot.dtsi b/arch/arm/dts/imx23-olinuxino-u-boot.dtsi
new file mode 100644
index 0000000000..dee8433696
--- /dev/null
+++ b/arch/arm/dts/imx23-olinuxino-u-boot.dtsi
@@ -0,0 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+&ssp0 {
+	non-removable;
+};
diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
index d1e189cbb6..bdd5fcd76a 100644
--- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c
+++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
@@ -57,18 +57,6 @@ int dram_init(void)
 	return mxs_dram_init();
 }
 
-#ifdef	CONFIG_CMD_MMC
-static int mx23_olx_mmc_cd(int id)
-{
-	return 1;	/* Card always present */
-}
-
-int board_mmc_init(struct bd_info *bis)
-{
-	return mxsmmc_initialize(bis, 0, NULL, mx23_olx_mmc_cd);
-}
-#endif
-
 int board_init(void)
 {
 	/* Adress of boot parameters */
diff --git a/configs/mx23_olinuxino_defconfig b/configs/mx23_olinuxino_defconfig
index 2bf6818ee3..680611cd01 100644
--- a/configs/mx23_olinuxino_defconfig
+++ b/configs/mx23_olinuxino_defconfig
@@ -12,6 +12,7 @@ CONFIG_TARGET_MX23_OLINUXINO=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_DEFAULT_DEVICE_TREE="imx23-olinuxino"
+# CONFIG_SYS_MALLOC_F is not set
 CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_ARCH_MISC_INIT=y
@@ -30,6 +31,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_DM=y
 CONFIG_MXS_GPIO=y
 CONFIG_LED_STATUS=y
 CONFIG_LED_STATUS_GPIO=y
@@ -39,10 +41,10 @@ CONFIG_LED_STATUS_STATE=2
 CONFIG_LED_STATUS_BOOT_ENABLE=y
 CONFIG_LED_STATUS_BOOT=0
 CONFIG_LED_STATUS_CMD=y
+CONFIG_DM_MMC=y
 CONFIG_MMC_MXS=y
 CONFIG_CONS_INDEX=0
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_STORAGE=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_SMSC95XX=y
-- 
2.30.0.rc0

  reply	other threads:[~2021-03-22 15:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-22 15:31 [PATCH v2 1/2] mx23_olinuxino: enable device tree Trevor Woerner
2021-03-22 15:31 ` Trevor Woerner [this message]
2021-04-09 11:25   ` [PATCH v2 2/2] mx23_olinuxino: convert MMC to driver model sbabic at denx.de
2021-04-09 11:24 ` [PATCH v2 1/2] mx23_olinuxino: enable device tree sbabic at denx.de

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=20210322153129.23026-2-twoerner@gmail.com \
    --to=twoerner@gmail.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