Commit e94793c844a40606252f2e3f6428063e057b3fd2
Committed by
Tom Rini
1 parent
5991703e88
Exists in
v2017.01-smarct4x
and in
25 other branches
spl: add USB Gadget config option
Introduce USB Gadget config option. This allows to combine Makefile entries for SPL_USBETH_SUPPORT and SPL_DFU_SUPPORT. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Ravi Babu <ravibabu@ti.com>
Showing 5 changed files with 27 additions and 17 deletions Side-by-side Diff
common/spl/Kconfig
... | ... | @@ -492,17 +492,6 @@ |
492 | 492 | enable SPI drivers that are needed for other purposes also, such |
493 | 493 | as a SPI PMIC. |
494 | 494 | |
495 | -config SPL_USBETH_SUPPORT | |
496 | - bool "Support USB Ethernet drivers" | |
497 | - depends on SPL | |
498 | - help | |
499 | - Enable access to the USB network subsystem and associated | |
500 | - drivers in SPL. This permits SPL to load U-Boot over a | |
501 | - USB-connected Ethernet link (such as a USB Ethernet dongle) rather | |
502 | - than from an onboard peripheral. Environment support is required | |
503 | - since the network stack uses a number of environment variables. | |
504 | - See also SPL_NET_SUPPORT and SPL_ETH_SUPPORT. | |
505 | - | |
506 | 495 | config SPL_USB_HOST_SUPPORT |
507 | 496 | bool "Support USB host drivers" |
508 | 497 | depends on SPL |
509 | 498 | |
... | ... | @@ -524,9 +513,27 @@ |
524 | 513 | config options. This enables loading from USB using a configured |
525 | 514 | device. |
526 | 515 | |
516 | +config SPL_USB_GADGET_SUPPORT | |
517 | + bool "Suppport USB Gadget drivers" | |
518 | + depends on SPL | |
519 | + help | |
520 | + Enable USB Gadget API which allows to enable USB device functions | |
521 | + in SPL. | |
522 | + | |
523 | +if SPL_USB_GADGET_SUPPORT | |
524 | + | |
525 | +config SPL_USBETH_SUPPORT | |
526 | + bool "Support USB Ethernet drivers" | |
527 | + help | |
528 | + Enable access to the USB network subsystem and associated | |
529 | + drivers in SPL. This permits SPL to load U-Boot over a | |
530 | + USB-connected Ethernet link (such as a USB Ethernet dongle) rather | |
531 | + than from an onboard peripheral. Environment support is required | |
532 | + since the network stack uses a number of environment variables. | |
533 | + See also SPL_NET_SUPPORT and SPL_ETH_SUPPORT. | |
534 | + | |
527 | 535 | config SPL_DFU_SUPPORT |
528 | 536 | bool "Support DFU (Device Firmware Upgarde)" |
529 | - depends on SPL | |
530 | 537 | select SPL_HASH_SUPPORT |
531 | 538 | help |
532 | 539 | This feature enables the DFU (Device Firmware Upgarde) in SPL with |
... | ... | @@ -549,6 +556,8 @@ |
549 | 556 | DFU and execute the u-boot/kernel from RAM. |
550 | 557 | |
551 | 558 | endchoice |
559 | + | |
560 | +endif | |
552 | 561 | |
553 | 562 | config SPL_WATCHDOG_SUPPORT |
554 | 563 | bool "Support watchdog drivers" |
configs/am335x_evm_usbspl_defconfig
drivers/Makefile
... | ... | @@ -33,9 +33,8 @@ |
33 | 33 | obj-$(CONFIG_SPL_ETH_SUPPORT) += net/phy/ |
34 | 34 | obj-$(CONFIG_SPL_USBETH_SUPPORT) += net/phy/ |
35 | 35 | obj-$(CONFIG_SPL_MUSB_NEW_SUPPORT) += usb/musb-new/ |
36 | -obj-$(CONFIG_SPL_USBETH_SUPPORT) += usb/gadget/ | |
37 | -obj-$(CONFIG_SPL_DFU_SUPPORT) += usb/gadget/ | |
38 | -obj-$(CONFIG_SPL_DFU_SUPPORT) += usb/gadget/udc/ | |
36 | +obj-$(CONFIG_SPL_USB_GADGET_SUPPORT) += usb/gadget/ | |
37 | +obj-$(CONFIG_SPL_USB_GADGET_SUPPORT) += usb/gadget/udc/ | |
39 | 38 | obj-$(CONFIG_SPL_DFU_SUPPORT) += dfu/ |
40 | 39 | obj-$(CONFIG_SPL_WATCHDOG_SUPPORT) += watchdog/ |
41 | 40 | obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += usb/host/ |
drivers/usb/gadget/Makefile
... | ... | @@ -9,6 +9,7 @@ |
9 | 9 | obj-$(CONFIG_USB_ETHER) += epautoconf.o config.o usbstring.o |
10 | 10 | |
11 | 11 | ifdef CONFIG_SPL_BUILD |
12 | +obj-$(CONFIG_SPL_USB_GADGET_SUPPORT) += g_dnl.o | |
12 | 13 | obj-$(CONFIG_SPL_DFU_SUPPORT) += f_dfu.o |
13 | 14 | endif |
14 | 15 | |
15 | 16 | |
... | ... | @@ -21,8 +22,8 @@ |
21 | 22 | obj-$(CONFIG_USB_GADGET_DWC2_OTG_PHY) += dwc2_udc_otg_phy.o |
22 | 23 | obj-$(CONFIG_USB_GADGET_FOTG210) += fotg210.o |
23 | 24 | obj-$(CONFIG_CI_UDC) += ci_udc.o |
24 | -obj-$(CONFIG_USB_GADGET_DOWNLOAD) += g_dnl.o | |
25 | 25 | ifndef CONFIG_SPL_BUILD |
26 | +obj-$(CONFIG_USB_GADGET_DOWNLOAD) += g_dnl.o | |
26 | 27 | obj-$(CONFIG_USB_FUNCTION_THOR) += f_thor.o |
27 | 28 | obj-$(CONFIG_USB_FUNCTION_DFU) += f_dfu.o |
28 | 29 | obj-$(CONFIG_USB_FUNCTION_MASS_STORAGE) += f_mass_storage.o |
scripts/Makefile.spl
... | ... | @@ -66,7 +66,7 @@ |
66 | 66 | |
67 | 67 | libs-$(CONFIG_SPL_LIBDISK_SUPPORT) += disk/ |
68 | 68 | libs-y += drivers/ |
69 | -libs-$(CONFIG_SPL_DFU_SUPPORT) += drivers/usb/dwc3/ | |
69 | +libs-$(CONFIG_SPL_USB_GADGET_SUPPORT) += drivers/usb/dwc3/ | |
70 | 70 | libs-y += dts/ |
71 | 71 | libs-y += fs/ |
72 | 72 | libs-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/ |