FreeBSD/src e37e867sys/arm/allwinner/clkng ccu_a31.c ccu_a64.c, sys/dev/clk/allwinner ccu_a31.c ccu_a64.c

clk: Move allwinner driver into the common directory

No need to keep it under sys/arm/allwinner/clkng
It's easier to find which controller we support by looking under one directory.
It will also be shared with Allwinner RiscV SoC.

Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision:  https://reviews.freebsd.org/D43188
DeltaFile
+973-0sys/dev/clk/allwinner/ccu_a31.c
+0-973sys/arm/allwinner/clkng/ccu_a31.c
+836-0sys/dev/clk/allwinner/ccu_a64.c
+0-836sys/arm/allwinner/clkng/ccu_a64.c
+0-787sys/arm/allwinner/clkng/ccu_h3.c
+787-0sys/dev/clk/allwinner/ccu_h3.c
+2,596-2,59662 files not shown
+9,895-9,89568 files

FreeBSD/src fdafd31sys/dev/malo if_malo.c, sys/net80211 ieee80211_tdma.c ieee80211_vht.c

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by:           Netflix
DeltaFile
+0-4sys/net80211/ieee80211_tdma.c
+0-4sys/net80211/ieee80211_vht.c
+0-4sys/net80211/ieee80211_wds.c
+0-4sys/net80211/ieee80211_adhoc.c
+0-4sys/dev/malo/if_malo.c
+0-4sys/net80211/ieee80211_hostap.c
+0-241,811 files not shown
+84-1,8811,817 files

FreeBSD/src 3bc8099sys/arm/arm hypervisor-stub.S locore-v6.S, sys/cam/ctl ctl_scsi_all.h

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/

Similar commit in current:
(cherry picked from commit 685dc743dc3b)
DeltaFile
+0-3sys/cam/ctl/ctl_scsi_all.h
+0-3sys/dev/cfe/cfe_env.c
+0-3sys/riscv/riscv/swtch.S
+0-3sys/arm/arm/hypervisor-stub.S
+0-3sys/arm/arm/locore-v6.S
+0-3sys/arm/arm/swtch-v6.S
+0-184,033 files not shown
+0-7,9144,039 files

FreeBSD/src f8167e0sys/amd64/amd64 cpu_switch.S efirt_support.S, sys/dev/mpr mpr_ioctl.h

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

Similar commit in current:
(cherry picked from commit 95ee2897e98f)
DeltaFile
+0-4sys/dev/mpr/mpr_ioctl.h
+0-4sys/dev/mps/mps_ioctl.h
+0-2sys/amd64/amd64/cpu_switch.S
+0-2sys/amd64/amd64/efirt_support.S
+0-2sys/amd64/amd64/exception.S
+0-2sys/amd64/amd64/locore.S
+0-163,795 files not shown
+0-7,6063,801 files

FreeBSD/src 685dc74sys/arm/arm swtch-v6.S, sys/arm64/qoriq qoriq_dw_pci.c

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
DeltaFile
+0-3sys/dev/bxe/57710_int_offsets.h
+0-3sys/dev/bxe/57711_int_offsets.h
+0-3sys/cam/ctl/ctl_scsi_all.c
+0-3sys/arm64/qoriq/qoriq_dw_pci.c
+0-3sys/dev/ioat/ioat_internal.h
+0-3sys/arm/arm/swtch-v6.S
+0-183,795 files not shown
+0-7,4523,801 files

FreeBSD/src 95ee289sys/amd64/acpica acpi_wakecode.S, sys/amd64/amd64 bpf_jit_machdep.h cpu_switch.S

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
DeltaFile
+0-4sys/dev/mps/mps_ioctl.h
+0-4sys/dev/mpr/mpr_ioctl.h
+0-2sys/compat/linuxkpi/common/include/asm/types.h
+0-2sys/amd64/acpica/acpi_wakecode.S
+0-2sys/amd64/amd64/bpf_jit_machdep.h
+0-2sys/amd64/amd64/cpu_switch.S
+0-163,592 files not shown
+0-7,2003,598 files

