powerpc: Split CPU flags into separate file and include in ELF header
This change fixes Bug 239621, where FreeBSD on powerpc deviates from
userspace expectations on other architectures (arm) and operating
systems (Linux)
Approved by: jhibbits (mentor)
MFC after: 1 week
arm64: Add MediaTek SoC support skeleton
Add the SOC_MEDIATEK and SOC_MEDIATEK_MT7986 options, list them in
NOTES, add std.mediatek, include it in GENERIC and in a MEDIATEK kernel
configuration, and add a DTB module that builds the Banana Pi BPI-R3
(MT7986A) DTB.
Reviewed by: mmel
Approved by: markj (mentor)
Sponsored by: Alchemilla Ventures Private Limited
Differential Revision: https://reviews.freebsd.org/D61186
clk/mediatek: Add common MediaTek clock and reset support
MediaTek SoCs split their clock tree over several controllers built from
the same blocks. Add a base driver that maps a controller's registers
and registers its table of clocks, and the node types the tables use:
- PLL with the MT7986 register layout: the rate is set by the
frequency control word and the post divider. A new control word is
only taken over when the PLL is enabled, so a running PLL is stopped
while its rate is changed, and a PLL that cannot stop keeps its rate.
Without a lock bit, a PLL that was never programmed cannot be told
from a stopped one, so the node has no gate: firmware starts the
PLLs, and a PLL that is off reports 0 Hz and cannot be set.
- Mux with an optional gate bit and an optional update latch, changed
by read-modify-write or, where the mux register is read-only,
through set/clear registers.
- Gate, changed in the same two ways.
Clocks of other controllers are linked clocks, so the registration order
[15 lines not shown]