[U-Boot] [PATCH 2/3] mmc: dwmmc: socfpga: Convert to DM

Chin Liang See clsee at altera.com
Tue Dec 1 06:24:51 CET 2015


Hi Marek,

On Mon, 2015-11-30 at 20:48 +0100, Marek Vasut wrote:
> Convert the SoCFPGA shim for registering the DWMMC driver to DM.
> 
> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Chin Liang See <clsee at altera.com>
> Cc: Dinh Nguyen <dinguyen at opensource.altera.com>
> Cc: Pantelis Antoniou <panto at antoniou-consulting.com>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Tom Rini <trini at konsulko.com>
> ---
>  drivers/mmc/socfpga_dw_mmc.c | 119 ++++++++++++++++++++-------------


I cannot applied this successfully to u-boot-socfpga.git. I tried git
am and also patch -1.


> ----------
>  1 file changed, 56 insertions(+), 63 deletions(-)
> 
> diff --git a/drivers/mmc/socfpga_dw_mmc.c
> b/drivers/mmc/socfpga_dw_mmc.c
> index 8076761..dd2b30a 100644
> --- a/drivers/mmc/socfpga_dw_mmc.c
> +++ b/drivers/mmc/socfpga_dw_mmc.c
> @@ -5,20 +5,28 @@
>   */
>  
>  #include <common.h>
> -#include <malloc.h>
> -#include <fdtdec.h>
> -#include <libfdt.h>
> -#include <dwmmc.h>
> -#include <errno.h>
> -#include <asm/arch/dwmmc.h>
>  #include <asm/arch/clock_manager.h>
> +#include <asm/arch/dwmmc.h>
>  #include <asm/arch/system_manager.h>
> +#include <dm.h>
> +#include <dwmmc.h>
> +#include <errno.h>
> +#include <fdtdec.h>
> +#include <libfdt.h>
> +#include <linux/err.h>
> +#include <malloc.h>
> +
> +DECLARE_GLOBAL_DATA_PTR;
>  
>  static const struct socfpga_clock_manager *clock_manager_base =
>  		(void *)SOCFPGA_CLKMGR_ADDRESS;
>  static const struct socfpga_system_manager *system_manager_base =
>  		(void *)SOCFPGA_SYSMGR_ADDRESS;
>  
> +struct socfpga_dwmmc_priv {
> +	struct dwmci_host	host;
> +};
> +

There is a new structure added when we add the dts support for drvsel
and smplsel. It's not reflected here.

Thanks
Chin Liang


More information about the U-Boot mailing list