the bitrig master branch has been updated by patrick with 2 new commits: commit df7b32eca2c6248d32a540d619f57389295bdc75 diff: https://github.com/bitrig/bitrig/commit/df7b32e author: Patrick Wildt <[email protected]> date: Fri Apr 24 15:00:00 2015 +0200
Implement a way to attach and get clocks from FDT. Currently we manually register clocks, but most of the newer SoCs describe the clocks and all dependencies in the device tree, which makes it much easier to setup on a new SoC. This commit establishes the following: * Device attachment depends on clocks, to make sure all clocks needed by the device are attached before the device itself is attached. For that we recurse the tree and attach all clock controllers first. * Have clock controllers register as clock provider. This enables us to find clocks based on a devices' device table information. We look up the clock's node, look for the provider in the list and call it's get function and expect to get the clock back. * Extract fixed factor and rate clocks to drivers so they can be attached as a provider like all other providers. M sys/arch/arm/clock/clock.c M sys/arch/arm/clock/clock_fixed_rate.c M sys/arch/arm/fdt/fdtbus.c M sys/arch/arm/include/clock.h M sys/arch/armv7/conf/generic A sys/arch/armv7/fdt/clkff.c A sys/arch/armv7/fdt/clkfr.c M sys/arch/armv7/fdt/files.fdt commit f7e298083dc1390746159a6a65a4717b920631ef diff: https://github.com/bitrig/bitrig/commit/f7e2980 author: Patrick Wildt <[email protected]> date: Fri Apr 24 15:10:00 2015 +0200 Use clock struct directly, don't lookup via a name Clock names are not completely reliable. They have been fine for the past, but there's no gurantee this always works. Thus, directly supply the parent as clock struct to ensure it is the correct parent. M sys/arch/arm/clock/clock_fixed_factor.c M sys/arch/arm/include/clock.h M sys/arch/armv7/imx/imxccm.c
