From patchwork Mon Aug 12 22:17:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2843309 X-Patchwork-Delegate: lethal@linux-sh.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A33929F294 for ; Mon, 12 Aug 2013 22:17:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8D8212049E for ; Mon, 12 Aug 2013 22:17:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2513520448 for ; Mon, 12 Aug 2013 22:17:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755771Ab3HLWRE (ORCPT ); Mon, 12 Aug 2013 18:17:04 -0400 Received: from mail-lb0-f180.google.com ([209.85.217.180]:59326 "EHLO mail-lb0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755469Ab3HLWRD (ORCPT ); Mon, 12 Aug 2013 18:17:03 -0400 Received: by mail-lb0-f180.google.com with SMTP id a16so5268483lbj.39 for ; Mon, 12 Aug 2013 15:17:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:to:subject:from:organization:date:mime-version :content-type:content-transfer-encoding:message-id; bh=/hHKanjOFDPoalAc6za2M0JEpriL0yk1qnZK+9cZFX0=; b=auNudVvnLnpGlhXGoQ+RC4UsLK6YB3/1y+kOTe7vBf0eOgNDqSU9+izS/ryK3iRyaT vwA6amEmnr9ZyBxzRNxLy1xDvPpHG6UFP2enYZsKHlbDbjw31io3qDn6pKWsFslYmBDS FYpQlqSKjGXwE7AfoucBqgoXp9+1P7AwBTSRTM2M4KAzp66o5FXQhoc1/9rDa4aV/h7X jaKu6sybu2kdhZ5Ewv02gpgLDOWDmUOw3VStukzjRwdRGLiIugQKcpiLM/57yaGWk8HK sorkhaH5eaAep+fSVl9FZ1quH003I1373FlpomBOOmhoNBNI7yUns155XZrhzudR8TSb JoLA== X-Gm-Message-State: ALoCoQmlrVSe/zLNnitK6cUKeXQSxZXrvmtlenld9CN/ocq2O1yxjd58PHQ3wi9qTh3qaxd0WFaY X-Received: by 10.112.74.104 with SMTP id s8mr790849lbv.0.1376345820841; Mon, 12 Aug 2013 15:17:00 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp91-76-146-154.pppoe.mtu-net.ru. [91.76.146.154]) by mx.google.com with ESMTPSA id rd5sm12593284lbb.16.2013.08.12.15.16.59 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 12 Aug 2013 15:17:00 -0700 (PDT) To: linux-sh@vger.kernel.org, lethal@linux-sh.org, netdev@vger.kernel.org Subject: [PATCH] SolutionEngine SH771x: remove Ether support From: Sergei Shtylyov Organization: Cogent Embedded Date: Tue, 13 Aug 2013 02:17:02 +0400 MIME-Version: 1.0 Message-Id: <201308130217.03133.sergei.shtylyov@cogentembedded.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The 'sh_eth' driver's probe will crash as the platform code is hopelessly behind the platform data -- it passes PHY ID instead of 'struct sh_eth_plat_data *'. Even if it's fixed, the driver probe will fail as the 'struct sh_eth_cpu_data' indicates presence of TSU but the platform device resource for it is absent. Since I have no data to fix it, I think it's best to remove the erratic code. Signed-off-by: Sergei Shtylyov --- The patch is against Paul Mundt's 'linux-sh.git' repo, 'sh-latest' branch. Paul, could you update your tree, it's still at 3.9-rc1? The code being removed has changed upstream... arch/sh/boards/mach-se/770x/setup.c | 55 ------------------------------------ arch/sh/include/mach-se/mach/se.h | 15 --------- 2 files changed, 70 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-sh/arch/sh/boards/mach-se/770x/setup.c =================================================================== --- linux-sh.orig/arch/sh/boards/mach-se/770x/setup.c +++ linux-sh/arch/sh/boards/mach-se/770x/setup.c @@ -111,64 +111,9 @@ static struct platform_device heartbeat_ .resource = &heartbeat_resource, }; -#if defined(CONFIG_CPU_SUBTYPE_SH7710) ||\ - defined(CONFIG_CPU_SUBTYPE_SH7712) -/* SH771X Ethernet driver */ -static struct resource sh_eth0_resources[] = { - [0] = { - .start = SH_ETH0_BASE, - .end = SH_ETH0_BASE + 0x1B8, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = SH_ETH0_IRQ, - .end = SH_ETH0_IRQ, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct platform_device sh_eth0_device = { - .name = "sh-eth", - .id = 0, - .dev = { - .platform_data = PHY_ID, - }, - .num_resources = ARRAY_SIZE(sh_eth0_resources), - .resource = sh_eth0_resources, -}; - -static struct resource sh_eth1_resources[] = { - [0] = { - .start = SH_ETH1_BASE, - .end = SH_ETH1_BASE + 0x1B8, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = SH_ETH1_IRQ, - .end = SH_ETH1_IRQ, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct platform_device sh_eth1_device = { - .name = "sh-eth", - .id = 1, - .dev = { - .platform_data = PHY_ID, - }, - .num_resources = ARRAY_SIZE(sh_eth1_resources), - .resource = sh_eth1_resources, -}; -#endif - static struct platform_device *se_devices[] __initdata = { &heartbeat_device, &cf_ide_device, -#if defined(CONFIG_CPU_SUBTYPE_SH7710) ||\ - defined(CONFIG_CPU_SUBTYPE_SH7712) - &sh_eth0_device, - &sh_eth1_device, -#endif }; static int __init se_devices_setup(void) Index: linux-sh/arch/sh/include/mach-se/mach/se.h =================================================================== --- linux-sh.orig/arch/sh/include/mach-se/mach/se.h +++ linux-sh/arch/sh/include/mach-se/mach/se.h @@ -95,21 +95,6 @@ #define IRQ_CFCARD evt2irq(0x2e0) #endif -/* SH Ether support (SH7710/SH7712) */ -/* Base address */ -#define SH_ETH0_BASE 0xA7000000 -#define SH_ETH1_BASE 0xA7000400 -/* PHY ID */ -#if defined(CONFIG_CPU_SUBTYPE_SH7710) -# define PHY_ID 0x00 -#elif defined(CONFIG_CPU_SUBTYPE_SH7712) -# define PHY_ID 0x01 -#endif -/* Ether IRQ */ -#define SH_ETH0_IRQ evt2irq(0xc00) -#define SH_ETH1_IRQ evt2irq(0xc20) -#define SH_TSU_IRQ evt2irq(0xc40) - void init_se_IRQ(void); #define __IO_PREFIX se