From patchwork Thu Dec 19 22:39:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 3384461 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 399C4C0D4A for ; Thu, 19 Dec 2013 21:39:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 63C1220688 for ; Thu, 19 Dec 2013 21:39:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 872A920686 for ; Thu, 19 Dec 2013 21:39:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756482Ab3LSVjq (ORCPT ); Thu, 19 Dec 2013 16:39:46 -0500 Received: from mail-la0-f45.google.com ([209.85.215.45]:36332 "EHLO mail-la0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756157Ab3LSVjp (ORCPT ); Thu, 19 Dec 2013 16:39:45 -0500 Received: by mail-la0-f45.google.com with SMTP id eh20so740522lab.18 for ; Thu, 19 Dec 2013 13:39:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:organization:to:subject:date:user-agent:cc :references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=3+3EkMw5ZR+SBXHeWvH29Ar3JZrjB0BsRKM95BK8LL0=; b=m92lly2VDfueQn32YEX9EKbTw9Wo245qQDb2gBIHYWEYgBqaS+3GtbpKDZeyC1O5KD Q27TOI/+iwvOUI2t/gNMwBlsXkFbvOO0HwL7UfaHiDBqDMs+lDJMnNaBWLTM06u1FKU7 n1E+LJYkUY2NluHsIlZ+V1FzKM98cRWrd4Jh1xdm+YhaZ0ZY4pnNOMjagRq5hg/h016O HbxJ11L/0D9J9LSJAdPiCit0GKidk0saQBh/nZAZ6uo+i2rN2a7ePog5+zO8LPFFr4VR nlxuGVxe6BMMAwmMDivgTN1tYGtWMrDUhRSWCfMDTZul6b2DLmrKhzdcz068EDLz9jY9 ETdg== X-Gm-Message-State: ALoCoQmSE6xwPyC6JtlYqSliRrBSwx6ukhG/0C4h7bOfE/3hnAD2REtLvBekQDzyAy0T+VYsplC1 X-Received: by 10.112.158.231 with SMTP id wx7mr1826268lbb.27.1387489184028; Thu, 19 Dec 2013 13:39:44 -0800 (PST) Received: from wasted.dev.rtsoft.ru (ppp91-76-87-169.pppoe.mtu-net.ru. [91.76.87.169]) by mx.google.com with ESMTPSA id c8sm4122674lag.3.2013.12.19.13.39.43 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 19 Dec 2013 13:39:43 -0800 (PST) From: Sergei Shtylyov Organization: Cogent Embedded To: netdev@vger.kernel.org Subject: [PATCH 1/2] sh_eth: add PHY IRQ to platform data Date: Fri, 20 Dec 2013 01:39:52 +0300 User-Agent: KMail/1.13.5 (Linux/2.6.32.26-175.fc12.i686.PAE; KDE/4.4.5; i686; ; ) Cc: linux-sh@vger.kernel.org References: <201312200138.09307.sergei.shtylyov@cogentembedded.com> In-Reply-To: <201312200138.09307.sergei.shtylyov@cogentembedded.com> MIME-Version: 1.0 Message-Id: <201312200139.52758.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=-7.4 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 Allow the platform code to pass PHY's IRQ to the driver. Print this IRQ along with the other PHY datails in sh_eth_phy_init(). Signed-off-by: Sergei Shtylyov --- drivers/net/ethernet/renesas/sh_eth.c | 6 ++++-- include/linux/sh_eth.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) -- 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/ethernet/renesas/sh_eth.c =================================================================== --- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c +++ net-next/drivers/net/ethernet/renesas/sh_eth.c @@ -1685,8 +1685,8 @@ static int sh_eth_phy_init(struct net_de return PTR_ERR(phydev); } - dev_info(&ndev->dev, "attached phy %i to driver %s\n", - phydev->addr, phydev->drv->name); + dev_info(&ndev->dev, "attached PHY %d (IRQ %d) to driver %s\n", + phydev->addr, phydev->irq, phydev->drv->name); mdp->phydev = phydev; @@ -2544,6 +2544,8 @@ static int sh_mdio_init(struct net_devic for (i = 0; i < PHY_MAX_ADDR; i++) mdp->mii_bus->irq[i] = PHY_POLL; + if (pd->phy_irq > 0) + mdp->mii_bus->irq[pd->phy] = pd->phy_irq; /* register mdio bus */ ret = mdiobus_register(mdp->mii_bus); Index: net-next/include/linux/sh_eth.h =================================================================== --- net-next.orig/include/linux/sh_eth.h +++ net-next/include/linux/sh_eth.h @@ -8,6 +8,7 @@ enum {EDMAC_LITTLE_ENDIAN, EDMAC_BIG_END struct sh_eth_plat_data { int phy; + int phy_irq; int edmac_endian; phy_interface_t phy_interface; void (*set_mdio_gate)(void *addr);