From patchwork Sun Oct 16 06:49:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Collins X-Patchwork-Id: 164281 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id DFDF4B6FD8 for ; Tue, 12 Jun 2012 09:05:53 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SeDg9-0004Hi-Cr; Mon, 11 Jun 2012 23:05:45 +0000 Received: from mail-pz0-f49.google.com ([209.85.210.49]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SeDd7-0003hC-GT for kernel-team@lists.ubuntu.com; Mon, 11 Jun 2012 23:02:37 +0000 Received: by mail-pz0-f49.google.com with SMTP id m1so6348994dad.8 for ; Mon, 11 Jun 2012 16:02:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:in-reply-to:references:from:date:subject:to; bh=d91MbytU3w/KYBt8OAKo1wUnTHS6MR6DxBK72vyuEzI=; b=mjuBE7LtO/dXfzL5Ag2srlFvCeBQ7XI/i6mqB+AqByvQt+7ZYKnrQ+q5f60gpcDoDY 2wwzBeIQrikE5z/sT+Vot/dKswclJ55lOSxKmwDOArmLbvvGXWBfDVYHYP4e0yl5bk2t e1w6eeim3vzhoJIAaDtWeox2/a4not7s3GPlGzZU37uyqhdVMJ4xpI4UfJkpPGVx6r6a Ewzd11xV8UK5UjuCLhVovUqwwqnJnoVtt1fCu7KaCwV0IXlrdfi4iCuBWsw5UbTL/O6S wavsClVrKroISHfm3ISpcLGemXzMecvgYddOKIZiBhH8N+g9XxNvg8Cvv1vGcEDGUny9 kqGg== Received: by 10.68.195.198 with SMTP id ig6mr39695pbc.92.1339455756915; Mon, 11 Jun 2012 16:02:36 -0700 (PDT) Received: from localhost (ip68-13-200-36.hr.hr.cox.net. [68.13.200.36]) by mx.google.com with ESMTPS id pq1sm19950816pbb.5.2012.06.11.16.02.34 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 11 Jun 2012 16:02:36 -0700 (PDT) Received: by localhost (sSMTP sendmail emulation); Mon, 11 Jun 2012 19:02:31 -0400 Message-Id: In-Reply-To: References: From: Andy Fleming Date: Sun, 16 Oct 2011 01:49:49 -0500 Subject: [PATCH 19/27] UBUNTU: SAUCE: phy: Add support for VSC8234 To: kernel-team@lists.ubuntu.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com This patch is being maintained and will eventually be merged upstream by Freescale directly. The powerpc-e500mc flavour uses this. Signed-off-by: Andy Fleming Signed-off-by: Kumar Gala Signed-off-by: Ben Collins --- drivers/net/phy/vitesse.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c index 0ec8e09..d0f36a1 100644 --- a/drivers/net/phy/vitesse.c +++ b/drivers/net/phy/vitesse.c @@ -54,6 +54,7 @@ #define MII_VSC8221_AUXCONSTAT_INIT 0x0004 /* need to set this bit? */ #define MII_VSC8221_AUXCONSTAT_RESERVED 0x0004 +#define PHY_ID_VSC8234 0x000fc620 #define PHY_ID_VSC8244 0x000fc6c0 #define PHY_ID_VSC8221 0x000fc550 @@ -119,7 +120,8 @@ static int vsc82xx_config_intr(struct phy_device *phydev) if (phydev->interrupts == PHY_INTERRUPT_ENABLED) err = phy_write(phydev, MII_VSC8244_IMASK, - phydev->drv->phy_id == PHY_ID_VSC8244 ? + ((phydev->drv->phy_id == PHY_ID_VSC8234) || + (phydev->drv->phy_id == PHY_ID_VSC8244)) ? MII_VSC8244_IMASK_MASK : MII_VSC8221_IMASK_MASK); else { @@ -153,6 +155,21 @@ static struct phy_driver vsc8244_driver = { .driver = { .owner = THIS_MODULE,}, }; +/* Vitesse 823x */ +static struct phy_driver vsc8234_driver = { + .phy_id = PHY_ID_VSC8234, + .name = "Vitesse VSC8234", + .phy_id_mask = 0x000ffff0, + .features = PHY_GBIT_FEATURES, + .flags = PHY_HAS_INTERRUPT, + .config_init = &vsc824x_config_init, + .config_aneg = &genphy_config_aneg, + .read_status = &genphy_read_status, + .ack_interrupt = &vsc824x_ack_interrupt, + .config_intr = &vsc82xx_config_intr, + .driver = { .owner = THIS_MODULE,}, +}; + static int vsc8221_config_init(struct phy_device *phydev) { int err; @@ -190,6 +207,12 @@ static int __init vsc82xx_init(void) err = phy_driver_register(&vsc8221_driver); if (err < 0) phy_driver_unregister(&vsc8244_driver); + err = phy_driver_register(&vsc8234_driver); + if (err < 0) { + phy_driver_unregister(&vsc8244_driver); + phy_driver_unregister(&vsc8221_driver); + } + return err; }