mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] net: phy: Add PHY_ID_MATCH_* macros
@ 2019-03-11 13:21 Sascha Hauer
  2019-03-11 13:21 ` [PATCH 2/3] net: phy: Add register access helper functions for phys Sascha Hauer
  2019-03-11 13:21 ` [PATCH 3/3] realtek phy driver Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Sascha Hauer @ 2019-03-11 13:21 UTC (permalink / raw)
  To: Barebox List

Linux has some macros to describe matching phy ids to vendors and
models. Add them to barebox for upcoming realtek phy driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 include/linux/phy.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/phy.h b/include/linux/phy.h
index 82c8da03ce..ce72861bfc 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -274,6 +274,10 @@ struct phy_driver {
 #define PHY_ANY_ID "MATCH ANY PHY"
 #define PHY_ANY_UID 0xffffffff
 
+#define PHY_ID_MATCH_EXACT(id) .phy_id = (id), .phy_id_mask = GENMASK(31, 0)
+#define PHY_ID_MATCH_MODEL(id) .phy_id = (id), .phy_id_mask = GENMASK(31, 4)
+#define PHY_ID_MATCH_VENDOR(id) .phy_id = (id), .phy_id_mask = GENMASK(31, 10)
+
 /* A Structure for boards to register fixups with the PHY Lib */
 struct phy_fixup {
 	struct list_head list;
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-11 13:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-11 13:21 [PATCH 1/3] net: phy: Add PHY_ID_MATCH_* macros Sascha Hauer
2019-03-11 13:21 ` [PATCH 2/3] net: phy: Add register access helper functions for phys Sascha Hauer
2019-03-11 13:21 ` [PATCH 3/3] realtek phy driver Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox