h2200: Fix build error
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
@@ -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
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") addedboard_usb_initandboard_usb_cleanupin ethernet gadget driver. But h2200 board didn't haveboard_usb_initandboard_usb_cleanupimplementations.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 functionusb_eth_init':+drivers/usb/gadget/ether.c:2316: undefined reference to `board_usb_init'Fix it here by adding empty
board_usb_initandboard_usb_cleanupfunctions inh2200.c.Fixes: <
8bfc288c3955> ("usb: gadget: ether: Perform board initialization from ethernet gadget driver")Signed-off-by Kishon Vijay Abraham I <[email protected]>--- board/h2200/h2200.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)board/h2200/h2200.c +2
-0@@ -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
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") addedboard_usb_initandboard_usb_cleanupin ethernet gadget driver. But h2200 board didn't haveboard_usb_initandboard_usb_cleanupimplementations.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 functionusb_eth_init':+drivers/usb/gadget/ether.c:2316: undefined reference to `board_usb_init'Fix it here by adding empty
board_usb_initandboard_usb_cleanupfunctions inh2200.c.Fixes: <
8bfc288c3955> ("usb: gadget: ether: Perform board initialization from ethernet gadget driver")Signed-off-by Kishon Vijay Abraham I <[email protected]>--- board/h2200/h2200.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)board/h2200/h2200.c +7
-0@@ -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
__weakfunctions ?
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
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") addedboard_usb_initandboard_usb_cleanupin ethernet gadget driver. But h2200 board didn't haveboard_usb_initandboard_usb_cleanupimplementations.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 functionusb_eth_init':+drivers/usb/gadget/ether.c:2316: undefined reference to `board_usb_init'Fix it here by adding empty
board_usb_initandboard_usb_cleanupfunctions inh2200.c.Fixes: <
8bfc288c3955> ("usb: gadget: ether: Perform board initialization from ethernet gadget driver")Signed-off-by Kishon Vijay Abraham I <[email protected]>---
board/h2200/h2200.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)board/h2200/h2200.c +0
-0@@ -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
__weakfunctions ?
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
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") addedboard_usb_initandboard_usb_cleanupin ethernet gadget driver. But h2200 board didn't haveboard_usb_initandboard_usb_cleanupimplementations.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 functionusb_eth_init':+drivers/usb/gadget/ether.c:2316: undefined reference to `board_usb_init'Fix it here by adding empty
board_usb_initandboard_usb_cleanupfunctions inh2200.c.Fixes: <
8bfc288c3955> ("usb: gadget: ether: Perform board initialization from ethernet gadget driver")Signed-off-by Kishon Vijay Abraham I <[email protected]>---
board/h2200/h2200.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)board/h2200/h2200.c +2
-0@@ -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
__weakfunctions ?
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
Marek Vasut
AppliedPATCH 1/1 h2200: Fix build error
In reply to Kishon Vijay Abraham IQuoted 12 lines · Kishon Vijay Abraham I
Commit <
8bfc288c3955> ("usb: gadget: ether: Perform board initialization from ethernet gadget driver") addedboard_usb_initandboard_usb_cleanupin ethernet gadget driver. But h2200 board didn't haveboard_usb_initandboard_usb_cleanupimplementations.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 functionusb_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_initandboard_usb_cleanupfunctions inh2200.c.Fixes: <
8bfc288c3955> ("usb: gadget: ether: Perform board initialization from ethernet gadget driver")Signed-off-by Kishon Vijay Abraham I <[email protected]>
Applied, thanks.
Best regards,
Marek Vasut