[U-Boot] [v2, 0/5] Split fsl_esdhc driver for i.MX

Y.b. Lu yangbo.lu at nxp.com
Mon Apr 8 15:03:40 UTC 2019


Any comments?
Thanks a lot :)

> -----Original Message-----
> From: Y.b. Lu
> Sent: Thursday, March 21, 2019 12:32 PM
> To: u-boot at lists.denx.de
> Cc: Prabhakar Kushwaha <prabhakar.kushwaha at nxp.com>; Peng Fan
> <peng.fan at nxp.com>; sbabic at denx.de; Y.b. Lu <yangbo.lu at nxp.com>
> Subject: [v2, 0/5] Split fsl_esdhc driver for i.MX
> 
> 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.
> 
> 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 +-
>  board/Arcturus/ucp1020/spl.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/beckhoff/mx53cx9020/mx53cx9020.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         |   4 +-
>  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 +-
>  .../freescale/mx6sxsabreauto/mx6sxsabreauto.c |   2 +-
>  board/freescale/mx6sxsabresd/mx6sxsabresd.c   |   2 +-
>  .../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                      |   4 +-
>  board/ge/mx53ppd/mx53ppd.c                    |   4 +-
>  board/grinn/liteboard/board.c                 |   4 +-
>  board/inversepath/usbarmory/usbarmory.c       |   2 +-
>  board/k+p/kp_imx53/kp_imx53.c                 |   4 +-
>  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                  |   4 +-
>  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/pcm052/pcm052.c                  |   2 +-
>  board/phytec/pcm058/pcm058.c                  |   2 +-
>  board/phytec/pfla02/pfla02.c                  |   2 +-
>  board/samtec/vining_2000/vining_2000.c        |   2 +-
>  board/seco/common/mx6.c                       |   2 +-
>  board/seco/mx6quq7/mx6quq7.c                  |   2 +-
>  board/sks-kinkel/sksimx6/sksimx6.c            |   2 +-
>  board/solidrun/mx6cuboxi/mx6cuboxi.c          |   2 +-
>  board/sysam/stmark2/stmark2.c                 |   2 +-
>  board/tbs/tbs2910/tbs2910.c                   |   6 +-
>  board/technexion/pico-imx7d/pico-imx7d.c      |   2 +-
>  board/technologic/ts4800/ts4800.c             |   6 +-
>  board/toradex/apalis_imx6/apalis_imx6.c       |   4 +-
>  .../toradex/colibri-imx6ull/colibri-imx6ull.c |   6 +-
>  board/toradex/colibri_imx6/colibri_imx6.c     |   4 +-
>  board/toradex/colibri_imx7/colibri_imx7.c     |   2 +-
>  board/toradex/colibri_vf/colibri_vf.c         |   4 +-
>  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/wandboard/spl.c                         |   2 +-
>  board/wandboard/wandboard.c                   |   2 +-
>  board/warp/warp.c                             |   2 +-
>  board/woodburn/woodburn.c                     |   4 +-
>  configs/apalis_imx6_defconfig                 |   2 +-
>  configs/apalis_imx6_nospl_com_defconfig       |   2 +-
>  configs/apalis_imx6_nospl_it_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_imx6_nospl_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/imx8qxp_mek_defconfig                 |   1 +
>  configs/kp_imx53_defconfig                    |   1 +
>  configs/kp_imx6q_tpc_defconfig                |   1 +
>  configs/liteboard_defconfig                   |   2 +-
>  .../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/pico-hobbit-imx6ul_defconfig          |   2 +-
>  configs/pico-hobbit-imx7d_defconfig           |   2 +-
>  configs/pico-imx6ul_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/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                           |   6 +
>  drivers/mmc/Makefile                          |   1 +
>  drivers/mmc/fsl_esdhc.c                       | 576 +-----------------
>  drivers/mmc/{fsl_esdhc.c => fsl_esdhc_imx.c}  | 101 +--
>  include/configs/imx8mq_evk.h                  |   1 -
>  include/configs/imx8qxp_mek.h                 |   1 -
>  include/configs/kp_imx53.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}      |  15 +-
>  250 files changed, 354 insertions(+), 1037 deletions(-)  copy
> drivers/mmc/{fsl_esdhc.c => fsl_esdhc_imx.c} (94%)  copy
> include/{fsl_esdhc.h => fsl_esdhc_imx.h} (97%)
> 
> --
> 2.17.1



More information about the U-Boot mailing list