Date: Wed, 05 Jun 2019 15:49:30 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-arm@FreeBSD.org Subject: [Bug 227974] libfdt reverses order of child devices in overlays Message-ID: <bug-227974-7-58HVgTj2qy@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-227974-7@https.bugs.freebsd.org/bugzilla/> References: <bug-227974-7@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227974 Ian Lepore <ian@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |Not A Bug CC| |ian@FreeBSD.org Status|New |Closed --- Comment #1 from Ian Lepore <ian@FreeBSD.org> --- The names of FDT device nodes do not necessarily have any relationship to t= he names of devices instantiated by freebsd. By FDT convention, a device node name is formed as devicetype@regaddr; it's just a coincidence in the case of spi that the register addresses are single-digit integers that seem to vagu= ely correspond with freebsd device names. (And it should be noted that the nam= es in the example shown do not follow the FDT rules and would generate a warni= ng with the modern gnu dtc compiler because they should be spigen@0 not spigen= 0). The root problem is that a user of spi devices needs some way to identify w= hich /dev/spigenX device corresponds to which device described in the FDT data. = We ultimately solved that problem by naming spigen devices in devfs after their bus and chip select number, instead of just using sequential 0-n numbers. = So instead of spigen0 and spigen1, the example overlay would now create /dev/spigen0.0 and /dev/spigen0.1 (assume they were on spi bus zero), and s= ince it's based on the chip select number it comes out the same name matter what order the nodes appear in. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-227974-7-58HVgTj2qy>