
Hi folks,
I am trying to get a modern u-boot running on my Wink Hub v1 (Hi Fabio! :-)
One of the features I am trying to enable is ultimately usbacm console, but in the process of trying to get there, I first tried enabling MUSB.
diff --git a/configs/mx28evk_defconfig b/configs/mx28evk_defconfig index fdab7ef73e5..8185c7e0d5a 100644 --- a/configs/mx28evk_defconfig +++ b/configs/mx28evk_defconfig @@ -70,3 +70,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_USB_MUSB_GADGET=y
The result was a failure to compile:
CC drivers/usb/musb-new/musb_gadget.o drivers/usb/musb-new/musb_gadget.c: In function ‘map_dma_buffer’: drivers/usb/musb-new/musb_gadget.c:108:40: warning: implicit declaration of function ‘dma_map_single’ [-Wimplicit-function-declaration] 108 | request->request.dma = dma_map_single( | ^~~~~~~~~~~~~~ drivers/usb/musb-new/musb_gadget.c:113:43: error: ‘DMA_TO_DEVICE’ undeclared (first use in this function) 113 | ? DMA_TO_DEVICE | ^~~~~~~~~~~~~ drivers/usb/musb-new/musb_gadget.c:113:43: note: each undeclared identifier is reported only once for each function it appears in drivers/usb/musb-new/musb_gadget.c:114:43: error: ‘DMA_FROM_DEVICE’ undeclared (first use in this function) 114 | : DMA_FROM_DEVICE); | ^~~~~~~~~~~~~~~ drivers/usb/musb-new/musb_gadget.c:117:17: warning: implicit declaration of function ‘dma_sync_single_for_device’ [-Wimplicit-function-declaration] 117 | dma_sync_single_for_device(musb->controller, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/usb/musb-new/musb_gadget.c: In function ‘unmap_dma_buffer’: drivers/usb/musb-new/musb_gadget.c:140:17: warning: implicit declaration of function ‘dma_unmap_single’ [-Wimplicit-function-declaration] 140 | dma_unmap_single(musb->controller, | ^~~~~~~~~~~~~~~~ drivers/usb/musb-new/musb_gadget.c:144:35: error: ‘DMA_TO_DEVICE’ undeclared (first use in this function) 144 | ? DMA_TO_DEVICE | ^~~~~~~~~~~~~ drivers/usb/musb-new/musb_gadget.c:145:35: error: ‘DMA_FROM_DEVICE’ undeclared (first use in this function) 145 | : DMA_FROM_DEVICE); | ^~~~~~~~~~~~~~~ drivers/usb/musb-new/musb_gadget.c:148:17: warning: implicit declaration of function ‘dma_sync_single_for_cpu’ [-Wimplicit-function-declaration] 148 | dma_sync_single_for_cpu(musb->controller, | ^~~~~~~~~~~~~~~~~~~~~~~ make[1]: *** [scripts/Makefile.build:257: drivers/usb/musb-new/musb_gadget.o] Error 1 make: *** [Makefile:1915: drivers/usb/musb-new] Error 2
This looked like it might be a result of the #include <common.h> removal, so I tried directly including linux/dma-mapping.h, but that seems to not be the correct approach, because the arguments to various functions are no longer as expected.
Any ideas on how to fix this?
Thanks!
Rogan
P.S. For what it is worth, I seem to have destroyed the console UART on my hardware, which is why I am trying to enable USB Gadget console. It also means that I am unable to provide any console logs from an actual running device. I do have another on the way, but right now, I'm actually trying to use the flash chip on my Hub 1 to hold an image read from the Hub 2, mount the various filesystems, and create a file that will enable a console on the Hub 2, which is otherwise locked down with HABv4!