Skip to contentSkip to conversation

h2200: Fix build error

PATCH New Kishon Vijay Abraham I 2 participants 6 messages Aug 21, 2015 – Aug 24, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 h2200: Fix build error

Commit <8bfc288c3955> ("usb: gadget: ether: Perform board initialization from ethernet gadget driver") added board_usb_init and board_usb_cleanup in ethernet gadget driver. But h2200 board didn't have board_usb_init and board_usb_cleanup implementations.

This introduced the following build errors +drivers/usb/gadget/built-in.o: In function `usb_eth_halt':
+drivers/usb/gadget/ether.c:2498: undefined reference to board_usb_cleanup' +drivers/usb/gadget/built-in.o: In function usb_eth_init':
+drivers/usb/gadget/ether.c:2316: undefined reference to `board_usb_init'

Fix it here by adding empty board_usb_init and board_usb_cleanup functions in h2200.c.

Fixes: <8bfc288c3955> ("usb: gadget: ether: Perform board initialization from ethernet gadget driver")

---
 board/h2200/h2200.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)
board/h2200/h2200.c +12 -0
index 66ae4b6..01f8e67 100644
@@ -59,3 +59,15 @@ int dram_init(void)
 	gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
 	return 0;
 }
+
+#ifdef CONFIG_USB_GADGET_PXA2XX
+int board_usb_init(int index, enum usb_init_type init)
+{
+	return 0;
+}
+
+int board_usb_cleanup(int index, enum usb_init_type init)
+{
+	return 0;
+}
+#endif
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 h2200: Fix build error

Quoted 33 lines · Kishon Vijay Abraham I

Commit <8bfc288c3955> ("usb: gadget: ether: Perform board initialization from ethernet gadget driver") added board_usb_init and board_usb_cleanup in ethernet gadget driver. But h2200 board didn't have board_usb_init and board_usb_cleanup implementations.

This introduced the following build errors

(quoted diff) +2 -0
+drivers/usb/gadget/built-in.o: In function `usb_eth_halt':
+drivers/usb/gadget/ether.c:2498: undefined reference to

board_usb_cleanup' +drivers/usb/gadget/built-in.o: In function usb_eth_init':
+drivers/usb/gadget/ether.c:2316: undefined reference to `board_usb_init'

Fix it here by adding empty board_usb_init and board_usb_cleanup functions in h2200.c.

Fixes: <8bfc288c3955> ("usb: gadget: ether: Perform board initialization from ethernet gadget driver")

---
 board/h2200/h2200.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)
board/h2200/h2200.c +2 -0
index 66ae4b6..01f8e67 100644
@@ -59,3 +59,15 @@ int dram_init(void)
 	gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
 	return 0;
 }
+
+#ifdef CONFIG_USB_GADGET_PXA2XX

board/h2200/h2200.c int dram_init(void) · line 73

Quoted 10 lines
board/h2200/h2200.c +10 -0
+int board_usb_init(int index, enum usb_init_type init)
+{
+	return 0;
+}
+
+int board_usb_cleanup(int index, enum usb_init_type init)
+{
+	return 0;
+}
+#endif

Shouldn't this go into the PXA2xx UDC driver instead as a set of __weak functions ?

Best regards,
Marek Vasut

#2 lore raw

PATCH 1/1 h2200: Fix build error

Hi Marek,

Quoted 39 lines · Marek Vasut
Quoted 38 lines · Kishon Vijay Abraham I

Commit <8bfc288c3955> ("usb: gadget: ether: Perform board initialization from ethernet gadget driver") added board_usb_init and board_usb_cleanup in ethernet gadget driver. But h2200 board didn't have board_usb_init and board_usb_cleanup implementations.

This introduced the following build errors

(quoted diff) +2 -0
+drivers/usb/gadget/built-in.o: In function `usb_eth_halt':
+drivers/usb/gadget/ether.c:2498: undefined reference to

board_usb_cleanup' +drivers/usb/gadget/built-in.o: In function usb_eth_init':
+drivers/usb/gadget/ether.c:2316: undefined reference to `board_usb_init'

Fix it here by adding empty board_usb_init and board_usb_cleanup functions in h2200.c.

Fixes: <8bfc288c3955> ("usb: gadget: ether: Perform board initialization from ethernet gadget driver")

---
 board/h2200/h2200.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)
board/h2200/h2200.c +7 -0
index 66ae4b6..01f8e67 100644
@@ -59,3 +59,15 @@ int dram_init(void)
 	gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
 	return 0;
 }
+
+#ifdef CONFIG_USB_GADGET_PXA2XX
+int board_usb_init(int index, enum usb_init_type init)
+{
+	return 0;
+}
+
Quoted 8 lines

board/h2200/h2200.c int dram_init(void) · line 73

Quoted 5 lines
board/h2200/h2200.c +5 -0
+int board_usb_cleanup(int index, enum usb_init_type init)
+{
+	return 0;
+}
+#endif

Shouldn't this go into the PXA2xx UDC driver instead as a set of __weak functions ?

thought all board_* functions should be added in board files. but I think whatever you are telling makes sense. Will post a new version.

Thanks
Kishon

#3 lore raw

PATCH 1/1 h2200: Fix build error

Quoted 56 lines · Kishon Vijay Abraham I

Hi Marek,

