From: Yangbo Lu <yangbo.lu@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [v7, 2/5] mmc: split fsl_esdhc driver for i.MX
Date: Thu, 20 Jun 2019 11:29:04 +0800 [thread overview]
Message-ID: <20190620032907.47417-3-yangbo.lu@nxp.com> (raw)
In-Reply-To: <20190620032907.47417-1-yangbo.lu@nxp.com>
The fsl_esdhc driver was for Freescale eSDHC on MPC83XX/MPC85XX
initially. The later QoriQ series PowerPC processors (which were
evolutions of MPC83XX/MPC85XX), QorIQ series ARM processors, and
i.MX series processors were using this driver for their eSDHCs too.
For the two series processors, the eSDHCs are becoming more and
more different. We should have split it into two drivers, like them
(sdhci-of-esdhc.c/sdhci-esdhc-imx.c) in linux kernel.
This patch is just to create a fsl_esdhc_imx driver which is a copy
of fsl_esdhc driver for i.MX processors. We will convert i.MX processors
to use fsl_esdhc_imx, and clean up the two drivers separately in the
future patches.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
---
Changes for v2:
- None.
Changes for v3:
- None.
Changes for v4:
- Used "Enhanced Secure Digital Host" in Kconfig help.
- Moved copyright to top line and added my info.
- Added Tested-by/Reviewed-by.
Changes for v5:
- None.
Changes for v6:
- None.
Changes for v7:
- Rebased.
- Added Reviewed-by.
---
drivers/mmc/Kconfig | 10 ++++++++--
drivers/mmc/Makefile | 1 +
drivers/mmc/{fsl_esdhc.c => fsl_esdhc_imx.c} | 5 +++--
include/{fsl_esdhc.h => fsl_esdhc_imx.h} | 13 ++++++++-----
4 files changed, 20 insertions(+), 9 deletions(-)
copy drivers/mmc/{fsl_esdhc.c => fsl_esdhc_imx.c} (99%)
copy include/{fsl_esdhc.h => fsl_esdhc_imx.h} (97%)
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index c23299e..9358872 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -668,8 +668,14 @@ config TEGRA124_MMC_DISABLE_EXT_LOOPBACK
config FSL_ESDHC
bool "Freescale/NXP eSDHC controller support"
help
- This selects support for the eSDHC (enhanced secure digital host
- controller) found on numerous Freescale/NXP SoCs.
+ This selects support for the eSDHC (Enhanced Secure Digital Host
+ Controller) found on numerous Freescale/NXP SoCs.
+
+config FSL_ESDHC_IMX
+ bool "Freescale/NXP i.MX eSDHC controller support"
+ help
+ This selects support for the i.MX eSDHC (Enhanced Secure Digital Host
+ Controller) found on numerous Freescale/NXP SoCs.
endmenu
diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile
index 0076fc3..3c8c53a 100644
--- a/drivers/mmc/Makefile
+++ b/drivers/mmc/Makefile
@@ -26,6 +26,7 @@ obj-$(CONFIG_MMC_DW_ROCKCHIP) += rockchip_dw_mmc.o
obj-$(CONFIG_MMC_DW_SOCFPGA) += socfpga_dw_mmc.o
obj-$(CONFIG_MMC_DW_SNPS) += snps_dw_mmc.o
obj-$(CONFIG_FSL_ESDHC) += fsl_esdhc.o
+obj-$(CONFIG_FSL_ESDHC_IMX) += fsl_esdhc_imx.o
obj-$(CONFIG_FTSDC010) += ftsdc010_mci.o
obj-$(CONFIG_GENERIC_ATMEL_MCI) += gen_atmel_mci.o
obj-$(CONFIG_MMC_MESON_GX) += meson_gx_mmc.o
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc_imx.c
similarity index 99%
copy from drivers/mmc/fsl_esdhc.c
copy to drivers/mmc/fsl_esdhc_imx.c
index 6a191a1..797bdbb 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -3,6 +3,7 @@
* Copyright 2007, 2010-2011 Freescale Semiconductor, Inc
* Copyright 2019 NXP Semiconductors
* Andy Fleming
+ * Yangbo Lu <yangbo.lu@nxp.com>
*
* Based vaguely on the pxa mmc code:
* (C) Copyright 2003
@@ -19,7 +20,7 @@
#include <part.h>
#include <power/regulator.h>
#include <malloc.h>
-#include <fsl_esdhc.h>
+#include <fsl_esdhc_imx.h>
#include <fdt_support.h>
#include <asm/io.h>
#include <dm.h>
@@ -116,7 +117,7 @@ struct esdhc_soc_data {
* @non_removable: 0: removable; 1: non-removable
* @wp_enable: 1: enable checking wp; 0: no check
* @vs18_enable: 1: use 1.8V voltage; 0: use 3.3V
- * @flags: ESDHC_FLAG_xx in include/fsl_esdhc.h
+ * @flags: ESDHC_FLAG_xx in include/fsl_esdhc_imx.h
* @caps: controller capabilities
* @tuning_step: tuning step setting in tuning_ctrl register
* @start_tuning_tap: the start point for tuning in tuning_ctrl register
diff --git a/include/fsl_esdhc.h b/include/fsl_esdhc_imx.h
similarity index 97%
copy from include/fsl_esdhc.h
copy to include/fsl_esdhc_imx.h
index 8dbd524..67fd289 100644
--- a/include/fsl_esdhc.h
+++ b/include/fsl_esdhc_imx.h
@@ -3,11 +3,14 @@
* FSL SD/MMC Defines
*-------------------------------------------------------------------
*
+ * Copyright 2019 NXP
+ * Yangbo Lu <yangbo.lu@nxp.com>
+ *
* Copyright 2007-2008,2010-2011 Freescale Semiconductor, Inc
*/
-#ifndef __FSL_ESDHC_H__
-#define __FSL_ESDHC_H__
+#ifndef __FSL_ESDHC_IMX_H__
+#define __FSL_ESDHC_IMX_H__
#include <linux/bitops.h>
#include <linux/errno.h>
@@ -258,15 +261,15 @@ struct fsl_esdhc_cfg {
#error "Endianess is not defined: please fix to continue"
#endif
-#ifdef CONFIG_FSL_ESDHC
+#ifdef CONFIG_FSL_ESDHC_IMX
int fsl_esdhc_mmc_init(bd_t *bis);
int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg *cfg);
void fdt_fixup_esdhc(void *blob, bd_t *bd);
#else
static inline int fsl_esdhc_mmc_init(bd_t *bis) { return -ENOSYS; }
static inline void fdt_fixup_esdhc(void *blob, bd_t *bd) {}
-#endif /* CONFIG_FSL_ESDHC */
+#endif /* CONFIG_FSL_ESDHC_IMX */
void __noreturn mmc_boot(void);
void mmc_spl_load_image(uint32_t offs, unsigned int size, void *vdst);
-#endif /* __FSL_ESDHC_H__ */
+#endif /* __FSL_ESDHC_IMX_H__ */
--
2.7.4
next prev parent reply other threads:[~2019-06-20 3:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-20 3:29 [U-Boot] [v7, 0/5] Split fsl_esdhc driver for i.MX Yangbo Lu
2019-06-20 3:29 ` [U-Boot] [v7, 1/5] Move CONFIG_FSL_ESDHC to defconfig Yangbo Lu
2019-06-20 3:29 ` Yangbo Lu [this message]
2019-06-20 3:29 ` [U-Boot] [v7, 3/5] Convert to use fsl_esdhc_imx for i.MX platforms Yangbo Lu
2019-06-20 3:29 ` [U-Boot] [v7, 4/5] mmc: fsl_esdhc: drop i.MX code Yangbo Lu
2019-06-20 3:29 ` [U-Boot] [v7, 5/5] mmc: fsl_esdhc_imx: drop useless code Yangbo Lu
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=20190620032907.47417-3-yangbo.lu@nxp.com \
--to=yangbo.lu@nxp.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