[U-Boot] [PATCH 6/6] SMDK5250: Populate I2C data using FDT.
Rajeshwari Shinde
rajeshwari.s at samsung.com
Thu Nov 8 06:30:03 CET 2012
Signed-off-by: Rajeshwari Shinde <rajeshwari.s at samsung.com>
---
board/samsung/smdk5250/smdk5250.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c
index db2457b..dfb7239 100644
--- a/board/samsung/smdk5250/smdk5250.c
+++ b/board/samsung/smdk5250/smdk5250.c
@@ -276,8 +276,11 @@ static int board_uart_init(void)
static int board_i2c_init(void)
{
int i, err;
-
- for (i = 0; i < CONFIG_MAX_I2C_NUM; i++) {
+ int count = CONFIG_MAX_I2C_NUM;
+#ifdef CONFIG_OF_CONTROL
+ count = i2c_fdt_bus_values(gd->fdt_blob);
+#endif
+ for (i = 0; i < count; i++) {
err = exynos_pinmux_config((PERIPH_ID_I2C0 + i),
PINMUX_FLAG_NONE);
if (err) {
--
1.7.4.4
More information about the U-Boot
mailing list