[U-Boot] please pull u-boot-samsung master

Minkyu Kang
2013-07-07T05:43:08Z

Dear Amar,

On 6 July 2013 04:12, Albert ARIBAUD <albert.u.boot@aribaud.net> wrote:

> Hi Minkyu,
>
> This breaks build of VCMA9:
>
> s3c24x0_i2c.c: In function 'board_i2c_init':
> s3c24x0_i2c.c:544:18: error: 'CONFIG_MAX_I2C_NUM' undeclared (first use
> in this function) s3c24x0_i2c.c:544:18: note: each undeclared
> identifier is reported only once for each function it appears in
> s3c24x0_i2c.c:545:3: warning: implicit declaration of function
> 'exynos_pinmux_config' [-Wimplicit-function-declaration]
> s3c24x0_i2c.c:545:25: error: 'PERIPH_ID_I2C0' undeclared (first use in
> this function) s3c24x0_i2c.c:546:10: error: 'PINMUX_FLAG_NONE'
> undeclared (first use in this function) make[1]: ***
> [/home/albert/src/u-boot-arm/build/VCMA9/drivers/i2c/s3c24x0_i2c.o]
> Error 1 make: ***
> [/home/albert/src/u-boot-arm/build/VCMA9/drivers/i2c/libi2c.o] Error 2
>
> Culprit is commit 2c07bb9b, authored by Amar <amarendra.xt@samsung.com>.
>
> (also: "Amar" seems to be only part of the author's name. Is this
> intentional?)
>
> Amicalement,
> --
> Albert.
>
>
please check.
seems have problem with non-FDT case.

u-boot-samsung$ git show 2c07bb9b53dded1d49731bb9cab589002b89286f
commit 2c07bb9b53dded1d49731bb9cab589002b89286f
Author: Amar <amarendra.xt@samsung.com>
Date: Thu Apr 4 02:27:06 2013 -0400

EXYNOS5: I2C: Add FDT and non-FDT support for I2C

This patch updates the function board_i2c_init() to add support for both
FDT and non-FDT for I2C, and initialise the I2C channels.

Signed-off-by: Amar <amarendra.xt@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>

diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c
index 46d2506..3fc1c5b 100644
--- a/drivers/i2c/s3c24x0_i2c.c
+++ b/drivers/i2c/s3c24x0_i2c.c
@@ -515,11 +515,12 @@ int i2c_write(uchar chip, uint addr, int alen, uchar
*buffer, int len)
len) != 0);
}

-#ifdef CONFIG_OF_CONTROL
void board_i2c_init(const void *blob)
{
+ int i;
+#ifdef CONFIG_OF_CONTROL
int node_list[CONFIG_MAX_I2C_NUM];
- int count, i;
+ int count;

count = fdtdec_find_aliases_for_id(blob, "i2c",
COMPAT_SAMSUNG_S3C2440_I2C, node_list,
@@ -539,8 +540,15 @@ void board_i2c_init(const void *blob)
bus->bus_num = i2c_busses++;
exynos_pinmux_config(bus->id, 0);
}
+#else
+ for (i = 0; i < CONFIG_MAX_I2C_NUM; i++) {
+ exynos_pinmux_config((PERIPH_ID_I2C0 + i),
+ PINMUX_FLAG_NONE);
+ }
+#endif
}

+#ifdef CONFIG_OF_CONTROL
static struct s3c24x0_i2c_bus *get_bus(unsigned int bus_idx)
{
if (bus_idx < i2c_busses)

--
from. prom.