[U-Boot] [PATCH V3] fsl: esdhc: support driver model

York Sun york.sun at nxp.com
Wed Apr 6 19:21:51 CEST 2016


On 03/24/2016 11:26 PM, Peng Fan wrote:
> Support Driver Model for fsl esdhc driver.
> 
> 1. Introduce a new structure struct fsl_esdhc_priv
> 2. Refactor fsl_esdhc_initialize which is originally used by board code.
>    - Introduce fsl_esdhc_init to be common usage for DM and non-DM
>    - Introduce fsl_esdhc_cfg_to_priv to build the bridge for non-DM part.
>    - The original API for board code is still there, but we use
>      'fsl_esdhc_cfg_to_priv' and 'fsl_esdhc_init' to serve it.
> 3. All the functions are changed to use 'struct fsl_esdhc_priv', except
>    fsl_esdhc_initialize.
> 4. Since clk driver is not implemented, use mxc_get_clock to geth
>    the clk and fill 'priv->sdhc_clk'.
> 
> Has been tested on i.MX6UL 14X14 EVK board:
> "
> =>dm tree
> ....
>  simple_bus  [ + ]    |   `-- aips-bus at 02100000
>   mmc        [ + ]    |       |-- usdhc at 02190000
>   mmc        [ + ]    |       |-- usdhc at 02194000
> ....
> => mmc list
> FSL_SDHC: 0 (SD)
> FSL_SDHC: 1 (SD)
> "
> 
> Signed-off-by: Peng Fan <van.freenix at gmail.com>
> Cc: York Sun <york.sun at nxp.com>
> Cc: Yangbo Lu <yangbo.lu at nxp.com>
> Cc: Hector Palacios <hector.palacios at digi.com>
> Cc: Eric Nelson <eric at nelint.com>
> Cc: Stefano Babic <sbabic at denx.de>
> Cc: Fabio Estevam <fabio.estevam at nxp.com>
> Cc: Pantelis Antoniou <panto at antoniou-consulting.com>
> Cc: Simon Glass <sjg at chromium.org>
> ---
> 
> V3:
>  Fix build error reported by York for PPC.
> 
> V2:
>  restructure the V1 patch.
>  Introduce fsl_esdhc_priv structure.
>  Introduce code to handle cd-gpios and non-removable.
> 
>  drivers/mmc/fsl_esdhc.c | 253 ++++++++++++++++++++++++++++++++++++++++--------
>  1 file changed, 213 insertions(+), 40 deletions(-)

Applied to u-boot-fsl-qoriq master. Awaiting upstream.
Thanks.

York




More information about the U-Boot mailing list