From patchwork Thu Apr 2 02:06:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Lunn X-Patchwork-Id: 457452 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 2EAEA1400B7 for ; Thu, 2 Apr 2015 13:10:53 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752983AbbDBCKt (ORCPT ); Wed, 1 Apr 2015 22:10:49 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:35801 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752276AbbDBCKq (ORCPT ); Wed, 1 Apr 2015 22:10:46 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.80) (envelope-from ) id 1YdUWo-0003FC-JD; Thu, 02 Apr 2015 04:06:42 +0200 From: Andrew Lunn To: davem@davemloft.net, linux@roeck-us.net Cc: netdev@vger.kernel.org, Andrew Lunn Subject: [PATCHv2 02/12] net: dsa: mv88e6xxx: Move switch product IDs into common include file Date: Thu, 2 Apr 2015 04:06:30 +0200 Message-Id: <1427940400-12434-3-git-send-email-andrew@lunn.ch> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1427940400-12434-1-git-send-email-andrew@lunn.ch> References: <1427940400-12434-1-git-send-email-andrew@lunn.ch> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Guenter Roeck This will let us use the switch product IDs in the common source code. Signed-off-by: Guenter Roeck Reviewed-by: Andrew Lunn Signed-off-by: Andrew Lunn --- 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 #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 #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