* [PATCH 2/2] SolutionEngine771x: add Ether TSU resource
@ 2018-01-03 20:08 ` Sergei Shtylyov
0 siblings, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2018-01-03 20:08 UTC (permalink / raw)
To: Yoshinori Sato, Rich Felker, linux-sh; +Cc: netdev, Sergei Shtylyov
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 <sergei.shtylyov@cogentembedded.com>
---
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(-)
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] SolutionEngine771x: add Ether TSU resource
@ 2018-01-03 20:08 ` Sergei Shtylyov
0 siblings, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2018-01-03 20:08 UTC (permalink / raw)
To: Yoshinori Sato, Rich Felker, linux-sh; +Cc: netdev, Sergei Shtylyov
[-- Attachment #1: SolutionEngine771x-add-Ether-TSU-resource.patch --]
[-- Type: text/plain, Size: 2154 bytes --]
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 <sergei.shtylyov@cogentembedded.com>
---
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(-)
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] SolutionEngine771x: add Ether TSU resource
2018-01-03 20:08 ` Sergei Shtylyov
@ 2018-01-06 9:24 ` Sergei Shtylyov
-1 siblings, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2018-01-06 9:24 UTC (permalink / raw)
To: Yoshinori Sato, Rich Felker, linux-sh; +Cc: netdev
Hello!
On 1/3/2018 11:08 PM, Sergei Shtylyov wrote:
> 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 <sergei.shtylyov@cogentembedded.com>
>
> ---
> 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(-)
>
> 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,
Oops, should be 0x200, not 0xA00.
> + .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,
Same here. I''ll repost...
> + .flags = IORESOURCE_MEM,
> + },
> + [2] = {
> .start = SH_ETH1_IRQ,
MBR, Sergei
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] SolutionEngine771x: add Ether TSU resource
@ 2018-01-06 9:24 ` Sergei Shtylyov
0 siblings, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2018-01-06 9:24 UTC (permalink / raw)
To: Yoshinori Sato, Rich Felker, linux-sh; +Cc: netdev
Hello!
On 1/3/2018 11:08 PM, Sergei Shtylyov wrote:
> 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 <sergei.shtylyov@cogentembedded.com>
>
> ---
> 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(-)
>
> 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,
Oops, should be 0x200, not 0xA00.
> + .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,
Same here. I''ll repost...
> + .flags = IORESOURCE_MEM,
> + },
> + [2] = {
> .start = SH_ETH1_IRQ,
MBR, Sergei
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] SolutionEngine771x: add Ether TSU resource
@ 2018-01-06 18:53 ` Sergei Shtylyov
0 siblings, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2018-01-06 18:53 UTC (permalink / raw)
To: Yoshinori Sato, Rich Felker, linux-sh; +Cc: netdev, Sergei Shtylyov
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 <sergei.shtylyov@cogentembedded.com>
---
Changes in version 2:
- corrected the TSU resource size.
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(-)
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
@@ -124,10 +124,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,
@@ -147,10 +152,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,
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] SolutionEngine771x: add Ether TSU resource
@ 2018-01-06 18:53 ` Sergei Shtylyov
0 siblings, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2018-01-06 18:53 UTC (permalink / raw)
To: Yoshinori Sato, Rich Felker, linux-sh; +Cc: netdev, Sergei Shtylyov
[-- Attachment #1: SolutionEngine771x-add-Ether-TSU-resource-v2.patch --]
[-- Type: text/plain, Size: 2212 bytes --]
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 <sergei.shtylyov@cogentembedded.com>
---
Changes in version 2:
- corrected the TSU resource size.
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(-)
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
@@ -124,10 +124,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,
@@ -147,10 +152,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,
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-01-06 18:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-03 20:08 [PATCH 2/2] SolutionEngine771x: add Ether TSU resource Sergei Shtylyov
2018-01-03 20:08 ` Sergei Shtylyov
2018-01-06 9:24 ` Sergei Shtylyov
2018-01-06 9:24 ` Sergei Shtylyov
2018-01-06 18:53 ` Sergei Shtylyov
2018-01-06 18:53 ` Sergei Shtylyov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.