[U-Boot] [PATCH 8/8] 83xx: Add eSDHC support on 8379 EMDS board
Kim Phillips
kim.phillips at freescale.com
Sat Jan 31 01:44:26 CET 2009
On Fri, 30 Jan 2009 15:45:44 -0600
Andy Fleming <afleming at freescale.com> wrote:
> @@ -30,6 +31,24 @@ int board_early_init_f(void)
> /* Clear all of the interrupt of BCSR */
> bcsr[0xe] = 0xff;
>
> +#ifdef CONFIG_MMC
> + bcsr[0xc] |= 0x4c;
magic - at least add a comment
> +
> +#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
we already have some of these defined in include/mpc83xx.h
> + 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;
use clrsetbits
> @@ -895,4 +895,6 @@ typedef struct immap {
> } immap_t;
> #endif
>
> +#define CONFIG_SYS_MPC83xx_ESDHC_OFFSET (0x2e000)
use offsetof
> +#define CONFIG_SYS_MPC83xx_ESDHC_ADDR (CONFIG_SYS_IMMR + CONFIG_SYS_MPC83xx_ESDHC_OFFSET)
> #endif /* __IMMAP_83xx__ */
> @@ -502,6 +505,18 @@ extern int board_pci_host_broken(void);
>
> #undef CONFIG_WATCHDOG /* watchdog disabled */
>
> +#define CONFIG_MMC 1
> +
> +#ifdef CONFIG_MMC
> +#define CONFIG_FSL_ESDHC
> +#define CFG_FSL_ESDHC_ADDR CONFIG_SYS_MPC83xx_ESDHC_ADDR
this should be a CONFIG_SYS_ (this comment probably applies to your
some other patches in this series).
Kim
More information about the U-Boot
mailing list