mbox series

[0/6] mmc: fsl_esdhc: add ADMA2 support

Message ID 20200923104252.14919-1-michael@walle.cc
Headers show
Series mmc: fsl_esdhc: add ADMA2 support | expand

Message

Michael Walle Sept. 23, 2020, 10:42 a.m. UTC
Add ADMA2 support mainly because it supports 64bit DMA addresses. These are
for example used if you use EFI on a LS1028A board which has more than 2GB
of RAM, because only the lower 2GB are mapped into the lower 32bit address
space.

Patches 1-4 clean the fsl_esdhc driver up. Patch 5 moves ADMA2 table
handling code out of the sdhci core code. Patch 6 finally adds the ADMA2
support to the fsl_esdhc driver.

This was tested on a custom board LS1028A board.

A passing travis-ci build is available at:
  https://travis-ci.org/github/mwalle/u-boot/builds/729431087

Michael Walle (6):
  mmc: fsl_esdhc: simplify 64bit check for SDMA transfers
  mmc: fsl_esdhc: use dma-mapping API
  mmc: fsl_esdhc: simplify esdhc_setup_data()
  mmc: fsl_esdhc: replace most #ifdefs by IS_ENABLED()
  mmc: sdhci: move the ADMA2 table handling into own module
  mmc: fsl_esdhc: add ADMA2 support

 drivers/mmc/Kconfig      |  13 ++
 drivers/mmc/Makefile     |   1 +
 drivers/mmc/fsl_esdhc.c  | 267 ++++++++++++++++++++-------------------
 drivers/mmc/sdhci-adma.c |  73 +++++++++++
 drivers/mmc/sdhci.c      |  63 ++-------
 include/fsl_esdhc.h      |  14 ++
 include/sdhci.h          |   8 +-
 7 files changed, 252 insertions(+), 187 deletions(-)
 create mode 100644 drivers/mmc/sdhci-adma.c

Comments

Peng Fan Oct. 12, 2020, 7:25 a.m. UTC | #1
> Subject: [PATCH 0/6] mmc: fsl_esdhc: add ADMA2 support
> 
> Add ADMA2 support mainly because it supports 64bit DMA addresses. These
> are for example used if you use EFI on a LS1028A board which has more than
> 2GB of RAM, because only the lower 2GB are mapped into the lower 32bit
> address space.
> 
> Patches 1-4 clean the fsl_esdhc driver up. Patch 5 moves ADMA2 table
> handling code out of the sdhci core code. Patch 6 finally adds the ADMA2
> support to the fsl_esdhc driver.

Patch 4 and patch 6 was not able to apply after I take Y.b's patchset.
Please rebase for the 2 patches, I took 1,2,3,5.

Thanks,
Peng.

> 
> This was tested on a custom board LS1028A board.
> 
> A passing travis-ci build is available at:
> 
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftravis-
> ci.org%2Fgithub%2Fmwalle%2Fu-boot%2Fbuilds%2F729431087&data=0
> 2%7C01%7Cpeng.fan%40nxp.com%7C67b21c56cad74704e39d08d85fad71ea
> %7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637364545846569
> 611&sdata=hFwAYOV72ugy%2FPPQyx1aeC2qmIQSnhSqtwqDpDVUUy4
> %3D&reserved=0
> 
> Michael Walle (6):
>   mmc: fsl_esdhc: simplify 64bit check for SDMA transfers
>   mmc: fsl_esdhc: use dma-mapping API
>   mmc: fsl_esdhc: simplify esdhc_setup_data()
>   mmc: fsl_esdhc: replace most #ifdefs by IS_ENABLED()
>   mmc: sdhci: move the ADMA2 table handling into own module
>   mmc: fsl_esdhc: add ADMA2 support
> 
>  drivers/mmc/Kconfig      |  13 ++
>  drivers/mmc/Makefile     |   1 +
>  drivers/mmc/fsl_esdhc.c  | 267 ++++++++++++++++++++-------------------
>  drivers/mmc/sdhci-adma.c |  73 +++++++++++
>  drivers/mmc/sdhci.c      |  63 ++-------
>  include/fsl_esdhc.h      |  14 ++
>  include/sdhci.h          |   8 +-
>  7 files changed, 252 insertions(+), 187 deletions(-)  create mode 100644
> drivers/mmc/sdhci-adma.c
> 
> --
> 2.20.1
Michael Walle Oct. 12, 2020, 8:09 a.m. UTC | #2
Hi Peng,

Am 2020-10-12 09:25, schrieb Peng Fan:
>> Subject: [PATCH 0/6] mmc: fsl_esdhc: add ADMA2 support
>> 
>> Add ADMA2 support mainly because it supports 64bit DMA addresses. 
>> These
>> are for example used if you use EFI on a LS1028A board which has more 
>> than
>> 2GB of RAM, because only the lower 2GB are mapped into the lower 32bit
>> address space.
>> 
>> Patches 1-4 clean the fsl_esdhc driver up. Patch 5 moves ADMA2 table
>> handling code out of the sdhci core code. Patch 6 finally adds the 
>> ADMA2
>> support to the fsl_esdhc driver.
> 
> Patch 4 and patch 6 was not able to apply after I take Y.b's patchset.
> Please rebase for the 2 patches, I took 1,2,3,5.

Thanks, I've rebased them, see:
   https://patchwork.ozlabs.org/project/uboot/list/?series=207252

-michael