[U-Boot] [PATCH v4] MPC8360EMDS: 512MB DDR and 33.33MHz oscillator support

Liu Dave-R63238 r63238 at freescale.com
Thu Oct 27 08:21:25 CEST 2011


NACK.

> diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c index 9885b14..8a97c1b
> 100644
> --- a/arch/powerpc/lib/board.c
> +++ b/arch/powerpc/lib/board.c
> @@ -75,9 +75,7 @@
>  #include <keyboard.h>
>  #endif
> 
> -#ifdef CONFIG_ADDR_MAP
>  #include <asm/mmu.h>
> -#endif
> 
>  #ifdef CONFIG_MP
>  #include <asm/mp.h>
> @@ -642,6 +640,23 @@ void board_init_r (gd_t *id, ulong dest_addr)
>  	gd = id;		/* initialize RAM version of global data */
>  	bd = gd->bd;
> 
> +#ifdef CONFIG_MPC8360EMDS
> +	/*
> +	 * BAT6 is used for SDRAM when DDR size is 512MB or larger than 256MB
> +	 * So re-setup PCI MEM space used BAT5 after relocated to DDR
> +	 */
> +	if (gd->ram_size > CONFIG_MAX_MEM_MAPPED) {
> +		/* Clear the BAT5 */
> +		write_bat(DBAT5, 0, 0);
> +		write_bat(IBAT5, 0, 0);
> +		asm("sync");
> +		/* Setup BAT5 for PCI MEM */
> +		write_bat(DBAT5, CONFIG_SYS_DBAT6U, CONFIG_SYS_DBAT6L);
> +		write_bat(IBAT5, CONFIG_SYS_IBAT6U, CONFIG_SYS_IBAT6L);
> +		asm("sync");
> +	}
> +#endif


It is not good way to add code to lib/board.c to match specific board.
Please move it to board level file.

Thanks a lot.
  Dave



More information about the U-Boot mailing list