From patchwork Fri May 31 06:08:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 247851 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 E03C82C0085 for ; Fri, 31 May 2013 16:10:11 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752565Ab3EaGJH (ORCPT ); Fri, 31 May 2013 02:09:07 -0400 Received: from mail-ea0-f169.google.com ([209.85.215.169]:46803 "EHLO mail-ea0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751849Ab3EaGIo (ORCPT ); Fri, 31 May 2013 02:08:44 -0400 Received: by mail-ea0-f169.google.com with SMTP id m14so1180062eaj.0 for ; Thu, 30 May 2013 23:08:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references:content-type:x-gm-message-state; bh=zHL5Y31L+oIaSvcl2f5id02jkqAcEc4zdPye4QKFAyc=; b=b/DtLNqPILjw4cLyPzWi05Lpwzu7Zun/myomRFVtm5WjlisgQm/VruUwV0c+QuWqAw iXww85AXfjq/gfTU8pFpJzh89LgSMlzRnyRsmYqY17zhqkUh32ouQvWFogDsYBfXzc+U 3qNyZHmNUdao6Z5dg5+FExMWHbJxAatuQXOjoW+TPZpaFwFu8yAvNCSYNnz1O2k8xtfc kCaYdz4AQ7rdqfhq44P4cCdSKZUPloYF3nIH0CHj6tnCyeb2GoXGfcWcG+Wdn5T+AKDF SGrW9BmrqWx2O6efB4TxRtJ4XDtPQrNlJUvo6YrpEnPgcYFBd0yy1DF12+Eu1stHwl1V Zz7w== X-Received: by 10.14.9.136 with SMTP id 8mr12178868eet.37.1369980522694; Thu, 30 May 2013 23:08:42 -0700 (PDT) Received: from localhost (nat-63.starnet.cz. [178.255.168.63]) by mx.google.com with ESMTPSA id e1sm30341703eem.10.2013.05.30.23.08.41 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Thu, 30 May 2013 23:08:42 -0700 (PDT) From: Michal Simek To: linux-kernel@vger.kernel.org Cc: Michal Simek , Michal Simek , "David S. Miller" , Lars-Peter Clausen , Christian Hohnstaedt , Rick Hoover , Anirudha Sarangi , Steven Wang , netdev@vger.kernel.org Subject: [PATCH v2 5/5] phy: Add Marvell 88E1510 phy ID Date: Fri, 31 May 2013 08:08:27 +0200 Message-Id: <4c8d1aa315b3abc569f4134d4301488ea510b2e8.1369980470.git.michal.simek@xilinx.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQkYqZOK27iBzezdnZT/KtD0nRH4gip9aOsh7mrV5VFUlEElo7vXBiNh7zk6uFie1PXIfPf9 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add support for this new phy ID. Signed-off-by: Rick Hoover Signed-off-by: Steven Wang Signed-off-by: Lars-Peter Clausen Signed-off-by: Michal Simek --- Changes in v2: - None drivers/net/phy/marvell.c | 25 +++++++++++++++++++++++++ include/linux/marvell_phy.h | 1 + 2 files changed, 26 insertions(+) -- 1.8.2.3 diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index df5a9f6..2e91477 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -374,6 +374,17 @@ static int m88e1318_config_aneg(struct phy_device *phydev) return m88e1121_config_aneg(phydev); } +static int m88e1510_config_aneg(struct phy_device *phydev) +{ + int err; + + err = m88e1318_config_aneg(phydev); + if (err < 0) + return err; + + return marvell_of_reg_init(phydev); +} + static int m88e1116r_config_init(struct phy_device *phydev) { int temp; @@ -1004,6 +1015,19 @@ static struct phy_driver marvell_drivers[] = { .config_intr = &marvell_config_intr, .driver = { .owner = THIS_MODULE }, }, + { + .phy_id = MARVELL_PHY_ID_88E1510, + .phy_id_mask = MARVELL_PHY_ID_MASK, + .name = "Marvell 88E1510", + .features = PHY_GBIT_FEATURES, + .flags = PHY_HAS_INTERRUPT, + .config_aneg = &m88e1510_config_aneg, + .read_status = &marvell_read_status, + .ack_interrupt = &marvell_ack_interrupt, + .config_intr = &marvell_config_intr, + .did_interrupt = &m88e1121_did_interrupt, + .driver = { .owner = THIS_MODULE }, + }, }; static int __init marvell_init(void) @@ -1032,6 +1056,7 @@ static struct mdio_device_id __maybe_unused marvell_tbl[] = { { MARVELL_PHY_ID_88E1240, MARVELL_PHY_ID_MASK }, { MARVELL_PHY_ID_88E1318S, MARVELL_PHY_ID_MASK }, { MARVELL_PHY_ID_88E1116R, MARVELL_PHY_ID_MASK }, + { MARVELL_PHY_ID_88E1510, MARVELL_PHY_ID_MASK }, { } }; diff --git a/include/linux/marvell_phy.h b/include/linux/marvell_phy.h index ec41025..8e9a029 100644 --- a/include/linux/marvell_phy.h +++ b/include/linux/marvell_phy.h @@ -15,6 +15,7 @@ #define MARVELL_PHY_ID_88E1240 0x01410e30 #define MARVELL_PHY_ID_88E1318S 0x01410e90 #define MARVELL_PHY_ID_88E1116R 0x01410e40 +#define MARVELL_PHY_ID_88E1510 0x01410dd0 /* struct phy_device dev_flags definitions */ #define MARVELL_PHY_M1145_FLAGS_RESISTANCE 0x00000001