Hi Pavel,

On Tue, 2014-05-27 at 15:12 +0200, ZY - pavel wrote:
> Altera Cyclone 5 board is very different board (big, rectangular,
> expensive) than EBV Socrates (small, circular, cheap) board. Different
> parts are used there, too, but same configuration of u-boot works on
> both. Nevertheless, printing wrong name confuses users. Virtual target
> is completely different, and board configured for it will not boot on
> physical targets.
> 
> Therefore this splits the configuration so that u-boot knows they are
> different. So far it is only used for correcting the puts, but there
> may be other uses in future.
> 
> Signed-off-by: Pavel Machek <[email protected]>
> 
> ---
> 
> Diff from v1: separate virtual target, too, and make it apply to
> recent u-boot.
> 
> diff --git a/board/altera/socfpga/socfpga_cyclone5.c 
> b/board/altera/socfpga/socfpga_cyclone5.c
> index a960eb6..33946b6 100644
> --- a/board/altera/socfpga/socfpga_cyclone5.c
> +++ b/board/altera/socfpga/socfpga_cyclone5.c
> @@ -28,7 +28,7 @@ int print_cpuinfo(void)
>   */
>  int checkboard(void)
>  {
> -     puts("BOARD : Altera SOCFPGA Cyclone5 Board\n");
> +     puts("BOARD : " ALTERA_BOARD_NAME "\n");
>       return 0;
>  }
>  
> diff --git a/boards.cfg b/boards.cfg
> index 221b7f8..6eebbf5 100644
> --- a/boards.cfg
> +++ b/boards.cfg
> @@ -379,6 +379,8 @@ Active  arm         armv7          rmobile     renesas    
>      lager
>  Active  arm         armv7          s5pc1xx     samsung         goni          
>       s5p_goni                              -                                 
>                                                                               
>                   Przemyslaw Marczak <[email protected]>
>  Active  arm         armv7          s5pc1xx     samsung         smdkc100      
>       smdkc100                              -                                 
>                                                                               
>                   Minkyu Kang <[email protected]>
>  Active  arm         armv7          socfpga     altera          socfpga       
>       socfpga_cyclone5                      -                                 
>                                                                               
>                   -
> +Active  arm         armv7          socfpga     altera          socfpga       
>       socfpga_virtual                      -                                  
>                                                                               
>                  -
> +Active  arm         armv7          socfpga     altera          socfpga       
>       socfpga_socrates                      -                                 
>                                                                               
>                   -
>  Active  arm         armv7          u8500       st-ericsson     snowball      
>       snowball                              -                                 
>                                                                               
>                   Mathieu Poirier <[email protected]>
>  Active  arm         armv7          u8500       st-ericsson     u8500         
>       u8500_href                            -                                 
>                                                                               
>                   -
>  Active  arm         armv7          vf610       freescale       vf610twr      
>       vf610twr                              
> vf610twr:IMX_CONFIG=board/freescale/vf610twr/imximage.cfg                     
>                                                     Alison Wang 
> <[email protected]>
> diff --git a/include/configs/socfpga_common.h 
> b/include/configs/socfpga_common.h
> new file mode 100644
> index 0000000..4d90952
> --- /dev/null
> +++ b/include/configs/socfpga_common.h
> @@ -0,0 +1,240 @@
> +/*
> + *  Copyright (C) 2012 Altera Corporation <www.altera.com>
> + *
> + * SPDX-License-Identifier:  GPL-2.0+
> + */
> +#ifndef __CONFIG_COMMON_H
> +#define __CONFIG_COMMON_H
> +
> +#include <asm/arch/socfpga_base_addrs.h>
> +#include "../../board/altera/socfpga/pinmux_config.h"
> +#include "../../board/altera/socfpga/pll_config.h"
> +


I believe these should go to board specific header file such as
socfpga_cyclone5 and socfpga_socrates. These are HW configuration
handoff files and different from board to board.


> +/*
> + * Hardware drivers
> + */
> +
> +/*
> + * SDRAM Memory Map
> + */
> +/* We have 1 bank of DRAM */
> +#define CONFIG_NR_DRAM_BANKS         1
> +/* SDRAM Bank #1 */
> +#define CONFIG_SYS_SDRAM_BASE                0x00000000
> +/* SDRAM memory size */
> +#define PHYS_SDRAM_1_SIZE            0x40000000
> +


Just a quick comments. In newer version SPL at rocketboard.org, we won't
need to specify the size. It will be calculated based on HW registers.
We will change this together with SPL SDRAM patch.


> diff --git a/include/configs/socfpga_cyclone5.h 
> b/include/configs/socfpga_cyclone5.h
> index 517070c..d5d59d2 100644
> --- a/include/configs/socfpga_cyclone5.h
> +++ b/include/configs/socfpga_cyclone5.h
> @@ -1,242 +1,16 @@
>  /*
> - *  Copyright (C) 2012 Altera Corporation <www.altera.com>
> + *  Copyright (C) 2014 Pavel Machek <[email protected]>
>   *
> - * SPDX-License-Identifier:  GPL-2.0+
> + * SPDX-License-Identifier:    GPL-2.0+
>   */
>  #ifndef __CONFIG_H
>  #define __CONFIG_H
>  
> -#include <asm/arch/socfpga_base_addrs.h>
> -#include "../../board/altera/socfpga/pinmux_config.h"
> -#include "../../board/altera/socfpga/pll_config.h"
> -


Same as above. We need to retain the handoff path in board specific
header file instead common.

Thanks
Chin Liang

_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to