From patchwork Wed Jan 3 20:08:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 10143339 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A0CC6601A1 for ; Wed, 3 Jan 2018 20:36:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9526829243 for ; Wed, 3 Jan 2018 20:36:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 895DD29279; Wed, 3 Jan 2018 20:36:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D989829243 for ; Wed, 3 Jan 2018 20:35:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751645AbeACUfy (ORCPT ); Wed, 3 Jan 2018 15:35:54 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:42197 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751403AbeACULl (ORCPT ); Wed, 3 Jan 2018 15:11:41 -0500 Received: by mail-wr0-f193.google.com with SMTP id w107so2833221wrb.9 for ; Wed, 03 Jan 2018 12:11:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:user-agent:date:to:cc:subject:mime-version :content-disposition; bh=FGRCqLlxZ5FkueMvmGKRM/cXvGkCUasI34bnZ20LB9c=; b=VVslUoTGeQeMvdQJ21inRx0krJ1ZIYgW12fLaYlE6IpyRwT3YBj8ljAz1q9bORky2j wLMBuV5yCa8ls9hd6MOWrh8oU5o5cspfS21Zs1WG9rlinu9oIjNyv4d6bMXi1qHHZru9 46tlqwegie6IC+X1sHsbRuSpbxMp/IOLDuNYpAvSRWz9bG0q2zYdPaEuHN2QtLKM/qEc 7eLb00iUI9IJcKiPYICsOQcW3yZmFgOE4Nb4MrBg0MdZf4X4GgMUlm4VGxPvX97geM12 9ru1S9S8/kll6VVw1qrKod8ou4JYiOOj7/Tf79lcTaDFLYyIsBA+vEmkIm2/5h63E7rM zTvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:user-agent:date:to:cc:subject :mime-version:content-disposition; bh=FGRCqLlxZ5FkueMvmGKRM/cXvGkCUasI34bnZ20LB9c=; b=ZlfVwWLmyUtT64y8PnTqAoxOazoWZas3PXhKeLFrbSejIgz6SnVT+rBIugNhYS+cZw iK/ufVdodc4crshjiFFUVY7a37X7ghEJ4Ip3xlaoTRQZZPDjpE561DCwp08y/25PnPeK rl9zoS5Vc6dq4kHd8JR3j54CXBLUruAgddx5AFuBXW9icDZ8zs08qI2eXhgCzxGoGO6a FXmIG5A7svtjb+QpR2TkRd3jdBZek4KVOYMq/HikbNGd0qJvLg+eFmBYlf4Vc/Hw6nlA sW4e5drTJc6TN0HV8bkZVVhFS3edQ/Bc6PJQWopWUZN+3tpj9Nyt00fuc23encNA0zNo 4eHA== X-Gm-Message-State: AKGB3mKpzxJomdpeNUhQX/Q2rbAyoVOitbtPrwKe60O9gQD38msd7uUY F8h8i5RnVBIFL1UFY8Xydk5Ebg== X-Google-Smtp-Source: ACJfBovSOYU4BDqAY6T7uxoBH2ClL753ZJPTh8o87/P/1OKrHVj4qQNlniPp8NL3h1+GaGTg56ewQQ== X-Received: by 10.25.42.9 with SMTP id f9mr1334114lfl.24.1515010300544; Wed, 03 Jan 2018 12:11:40 -0800 (PST) Received: from wasted.cogentembedded.com ([31.173.87.30]) by smtp.gmail.com with ESMTPSA id t17sm326746lfi.33.2018.01.03.12.11.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jan 2018 12:11:39 -0800 (PST) From: Sergei Shtylyov X-Google-Original-From: "Sergei Shtylyov" Received: by wasted.cogentembedded.com (sSMTP sendmail emulation); Wed, 03 Jan 2018 23:11:37 +0300 Message-Id: <20180103201137.255228853@cogentembedded.com> User-Agent: quilt/0.64 Date: Wed, 03 Jan 2018 23:08:15 +0300 To: Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org Cc: netdev@vger.kernel.org, Sergei Shtylyov Subject: [PATCH 2/2] SolutionEngine771x: add Ether TSU resource MIME-Version: 1.0 Content-Disposition: inline; filename=SolutionEngine771x-add-Ether-TSU-resource.patch Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP After the Ether platform data is fixed, the driver probe() method would still fail since the 'struct sh_eth_cpu_data' corresponding to SH771x indicates the presence of TSU but the memory resource for it is absent. Add the missing TSU resource to both Ether devices and fix the harmless off-by-one error in the main memory resources, while at it... Fixes: 4986b996882d ("net: sh_eth: remove the SH_TSU_ADDR") Signed-off-by: Sergei Shtylyov --- arch/sh/boards/mach-se/770x/setup.c | 14 ++++++++++++-- arch/sh/include/mach-se/mach/se.h | 1 + 2 files changed, 13 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: linux/arch/sh/boards/mach-se/770x/setup.c =================================================================== --- linux.orig/arch/sh/boards/mach-se/770x/setup.c +++ linux/arch/sh/boards/mach-se/770x/setup.c @@ -123,10 +123,15 @@ static struct sh_eth_plat_data sh_eth_pl static struct resource sh_eth0_resources[] = { [0] = { .start = SH_ETH0_BASE, - .end = SH_ETH0_BASE + 0x1B8, + .end = SH_ETH0_BASE + 0x1B8 - 1, .flags = IORESOURCE_MEM, }, [1] = { + .start = SH_TSU_BASE, + .end = SH_TSU_BASE + 0xA00 - 1, + .flags = IORESOURCE_MEM, + }, + [2] = { .start = SH_ETH0_IRQ, .end = SH_ETH0_IRQ, .flags = IORESOURCE_IRQ, @@ -146,10 +151,15 @@ static struct platform_device sh_eth0_de static struct resource sh_eth1_resources[] = { [0] = { .start = SH_ETH1_BASE, - .end = SH_ETH1_BASE + 0x1B8, + .end = SH_ETH1_BASE + 0x1B8 - 1, .flags = IORESOURCE_MEM, }, [1] = { + .start = SH_TSU_BASE, + .end = SH_TSU_BASE + 0xA00 - 1, + .flags = IORESOURCE_MEM, + }, + [2] = { .start = SH_ETH1_IRQ, .end = SH_ETH1_IRQ, .flags = IORESOURCE_IRQ, Index: linux/arch/sh/include/mach-se/mach/se.h =================================================================== --- linux.orig/arch/sh/include/mach-se/mach/se.h +++ linux/arch/sh/include/mach-se/mach/se.h @@ -100,6 +100,7 @@ /* Base address */ #define SH_ETH0_BASE 0xA7000000 #define SH_ETH1_BASE 0xA7000400 +#define SH_TSU_BASE 0xA7000800 /* PHY ID */ #if defined(CONFIG_CPU_SUBTYPE_SH7710) # define PHY_ID 0x00