From patchwork Mon Dec 9 23:20:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 3313371 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 530C49F1F0 for ; Mon, 9 Dec 2013 22:20:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6C95720184 for ; Mon, 9 Dec 2013 22:20:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6293C2015A for ; Mon, 9 Dec 2013 22:20:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754941Ab3LIWUp (ORCPT ); Mon, 9 Dec 2013 17:20:45 -0500 Received: from mail-la0-f54.google.com ([209.85.215.54]:55672 "EHLO mail-la0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755842Ab3LIWUo (ORCPT ); Mon, 9 Dec 2013 17:20:44 -0500 Received: by mail-la0-f54.google.com with SMTP id b8so2121219lan.27 for ; Mon, 09 Dec 2013 14:20:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:subject:cc:from:organization:date :mime-version:content-type:content-transfer-encoding:message-id; bh=zkrYHH1z7aOLhfxwbta1dbxRu/+337OTBBW8rVINCqs=; b=aZF4MAkB81t3RK++9dxtDOXiQM5klIoqVeclbWM5JlcXKQwoxuxZikh0HFZ4Mev3c0 ywgALxp9LsOdM2l1DRMPjCJFwzsoQOQJo0nhOh++FbcyRozJ/v9hv+vJudMRdCtCwTqM V790TGXJXJTvX0ljwtCxYDXVXBcAnl+VzSjpjSj/ExKbKaE9Wkrrl1k5B9pP0E6cF9vK FBf8JANWhd9qXZ8ORGGPWac+dHaik2nMAfM5+/qmHqGbw5uz3NZawdFUpwuLQ/VMBBqN yNi7sXIAdHvGr+G4l3xQX8ACzQi05amFRwcqSA31Uw9bCj8Rw7FpaZzzIgOGMwJ5HPUQ fwOg== X-Gm-Message-State: ALoCoQnQFoTEPtO2irNbXTXZMXRzd++rz3DSAewnC23rItTf7nXLZx41purksOOLajHotLeh3o5/ X-Received: by 10.152.45.8 with SMTP id i8mr6520077lam.12.1386627642897; Mon, 09 Dec 2013 14:20:42 -0800 (PST) Received: from wasted.dev.rtsoft.ru (ppp91-76-94-219.pppoe.mtu-net.ru. [91.76.94.219]) by mx.google.com with ESMTPSA id m5sm17395527laj.4.2013.12.09.14.20.42 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 09 Dec 2013 14:20:42 -0800 (PST) To: netdev@vger.kernel.org Subject: [PATCH] micrel: add support for KSZ8041RNLI Cc: linux-sh@vger.kernel.org From: Sergei Shtylyov Organization: Cogent Embedded Date: Tue, 10 Dec 2013 02:20:41 +0300 MIME-Version: 1.0 Message-Id: <201312100220.42153.sergei.shtylyov@cogentembedded.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Renesas R-Car development boards use KSZ8041RNLI PHY which for some reason has ID of 0x00221537 that is not documented for KSZ8041-family PHYs and does not match the documented ID of 0x0022151x (where 'x' is the revision). We have to add the new #define PHY_ID_* and new ksphy_driver[] entry, almost the same as KSZ8041 one, differing only in the 'phy_id' and 'name' fields. Signed-off-by: Sergei Shtylyov Tested-by: Geert Uytterhoeven --- This patch is atop of DaveM's 'net-next.git' repo. drivers/net/phy/micrel.c | 15 +++++++++++++++ include/linux/micrel_phy.h | 2 ++ 2 files changed, 17 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: net-next/drivers/net/phy/micrel.c =================================================================== --- net-next.orig/drivers/net/phy/micrel.c +++ net-next/drivers/net/phy/micrel.c @@ -336,6 +336,21 @@ static struct phy_driver ksphy_driver[] .resume = genphy_resume, .driver = { .owner = THIS_MODULE,}, }, { + .phy_id = PHY_ID_KSZ8041RNLI, + .phy_id_mask = 0x00fffff0, + .name = "Micrel KSZ8041RNLI", + .features = PHY_BASIC_FEATURES | + SUPPORTED_Pause | SUPPORTED_Asym_Pause, + .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT, + .config_init = kszphy_config_init, + .config_aneg = genphy_config_aneg, + .read_status = genphy_read_status, + .ack_interrupt = kszphy_ack_interrupt, + .config_intr = kszphy_config_intr, + .suspend = genphy_suspend, + .resume = genphy_resume, + .driver = { .owner = THIS_MODULE,}, +}, { .phy_id = PHY_ID_KSZ8051, .phy_id_mask = 0x00fffff0, .name = "Micrel KSZ8051", Index: net-next/include/linux/micrel_phy.h =================================================================== --- net-next.orig/include/linux/micrel_phy.h +++ net-next/include/linux/micrel_phy.h @@ -22,6 +22,8 @@ #define PHY_ID_KSZ8021 0x00221555 #define PHY_ID_KSZ8031 0x00221556 #define PHY_ID_KSZ8041 0x00221510 +/* undocumented */ +#define PHY_ID_KSZ8041RNLI 0x00221537 #define PHY_ID_KSZ8051 0x00221550 /* same id: ks8001 Rev. A/B, and ks8721 Rev 3. */ #define PHY_ID_KSZ8001 0x0022161A