[U-Boot] [PATCH 5/6 V7] EXYNOS5: Enable SPI

Simon Glass sjg at chromium.org
Thu Oct 25 19:16:31 CEST 2012


On Mon, Oct 22, 2012 at 4:52 AM, Hatim Ali <hatim.rv at samsung.com> wrote:
> From: Rajeshwari Shinde <rajeshwari.s at samsung.com>
>
> This patch enables SPI driver for EXYNOS5.
>
> Signed-off-by: Rajeshwari Shinde <rajeshwari.s at samsung.com>
> Signed-off-by: Hatim Ali <hatim.rv at samsung.com>

Acked-by: Simon Glass <sjg at chromium.org>

> ---
> Changes since v4:
>         - Rebased on u-boot-samsung.git
> Changes since v5:
>         No change
> Changes since v6:
>         Removed unused define from the config file
>
>
> diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c
> index a5816e4..069c9e8 100644
> --- a/board/samsung/smdk5250/smdk5250.c
> +++ b/board/samsung/smdk5250/smdk5250.c
> @@ -24,6 +24,7 @@
>  #include <asm/io.h>
>  #include <i2c.h>
>  #include <netdev.h>
> +#include <spi.h>
>  #include <asm/arch/cpu.h>
>  #include <asm/arch/gpio.h>
>  #include <asm/arch/mmc.h>
> @@ -63,6 +64,9 @@ static int smc9115_pre_init(void)
>  int board_init(void)
>  {
>         gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL);
> +#ifdef CONFIG_EXYNOS_SPI
> +       spi_init();
> +#endif
>         return 0;
>  }
>
> diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h
> index 9e3b55b..604c61e 100644
> --- a/include/configs/smdk5250.h
> +++ b/include/configs/smdk5250.h
> @@ -164,7 +164,6 @@
>  #undef CONFIG_CMD_IMLS
>  #define CONFIG_IDENT_STRING            " for SMDK5250"
>
> -#define CONFIG_ENV_IS_IN_MMC
>  #define CONFIG_SYS_MMC_ENV_DEV         0
>
>  #define CONFIG_SECURE_BL1_ONLY
> @@ -213,6 +212,27 @@
>  #define CONFIG_ENV_SROM_BANK           1
>  #endif /*CONFIG_CMD_NET*/
>
> +/* 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
> +
>  /* Enable PXE Support */
>  #ifdef CONFIG_CMD_NET
>  #define CONFIG_CMD_PXE
> --
> 1.7.2.3
>


More information about the U-Boot mailing list