summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/mv88e6xxx/serdes.h
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2017-05-26 01:03:21 +0200
committerDavid S. Miller <davem@davemloft.net>2017-05-26 15:00:44 -0400
commit6d91782f0f140ae515732a9543a0ae3f9f3140ce (patch)
treeb0f95b100aeed03f3388ebc7f75a49882598ada6 /drivers/net/dsa/mv88e6xxx/serdes.h
parent10fa5bfcd69730765b496c7d91c5df0da7019489 (diff)
net: dsa: mv88e6xxx: Refactor mv88e6352 SERDES code into an op
The mv88e6390 family has a different SERDES implementation. Refactor the mv88e6352 code into an ops function, so we can later add the mv88e6390 code. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/serdes.h')
-rw-r--r--drivers/net/dsa/mv88e6xxx/serdes.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/serdes.h b/drivers/net/dsa/mv88e6xxx/serdes.h
new file mode 100644
index 000000000000..a690be09ac52
--- /dev/null
+++ b/drivers/net/dsa/mv88e6xxx/serdes.h
@@ -0,0 +1,24 @@
+/*
+ * Marvell 88E6xxx SERDES manipulation, via SMI bus
+ *
+ * Copyright (c) 2008 Marvell Semiconductor
+ *
+ * Copyright (c) 2016 Andrew Lunn <andrew@lunn.ch>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#ifndef _MV88E6XXX_SERDES_H
+#define _MV88E6XXX_SERDES_H
+
+#include "mv88e6xxx.h"
+
+#define MV88E6352_ADDR_SERDES 0x0f
+#define MV88E6352_SERDES_PAGE_FIBER 0x01
+
+int mv88e6352_serdes_power(struct mv88e6xxx_chip *chip, int port, bool on);
+
+#endif