FreeBSD/src caa41f6include bitstring.h complex.h, sys/dev/qlxge qls_isr.c

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:         pfg
MFC After:              3 days
Sponsored by:           Netflix

(cherry picked from commit 4d846d260e2b9a3d4d0a701462568268cbfe7a5b)
DeltaFile
+2-2sys/dev/qlxge/qls_isr.c
+2-2sys/xen/xenbus/xenbusb.h
+1-1include/bitstring.h
+1-1include/complex.h
+1-1include/cpio.h
+1-1include/elf-hints.h
+8-85,432 files not shown
+5,440-5,4405,438 files

FreeBSD/src 4d846d2include elf.h fmtmsg.h, sys/dev/qlxge qls_isr.c

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:         pfg
MFC After:              3 days
Sponsored by:           Netflix
DeltaFile
+2-2sys/dev/qlxge/qls_isr.c
+2-2sys/xen/xenbus/xenbusb.h
+1-1include/elf.h
+1-1include/fmtmsg.h
+1-1include/inttypes.h
+1-1include/iso646.h
+8-85,571 files not shown
+5,579-5,5795,577 files

FreeBSD/src 7e1e2basys/arm/allwinner aw_nmi.c aw_ccu.c, sys/arm/allwinner/clkng ccu_sun8i_r.c ccu_a31.c

arm allwinner: Remove unused devclass arguments to DRIVER_MODULE.
DeltaFile
+4-8sys/arm/allwinner/clkng/ccu_sun8i_r.c
+2-4sys/arm/allwinner/aw_nmi.c
+2-4sys/arm/allwinner/clkng/ccu_a31.c
+2-4sys/arm/allwinner/clkng/ccu_a13.c
+2-4sys/arm/allwinner/clkng/ccu_a10.c
+2-4sys/arm/allwinner/aw_ccu.c
+14-2840 files not shown
+68-15646 files

FreeBSD/src 6545488 (r365068)sys/arm/arm pmap-v4.c, sys/arm/ti/omap4 omap4_prcm_clks.c omap4_reg.h

arm: clean up empty lines in .c and .h files
DeltaFile
+41-51sys/arm/ti/omap4/omap4_prcm_clks.c
+0-46sys/arm/ti/omap4/omap4_reg.h
+0-44sys/arm/arm/pmap-v4.c
+7-31sys/arm/ti/twl/twl_vreg.c
+4-27sys/arm/ti/twl/twl_clks.c
+13-16sys/arm/ti/usb/omap_ehci.c
+65-215237 files not shown
+100-725243 files

FreeBSD/src 7afa997 (r355174)sys/arm/allwinner/clkng aw_clk_mipi.c aw_clk_m.c

MFC r350842, r350844-r350846, r351099, r352848, r352859

r350842:
allwinner: Rework the BUS_PASS on drivers

- Put all clock and control unit driver in BUS_PASS_RESOURCE except
  for the DE2 CCU as it needs the main CCU to be available.
- Use BUS_PASS_CPU for a20_cpu_cfg as it makes more sense.
- For aw_syscon use SCHEDULER pass as we need it early for drivers
  that attach in BUS_PASS_SUPPORTDEV
- For the rest we can use BUS_PASS_SUPPORTDEV

r350844:
allwinner: Add a new clock aw_clk_m

We used the aw_clk_nm clock for clock with only one divider factor
and used a fake multiplier factor. This cannot work properly as we
end up writing the "fake" factor to the register (and so always set
the LSB to 1).

    [43 lines not shown]
DeltaFile
+300-0sys/arm/allwinner/clkng/aw_clk_mipi.c
+290-0sys/arm/allwinner/clkng/aw_clk_m.c
+68-53sys/arm/allwinner/clkng/ccu_a64.c
+77-16sys/arm/allwinner/clkng/aw_clk_frac.c
+66-2sys/arm/allwinner/clkng/aw_clk.h
+53-0sys/arm/allwinner/clkng/aw_clk_mipi.h
+854-7122 files not shown
+962-10128 files

FreeBSD/src d27bec7 (r350846)sys/arm/allwinner/clkng aw_clk_frac.c ccu_a31.c

