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: 303749 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 7AB3E2C00D3 for ; Fri, 20 Dec 2013 08:39:50 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756516Ab3LSVjq (ORCPT ); Thu, 19 Dec 2013 16:39:46 -0500 Received: from mail-la0-f52.google.com ([209.85.215.52]:60922 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756258Ab3LSVjp (ORCPT ); Thu, 19 Dec 2013 16:39:45 -0500 Received: by mail-la0-f52.google.com with SMTP id y1so727019lam.39 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=PjjeiWXzO5VoYJp8G5KFHx77x7EblxaFzarN3YTAbhjYsL9b1c+j2WysmBjDJBPSjg 5mJW4Qxl4VczivUDOM7CoUDdggr/5wjOV2dcI5CIDzeqOIoIddyXwefgmAedzDNuZWgi LH0qKxOC1qkMoHBRBlmdkl6uUvqxD7nfQHcr/rUVJTyuR4vzwjYsosVmLK6KIPatkHI+ j4Fe6rIsCjmJnyje21F39nWB/6Xb5MaUHf7RTEn+lWhGhWhONFLUfR2VKDycSJ94Iy92 H/wJIcSneJOqN2+ORGcIe3kqEidZuiEsDt28oMv1NnNH3NFbm4nVNTJMOb15edJedFAP Skaw== X-Gm-Message-State: ALoCoQn8cGktoGnIMUc2EqXFoYMbN75XP9p/hdhXdiSbf7gBCSWOOGL2Ct4ZtWuzJ0mWlF1Vg1wf 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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 netdev" 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);