[U-Boot] [PATCH v2 1/2] smdk5250: move board specific options to board specific config file
Simon Glass
sjg at chromium.org
Wed Feb 27 22:51:43 CET 2013
Hi,
On Mon, Feb 25, 2013 at 9:13 PM, Inderpal Singh
<inderpal.singh at linaro.org> wrote:
> Signed-off-by: Inderpal Singh <inderpal.singh at linaro.org>
> Acked-by: Chander Kashyap <chander.kashyap at linaro.org>
> ---
> include/configs/exynos5250-dt.h | 60 ---------------------------------------
> include/configs/smdk5250.h | 35 +++++++++++++++++++++++
> 2 files changed, 35 insertions(+), 60 deletions(-)
>
> diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h
Sorry I have only just seen this - I don't think this patch is wholly correct.
The intent with the -dt.h file is to enable things that might be used
by exynos5250 boards. For example it is OK to enable multiple pmic
drivers, SPI, MMC, etc. even if not all boards use them. Device tree
nodes have a 'status = "disabled" feature to deal with turning
individual peripherals on/ff. I agree that the smdk5250 string is
wrong, but you should perhaps change this to exynos5250 instead. By
all means undef and define things in your board, but we should not
defeat the purpose of the -dt.h file. The device tree should be used
to configure/enable drivers where possible.
Now I realise that what I am saying is not entirely possible right now
(in that for example some drivers are not device tree-enabled), but we
should try to avoid just treating this file as an exynos 'common'
file.
Regards,
Simon
> index 3fa86b2..d4a589c 100644
> --- a/include/configs/exynos5250-dt.h
> +++ b/include/configs/exynos5250-dt.h
> @@ -73,7 +73,6 @@
> #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (4 << 20))
>
> /* select serial console configuration */
> -#define CONFIG_SERIAL3 /* use SERIAL 3 */
> #define CONFIG_BAUDRATE 115200
> #define EXYNOS5_DEFAULT_UART_OFFSET 0x010000
>
> @@ -139,7 +138,6 @@
> /* Miscellaneous configurable options */
> #define CONFIG_SYS_LONGHELP /* undef to save memory */
> #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
> -#define CONFIG_SYS_PROMPT "SMDK5250 # "
> #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
> #define CONFIG_SYS_PBSIZE 384 /* Print Buffer Size */
> #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
> @@ -179,7 +177,6 @@
> /* FLASH and environment organization */
> #define CONFIG_SYS_NO_FLASH
> #undef CONFIG_CMD_IMLS
> -#define CONFIG_IDENT_STRING " for SMDK5250"
>
> #define CONFIG_SYS_MMC_ENV_DEV 0
>
> @@ -232,57 +229,10 @@
> #define CONFIG_I2C_EDID
>
> /* PMIC */
> -#define CONFIG_PMIC
> -#define CONFIG_PMIC_I2C
> -#define CONFIG_PMIC_MAX77686
> -
> -/* SPI */
> -#define CONFIG_ENV_IS_IN_SPI_FLASH
> -#define CONFIG_SPI_FLASH
> -
> -#ifdef CONFIG_SPI_FLASH
> -#define CONFIG_EXYNOS_SPI
> -#define CONFIG_CMD_SF
> -#define CONFIG_CMD_SPI
> -#define CONFIG_SPI_FLASH_WINBOND
> -#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
> -#define CONFIG_SF_DEFAULT_SPEED 50000000
> -#define EXYNOS5_SPI_NUM_CONTROLLERS 5
> -#endif
> -
> -#ifdef CONFIG_ENV_IS_IN_SPI_FLASH
> -#define CONFIG_ENV_SPI_MODE SPI_MODE_0
> -#define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE
> -#define CONFIG_ENV_SPI_BUS 1
> -#define CONFIG_ENV_SPI_MAX_HZ 50000000
> -#endif
> -
> -/* PMIC */
> #define CONFIG_POWER
> #define CONFIG_POWER_I2C
> #define CONFIG_POWER_MAX77686
>
> -/* SPI */
> -#define CONFIG_ENV_IS_IN_SPI_FLASH
> -#define CONFIG_SPI_FLASH
> -
> -#ifdef CONFIG_SPI_FLASH
> -#define CONFIG_EXYNOS_SPI
> -#define CONFIG_CMD_SF
> -#define CONFIG_CMD_SPI
> -#define CONFIG_SPI_FLASH_WINBOND
> -#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
> -#define CONFIG_SF_DEFAULT_SPEED 50000000
> -#define EXYNOS5_SPI_NUM_CONTROLLERS 5
> -#endif
> -
> -#ifdef CONFIG_ENV_IS_IN_SPI_FLASH
> -#define CONFIG_ENV_SPI_MODE SPI_MODE_0
> -#define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE
> -#define CONFIG_ENV_SPI_BUS 1
> -#define CONFIG_ENV_SPI_MAX_HZ 50000000
> -#endif
> -
> /* Ethernet Controllor Driver */
> #ifdef CONFIG_CMD_NET
> #define CONFIG_SMC911X
> @@ -314,14 +264,4 @@
> #define CONFIG_SHA1
> #define CONFIG_SHA256
>
> -/* Display */
> -#define CONFIG_LCD
> -#ifdef CONFIG_LCD
> -#define CONFIG_EXYNOS_FB
> -#define CONFIG_EXYNOS_DP
> -#define LCD_XRES 2560
> -#define LCD_YRES 1600
> -#define LCD_BPP LCD_COLOR16
> -#endif
> -
> #endif /* __CONFIG_H */
> diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h
> index 81f83a8..51c4215 100644
> --- a/include/configs/smdk5250.h
> +++ b/include/configs/smdk5250.h
> @@ -30,4 +30,39 @@
> #undef CONFIG_DEFAULT_DEVICE_TREE
> #define CONFIG_DEFAULT_DEVICE_TREE exynos5250-smdk5250
>
> +#define CONFIG_SYS_PROMPT "SMDK5250 # "
> +#define CONFIG_SERIAL3 /* use SERIAL 3 */
> +#define CONFIG_IDENT_STRING " for SMDK5250"
> +
> +/* SPI */
> +#define CONFIG_ENV_IS_IN_SPI_FLASH
> +#define CONFIG_SPI_FLASH
> +
> +#ifdef CONFIG_SPI_FLASH
> +#define CONFIG_EXYNOS_SPI
> +#define CONFIG_CMD_SF
> +#define CONFIG_CMD_SPI
> +#define CONFIG_SPI_FLASH_WINBOND
> +#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
> +#define CONFIG_SF_DEFAULT_SPEED 50000000
> +#define EXYNOS5_SPI_NUM_CONTROLLERS 5
> +#endif
> +
> +#ifdef CONFIG_ENV_IS_IN_SPI_FLASH
> +#define CONFIG_ENV_SPI_MODE SPI_MODE_0
> +#define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE
> +#define CONFIG_ENV_SPI_BUS 1
> +#define CONFIG_ENV_SPI_MAX_HZ 50000000
> +#endif
> +
> +/* Display */
> +#define CONFIG_LCD
> +#ifdef CONFIG_LCD
> +#define CONFIG_EXYNOS_FB
> +#define CONFIG_EXYNOS_DP
> +#define LCD_XRES 2560
> +#define LCD_YRES 1600
> +#define LCD_BPP LCD_COLOR16
> +#endif
> +
> #endif /* __CONFIG_SMDK_H */
> --
> 1.7.9.5
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
More information about the U-Boot
mailing list