allwinner: Add support to min/max in aw_clk_frac

The Fractionals clock in Allwinner device have some min/max frequencies
that they can do.
Add support for it.
DeltaFile
+77-16sys/arm/allwinner/clkng/aw_clk_frac.c
+12-7sys/arm/allwinner/clkng/ccu_a31.c
+12-6sys/arm/allwinner/clkng/ccu_a64.c
+8-4sys/arm/allwinner/clkng/ccu_h3.c
+5-1sys/arm/allwinner/clkng/aw_clk.h
+4-2sys/arm/allwinner/clkng/ccu_a10.c
+118-361 files not shown
+121-367 files

FreeBSD/src cfc8861 (r350842)sys/arm/allwinner aw_rsb.c aw_rtc.c, sys/arm/allwinner/clkng ccu_sun8i_r.c ccu_a10.c

allwinner: Rework the BUS_PASS on drivers

- Put all clock and control unit driver in BUS_PASS_RESOURCE except
  for the DE2 CCU as it needs the main CCU to be available.
- Use BUS_PASS_CPU for a20_cpu_cfg as it makes more sense.
- For aw_syscon use SCHEDULER pass as we need it early for drivers
  that attach in BUS_PASS_SUPPORTDEV
- For the rest we can use BUS_PASS_SUPPORTDEV
DeltaFile
+2-2sys/arm/allwinner/clkng/ccu_sun8i_r.c
+2-2sys/arm/allwinner/aw_rsb.c
+1-1sys/arm/allwinner/aw_rtc.c
+1-1sys/arm/allwinner/aw_sid.c
+1-1sys/arm/allwinner/aw_syscon.c
+1-1sys/arm/allwinner/clkng/ccu_a10.c
+8-811 files not shown
+19-1917 files

FreeBSD/src 8c86cbf (r350629)sys/arm/allwinner/clkng aw_clk_frac.c aw_clk.h

MFC r348179-r348182

r348179:
allwinner: aw_ccu: Add some debug printfs (disabled by default)

Also print information about setting frequency at boot under bootverbose

r348180:
arm: allwinner: clk: Add new clock aw_clk_frac

Add a clock driver for clock that can either be used in integer mode
with one N factor and one M divider or in fractional mode where the
output frequency is chosen between two predifined output.

r348181:
arm: allwinner: clk: Use the new frac clock

Some clocks used the NM type but this clock is for the ones with the
formula "clk = clkin / n / m" and not "clk = clkin * n / m"

    [6 lines not shown]
DeltaFile
+338-0sys/arm/allwinner/clkng/aw_clk_frac.c
+32-33sys/arm/allwinner/clkng/aw_clk.h
+17-47sys/arm/allwinner/clkng/aw_clk_nm.c
+52-0sys/arm/allwinner/clkng/aw_clk_frac.h
+15-13sys/arm/allwinner/clkng/ccu_a64.c
+12-12sys/arm/allwinner/clkng/ccu_a31.c
+466-1057 files not shown
+501-11813 files

FreeBSD/src 99f30bb (r350597)sys/gnu/dts/arm dra7-l4.dtsi am437x-l4.dtsi

MFC r346092, r346271-r346272

r346092:
Import DTS files from Linux 5.0

r346271:
aw_rtc: Register the clocks

Since latest DTS update the rtc is supposed to register two clocks :

- osc32k (the 32k oscillator on the board that the RTC uses directly and
that other peripheral can use)
- iosc (the internal oscillator of the RTC when available which frequency
depend on the SoC revision)

Since we need the RTC before the proper clock control unit (because it uses
those clocks) attach it a BUS_PASS_BUS + MIDDLE and attach the clock control
unit at BUS_PASS_BUS + LAST for the SoC that requires it.


    [10 lines not shown]
DeltaFile
+4,600-0sys/gnu/dts/arm/dra7-l4.dtsi
+2,505-0sys/gnu/dts/arm/am437x-l4.dtsi
+2,460-0sys/gnu/dts/arm/omap5-l4.dtsi
+2,132-0sys/gnu/dts/arm/am33xx-l4.dtsi
+1,741-0sys/gnu/dts/arm/r8a7744.dtsi
+16-1,418sys/gnu/dts/arm/dra7.dtsi
+13,454-1,418741 files not shown
+43,870-11,971747 files

