[U-Boot] [PATCH 08/14] universal: request soft i2c/spi gpio

Przemyslaw Marczak p.marczak at samsung.com
Fri Oct 24 17:53:44 CEST 2014


Hello,

This commit was send by a mistake, the previous one is proper.
So please use the previous "8-th".

On 10/24/2014 05:45 PM, Przemyslaw Marczak wrote:
> Signed-off-by: Przemyslaw Marczak <p.marczak at samsung.com>
> ---
>   board/samsung/universal_c210/universal.c | 24 ++++++++++++++++++++++++
>   1 file changed, 24 insertions(+)
>
> diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c
> index c04f48c..b53def8 100644
> --- a/board/samsung/universal_c210/universal.c
> +++ b/board/samsung/universal_c210/universal.c
> @@ -204,6 +204,21 @@ int exynos_early_init_f(void)
>   #ifdef CONFIG_SOFT_SPI
>   static void soft_spi_init(void)
>   {
> +	char buf[16];
> +
> +	/* Reserve gpios for soft SPI */
> +	sprintf(buf, "soft_spi_sclk");
> +	gpio_request(CONFIG_SOFT_SPI_GPIO_SCLK, buf);
> +
> +	sprintf(buf, "soft_spi_mosi");
> +	gpio_request(CONFIG_SOFT_SPI_GPIO_MOSI, buf);
> +
> +	sprintf(buf, "soft_spi_miso");
> +	gpio_request(CONFIG_SOFT_SPI_GPIO_MISO, buf);
> +
> +	sprintf(buf, "soft_spi_cs");
> +	gpio_request(CONFIG_SOFT_SPI_GPIO_CS, buf);
> +
>   	gpio_direction_output(CONFIG_SOFT_SPI_GPIO_SCLK,
>   		CONFIG_SOFT_SPI_MODE & SPI_CPOL);
>   	gpio_direction_output(CONFIG_SOFT_SPI_GPIO_MOSI, 1);
> @@ -377,6 +392,8 @@ void exynos_enable_ldo(unsigned int onoff)
>
>   int exynos_init(void)
>   {
> +	char buf[16];
> +
>   	gd->bd->bi_arch_number = MACH_TYPE_UNIVERSAL_C210;
>
>   	switch (get_hwrev()) {
> @@ -401,6 +418,13 @@ int exynos_init(void)
>   		break;
>   	}
>
> +	/* Request soft I2C gpios */
> +	sprintf(buf, "soft_i2c_scl");
> +	gpio_request(CONFIG_SOFT_I2C_GPIO_SCL, buf);
> +
> +	sprintf(buf, "soft_i2c_sda");
> +	gpio_request(CONFIG_SOFT_I2C_GPIO_SDA, buf);
> +
>   #ifdef CONFIG_SOFT_SPI
>   	soft_spi_init();
>   #endif
>
Best Regards,
-- 
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com


More information about the U-Boot mailing list