From patchwork Wed Jun 19 04:24:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangbo Lu X-Patchwork-Id: 1118644 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=nxp.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45TN2C6yRlz9sNC for ; Wed, 19 Jun 2019 21:26:43 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 9C0C4C21E1B; Wed, 19 Jun 2019 11:26:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=KHOP_BIG_TO_CC autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 9BE2BC21C50; Wed, 19 Jun 2019 11:26:36 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 26EA8C21C3F; Wed, 19 Jun 2019 04:23:43 +0000 (UTC) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lists.denx.de (Postfix) with ESMTPS id A0316C21BE5 for ; Wed, 19 Jun 2019 04:23:42 +0000 (UTC) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id EF7781A0546; Wed, 19 Jun 2019 06:23:41 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 211A31A0558; Wed, 19 Jun 2019 06:23:11 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 500FD402A6; Wed, 19 Jun 2019 12:22:56 +0800 (SGT) From: Yangbo Lu To: u-boot@lists.denx.de Date: Wed, 19 Jun 2019 12:24:25 +0800 Message-Id: <20190619042430.37881-1-yangbo.lu@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP X-Mailman-Approved-At: Wed, 19 Jun 2019 11:26:35 +0000 Cc: =?utf-8?q?Eddy_Petri=C8=99or?= , Nikita Kiryanov , Patrick Bruenn , Adrian Alonso , Bhaskar Upadhaya , Vanessa Maegima , Albert ARIBAUD , "NXP i . MX U-Boot Team" , Ken Lin , Stefan Roese , Richard Hu , Marek Vasut , Max Krummenacher , Stefan Agner , Ian Ray , Andrej Rosano , Simone CIANNI , Markus Niebel , Jason Liu , Ingo Schroeck , Andreas Geisreiter , Otavio Salvador , Parthiban Nallathambi , Breno Lima , Alison Wang , Raffaele RECALCATI , Akshay Bhat , Ludwig Zenz , Olaf Mandel , =?utf-8?q?Antti_M=C3=A4entausta?= , Martyn Welch , Soeren Moch , Francesco Montefoschi Subject: [U-Boot] [v6, 0/5] Split fsl_esdhc driver for i.MX X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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. It's ideal to keep common part for reusing. However, it's hard to find out a little which could be reused. The truth is there will be more and more different registers, bits and operatiing processes. Even some code is common now, it may have to be split in the future. So let's just split is as two drivers. Patch #2 just created a fsl_esdhc_imx driver which was a copy of fsl_esdhc driver for i.MX processors. Patch #3 converted i.MX platforms to use fsl_esdhc_imx. Patch #4 and #5 just dropped useless code for the two driver. There are still many cleaning up works needed to be done in the future, because the eSDHC driver is mess for a long time. Since I'm only owner for QorIQ eSDHC driver, I dropped only a little things which I'm sure for fsl_esdhc_imx. Let i.MX eSDHC owner do futhur cleaning up. Reviewed-by: Martyn Welch --- Changes for v6: - Rebased. - Applied to two new i.MX boards phycore_pcl063_ull/pico-imx7d_bl33. Yangbo Lu (5): Move CONFIG_FSL_ESDHC to defconfig mmc: split fsl_esdhc driver for i.MX Convert to use fsl_esdhc_imx for i.MX platforms mmc: fsl_esdhc: drop i.MX code mmc: fsl_esdhc_imx: drop useless code arch/arm/cpu/arm1136/mx35/generic.c | 10 +- arch/arm/cpu/arm926ejs/mx25/generic.c | 8 +- arch/arm/cpu/armv7/vf610/generic.c | 10 +- arch/arm/cpu/armv8/s32v234/generic.c | 2 +- arch/arm/include/asm/global_data.h | 2 +- arch/arm/mach-imx/cpu.c | 6 +- arch/arm/mach-imx/mx6/litesom.c | 4 +- arch/arm/mach-imx/mx7/clock.c | 4 +- arch/arm/mach-imx/mx7ulp/clock.c | 2 +- arch/arm/mach-imx/speed.c | 4 +- arch/m68k/cpu/mcf5445x/cpu_init.c | 2 +- board/advantech/dms-ba16/dms-ba16.c | 4 +- board/aristainetos/aristainetos-v1.c | 2 +- board/aristainetos/aristainetos-v2.c | 2 +- board/aristainetos/aristainetos.c | 4 +- board/bachmann/ot1200/ot1200.c | 2 +- board/barco/platinum/platinum.c | 2 +- board/barco/titanium/titanium.c | 4 +- board/boundary/nitrogen6x/nitrogen6x.c | 4 +- board/ccv/xpress/xpress.c | 2 +- board/compulab/cl-som-imx7/cl-som-imx7.c | 6 +- board/compulab/cl-som-imx7/common.c | 6 +- board/compulab/cl-som-imx7/common.h | 8 +- board/compulab/cl-som-imx7/mux.c | 8 +- board/compulab/cl-som-imx7/spl.c | 6 +- board/compulab/cm_fx6/cm_fx6.c | 4 +- board/compulab/cm_fx6/common.c | 4 +- board/compulab/cm_fx6/spl.c | 2 +- board/congatec/cgtqmx6eval/cgtqmx6eval.c | 4 +- board/dhelectronics/dh_imx6/dh_imx6.c | 2 +- board/dhelectronics/dh_imx6/dh_imx6_spl.c | 2 +- board/el/el6x/el6x.c | 4 +- board/embest/mx6boards/mx6boards.c | 4 +- board/freescale/imx8mq_evk/imx8mq_evk.c | 2 +- board/freescale/imx8mq_evk/spl.c | 2 +- board/freescale/imx8qxp_mek/imx8qxp_mek.c | 2 +- board/freescale/m54418twr/m54418twr.c | 2 +- board/freescale/mx25pdk/mx25pdk.c | 6 +- board/freescale/mx35pdk/mx35pdk.c | 4 +- board/freescale/mx51evk/mx51evk.c | 6 +- board/freescale/mx53ard/mx53ard.c | 4 +- board/freescale/mx53evk/mx53evk.c | 4 +- board/freescale/mx53loco/mx53loco.c | 4 +- board/freescale/mx53smd/mx53smd.c | 4 +- board/freescale/mx6qarm2/mx6qarm2.c | 4 +- board/freescale/mx6sabreauto/mx6sabreauto.c | 4 +- board/freescale/mx6sabresd/mx6sabresd.c | 4 +- board/freescale/mx6slevk/mx6slevk.c | 2 +- board/freescale/mx6sxsabreauto/mx6sxsabreauto.c | 2 +- board/freescale/mx6sxsabresd/mx6sxsabresd.c | 2 +- board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 4 +- board/freescale/mx6ullevk/mx6ullevk.c | 2 +- board/freescale/mx7dsabresd/mx7dsabresd.c | 2 +- board/freescale/s32v234evb/s32v234evb.c | 4 +- board/freescale/vf610twr/vf610twr.c | 4 +- board/gateworks/gw_ventana/common.c | 6 +- board/gateworks/gw_ventana/gw_ventana.c | 2 +- board/ge/bx50v3/bx50v3.c | 2 +- board/ge/mx53ppd/mx53ppd.c | 2 +- board/grinn/liteboard/board.c | 4 +- board/inversepath/usbarmory/usbarmory.c | 2 +- board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c | 4 +- board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c | 2 +- board/kosagi/novena/novena.c | 2 +- board/kosagi/novena/novena_spl.c | 6 +- board/liebherr/display5/common.c | 2 +- board/liebherr/display5/display5.c | 6 +- board/liebherr/display5/spl.c | 2 +- board/liebherr/mccmon6/mccmon6.c | 2 +- board/liebherr/mccmon6/spl.c | 2 +- board/logicpd/imx6/imx6logic.c | 4 +- board/menlo/m53menlo/m53menlo.c | 4 +- board/phytec/pcl063/pcl063.c | 2 +- board/phytec/pcl063/spl.c | 6 +- board/phytec/pcm058/pcm058.c | 2 +- board/phytec/pfla02/pfla02.c | 2 +- board/seco/common/mx6.c | 2 +- board/seco/mx6quq7/mx6quq7.c | 2 +- board/sks-kinkel/sksimx6/sksimx6.c | 2 +- board/softing/vining_2000/vining_2000.c | 2 +- board/solidrun/mx6cuboxi/mx6cuboxi.c | 2 +- board/tbs/tbs2910/tbs2910.c | 6 +- board/technexion/pico-imx6ul/spl.c | 2 +- board/technexion/pico-imx7d/spl.c | 2 +- board/technologic/ts4800/ts4800.c | 6 +- board/toradex/apalis_imx6/apalis_imx6.c | 6 +- board/toradex/colibri_imx6/colibri_imx6.c | 6 +- board/toradex/colibri_imx7/colibri_imx7.c | 2 +- board/tqc/tqma6/tqma6.c | 2 +- board/tqc/tqma6/tqma6_mba6.c | 2 +- board/tqc/tqma6/tqma6_wru4.c | 2 +- board/udoo/neo/neo.c | 2 +- board/udoo/udoo.c | 2 +- board/udoo/udoo_spl.c | 2 +- board/variscite/dart_6ul/dart_6ul.c | 2 +- board/variscite/dart_6ul/spl.c | 2 +- board/wandboard/spl.c | 2 +- board/warp/warp.c | 2 +- board/woodburn/woodburn.c | 4 +- configs/apalis_imx6_defconfig | 2 +- configs/aristainetos2_defconfig | 2 +- configs/aristainetos2b_defconfig | 2 +- configs/aristainetos_defconfig | 2 +- configs/bk4r1_defconfig | 2 +- configs/cgtqmx6eval_defconfig | 2 +- configs/cl-som-imx7_defconfig | 2 +- configs/cm_fx6_defconfig | 2 +- configs/colibri-imx6ull_defconfig | 2 +- configs/colibri_imx6_defconfig | 2 +- configs/colibri_imx7_defconfig | 2 +- configs/colibri_imx7_emmc_defconfig | 2 +- configs/colibri_vf_defconfig | 2 +- configs/dh_imx6_defconfig | 2 +- configs/display5_defconfig | 2 +- configs/display5_factory_defconfig | 2 +- configs/dms-ba16-1g_defconfig | 2 +- configs/dms-ba16_defconfig | 2 +- configs/ge_bx50v3_defconfig | 2 +- configs/gwventana_emmc_defconfig | 2 +- configs/gwventana_gw5904_defconfig | 2 +- configs/gwventana_nand_defconfig | 2 +- configs/imx6dl_icore_nand_defconfig | 2 +- configs/imx6dl_mamoj_defconfig | 2 +- configs/imx6q_icore_nand_defconfig | 2 +- configs/imx6q_logic_defconfig | 2 +- configs/imx6qdl_icore_mipi_defconfig | 2 +- configs/imx6qdl_icore_mmc_defconfig | 2 +- configs/imx6qdl_icore_nand_defconfig | 2 +- configs/imx6qdl_icore_rqs_defconfig | 2 +- configs/imx6ul_geam_mmc_defconfig | 2 +- configs/imx6ul_geam_nand_defconfig | 2 +- configs/imx6ul_isiot_emmc_defconfig | 2 +- configs/imx6ul_isiot_nand_defconfig | 2 +- configs/imx8mq_evk_defconfig | 1 + configs/imx8qm_mek_defconfig | 1 + configs/imx8qxp_mek_defconfig | 1 + configs/kp_imx53_defconfig | 2 +- configs/kp_imx6q_tpc_defconfig | 1 + configs/liteboard_defconfig | 2 +- configs/ls1012afrwy_qspi_SECURE_BOOT_defconfig | 1 + configs/ls1012afrwy_qspi_defconfig | 1 + configs/ls1012afrwy_tfa_SECURE_BOOT_defconfig | 1 + configs/ls1012afrwy_tfa_defconfig | 1 + configs/m53menlo_defconfig | 2 +- configs/marsboard_defconfig | 2 +- configs/mccmon6_nor_defconfig | 2 +- configs/mccmon6_sd_defconfig | 2 +- configs/mx25pdk_defconfig | 2 +- configs/mx35pdk_defconfig | 2 +- configs/mx51evk_defconfig | 2 +- configs/mx53ard_defconfig | 2 +- configs/mx53cx9020_defconfig | 2 +- configs/mx53evk_defconfig | 2 +- configs/mx53loco_defconfig | 2 +- configs/mx53ppd_defconfig | 2 +- configs/mx53smd_defconfig | 2 +- configs/mx6cuboxi_defconfig | 2 +- configs/mx6dlarm2_defconfig | 2 +- configs/mx6dlarm2_lpddr2_defconfig | 2 +- configs/mx6qarm2_defconfig | 2 +- configs/mx6qarm2_lpddr2_defconfig | 2 +- configs/mx6qsabrelite_defconfig | 2 +- configs/mx6sabreauto_defconfig | 2 +- configs/mx6sabresd_defconfig | 2 +- configs/mx6slevk_defconfig | 2 +- configs/mx6slevk_spinor_defconfig | 2 +- configs/mx6slevk_spl_defconfig | 2 +- configs/mx6sllevk_defconfig | 2 +- configs/mx6sllevk_plugin_defconfig | 2 +- configs/mx6sxsabreauto_defconfig | 2 +- configs/mx6sxsabresd_defconfig | 2 +- configs/mx6sxsabresd_spl_defconfig | 2 +- configs/mx6ul_14x14_evk_defconfig | 2 +- configs/mx6ul_9x9_evk_defconfig | 2 +- configs/mx6ull_14x14_evk_defconfig | 2 +- configs/mx6ull_14x14_evk_plugin_defconfig | 2 +- configs/mx7dsabresd_defconfig | 2 +- configs/mx7dsabresd_qspi_defconfig | 2 +- configs/mx7ulp_evk_defconfig | 2 +- configs/mx7ulp_evk_plugin_defconfig | 2 +- configs/nitrogen6dl2g_defconfig | 2 +- configs/nitrogen6dl_defconfig | 2 +- configs/nitrogen6q2g_defconfig | 2 +- configs/nitrogen6q_defconfig | 2 +- configs/nitrogen6s1g_defconfig | 2 +- configs/nitrogen6s_defconfig | 2 +- configs/novena_defconfig | 2 +- configs/opos6uldev_defconfig | 2 +- configs/ot1200_defconfig | 2 +- configs/ot1200_spl_defconfig | 2 +- configs/pcm052_defconfig | 2 +- configs/pcm058_defconfig | 2 +- configs/pfla02_defconfig | 2 +- configs/phycore_pcl063_defconfig | 2 +- configs/phycore_pcl063_ull_defconfig | 2 +- configs/pico-hobbit-imx6ul_defconfig | 2 +- configs/pico-hobbit-imx7d_defconfig | 2 +- configs/pico-imx6ul_defconfig | 2 +- configs/pico-imx7d_bl33_defconfig | 2 +- configs/pico-imx7d_defconfig | 2 +- configs/pico-pi-imx6ul_defconfig | 2 +- configs/pico-pi-imx7d_defconfig | 2 +- configs/platinum_picon_defconfig | 2 +- configs/platinum_titanium_defconfig | 2 +- configs/riotboard_defconfig | 2 +- configs/riotboard_spl_defconfig | 2 +- configs/s32v234evb_defconfig | 2 +- configs/secomx6quq7_defconfig | 2 +- configs/sksimx6_defconfig | 2 +- configs/tbs2910_defconfig | 2 +- configs/titanium_defconfig | 2 +- configs/tqma6dl_mba6_mmc_defconfig | 2 +- configs/tqma6dl_mba6_spi_defconfig | 2 +- configs/tqma6q_mba6_mmc_defconfig | 2 +- configs/tqma6q_mba6_spi_defconfig | 2 +- configs/tqma6s_mba6_mmc_defconfig | 2 +- configs/tqma6s_mba6_spi_defconfig | 2 +- configs/tqma6s_wru4_mmc_defconfig | 2 +- configs/ts4800_defconfig | 2 +- configs/udoo_defconfig | 2 +- configs/udoo_neo_defconfig | 2 +- configs/usbarmory_defconfig | 2 +- configs/variscite_dart6ul_defconfig | 2 +- configs/vf610twr_defconfig | 2 +- configs/vf610twr_nand_defconfig | 2 +- configs/vining_2000_defconfig | 2 +- configs/wandboard_defconfig | 2 +- configs/warp7_bl33_defconfig | 2 +- configs/warp7_defconfig | 2 +- configs/warp_defconfig | 2 +- configs/woodburn_defconfig | 2 +- configs/woodburn_sd_defconfig | 2 +- configs/xpress_defconfig | 2 +- configs/xpress_spl_defconfig | 2 +- configs/zc5202_defconfig | 2 +- configs/zc5601_defconfig | 2 +- drivers/mmc/Kconfig | 10 +- drivers/mmc/Makefile | 1 + drivers/mmc/fsl_esdhc.c | 626 +--------------------- drivers/mmc/{fsl_esdhc.c => fsl_esdhc_imx.c} | 72 +-- include/configs/imx8mq_evk.h | 1 - include/configs/imx8qm_mek.h | 1 - include/configs/imx8qxp_mek.h | 1 - include/configs/kp_imx6q_tpc.h | 1 - include/configs/ls1012afrwy.h | 1 - include/fsl_esdhc.h | 57 -- include/{fsl_esdhc.h => fsl_esdhc_imx.h} | 17 +- 247 files changed, 351 insertions(+), 1047 deletions(-) copy drivers/mmc/{fsl_esdhc.c => fsl_esdhc_imx.c} (95%) copy include/{fsl_esdhc.h => fsl_esdhc_imx.h} (97%)