FreeBSD/src 0269ae4 (r348744)contrib/libarchive/libarchive archive_read_support_format_rar5.c, sys/dev/de if_de.c

MFHead @348740

Sponsored by:   The FreeBSD Foundation
DeltaFile
+2,899-2,366contrib/libarchive/libarchive/archive_read_support_format_rar5.c
+0-5,009sys/dev/de/if_de.c
+0-4,300sys/dev/txp/3c990img.h
+0-3,021sys/dev/txp/if_txp.c
+0-2,740sys/dev/sf/if_sf.c
+0-2,281sys/dev/tl/if_tl.c
+2,899-19,7171,899 files not shown
+32,154-76,8541,905 files

FreeBSD/src 747ef14 (r348181)sys/arm/allwinner/clkng ccu_a64.c ccu_a31.c

arm: allwinner: clk: Use the new frac clock

Some clocks used the NM type but this clock is for the ones with the
formula "clk = clkin / n / m" and not "clk = clkin * n / m"
Use the new frac clock for them.
DeltaFile
+15-13sys/arm/allwinner/clkng/ccu_a64.c
+12-12sys/arm/allwinner/clkng/ccu_a31.c
+8-8sys/arm/allwinner/clkng/ccu_h3.c
+4-4sys/arm/allwinner/clkng/ccu_a10.c
+39-374 files

FreeBSD/src 7648bc9 (r347539)contrib/sqlite3 sqlite3.c, contrib/zlib deflate.c

MFHead @347527

Sponsored by:   The FreeBSD Foundation
DeltaFile
+8,353-6,010contrib/sqlite3/sqlite3.c
+4,601-0sys/gnu/dts/arm/dra7-l4.dtsi
+2,506-0sys/gnu/dts/arm/am437x-l4.dtsi
+2,460-0sys/gnu/dts/arm/omap5-l4.dtsi
+2,163-0sys/contrib/zlib/deflate.c
+0-2,163contrib/zlib/deflate.c
+20,083-8,1732,837 files not shown
+170,261-83,0882,843 files

FreeBSD/src 5f50cbd (r346271)sys/arm/allwinner aw_rtc.c, sys/arm/allwinner/clkng ccu_a31.c ccu_a83t.c

aw_rtc: Register the clocks

Since latest DTS update the rtc is supposed to register two clocks :

- osc32k (the 32k oscillator on the board that the RTC uses directly and
that other peripheral can use)
- iosc (the internal oscillator of the RTC when available which frequency
depend on the SoC revision)

Since we need the RTC before the proper clock control unit (because it uses
those clocks) attach it a BUS_PASS_BUS + MIDDLE and attach the clock control
unit at BUS_PASS_BUS + LAST for the SoC that requires it.

Tested On:           A20, H3, A64

MFC after:      1 month
DeltaFile
+101-35sys/arm/allwinner/aw_rtc.c
+1-1sys/arm/allwinner/clkng/ccu_a31.c
+1-1sys/arm/allwinner/clkng/ccu_a83t.c
+1-1sys/arm/allwinner/clkng/ccu_h3.c
+1-1sys/arm/allwinner/clkng/ccu_a64.c
+105-395 files

FreeBSD/src cfba8de (r335190)sys/arm/allwinner/clkng ccu_a31.c ccu_h3.c

allwinner: ccung: Fully subclass the clock drivers

Each clock drivers if now fully subclassed, this have the advantage that
we can control the probe order.
Some clocks can have parents from other drivers, for example clocks in the
sun8i_r driver uses clocks from the main clock driver.
This worked before because the sun8i_r node is after the main ccu node in the
dtb and driver are probed in DTB order. This cannot work with the Display
Engine clocks as it is the first node in the DTB.

