From patchwork Tue Mar 8 07:59:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 617541 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p287xoD0023715 for ; Tue, 8 Mar 2011 07:59:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755679Ab1CHH7r (ORCPT ); Tue, 8 Mar 2011 02:59:47 -0500 Received: from relmlor1.renesas.com ([210.160.252.171]:60729 "EHLO relmlor1.renesas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755710Ab1CHH7q (ORCPT ); Tue, 8 Mar 2011 02:59:46 -0500 Received: from relmlir3.idc.renesas.com ([10.200.68.153]) by relmlor1.idc.renesas.com ( SJSMS) with ESMTP id <0LHQ006D1BJLCK70@relmlor1.idc.renesas.com>; Tue, 08 Mar 2011 16:59:45 +0900 (JST) Received: from relmlac4.idc.renesas.com ([10.200.69.24]) by relmlir3.idc.renesas.com ( SJSMS) with ESMTP id <0LHQ00JL8BJLMQ70@relmlir3.idc.renesas.com>; Tue, 08 Mar 2011 16:59:45 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id A163948082; Tue, 08 Mar 2011 16:59:45 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id 4B7714807B; Tue, 08 Mar 2011 16:59:45 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac4.idc.renesas.com with ESMTP id SAF09500; Tue, 08 Mar 2011 16:59:45 +0900 X-IronPort-AV: E=Sophos; i="4.62,283,1297004400"; d="scan'208"; a="15507798" Received: from unknown (HELO [172.30.8.157]) ([172.30.8.157]) by relmlii2.idc.renesas.com with ESMTP; Tue, 08 Mar 2011 16:59:45 +0900 Message-id: <4D75E1F1.5090306@renesas.com> Date: Tue, 08 Mar 2011 16:59:45 +0900 From: Yoshihiro Shimoda User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-version: 1.0 To: netdev@vger.kernel.org Cc: SH-Linux Subject: [PATCH 4/6] net: sh_eth: modify the PHY_INTERFACE_MODE Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 08 Mar 2011 07:59:51 +0000 (UTC) diff --git a/arch/sh/include/asm/sh_eth.h b/arch/sh/include/asm/sh_eth.h index 1557696..e86c880 100644 --- a/arch/sh/include/asm/sh_eth.h +++ b/arch/sh/include/asm/sh_eth.h @@ -1,6 +1,8 @@ #ifndef __ASM_SH_ETH_H__ #define __ASM_SH_ETH_H__ +#include + enum {EDMAC_LITTLE_ENDIAN, EDMAC_BIG_ENDIAN}; enum { SH_ETH_REG_GIGABIT, @@ -12,6 +14,7 @@ struct sh_eth_plat_data { int phy; int edmac_endian; int register_type; + phy_interface_t phy_interface; unsigned char mac_addr[6]; unsigned no_ether_link:1; diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 6734311..5d28ce6 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -1071,7 +1071,7 @@ static int sh_eth_phy_init(struct net_device *ndev) /* Try connect to PHY */ phydev = phy_connect(ndev, phy_id, sh_eth_adjust_link, - 0, PHY_INTERFACE_MODE_MII); + 0, mdp->phy_interface); if (IS_ERR(phydev)) { dev_err(&ndev->dev, "phy_connect failed\n"); return PTR_ERR(phydev); @@ -1669,6 +1669,7 @@ static int sh_eth_drv_probe(struct platform_device *pdev) pd = (struct sh_eth_plat_data *)(pdev->dev.platform_data); /* get PHY ID */ mdp->phy_id = pd->phy; + mdp->phy_interface = pd->phy_interface; /* EDMAC endian */ mdp->edmac_endian = pd->edmac_endian; mdp->no_ether_link = pd->no_ether_link; diff --git a/drivers/net/sh_eth.h b/drivers/net/sh_eth.h index b349c5e..c3048a6 100644 --- a/drivers/net/sh_eth.h +++ b/drivers/net/sh_eth.h @@ -781,6 +781,7 @@ struct sh_eth_private { struct mii_bus *mii_bus; /* MDIO bus control */ struct phy_device *phydev; /* PHY device control */ enum phy_state link; + phy_interface_t phy_interface; int msg_enable; int speed; int duplex;