From patchwork Tue Oct 21 08:53:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 401379 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 245BB14007B for ; Tue, 21 Oct 2014 20:02:09 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754818AbaJUJAJ (ORCPT ); Tue, 21 Oct 2014 05:00:09 -0400 Received: from mail-wg0-f48.google.com ([74.125.82.48]:50380 "EHLO mail-wg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753256AbaJUIx7 (ORCPT ); Tue, 21 Oct 2014 04:53:59 -0400 Received: by mail-wg0-f48.google.com with SMTP id k14so772780wgh.31 for ; Tue, 21 Oct 2014 01:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :content-type:content-transfer-encoding; bh=FGwuN84OCwFqZVmrQZqw//fPpTEyhKIuJ5bALFxYO64=; b=JLpGnOoS1LDdLkyMbwXB2Y4hZZOhgrd3a4A3osdJIR3+6eEu0eWHL4LvWHiI5qaPum sVmnxtajscS5w5jD9qUU8uyK9zDeUdhR7KzRAgv8mhMsurNHgEjzR/HiLN++WjqLG/pZ W7UWnq9Er7eTjv9iALtqvPO8m85k8wRjTVnPJL5GHktTGOiiNpWbFsVOooTLKQHlz63X 63Ocm/zkKHlIY2tCrRf/rwkZbs4xnUX+41bklsRie5m5pWkeDVFMhta/4lXhEALeNzSG IwokGXQD0tU7sT/Dx26GADjb8/hqAicVigBuVnmGz1nmofmEwppa8htAA9JXl2dLcXi3 GGrg== X-Received: by 10.194.122.104 with SMTP id lr8mr41324327wjb.64.1413881637904; Tue, 21 Oct 2014 01:53:57 -0700 (PDT) Received: from topkick.lan (f052063137.adsl.alicedsl.de. [78.52.63.137]) by mx.google.com with ESMTPSA id y5sm12379843wix.10.2014.10.21.01.53.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Oct 2014 01:53:56 -0700 (PDT) From: Sebastian Hesselbarth To: Sebastian Hesselbarth Cc: "David S. Miller" , =?UTF-8?q?Antoine=20T=C3=A9nart?= , Florian Fainelli , Eric Miao , Haojian Zhuang , linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/9] net: pxa168_eth: Provide phy_interface mode on platform_data Date: Tue, 21 Oct 2014 10:53:40 +0200 Message-Id: <1413881627-21639-3-git-send-email-sebastian.hesselbarth@gmail.com> In-Reply-To: <1413881627-21639-1-git-send-email-sebastian.hesselbarth@gmail.com> References: <1413881627-21639-1-git-send-email-sebastian.hesselbarth@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The PXA168 Ethernet IP support MII and RMII connection to its PHY. Currently, pxa168 platform_data does not provide a way to pass that and there is one user of pxa168 platform_data (mach-mmp/gplug). Given the pinctrl settings of gplug it uses RMII, so add and pass a corresponding phy_interface_t. Signed-off-by: Sebastian Hesselbarth --- Cc: "David S. Miller" Cc: "Antoine Ténart" Cc: Florian Fainelli Cc: Eric Miao Cc: Haojian Zhuang Cc: linux-arm-kernel@lists.infradead.org Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- arch/arm/mach-mmp/gplugd.c | 2 ++ include/linux/pxa168_eth.h | 1 + 2 files changed, 3 insertions(+) diff --git a/arch/arm/mach-mmp/gplugd.c b/arch/arm/mach-mmp/gplugd.c index d81b2475e67e..3b5794cd0357 100644 --- a/arch/arm/mach-mmp/gplugd.c +++ b/arch/arm/mach-mmp/gplugd.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -158,6 +159,7 @@ struct pxa168_eth_platform_data gplugd_eth_platform_data = { .port_number = 0, .phy_addr = 0, .speed = 0, /* Autonagotiation */ + .intf = PHY_INTERFACE_MODE_RMII, .init = gplugd_eth_init, }; diff --git a/include/linux/pxa168_eth.h b/include/linux/pxa168_eth.h index 18d75e795606..37c381120bc8 100644 --- a/include/linux/pxa168_eth.h +++ b/include/linux/pxa168_eth.h @@ -13,6 +13,7 @@ struct pxa168_eth_platform_data { */ int speed; /* 0, SPEED_10, SPEED_100 */ int duplex; /* DUPLEX_HALF or DUPLEX_FULL */ + phy_interface_t intf; /* * Override default RX/TX queue sizes if nonzero.