Tested on:    A83T, H5 A64
Tested on:    A20 (kevans)
DeltaFile
+113-108sys/arm/allwinner/clkng/ccu_a31.c
+111-86sys/arm/allwinner/clkng/ccu_h3.c
+97-93sys/arm/allwinner/clkng/ccu_a83t.c
+100-89sys/arm/allwinner/clkng/ccu_a64.c
+32-135sys/arm/allwinner/clkng/aw_ccung.c
+88-76sys/arm/allwinner/clkng/ccu_a10.c
+541-58710 files not shown
+764-95616 files

FreeBSD/src c2c014f (r325505)share/colldef zh_CN.GB18030.src zh_CN.UTF-8.src, sys/contrib/dev/iwm iwm-8265-22.fw.uu

Merge ^/head r323559 through r325504.
DeltaFile
+39,091-38,998share/colldef/zh_CN.GB18030.src
+35,281-35,290share/colldef/zh_CN.UTF-8.src
+29,823-29,813share/colldef/zh_CN.GBK.src
+40,270-0sys/contrib/dev/iwm/iwm-8265-22.fw.uu
+13,278-13,184share/colldef/zh_TW.Big5.src
+12,829-12,835share/colldef/zh_CN.GB2312.src
+170,572-130,1204,633 files not shown
+407,579-285,9794,639 files

FreeBSD/src 5089698 (r324483)sys/contrib/dev/iwm iwm-8265-22.fw.uu, sys/dev/cxgbe/firmware t6fw-1.16.63.0.bin.uu t6fw-1.16.59.0.bin.uu

MFhead at r324482
DeltaFile
+40,270-0sys/contrib/dev/iwm/iwm-8265-22.fw.uu
+12,037-0sys/dev/cxgbe/firmware/t6fw-1.16.63.0.bin.uu
+0-11,974sys/dev/cxgbe/firmware/t6fw-1.16.59.0.bin.uu
+11,265-0sys/dev/cxgbe/firmware/t5fw-1.16.63.0.bin.uu
+0-11,247sys/dev/cxgbe/firmware/t5fw-1.16.59.0.bin.uu
+9,567-0sys/dev/cxgbe/firmware/t4fw-1.16.63.0.bin.uu
+73,139-23,221522 files not shown
+102,525-45,794528 files

FreeBSD/src d8ffc6f (r324211)sys/arm/allwinner/clkng ccu_a31.c ccu_a31.h

Allwinner A31 ccu: Use clock/reset IDs from dt-bindings

Do not redefines resets and clocks ID which are already in the
dt-bindings include directory. Those files are under dual licenced
under GPL2/MIT so use them directly.
DeltaFile
+231-196sys/arm/allwinner/clkng/ccu_a31.c
+0-216sys/arm/allwinner/clkng/ccu_a31.h
+231-4122 files

FreeBSD/src be64968 (r314421)sys/arm/allwinner/clkng ccu_a31.c ccu_h3.c, sys/compat/svr4 svr4_stream.c svr4_misc.c

Merge ^/head r314270 through r314419.
DeltaFile
+0-2,043sys/compat/svr4/svr4_stream.c
+0-1,680sys/compat/svr4/svr4_misc.c
+936-0sys/arm/allwinner/clkng/ccu_a31.c
+0-732sys/compat/svr4/svr4_fcntl.c
+720-0sys/arm/allwinner/clkng/ccu_h3.c
+0-705sys/compat/svr4/svr4_stat.c
+1,656-5,160273 files not shown
+7,137-16,706279 files

FreeBSD/src fd8516c (r314394)sys/arm/allwinner/a31 files.a31, sys/arm/allwinner/clkng ccu_a31.c ccu_a31.h

allwinner: A31: Add ccung driver

This adds clocks support for the aw_ccung on the A31 SoC.
Newer DTS files require this.
All the clocks except two CSI are defined and exported on the clock domain.
DeltaFile
+936-0sys/arm/allwinner/clkng/ccu_a31.c
+250-0sys/arm/allwinner/clkng/ccu_a31.h
+16-0sys/arm/allwinner/clkng/aw_ccung.c
+1-0sys/arm/allwinner/a31/files.a31
+1,203-04 files