diff mbox

SolutionEngine SH771x: remove Ether support

Message ID 201308130217.03133.sergei.shtylyov@cogentembedded.com (mailing list archive)
State Awaiting Upstream
Delegated to: Paul Mundt
Headers show

Commit Message

Sergei Shtylyov Aug. 12, 2013, 10:17 p.m. UTC
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 <sergei.shtylyov@cogentembedded.com>

---
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

Comments

Sergei Shtylyov Aug. 13, 2013, 9:32 p.m. UTC | #1
Hello.

On 08/13/2013 02:17 AM, I wrote:

> 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.

    After looking at the original driver, it seems I've got the necessary 
data... but both Ether controllers seems to have shared TSU which is not yet 
supported by the driver (there was a patch from Iwamatsu-san to implement it 
but it hasn't been merged).

> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

WBR, Sergei

--
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
diff mbox

Patch

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