From patchwork Sat Jun 1 22:40:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2649141 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 78014DFE76 for ; Sat, 1 Jun 2013 22:40:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752202Ab3FAWku (ORCPT ); Sat, 1 Jun 2013 18:40:50 -0400 Received: from mail-lb0-f170.google.com ([209.85.217.170]:47336 "EHLO mail-lb0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751294Ab3FAWkt (ORCPT ); Sat, 1 Jun 2013 18:40:49 -0400 Received: by mail-lb0-f170.google.com with SMTP id t11so29992lbd.15 for ; Sat, 01 Jun 2013 15:40:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=to:subject:cc:from:organization:date:mime-version:content-type :content-transfer-encoding:message-id:x-gm-message-state; bh=Lqaci25leTyn8T+YiQ+qaDhO8bBl8XARX8n1f8Tf0D0=; b=gk0OCAMsnikPNFQOirhvMLQLmDeooUsxnNFUXggzRmdksKV/TPtE3dy+VuPBb6DJbv 1tkXcQHyTTtnHInhWNHo2jZqmcaY9no9gONuCdM9hE4Yg2H4sa95g1BWtb0c54CyFt+7 /D30+kc8OftZ9RImOCEYSrxxFNb9MEUzQVbWZBbYiTYIt0ntDUkVDQOMLEHf6z69Svz1 vsGTGdFOR6WA7zfI9jkdSB3oD/zJbGL5CsCDq+Du4yEnxGdcf+D7C8WUK7uHvFlJXULM feGrB3evc/SrvvvpasO06+BJcDeWtWJKOyc0gUI/BwOozMFmYayeLn8iKifYWdB5FW8j DsZg== X-Received: by 10.152.19.166 with SMTP id g6mr8250162lae.4.1370126447012; Sat, 01 Jun 2013 15:40:47 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp91-76-145-9.pppoe.mtu-net.ru. [91.76.145.9]) by mx.google.com with ESMTPSA id n5sm11959821lbi.13.2013.06.01.15.40.45 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 01 Jun 2013 15:40:46 -0700 (PDT) To: horms@verge.net.au, linux-sh@vger.kernel.org Subject: [PATCH v3] ARM: shmobile: BOCK-W: add Ether support Cc: magnus.damm@gmail.com, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org From: Sergei Shtylyov Organization: Cogent Embedded Date: Sun, 2 Jun 2013 02:40:55 +0400 MIME-Version: 1.0 Message-Id: <201306020240.55702.sergei.shtylyov@cogentembedded.com> X-Gm-Message-State: ALoCoQnBnPEcsZeP6P/Q4LAAEpnUFqXhIf3A0u2TCAJpFGNlgi+9Ag6OX5QomUsU/c4qSy9+2O0W Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org Register Ether device from bockw_init(), passing the platform data to it, adding only the RMII pin group to bockw_pinctrl_map[]. Although the LINK signal exists on the board, it's connected to the link/activity LED output of the PHY, thus the link disappears and reappears after each packet. We'd be better off ignoring such signal and getting the link state from the PHY indirectly. Signed-off-by: Sergei Shtylyov --- The patch is atop of Simon's 'renesas.git' repo, 'renesas-next-20130528' tag and the USB patches just reposted. I decided to move it ahead of the VIN patches as it can be merged right now since all dependecies have been already met. Changes from version 2: - resolved rejects due to patch move; - removed the code dealing with the pin conflict with VIN1 and the note related to it from the changelog. Changes from the original posting: - refreshed the patch. arch/arm/mach-shmobile/board-bockw.c | 18 ++++++++++++++++++ 1 file changed, 18 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: renesas/arch/arm/mach-shmobile/board-bockw.c =================================================================== --- renesas.orig/arch/arm/mach-shmobile/board-bockw.c +++ renesas/arch/arm/mach-shmobile/board-bockw.c @@ -65,7 +65,24 @@ static struct sh_mobile_sdhi_info sdhi0_ static struct rcar_phy_platform_data usb_phy_platform_data __initdata; +static struct sh_eth_plat_data ether_platform_data __initdata = { + .phy = 0x01, + .edmac_endian = EDMAC_LITTLE_ENDIAN, + .register_type = SH_ETH_REG_FAST_RCAR, + .phy_interface = PHY_INTERFACE_MODE_RMII, + /* + * Although the LINK signal is available on the board, it's connected to + * the link/activity LED output of the PHY, thus the link disappears and + * reappears after each packet. We'd be better off ignoring such signal + * and getting the link state from the PHY indirectly. + */ + .no_ether_link = 1, +}; + static const struct pinctrl_map bockw_pinctrl_map[] = { + /* Ether */ + PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7778", + "ether_rmii", "ether"), /* SCIF0 */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", "scif0_data_a", "scif0"), @@ -98,6 +115,7 @@ static void __init bockw_init(void) r8a7778_init_irq_extpin(1); r8a7778_add_standard_devices(); r8a7778_add_usb_phy_device(&usb_phy_platform_data); + r8a7778_add_ether_device(ðer_platform_data); pinctrl_register_mappings(bockw_pinctrl_map, ARRAY_SIZE(bockw_pinctrl_map));