netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: davem@davemloft.net, linux@roeck-us.net
Cc: netdev@vger.kernel.org
Subject: [PATCH 02/12] net: dsa: mv88e6xxx: Move switch product IDs into common include file
Date: Thu,  2 Apr 2015 03:21:49 +0200	[thread overview]
Message-ID: <1427937719-11630-3-git-send-email-andrew@lunn.ch> (raw)
In-Reply-To: <1427937719-11630-1-git-send-email-andrew@lunn.ch>

From: Guenter Roeck <linux@roeck-us.net>

This will let us use the switch product IDs in the common source code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
---
 drivers/net/dsa/mv88e6131.c |  6 ------
 drivers/net/dsa/mv88e6171.c |  4 ----
 drivers/net/dsa/mv88e6xxx.h | 36 ++++++++++++++++++++++++++++++++++++
 3 files changed, 36 insertions(+), 10 deletions(-)

diff --git a/drivers/net/dsa/mv88e6131.c b/drivers/net/dsa/mv88e6131.c
index 0252d51c0a74..f0dea2d1581e 100644
--- a/drivers/net/dsa/mv88e6131.c
+++ b/drivers/net/dsa/mv88e6131.c
@@ -17,12 +17,6 @@
 #include <net/dsa.h>
 #include "mv88e6xxx.h"
 
-/* Switch product IDs */
-#define ID_6085		0x04a0
-#define ID_6095		0x0950
-#define ID_6131		0x1060
-#define ID_6131_B2	0x1066
-
 static char *mv88e6131_probe(struct device *host_dev, int sw_addr)
 {
 	struct mii_bus *bus = dsa_host_dev_to_mii_bus(host_dev);
diff --git a/drivers/net/dsa/mv88e6171.c b/drivers/net/dsa/mv88e6171.c
index 18cfead83dc9..639bd83b76c7 100644
--- a/drivers/net/dsa/mv88e6171.c
+++ b/drivers/net/dsa/mv88e6171.c
@@ -17,10 +17,6 @@
 #include <net/dsa.h>
 #include "mv88e6xxx.h"
 
-/* Switch product IDs */
-#define ID_6171	0x1710
-#define ID_6172	0x1720
-
 static char *mv88e6171_probe(struct device *host_dev, int sw_addr)
 {
 	struct mii_bus *bus = dsa_host_dev_to_mii_bus(host_dev);
diff --git a/drivers/net/dsa/mv88e6xxx.h b/drivers/net/dsa/mv88e6xxx.h
index aaf239aba726..aca48792db4b 100644
--- a/drivers/net/dsa/mv88e6xxx.h
+++ b/drivers/net/dsa/mv88e6xxx.h
@@ -11,6 +11,42 @@
 #ifndef __MV88E6XXX_H
 #define __MV88E6XXX_H
 
+/* switch product IDs */
+
+#define ID_6085		0x04a0
+#define ID_6095		0x0950
+
+#define ID_6123		0x1210
+#define ID_6123_A1	0x1212
+#define ID_6123_A2	0x1213
+
+#define ID_6131		0x1060
+#define ID_6131_B2	0x1066
+
+#define ID_6152		0x1a40
+#define ID_6155		0x1a50
+
+#define ID_6161		0x1610
+#define ID_6161_A1	0x1612
+#define ID_6161_A2	0x1613
+
+#define ID_6165		0x1650
+#define ID_6165_A1	0x1652
+#define ID_6165_A2	0x1653
+
+#define ID_6171		0x1710
+#define ID_6172		0x1720
+#define ID_6176		0x1760
+
+#define ID_6182		0x1a60
+#define ID_6185		0x1a70
+
+#define ID_6352		0x3520
+#define ID_6352_A0	0x3521
+#define ID_6352_A1	0x3522
+
+/* Registers */
+
 #define REG_PORT(p)		(0x10 + (p))
 #define REG_GLOBAL		0x1b
 #define REG_GLOBAL2		0x1c
-- 
2.1.4

  parent reply	other threads:[~2015-04-02  1:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02  1:21 [PATCH 00/12] DSA Mavell drivers refactoring and cleanup Andrew Lunn
2015-04-02  1:21 ` [PATCH 01/12] net: dsa: mv88e6131: Use common initialization functions Andrew Lunn
2015-04-02  1:39   ` Guenter Roeck
2015-04-02  1:51     ` Andrew Lunn
2015-04-02  2:01       ` David Miller
2015-04-02  2:00     ` David Miller
2015-04-02  1:21 ` Andrew Lunn [this message]
2015-04-02  1:21 ` [PATCH 03/12] net: dsa: mv88e6131: Determine and use number of switch ports Andrew Lunn
2015-04-02  1:21 ` [PATCH 04/12] net: dsa: mv88e6123_61_65: " Andrew Lunn
2015-04-02  1:21 ` [PATCH 05/12] net: dsa: Consistently set and use ps->num_ports Andrew Lunn
2015-04-02  1:35   ` Guenter Roeck
2015-04-02  1:21 ` [PATCH 06/12] net: dsa: Centralize Marvell switch reset Andrew Lunn
2015-04-02  1:21 ` [PATCH 07/12] net: dsa: Move phy page access functions into shared code Andrew Lunn
2015-04-02  1:21 ` [PATCH 08/12] net: dsa: Consolidate phy read and write functions Andrew Lunn
2015-04-02  1:21 ` [PATCH 09/12] net: dsa: mv88e6xxx: Add missing mutex's in EEE operations Andrew Lunn
2015-04-02  1:21 ` [PATCH 10/12] net: dsa: Consolidate getting the statistics Andrew Lunn
2015-04-02  1:21 ` [PATCH 11/12] net: dsa: Use mnemonics rather than register numbers Andrew Lunn
2015-04-02  1:21 ` [PATCH 12/12] net: dsa: mv88e6xxx: Fix stats counters for 6352 family Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1427937719-11630-3-git-send-email-andrew@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=linux@roeck-us.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).