freebsd-nq/sys/modules/usb
Ian Lepore bac5ec96f4 Add common support functions for USB devices configured via FDT data.
FDT data is sometimes used to configure usb devices which are hardwired into
an embedded system. Because the devices are instantiated by the usb
enumeration process rather than by ofwbus iterating through the fdt data, it
is somewhat difficult for a usb driver to locate fdt data that belongs to
it. In the past, various ad-hoc methods have been used, which can lead to
errors such applying configuration that should apply only to a hardwired
device onto a similar device attached by the user at runtime. For example,
if the user adds an ethernet device that uses the same driver as the builtin
ethernet, both devices might end up with the same MAC address.

These changes add a new usb_fdt_get_node() helper function that a driver can
use to locate FDT data that belongs to a single unique instance of the
device. This function locates the proper FDT data using the mechanism
detailed in the standard "usb-device.txt" binding document [1].

There is also a new usb_fdt_get_mac_addr() function, used to retrieve the
mac address for a given device instance from the fdt data. It uses
usb_fdt_get_node() to locate the right node in the FDT data, and attempts to
obtain the mac-address or local-mac-address property (in that order, the
same as linux does it).

The existing if_smsc driver is modified to use the new functions, both as an
example and for testing the new functions. Rpi and rpi2 boards use this
driver and provide the mac address via the fdt data.

[1] https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/usb/usb-device.txt

Differential Revision:	https://reviews.freebsd.org/D20262
2019-05-19 16:56:59 +00:00
..
atmegadci sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
atp sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
aue sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
avr32dci sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
axe sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
axge sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
cdce sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
cfumass sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
cue sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
dwc_otg sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
ehci sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
g_audio sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
g_keyboard sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
g_modem sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
g_mouse sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
ipheth sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
kue sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
mos sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
muge Add driver for Microchip LAN78xx USB3-GigE controller 2018-05-17 14:04:59 +00:00
musb sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
ohci sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
quirk sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
rsu sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
rsufw sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
rue sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
rum usb/wlan/*: properly include "opt_wlan.h" into all drivers 2018-03-10 23:16:24 +00:00
run usb/wlan/*: properly include "opt_wlan.h" into all drivers 2018-03-10 23:16:24 +00:00
runfw sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
saf1761otg sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
smsc sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
template Add a "multifunction" device side USB template, which provides mass 2018-05-17 19:54:11 +00:00
u3g sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
uark sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
uath usb/wlan/*: properly include "opt_wlan.h" into all drivers 2018-03-10 23:16:24 +00:00
ubsa sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
ubser sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
uchcom sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
ucom sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
ucycom sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
udav sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
udbp sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
udl sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
uep uep(4): add evdev support 2018-08-05 11:14:13 +00:00
uether sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
ufm sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
ufoma sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
uftdi sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
ugensa sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
ugold sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
uhci sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
uhid sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
uhid_snes Add new USB HID driver for Super Nintendo gamepads. 2018-05-15 15:36:34 +00:00
uhso sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
uipaq sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
ukbd Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
uled sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
ulpt sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
umass sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
umcs sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
umct sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
umodem sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
umoscom sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
ums sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
upgt usb/wlan/*: properly include "opt_wlan.h" into all drivers 2018-03-10 23:16:24 +00:00
uplcom sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
ural usb/wlan/*: properly include "opt_wlan.h" into all drivers 2018-03-10 23:16:24 +00:00
ure sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
urio sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
urndis sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
urtw usb/wlan/*: properly include "opt_wlan.h" into all drivers 2018-03-10 23:16:24 +00:00
usb Add common support functions for USB devices configured via FDT data. 2019-05-19 16:56:59 +00:00
usfs sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
usie sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
uslcom sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
uss820dci sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
uvisor sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
uvscom sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
wmt Add support for generic MS Windows 7/8/10-compatible USB HID touchscreens 2017-08-19 17:00:10 +00:00
wsp sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
xhci sys/modules: normalize .CURDIR-relative paths to SRCTOP 2017-03-04 10:10:17 +00:00
zyd usb/wlan/*: properly include "opt_wlan.h" into all drivers 2018-03-10 23:16:24 +00:00
Makefile Remove Atmel AT91RM9200 and AT91SAM9 support. 2018-07-27 18:28:22 +00:00