Received: by 10.223.185.116 with SMTP id b49csp6391775wrg; Wed, 28 Feb 2018 08:39:16 -0800 (PST) X-Google-Smtp-Source: AH8x224lK9WHo2UVU4nl0376AZ9P0499E82Uub+RcPJoNFRod60EbsBPFmK5y3ytwqdXhAa7tn0A X-Received: by 2002:a17:902:2de4:: with SMTP id p91-v6mr18745064plb.405.1519835956666; Wed, 28 Feb 2018 08:39:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519835956; cv=none; d=google.com; s=arc-20160816; b=mw29CLk0sieMLmbso94jnq38UiJnyQSOrcKOyyRWU6rimvd+kCcWXCeBlv3OIQgMr1 Mzd0UHayywwTJTzvZ8v5nBxNADLKhMZMxd/sAizYBZEn6rUFTE5VxxWyRgrREp1bGcPW qTA8FzPLXrLTsMQaJZsYRpShhMIyPIG6chQJ2C4sB+4f3gd3mHywLWYXLDC6b2XpBuSP +9AFGSQ/6Mr4m31geDLXpDHjfO84L1ypyjkM84f8khZU7ExnQkll/pY1ediQPmlEx+ft 2+59t9wmBdskbQKxjlqFTbLvZEkwmrMJnaWLLkHFPimydffCUOj5wsYAzoqIFYJFJEfB Kk5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=rw7Cn86svBAcgVjfIg6m8yhgzXwHc32JSBPxRMIIAu4=; b=hVKbjR2pAtwKmtV1HVWlnPibriLvoncAjhcpnTylARcAINRWC9kqWNJtZr+7ECxC5P Cu1GiK9IRSNrAn5bOBv+/WwLqj6+jZsmynbUYb0YL/o/2whJcNaU5XUn9qmphYsdjqLl aJjq+Hdy3jurs17uyhqZ7Zt5Xz0BxdTMf6s/H/DOXOQ0F6DbOS2oHZmEvsLHVMcp5F7B EYAqY2RZrTctQA4NKpMMOZqMKBspzLsw+G+xcLm1qIxD+qwTxYwKJjI2/ity+wkXIMGM /PuwyUGxwoj5jFfq8nXJ2oXpelgg5mVhWRaIHiJeXpU+YLCFSbnmGmh4eW+cMWkLjmWW vFnw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 70-v6si1521643ple.147.2018.02.28.08.39.02; Wed, 28 Feb 2018 08:39:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933748AbeB1QiG (ORCPT + 99 others); Wed, 28 Feb 2018 11:38:06 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:34821 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753084AbeB1QE0 (ORCPT ); Wed, 28 Feb 2018 11:04:26 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Yq-0006Xj-57; Wed, 28 Feb 2018 15:22:28 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yj-0000FS-Jt; Wed, 28 Feb 2018 15:22:21 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "David S. Miller" , "Sergei Shtylyov" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 197/254] SolutionEngine771x: add Ether TSU resource In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Sergei Shtylyov commit f9a531d6731d74f1e24298d9641c2dc1fef2631b upstream. 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 Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- 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(-) --- a/arch/sh/boards/mach-se/770x/setup.c +++ b/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 + 0x200 - 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 + 0x200 - 1, + .flags = IORESOURCE_MEM, + }, + [2] = { .start = SH_ETH1_IRQ, .end = SH_ETH1_IRQ, .flags = IORESOURCE_IRQ, --- a/arch/sh/include/mach-se/mach/se.h +++ b/arch/sh/include/mach-se/mach/se.h @@ -99,6 +99,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