Quoted 37 lines · Marek Vasut
Quoted 36 lines · Kishon Vijay Abraham I

Commit <8bfc288c3955> ("usb: gadget: ether: Perform board initialization from ethernet gadget driver") added board_usb_init and board_usb_cleanup in ethernet gadget driver. But h2200 board didn't have board_usb_init and board_usb_cleanup implementations.

This introduced the following build errors

(quoted diff) +2 -0
+drivers/usb/gadget/built-in.o: In function `usb_eth_halt':
+drivers/usb/gadget/ether.c:2498: undefined reference to

board_usb_cleanup' +drivers/usb/gadget/built-in.o: In function usb_eth_init':
+drivers/usb/gadget/ether.c:2316: undefined reference to `board_usb_init'

Fix it here by adding empty board_usb_init and board_usb_cleanup functions in h2200.c.

Fixes: <8bfc288c3955> ("usb: gadget: ether: Perform board initialization from ethernet gadget driver")

---

 board/h2200/h2200.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)
board/h2200/h2200.c +0 -0
index 66ae4b6..01f8e67 100644
@@ -59,3 +59,15 @@ int dram_init(void)
 
 	gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
 	return 0;
 
 }
Quoted 15 lines

board/h2200/h2200.c int dram_init(void) · line 73

Quoted 12 lines
board/h2200/h2200.c +12 -0
+
+#ifdef CONFIG_USB_GADGET_PXA2XX
+int board_usb_init(int index, enum usb_init_type init)
+{
+	return 0;
+}
+
+int board_usb_cleanup(int index, enum usb_init_type init)
+{
+	return 0;
+}
+#endif

Shouldn't this go into the PXA2xx UDC driver instead as a set of __weak functions ?

Quoted 2 lines

thought all board_* functions should be added in board files. but I think whatever you are telling makes sense. Will post a new version.

Ow, we don't even have a default implementation of these anywhere. In that case, I think this patch is all right and if noone is opposed, I'll pick it as is. Sorry for the noise.

Best regards,
Marek Vasut

#4 lore raw

PATCH 1/1 h2200: Fix build error

Quoted 57 lines · Marek Vasut
Quoted 56 lines · Kishon Vijay Abraham I

Hi Marek,

Quoted 52 lines · Marek Vasut
Quoted 38 lines · Kishon Vijay Abraham I

Commit <8bfc288c3955> ("usb: gadget: ether: Perform board initialization from ethernet gadget driver") added board_usb_init and board_usb_cleanup in ethernet gadget driver. But h2200 board didn't have board_usb_init and board_usb_cleanup implementations.

This introduced the following build errors

(quoted diff) +2 -0
+drivers/usb/gadget/built-in.o: In function `usb_eth_halt':
+drivers/usb/gadget/ether.c:2498: undefined reference to

board_usb_cleanup' +drivers/usb/gadget/built-in.o: In function usb_eth_init':
+drivers/usb/gadget/ether.c:2316: undefined reference to `board_usb_init'

Fix it here by adding empty board_usb_init and board_usb_cleanup functions in h2200.c.

Fixes: <8bfc288c3955> ("usb: gadget: ether: Perform board initialization from ethernet gadget driver")

---

 board/h2200/h2200.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)
board/h2200/h2200.c +2 -0
index 66ae4b6..01f8e67 100644
@@ -59,3 +59,15 @@ int dram_init(void)
 
 	gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
 	return 0;
 
 }
 
+
+#ifdef CONFIG_USB_GADGET_PXA2XX

board/h2200/h2200.c int dram_init(void) · line 73

Quoted 10 lines
board/h2200/h2200.c +10 -0
+int board_usb_init(int index, enum usb_init_type init)
+{
+	return 0;
+}
+
+int board_usb_cleanup(int index, enum usb_init_type init)
+{
+	return 0;
+}
+#endif

Shouldn't this go into the PXA2xx UDC driver instead as a set of __weak functions ?

Quoted 6 lines
Quoted 2 lines

thought all board_* functions should be added in board files. but I think whatever you are telling makes sense. Will post a new version.

Ow, we don't even have a default implementation of these anywhere. In that case, I think this patch is all right and if noone is opposed, I'll pick it as is. Sorry for the noise.

ah.. alright.

Thanks
Kishon

Applied
#5 lore raw

PATCH 1/1 h2200: Fix build error

In reply to Kishon Vijay Abraham I
Quoted 12 lines · Kishon Vijay Abraham I

Commit <8bfc288c3955> ("usb: gadget: ether: Perform board initialization from ethernet gadget driver") added board_usb_init and board_usb_cleanup in ethernet gadget driver. But h2200 board didn't have board_usb_init and board_usb_cleanup implementations.

This introduced the following build errors

(quoted diff) +2 -0
+drivers/usb/gadget/built-in.o: In function `usb_eth_halt':
+drivers/usb/gadget/ether.c:2498: undefined reference to

board_usb_cleanup' +drivers/usb/gadget/built-in.o: In function usb_eth_init':
+drivers/usb/gadget/ether.c:2316: undefined reference to `board_usb_init'

Quoted 7 lines

Fix it here by adding empty board_usb_init and board_usb_cleanup functions in h2200.c.

Fixes: <8bfc288c3955> ("usb: gadget: ether: Perform board initialization from ethernet gadget driver")

Applied, thanks.

Best regards,
Marek Vasut