Skip to contentSkip to conversation

EXYNOS: Resolve the i2c compilation error for

PATCH Superseded amar_g 4 participants 5 messages Jul 9, 2013 – Jul 10, 2013

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

amar_g

author
#0 lore raw

PATCH 1/1 EXYNOS: Resolve the i2c compilation error for

This patch resolves the below mentiond compilation error of i2c driver for non-FDT case

Compilation error:
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

---
 board/samsung/smdk5250/smdk5250.c |   10 ++++++++++
 drivers/i2c/s3c24x0_i2c.c         |    9 +--------
 2 files changed, 11 insertions(+), 8 deletions(-)
board/samsung/smdk5250/smdk5250.c +10 -0
index ae1f077..f1d3d97 100644
@@ -332,6 +332,16 @@ static int board_uart_init(void)
 	return ret;
 }
 
+void board_i2c_init(const void *blob)
+{
+	int i;
+
+	for (i = 0; i < CONFIG_MAX_I2C_NUM; i++) {
+		exynos_pinmux_config((PERIPH_ID_I2C0 + i),
+				     PINMUX_FLAG_NONE);
+	}
+}
+
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
drivers/i2c/s3c24x0_i2c.c +1 -8
index 3fc1c5b..382e4c2 100644
@@ -515,10 +515,10 @@ 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;
 
@@ -540,15 +540,8 @@ 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)
Signature · 1 line
1.7.3.rc2
#1 lore raw

PATCH 1/1 EXYNOS: Resolve the i2c compilation error for

Hi amar_g,

Quoted 4 lines · amar_g

This patch resolves the below mentiond compilation error of i2c driver for non-FDT case

Compilation error:

---8<---

Quoted 9 lines

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)

---8<---

Please limit info to the error message between 8< above, or better yet, just mention a summary of the error.

Also: since this is the V1 of a V0, it requires patch history after the commit message delimiter ('---' line below).

Quoted 50 lines
---
 board/samsung/smdk5250/smdk5250.c |   10 ++++++++++
 drivers/i2c/s3c24x0_i2c.c         |    9 +--------
 2 files changed, 11 insertions(+), 8 deletions(-)
board/samsung/smdk5250/smdk5250.c +10 -0
index ae1f077..f1d3d97 100644
@@ -332,6 +332,16 @@ static int board_uart_init(void)
 	return ret;
 }
 
+void board_i2c_init(const void *blob)
+{
+	int i;
+
+	for (i = 0; i < CONFIG_MAX_I2C_NUM; i++) {
+		exynos_pinmux_config((PERIPH_ID_I2C0 + i),
+				     PINMUX_FLAG_NONE);
+	}
+}
+
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
drivers/i2c/s3c24x0_i2c.c +1 -3
index 3fc1c5b..382e4c2 100644
@@ -515,10 +515,10 @@ 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;
 
@@ -540,15 +540,8 @@ 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++) {

drivers/i2c/s3c24x0_i2c.c void board_i2c_init(const void *blob) · line 547

Quoted 10 lines
drivers/i2c/s3c24x0_i2c.c +0 -5
-		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)

Amicalement,

Signature · 1 line
Albert.
#2 lore raw

PATCH 1/1 EXYNOS: Resolve the i2c compilation error for

Hi Albert,

Please find my response below.

Thanks & Regards
Amarendra Reddy

Quoted 21 lines · Albert ARIBAUD

Hi amar_g,

Quoted 4 lines · amar_g

This patch resolves the below mentiond compilation error of i2c driver for non-FDT case

Compilation error:

---8<---

Quoted 9 lines

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)

---8<---

Quoted 7 lines

Please limit info to the error message between 8< above, or better yet, just mention a summary of the error.

Also: since this is the V1 of a V0, it requires patch history after the commit message delimiter ('---' line below).

Ok, shall add history after the delimiter ('---' line below).

And shall limit the error message for less than eight lines.

Quoted 71 lines

Review

Quoted 8 lines
---
 board/samsung/smdk5250/smdk5250.c |   10 ++++++++++
 drivers/i2c/s3c24x0_i2c.c         |    9 +--------
 2 files changed, 11 insertions(+), 8 deletions(-)
(quoted diff) +0 -0

b/board/samsung/smdk5250/smdk5250.c

drivers/i2c/s3c24x0_i2c.c int i2c_write(uchar chip, uint addr, int alen,

Quoted 25 lines

index ae1f077..f1d3d97 100644

board/samsung/smdk5250/smdk5250.c +10 -0
@@ -332,6 +332,16 @@ static int board_uart_init(void)
      return ret;
 }
 
