freebsd-dev/sys/conf
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
..
config.mk Remove IEEE80211_AMPDU_AGE config option. 2019-01-20 15:17:56 +00:00
dtb.build.mk fdt: Fix installation of aarch64 dtb 2019-05-02 16:56:03 +00:00
dtb.mk Allow kernel config to specify DTS/DTSO to build, and out-of-tree support 2019-03-26 02:45:23 +00:00
files Add common support functions for USB devices configured via FDT data. 2019-05-19 16:56:59 +00:00
files.amd64 Move scterm_teken.c from 6 MD files lists to the MI files list so that it 2019-02-21 17:31:33 +00:00
files.arm arm: Order files.arm to have cloudabi and annapurna sections 2019-04-16 20:06:39 +00:00
files.arm64 Implement the ffs and fls functions, and their longer counterparts, in 2019-05-17 15:52:17 +00:00
files.i386 FCP-101: Remove ep(4). 2019-05-17 15:23:10 +00:00
files.mips Move scterm_teken.c from 6 MD files lists to the MI files list so that it 2019-02-21 17:31:33 +00:00
files.powerpc FCP-101: Remove bm(4). 2019-05-17 15:20:51 +00:00
files.riscv Connect Xilinx AXI drivers and Cadence Ethernet MAC to the RISC-V build. 2019-05-08 16:06:54 +00:00
files.sparc64 Move scterm_teken.c from 6 MD files lists to the MI files list so that it 2019-02-21 17:31:33 +00:00
kern.mk kernel build: Disable unhelpful GCC warning (tripped after r346352) 2019-04-19 20:08:45 +00:00
kern.opts.mk Remove drm2 modules. 2019-02-19 19:36:56 +00:00
kern.post.mk Fix build race with machine links and genoffset.o. 2019-05-10 18:09:27 +00:00
kern.pre.mk Specify -z notext when building with -z ifunc-noplt. 2019-05-14 18:26:39 +00:00
kmod_syms_prefix.awk Add the infrastructure to support loading multiple versions of TCP 2017-06-08 20:41:28 +00:00
kmod_syms.awk
kmod.mk Remove redundant -Wl uses from the kernel's LDFLAGS. 2019-05-14 18:10:32 +00:00
ldscript.amd64 Add comment to explain kernel ldscript 0x200000 constant 2018-11-09 20:33:38 +00:00
ldscript.arm
ldscript.arm64
ldscript.i386 Fix placement of __bss_start in i386 kernel linker script 2018-10-11 20:44:25 +00:00
ldscript.mips
ldscript.mips.cfe
ldscript.mips.mips64
ldscript.mips.octeon1
ldscript.powerpc
ldscript.powerpc64 powerpc64: Fix kernel ldscript to only emit one PT_LOAD segment 2019-03-29 03:01:21 +00:00
ldscript.powerpcspe
ldscript.riscv Avoid orphan sections between __bss_start and .(s)bss. 2019-02-18 13:14:53 +00:00
ldscript.sparc64
Makefile.amd64 Retire CLANG_NO_IAS34 2018-11-01 23:11:47 +00:00
Makefile.arm Only build the cache handling code we need when building the arm ELF 2018-07-28 12:50:09 +00:00
Makefile.arm64 Revert r336353 completely based on protest; compatibility shims incoming 2018-07-17 14:11:30 +00:00
Makefile.i386 Retire CLANG_NO_IAS34 2018-11-01 23:11:47 +00:00
Makefile.mips Revert r336353 completely based on protest; compatibility shims incoming 2018-07-17 14:11:30 +00:00
Makefile.powerpc Revert r336353 completely based on protest; compatibility shims incoming 2018-07-17 14:11:30 +00:00
Makefile.riscv Revert r336353 completely based on protest; compatibility shims incoming 2018-07-17 14:11:30 +00:00
Makefile.sparc64 Revert r336353 completely based on protest; compatibility shims incoming 2018-07-17 14:11:30 +00:00
makeLINT.mk Remove the mlx5 driver from LINT kernel config for 32-bit PPC 2018-05-30 02:26:36 +00:00
makeLINT.sed
newvers.sh Style only change: Prefer $() to `` 2019-04-08 18:25:14 +00:00
NOTES FCP-101: Remove xe(4) 2019-05-17 15:24:44 +00:00
options Add a COMPAT_FREEBSD12 kernel option. 2019-05-02 18:10:23 +00:00
options.amd64 Remove iBCS2, part2: general kernel 2018-12-19 21:57:58 +00:00
options.arm Remove now the cow unused CPU_ARM9 and CPU_FA526 options. These are for 2018-07-28 11:00:45 +00:00
options.arm64 arm64: Add new SoC type MARVELL_8K 2018-12-12 21:58:30 +00:00
options.i386 i386: Merge PAE and non-PAE pmaps into same kernel. 2019-01-30 02:07:13 +00:00
options.mips Add SMP support for BERI CPU. 2018-04-12 17:43:19 +00:00
options.powerpc Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
options.riscv o Add driver for PLIC (Platform-Level Interrupt Controller) device. 2018-06-12 17:45:15 +00:00
options.sparc64
systags.sh sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
WITHOUT_SOURCELESS
WITHOUT_SOURCELESS_HOST
WITHOUT_SOURCELESS_UCODE Remove adv(4) and adw(4) 2018-10-22 02:34:47 +00:00