[U-Boot] [PATCH 08/10] 83xx: Add eSDHC support on 8379 EMDS board

Liu Dave-R63238 DaveLiu at freescale.com
Sat Nov 1 04:45:18 CET 2008


> diff --git a/board/freescale/mpc837xemds/mpc837xemds.c 
> b/board/freescale/mpc837xemds/mpc837xemds.c
> index acf8ada..57747be 100644
> --- a/board/freescale/mpc837xemds/mpc837xemds.c
> +++ b/board/freescale/mpc837xemds/mpc837xemds.c
> @@ -22,6 +22,7 @@
>  
>  int board_early_init_f(void)
>  {
> +	struct immap __iomem *im = (struct immap __iomem 
> *)CONFIG_SYS_IMMR;
>  	u8 *bcsr = (u8 *)CONFIG_SYS_BCSR;
>  
>  	/* Enable flash write */
> @@ -29,6 +30,24 @@ int board_early_init_f(void)
>  	/* Clear all of the interrupt of BCSR */
>  	bcsr[0xe] = 0xff;
>  
> +#ifdef CONFIG_MMC
> +       bcsr[0xc] |= 0x4c;
> +
> +#define SICRL_USB_B_MASK       0x30000000
> +#define SICRL_USB_B_SD         0x20000000
> +#define SICRH_GPIO2_E_MASK     0x00000c00
> +#define SICRH_GPIO2_E_SD       0x00000800
> +#define SICRH_SPI_MASK         0x00000003
> +#define SICRH_SPI_SD           0x00000001
> +
> +       im->sysconf.sicrl &= ~SICRL_USB_B_MASK;
> +       im->sysconf.sicrl |= SICRL_USB_B_SD;
> +
> +       im->sysconf.sicrh &= ~(SICRH_GPIO2_E_MASK | SICRH_SPI_MASK);
> +       im->sysconf.sicrh |= SICRH_GPIO2_E_SD | SICRH_SPI_SD;
> +
> +#endif

Andy, Could you put the SICRH/L to CONFIG_SYS_SICRH/L of MPC837XEMDS.h?
cpu init has these stuff initialization.

Thanks,
Dave


More information about the U-Boot mailing list