+void board_i2c_init(const void *blob)
+{
+     int i;
+
+     for (i = 0; i < CONFIG_MAX_I2C_NUM; i++) {
+             exynos_pinmux_config((PERIPH_ID_I2C0 + i),
+                                  PINMUX_FLAG_NONE);
+     }
+}
+
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
drivers/i2c/s3c24x0_i2c.c +0 -0
index 3fc1c5b..382e4c2 100644
@@ -515,10 +515,10 @@ int i2c_write(uchar chip, uint addr, int alen,

uchar *buffer, int len)

Quoted 17 lines
drivers/i2c/s3c24x0_i2c.c +1 -3
               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;
 
@@ -540,15 +540,8 @@ 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++) {

drivers/i2c/s3c24x0_i2c.c void board_i2c_init(const void *blob) · line 547

Quoted 10 lines
drivers/i2c/s3c24x0_i2c.c +0 -5
-             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)

Amicalement,
--
Albert.
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#3 lore raw

PATCH 1/1 EXYNOS: Resolve the i2c compilation error for

In reply to amar_g
Quoted 1 line · amar_g

This patch resolves the below mentiond compilation error of i2c driver

typo.. maybe mentiond will be mentioned?

Quoted 77 lines

for non-FDT case

Compilation error:
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

---
 board/samsung/smdk5250/smdk5250.c |   10 ++++++++++
 drivers/i2c/s3c24x0_i2c.c         |    9 +--------
 2 files changed, 11 insertions(+), 8 deletions(-)
board/samsung/smdk5250/smdk5250.c +10 -0
index ae1f077..f1d3d97 100644
@@ -332,6 +332,16 @@ static int board_uart_init(void)
 	return ret;
 }
 
+void board_i2c_init(const void *blob)
+{
+	int i;
+
+	for (i = 0; i < CONFIG_MAX_I2C_NUM; i++) {
+		exynos_pinmux_config((PERIPH_ID_I2C0 + i),
+				     PINMUX_FLAG_NONE);
+	}
+}
+
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
drivers/i2c/s3c24x0_i2c.c +1 -8
index 3fc1c5b..382e4c2 100644
@@ -515,10 +515,10 @@ 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;
 
@@ -540,15 +540,8 @@ 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)
#4 lore raw

PATCH 1/1 EXYNOS: Resolve the i2c compilation error for

Dear Minkyu,

Please find the response below.

Thanks & Regards
Amarendra Reddy

Quoted 90 lines · Minkyu Kang
Quoted 1 line · amar_g

This patch resolves the below mentiond compilation error of i2c driver

typo.. maybe mentiond will be mentioned?
OK will change mentiond to mentioned.

Quoted 16 lines

for non-FDT case

Compilation error:
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

Review

Quoted 8 lines
---
 board/samsung/smdk5250/smdk5250.c |   10 ++++++++++
 drivers/i2c/s3c24x0_i2c.c         |    9 +--------
 2 files changed, 11 insertions(+), 8 deletions(-)
(quoted diff) +0 -0

b/board/samsung/smdk5250/smdk5250.c

drivers/i2c/s3c24x0_i2c.c int i2c_write(uchar chip, uint addr, int alen,

Quoted 25 lines

index ae1f077..f1d3d97 100644

board/samsung/smdk5250/smdk5250.c +10 -0
@@ -332,6 +332,16 @@ static int board_uart_init(void)
      return ret;
 }
 
+void board_i2c_init(const void *blob)
+{
+     int i;
+
+     for (i = 0; i < CONFIG_MAX_I2C_NUM; i++) {
+             exynos_pinmux_config((PERIPH_ID_I2C0 + i),
+                                  PINMUX_FLAG_NONE);
+     }
+}
+
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
drivers/i2c/s3c24x0_i2c.c +0 -0
index 3fc1c5b..382e4c2 100644
@@ -515,10 +515,10 @@ int i2c_write(uchar chip, uint addr, int alen,

uchar *buffer, int len)

Quoted 18 lines
drivers/i2c/s3c24x0_i2c.c +1 -3
               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;
 
@@ -540,15 +540,8 @@ 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++) {

drivers/i2c/s3c24x0_i2c.c void board_i2c_init(const void *blob) · line 547

Quoted 10 lines
drivers/i2c/s3c24x0_i2c.c +0 -5
-             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)

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot