| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
We've removed kernel option EXT_RESOURCES almost two years ago.
While it was ok to have some code under a common 'extres' subdirectory
at first, we now have a lot of consumer of it and we made it mandatory
so no need to have it under a cryptic name.
Reviewed by: mhorne
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D43196
|
| |
|
|
|
|
|
|
|
|
|
| |
We've removed kernel option EXT_RESOURCES almost two years ago.
While it was ok to have some code under a common 'extres' subdirectory
at first, we now have a lot of consumer of it and we made it mandatory
so no need to have it under a cryptic name.
Reviewed by: emaste, imp
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D43195
|
| |
|
|
|
|
|
|
|
|
|
| |
We've removed kernel option EXT_RESOURCES almost two years ago.
While it was ok to have some code under a common 'extres' subdirectory
at first, we now have a lot of consumer of it and we made it mandatory
so no need to have it under a cryptic name.
Reviewed by: emaste, imp
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D43194
|
| |
|
|
|
|
|
|
|
|
|
| |
We've removed kernel option EXT_RESOURCES almost two years ago.
While it was ok to have some code under a common 'extres' subdirectory
at first, we now have a lot of consumer of it and we made it mandatory
so no need to have it under a cryptic name.
Reviewed by: dab, imp
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D43193
|
| |
|
|
|
|
|
|
|
|
|
| |
We've removed kernel option EXT_RESOURCES almost two years ago.
While it was ok to have some code under a common 'extres' subdirectory
at first, we now have a lot of consumer of it and we made it mandatory
so no need to have it under a cryptic name.
Reviewed by: imp
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D43192
|
| |
|
|
|
|
|
|
|
|
|
| |
We've removed kernel option EXT_RESOURCES almost two years ago.
While it was ok to have some code under a common 'extres' subdirectory
at first, we now have a lot of consumer of it and we made it mandatory
so no need to have it under a cryptic name.
Reviewed by: mhorne
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D43191
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current dts for Raspberry 3B+ and 4B have 2 disabled fixed-clock
nodes which have no clock-frequency value. Such nodes are non-standard.
This results in about 150 messages during autoconfiguration:
clk_fixed2: <Fixed clock> disabled on ofwbus0
clk_fixed2: Cannot FDT parameters.
device_attach: clk_fixed2 attach returned 6
Defensively check for clock-frequency in the probe routine, and if
none, return an error with a more direct error message (1 line per
occurrence, 50 lines total):
clk_fixed2: clock-fixed has no clock-frequency
Based on a patch by manu.
MFC after: 1 week
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D41594
|
| |
|
|
| |
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
| |
|
|
| |
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| |
|
|
| |
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
Modern multi-protocol phys are capable of supporting multiple different
protocols. Add a method for mode (and/or its variants) setting.
Discused with: ganbold, manu, andrew
MFC after: 3 weeks
|
| |
|
|
|
|
|
|
|
|
| |
In some drivers we need to assert and deassert a group of hardware
resets in any order. To support this add a new hwreset_array that
manages all hwresets defined for a device.
Reviewed by: bz, manu, mmel
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37357
|
| |
|
|
| |
This reverts commit 6692670f58f9069e59bc0c958fdaefb9bea5f726.
|
| |
|
|
| |
It is needed for the RK356X combo phy.
|
| |
|
|
|
|
| |
We don't need to include regdev_if.h when not building for FDT.
Sponsored by: Innovate UK
|
| |
|
|
|
|
|
| |
Include sys/bus.h directly rather than depend on header pollution.
While here fix the order of sys/systm.h.
Sponsored by: Innovate UK
|
| |
|
|
|
|
|
| |
We only need to include phydev_if.h in phy.c when FDT is enabled and
don't need it at all in phy_usb.c.
Sponsored by: Innovate UK
|
| |
|
|
|
|
| |
Rather than depending on header pollution include systm.h directly.
Sponsored by: Innovate UK
|
| |
|
|
|
|
|
| |
Include opt_platform.h to get the FDT definition and only include FDT
headers when FDT is defined.
Sponsored by: Innovate UK
|
| |
|
|
|
|
|
| |
There is no OFW/FDT specific code in this file so the ofw headers can
be removed.
Sponsored by: Innovate UK
|
| |
|
|
|
|
| |
This allows drivers that use this to build in an ACPI only kernel.
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
| |
We need to include opt_platform.h as it's where FDT will be defined.
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
| |
They are only ever built when FDT is enabled so there is no need to
check for it in the files.
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
|
|
| |
The regnode interface is currently only built for FDT, thus not
applicable to ACPI-only kernels. Move the "regnode_if.h" include
underneath a previously existing FDT cpp segment.
Reviewed by: andrew, imp, manu
Differential Revision: https://reviews.freebsd.org/D36790
|
| |
|
|
|
|
|
|
|
| |
syscon currently includes sys/malloc.h via header pollution from
dev/ofw/ofw_bus.h -> dev/ofw/openfirm.h. Fix the build without FDT
defined by including sys/malloc.h directly.
Reviewed by: andrew, imp, manu
Differential Revision: https://reviews.freebsd.org/D36787
|
| | |
|
| |
|
|
| |
This brings it in line with what the clk_*_freq routines are named.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The existing call can only really be used for a node wishing to
configure its parent, but as we don't pass in a pointer to the freq,
we can't set it to what it would be for a DRY_RUN pass.
So for clock nodes that wish to try setting parent frequencies to see
which would be the best for its own target frequency, we really do need
a way to call in and pass in a flag /and/ a pointer to freq so it can be
updated for us as the clock tree is recursed through.
Reviewers: manu
Approved by: manu
Subscribers: imp
Differential Revision: https://reviews.freebsd.org/D33445
|
| |
|
|
|
|
|
| |
- add method to read gate enable/disable staust from HW
- show gate status in sysctl clock dump
MFC after: 1 week
|
| |
|
|
|
|
|
|
| |
Always recalculate the frequency, the cache is lazily initialized so it is not always up to date.
While I'm in mark sysctl as MPSAFE.
Discussed with: manu, adrian
MFC after: 1 week
|
| |
|
|
|
|
|
| |
- s/alocated/allocated/
- s/realocated/reallocated/
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
| |
If a regulator hasn't been enable by a driver but is enabled in hardware
(most likely enabled by U-Boot), regulator_status will returns that it
is enabled and so any call to regulator_disable will panic as it wasn't
enabled by one of our drivers.
Sponsored by: Diablotin Systems
Differential Revision: https://reviews.freebsd.org/D30293
|
| |
|
|
|
|
|
| |
The divider table already contains the correct HW divider value, it should
not be modified by other flags such as 'CLK_DIV_ZERO_BASED'.
MFC after: 4 weeks
|
| |
|
|
|
|
|
|
| |
This allow to get a syscon node defined under a specific fdt node (which isn't
always the device one).
Notes:
svn path=/head/; revision=367767
|
| |
|
|
|
|
|
|
|
|
| |
Just fix indentation of an if() clause.
No functional changes intended.
MFC after: 3 days
Notes:
svn path=/head/; revision=366799
|
| |
|
|
|
|
|
|
|
|
|
| |
Mutex should be owned in affected functions.
Reborted by: emaste
MFC after: 4 weeks
MFC with: r366161
Notes:
svn path=/head/; revision=366312
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases, the syscon driver may be used by consumer requiring better
control about locking (ie. it may be used as registe file provider for clock
driver which needs locked access to multiple registers).
Add fine locking protocol methods together with bunch of helper functions
in syscon driver and implement this functionality in syscon_generic driver.
MFC after: 4 weeks
Notes:
svn path=/head/; revision=366161
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Syscon can also have child nodes that share a registration file with it.
To do this correctly, follow these steps:
- subclass syscon from simplebus and expose it if the node is also
"simple-bus" compatible.
- block simplebus probe for this compatible string, so it's priority
(bus pass) doesn't colide with syscon driver.
While I'm in, also block "syscon", "simple-mfd" for the same reason.
MFC after: 4 weeks
Notes:
svn path=/head/; revision=366156
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
abs() takes a (signed) int as input.
Instead, it was used with unsigned 64-bit integers.
So, add and use a new helper function to calculate a difference between
two uint64_t-s.
Reviewed by: manu
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D26307
Notes:
svn path=/head/; revision=365395
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This device driver supports both syscon-power and syscon-reset devices,
as specified in [1] and [2]. These provide a very simple interface for
power and reset control, and among other things are used by QEMU's virt
machine on RISC-V. A separate commit will enable this on RISC-V, as that
requires adding a RISC-V-specific riscv_syscon akin to r327936's
aw_syscon.
[1] https://www.kernel.org/doc/Documentation/devicetree/bindings/power/reset/syscon-poweroff.txt
[2] https://www.kernel.org/doc/Documentation/devicetree/bindings/power/reset/syscon-reboot.txt
Reviewed by: brooks (mentor), jhb (mentor)
Approved by: brooks (mentor), jhb (mentor)
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D25724
Notes:
svn path=/head/; revision=363573
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
As Emanuel poited me the Linux processes these clock assignments in forward
order, not in reversed. I misread the original code.
Tha problem with wrong order for assigned clocks found in tegra (and some imx)
DT should be reanalyzed and solved by different way.
MFC with: r363123
Reported by; manu
Notes:
svn path=/head/; revision=363510
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Linux processes these clocks in reverse order and some DT relies
on this fact. For example, the frequency setting for a given PLL
is the last in the list, preceded by the frequency setting of its
following divider or so...
MFC after: 1 week
Notes:
svn path=/head/; revision=363123
|
| |
|
|
|
|
|
| |
MFC after: 1 week
Notes:
svn path=/head/; revision=363122
|
| |
|
|
|
|
|
|
|
|
|
| |
On some boards there is a lot of of syscon node that are unused as
more specific drivers is probed before, no need to flood the console
for the mostly-unused generic ones.
MFC after: 1 week
Notes:
svn path=/head/; revision=363015
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked).
Use it in preparation for a general review of all nodes.
This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.
Mark all obvious cases as MPSAFE. All entries that haven't been marked
as MPSAFE before are by default marked as NEEDGIANT
Approved by: kib (mentor, blanket)
Commented by: kib, gallatin, melifaro
Differential Revision: https://reviews.freebsd.org/D23718
Notes:
svn path=/head/; revision=358333
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Some consumer cannot know the voltage of the regulator without it.
While here, refuse to attach is min_voltage != max_voltage, it
shouldn't happens anyway.
Reviewed by: mmel
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D23003
Notes:
svn path=/head/; revision=356803
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Highlights:
- Exit early if we're not disabling unused regulators; there's no need to
take the regulator topology lock and re-evaluate this every iteration, as
it's not going to change.
- Don't emit a notice that we're shutting down a regulator if it's not
enabled, to reduce noise.
- Mention the outcome of the shutdown, to aide debugging and easily let
developer/user collect list of regulators we actually shutdown to
determine problematic one.
Reviewed by: manu
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D22213
Notes:
svn path=/head/; revision=356649
|
| |
|
|
|
|
|
|
|
|
|
| |
This method is supposed to write the voltage into uvolt
and return an errno compatible value.
Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D23006
Notes:
svn path=/head/; revision=356487
|