]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: macb: split USRIO_HAS_CLKEN capability in two
authorConor Dooley <conor.dooley@microchip.com>
Wed, 25 Mar 2026 16:28:07 +0000 (16:28 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sun, 29 Mar 2026 21:34:27 +0000 (14:34 -0700)
commit039f185a00602fe4e760216ffb50dda6d1ed863a
treebdb206c7fa93f8a0b6b4a109d17699f09d31b543
parenta17871778ee28e4df054521e966e9f37c61f541b
net: macb: split USRIO_HAS_CLKEN capability in two

While trying to rework the internal/external refclk selection on
sama7g5, Ryan and I noticed that the sama7g5 was "overloading" the
meaning of MACB_CAPS_USRIO_HAS_CLKEN, using it differently to how it was
originally intended.
Originally, on the macb hardware on sam9620 et al,
MACB_CAPS_USRIO_HAS_CLKEN represented the hardware having a bit that
needed to be set to turn on the input clock to the transceivers. The
sama7g5 doesn't have this bit, so for some reason the decision was made
to reuse this capability flag to control selection of internal/external
references.

Split the caps in two, so that capabilities do what they say on the tin,
and allow reworking the refclk selection handling without impacting the
older devices that use MACB_CAPS_USRIO_CLKEN for its original purpose.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20260325-gradient-grading-b23b9e6ef9ff@spud
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/cadence/macb.h
drivers/net/ethernet/cadence/macb_main.c