Skip to contentSkip to conversation

ARM: ep93xx: ts72xx: Add support for BK3 board

PATCH Superseded Lukasz Majewski 5 participants 80 messages Nov 16, 2017 – Dec 20, 2017

Subsystems (4)
lore
Share & tools
lore

Lukasz Majewski

author maintainer
#0 lore raw

cover ARM: ep93xx: ts72xx: Add support for BK3 board

This patch series adds support for Liebherr's BK3 board, being a derivative of TS72XX design.

This patchset consists of following patches:

- ts72xx.[c|h] cosmetic cleanup/improvement
- Move the common code for ts72xx and BK3 to ts72xx-common.c - this code can be reused by other designs build around ts72xx
- The Liebherr's BK3 board has been added with re-using code of ts72xx.c

Lukasz Majewski (4):
ARM: ep93xx: ts72xx: Use DEFINE_RES_MEM macros where applicable
ARM: ep93xx: ts72xx: Provide include guards for ts72xx.h file
ARM: ep93xx: ts72xx: Exclude reusable part of the ts72xx board
ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

 arch/arm/mach-ep93xx/Kconfig         |  11 +++
 arch/arm/mach-ep93xx/Makefile        |   2 +
 arch/arm/mach-ep93xx/bk3.c           |  88 +++++++++++++++++++
 arch/arm/mach-ep93xx/ts72xx-common.c | 158 +++++++++++++++++++++++++++++++++++
 arch/arm/mach-ep93xx/ts72xx.c        | 136 ++----------------------------
 arch/arm/mach-ep93xx/ts72xx.h        |  14 ++++
 arch/arm/tools/mach-types            |   1 +
 7 files changed, 279 insertions(+), 131 deletions(-)
 create mode 100644 arch/arm/mach-ep93xx/bk3.c
 create mode 100644 arch/arm/mach-ep93xx/ts72xx-common.c
Signature · 1 line
2.11.0
author maintainer
#1 lore raw

PATCH 1/4 ARM: ep93xx: ts72xx: Use DEFINE_RES_MEM macros where applicable

This commit cleans up the code by using dedicated macros instead of full definitions.

---
 arch/arm/mach-ep93xx/ts72xx.c | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)
arch/arm/mach-ep93xx/ts72xx.c +3 -15
index 8745162ec05d..06345b85f27c 100644
@@ -187,16 +187,8 @@ static struct platform_device ts72xx_rtc_device = {
 };
 
 static struct resource ts72xx_wdt_resources[] = {
-	{
-		.start	= TS72XX_WDT_CONTROL_PHYS_BASE,
-		.end	= TS72XX_WDT_CONTROL_PHYS_BASE + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	{
-		.start	= TS72XX_WDT_FEED_PHYS_BASE,
-		.end	= TS72XX_WDT_FEED_PHYS_BASE + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
+	DEFINE_RES_MEM(TS72XX_WDT_CONTROL_PHYS_BASE, SZ_4K),
+	DEFINE_RES_MEM(TS72XX_WDT_FEED_PHYS_BASE, SZ_4K),
 };
 
 static struct platform_device ts72xx_wdt_device = {
@@ -216,11 +208,7 @@ static struct ep93xx_eth_data __initdata ts72xx_eth_data = {
 #define TS73XX_FPGA_LOADER_BASE		0x03c00000
 
 static struct resource ts73xx_fpga_resources[] = {
-	{
-		.start	= EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE,
-		.end	= EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE + 1,
-		.flags	= IORESOURCE_MEM,
-	},
+	DEFINE_RES_MEM(EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE, 0x01),
 };
 
 static struct platform_device ts73xx_fpga_device = {
Signature · 1 line
2.11.0
author maintainer
#2 lore raw

PATCH 2/4 ARM: ep93xx: ts72xx: Provide include guards for ts72xx.h file

In reply to Lukasz Majewski

This commit adds include file guards to ts72xx.h

---
 arch/arm/mach-ep93xx/ts72xx.h | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/mach-ep93xx/ts72xx.h +4 -0
index 2255ba29fdd6..d67f203f769a 100644
@@ -11,6 +11,9 @@
  * febfd000	22800000	4K	options register #2
  */
 
+#ifndef __TS72XX_H_
+#define __TS72XX_H_
+
 #define TS72XX_MODEL_PHYS_BASE		0x22000000
 #define TS72XX_MODEL_VIRT_BASE		IOMEM(0xfebff000)
 #define TS72XX_MODEL_SIZE		0x00001000
@@ -85,3 +88,4 @@ static inline int is_ts9420_installed(void)
 					TS72XX_OPTIONS2_TS9420);
 }
 #endif
+#endif /* __TS72XX_H_ */
Signature · 1 line
2.11.0
author maintainer
#3 lore raw

PATCH 3/4 ARM: ep93xx: ts72xx: Exclude reusable part of the ts72xx board

In reply to Lukasz Majewski

This commit creates a new file ts72xx-common.c [1], which consists of code being potentially re-usable by other clones of reference ts72xx design.

To achieve this goal, a new symbol - TS72XX_COMMON has been introduced.

---
 arch/arm/mach-ep93xx/Kconfig         |   4 +
 arch/arm/mach-ep93xx/Makefile        |   1 +
 arch/arm/mach-ep93xx/ts72xx-common.c | 158 +++++++++++++++++++++++++++++++++++
 arch/arm/mach-ep93xx/ts72xx.c        | 122 +--------------------------
 arch/arm/mach-ep93xx/ts72xx.h        |   5 ++
 5 files changed, 172 insertions(+), 118 deletions(-)
 create mode 100644 arch/arm/mach-ep93xx/ts72xx-common.c
arch/arm/mach-ep93xx/Kconfig +4 -0
index 61a75ca3684e..16c5d6eedf45 100644
@@ -131,10 +131,14 @@ config MACH_SNAPPER_CL15
 
 config MACH_TS72XX
 	bool "Support Technologic Systems TS-72xx SBC"
+	select TS72XX_COMMON
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  Technologic Systems TS-72xx board.
 
+config TS72XX_COMMON
+	bool
+
 config MACH_VISION_EP9307
 	bool "Support Vision Engraving Systems EP9307 SoM"
 	help
arch/arm/mach-ep93xx/Makefile +1 -0
index b7ae4345ac08..f2692a072864 100644
@@ -16,3 +16,4 @@ obj-$(CONFIG_MACH_SIM_ONE)	+= simone.o
 obj-$(CONFIG_MACH_SNAPPER_CL15)	+= snappercl15.o
 obj-$(CONFIG_MACH_TS72XX)	+= ts72xx.o
 obj-$(CONFIG_MACH_VISION_EP9307)+= vision_ep9307.o
+obj-$(CONFIG_TS72XX_COMMON)	+= ts72xx-common.o
arch/arm/mach-ep93xx/ts72xx-common.c new file +158 -0

158 lines not on this page · raw message

arch/arm/mach-ep93xx/ts72xx.c +4 -118

157 lines not on this page · raw message

arch/arm/mach-ep93xx/ts72xx.h +5 -0
index d67f203f769a..a9d3bb49f666 100644
@@ -87,5 +87,10 @@ static inline int is_ts9420_installed(void)
 	return !!(__raw_readb(TS72XX_OPTIONS2_VIRT_BASE) &
 					TS72XX_OPTIONS2_TS9420);
 }
+
+void __init ts72xx_register_flash(struct mtd_partition *parts, int n);
+void __init ts72xx_register_watchdog(void);
+void __init ts72xx_common_map_io(void);
+void __init ts72xx_register_eth(void);
 #endif
 #endif /* __TS72XX_H_ */
Signature · 1 line
2.11.0
author maintainer
#4 lore raw

PATCH 4/4 ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

In reply to Lukasz Majewski

The BK3 board is a derivative of the ts72xx reference design. Hence, it can re-use code from the ts72xx-common.c file.

---
 arch/arm/mach-ep93xx/Kconfig  |  7 ++++
 arch/arm/mach-ep93xx/Makefile |  1 +
 arch/arm/mach-ep93xx/bk3.c    | 88 +++++++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-ep93xx/ts72xx.h |  5 +++
 arch/arm/tools/mach-types     |  1 +
 5 files changed, 102 insertions(+)
 create mode 100644 arch/arm/mach-ep93xx/bk3.c
arch/arm/mach-ep93xx/Kconfig +7 -0
index 16c5d6eedf45..18a93b404d5e 100644
@@ -21,6 +21,13 @@ config MACH_ADSSPHERE
 	  Say 'Y' here if you want your kernel to support the ADS
 	  Sphere board.
 
+config MACH_BK3
+	bool "Support Liebherr BK3.1"
+	select TS72XX_COMMON
+	help
+	  Say 'Y' here if you want your kernel to support the
+	  Liebherr controller BK3.1.
+
 config MACH_EDB93XX
 	bool
 
arch/arm/mach-ep93xx/Makefile +1 -0
index f2692a072864..fb5bdb7cb944 100644
@@ -9,6 +9,7 @@ obj-$(CONFIG_CRUNCH)		+= crunch.o crunch-bits.o
 AFLAGS_crunch-bits.o		:= -Wa,-mcpu=ep9312
 
 obj-$(CONFIG_MACH_ADSSPHERE)	+= adssphere.o
+obj-$(CONFIG_MACH_BK3)          += bk3.o
 obj-$(CONFIG_MACH_EDB93XX)	+= edb93xx.o
 obj-$(CONFIG_MACH_GESBC9312)	+= gesbc9312.o
 obj-$(CONFIG_MACH_MICRO9)	+= micro9.o
arch/arm/mach-ep93xx/bk3.c new file +88 -0

88 lines not on this page · raw message

arch/arm/mach-ep93xx/ts72xx.h +5 -0
index a9d3bb49f666..07f6491f35ea 100644
@@ -44,6 +44,11 @@
 #define TS72XX_WDT_CONTROL_PHYS_BASE	0x23800000
 #define TS72XX_WDT_FEED_PHYS_BASE	0x23c00000
 
+/* BK3 specific defines */
+#define BK3_CPLDVER_PHYS_BASE		0x23400000
+#define BK3_CPLDVER_VIRT_BASE		0xfebfd000
+#define BK3_CPLDVER_SIZE		0x00001000
+
 #ifndef __ASSEMBLY__
 
 static inline int ts72xx_model(void)
arch/arm/tools/mach-types +1 -0
index a9313b66f770..4eac94c1eb6f 100644
@@ -345,6 +345,7 @@ mxlads			MACH_MXLADS		MXLADS			1851
 linkstation_mini	MACH_LINKSTATION_MINI	LINKSTATION_MINI	1858
 afeb9260		MACH_AFEB9260		AFEB9260		1859
 imx27ipcam		MACH_IMX27IPCAM		IMX27IPCAM		1871
+bk3			MACH_BK3		BK3			1880
 rd88f6183ap_ge		MACH_RD88F6183AP_GE	RD88F6183AP_GE		1894
 realview_pba8		MACH_REALVIEW_PBA8	REALVIEW_PBA8		1897
 realview_pbx		MACH_REALVIEW_PBX	REALVIEW_PBX		1901
Signature · 1 line
2.11.0
#5 lore raw
In reply to Lukasz Majewski

Hello Lukasz!

Quoted 5 lines · Lukasz Majewski

This patch series adds support for Liebherr's BK3 board, being a derivative of TS72XX design.

This patchset consists of following patches:

Quoted 8 lines

- ts72xx.[c|h] cosmetic cleanup/improvement
- Move the common code for ts72xx and BK3 to ts72xx-common.c - this code can be reused by other designs build around ts72xx
- The Liebherr's BK3 board has been added with re-using code of ts72xx.c

Lukasz Majewski (4):
ARM: ep93xx: ts72xx: Use DEFINE_RES_MEM macros where applicable

The patch 3/4 deletes everything added by patch 1/4, so I don't really see the point of it.

Quoted 3 lines

ARM: ep93xx: ts72xx: Provide include guards for ts72xx.h file
ARM: ep93xx: ts72xx: Exclude reusable part of the ts72xx board
ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

I tend to agree with Hartley, if you'd just add all BK3-related extras to ts72xx.c it would be less than 60 LoCs, you probably even do not need new Kconfig options.

Alex.

author maintainer
#6 lore raw

Hi Alexander,

Quoted 14 lines

Hello Lukasz!

Quoted 11 lines · Lukasz Majewski

This patch series adds support for Liebherr's BK3 board, being a derivative of TS72XX design.

This patchset consists of following patches:

- ts72xx.[c|h] cosmetic cleanup/improvement
- Move the common code for ts72xx and BK3 to ts72xx-common.c - this code can be reused by other designs build around ts72xx
- The Liebherr's BK3 board has been added with re-using code of ts72xx.c

Quoted 5 lines
Quoted 2 lines

Lukasz Majewski (4):
ARM: ep93xx: ts72xx: Use DEFINE_RES_MEM macros where applicable

The patch 3/4 deletes everything added by patch 1/4, so I don't really see the point of it.

I wanted to first clean up things.

Quoted 9 lines
Quoted 5 lines

ARM: ep93xx: ts72xx: Provide include guards for ts72xx.h file
ARM: ep93xx: ts72xx: Exclude reusable part of the ts72xx board
ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx
derivative

I tend to agree with Hartley, if you'd just add all BK3-related extras to ts72xx.c it would be less than 60 LoCs, you probably even do not need new Kconfig options.

Some Kconfig option would be welcome (MACH_BK3 ?) if it turns out that I do need to adjust some things later (like change HAMMING NAND ECC to BCH for plat_nand driver).

The separate bk3.c file is more appealing (for me) in terms of extending the code latter.

Quoted 2 lines

Alex.

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171120/d0ce35fc/attachment.sig>

#7 lore raw
Quoted 16 lines · Lukasz Majewski

Hi Alexander,

Quoted 14 lines

Hello Lukasz!

Quoted 11 lines · Lukasz Majewski

This patch series adds support for Liebherr's BK3 board, being a derivative of TS72XX design.

This patchset consists of following patches:

- ts72xx.[c|h] cosmetic cleanup/improvement
- Move the common code for ts72xx and BK3 to ts72xx-common.c - this code can be reused by other designs build around ts72xx
- The Liebherr's BK3 board has been added with re-using code of ts72xx.c

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Lukasz Majewski (4):
ARM: ep93xx: ts72xx: Use DEFINE_RES_MEM macros where applicable

The patch 3/4 deletes everything added by patch 1/4, so I don't really see the point of it.

I wanted to first clean up things.

Cleaning it up first is the right approach, a patch that moves code around should not contain any other changes.

Quoted 9 lines
Quoted 8 lines
Quoted 4 lines

ARM: ep93xx: ts72xx: Provide include guards for ts72xx.h file
ARM: ep93xx: ts72xx: Exclude reusable part of the ts72xx board
ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx
derivative

I tend to agree with Hartley, if you'd just add all BK3-related extras to ts72xx.c it would be less than 60 LoCs, you probably even do not need new Kconfig options.

Quoted 6 lines

Some Kconfig option would be welcome (MACH_BK3 ?) if it turns out that I do need to adjust some things later (like change HAMMING NAND ECC to BCH for plat_nand driver).

The separate bk3.c file is more appealing (for me) in terms of extending the code latter.

I think keeping everything in one file, but adding a new Kconfig option that uses 'select MACH_TS72XX' to enable the existing board would be simpler, we can split it out later once we think it gets too big.

Arnd

author maintainer
#8 lore raw

Hi Arnd,

Quoted 43 lines
Quoted 16 lines · Lukasz Majewski

Hi Alexander,

Quoted 14 lines

Hello Lukasz!

Quoted 11 lines · Lukasz Majewski

This patch series adds support for Liebherr's BK3 board, being a derivative of TS72XX design.

This patchset consists of following patches:

- ts72xx.[c|h] cosmetic cleanup/improvement
- Move the common code for ts72xx and BK3 to ts72xx-common.c - this code can be reused by other designs build around ts72xx
- The Liebherr's BK3 board has been added with re-using code of ts72xx.c

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Lukasz Majewski (4):
ARM: ep93xx: ts72xx: Use DEFINE_RES_MEM macros where
applicable

The patch 3/4 deletes everything added by patch 1/4, so I don't really see the point of it.

I wanted to first clean up things.

Cleaning it up first is the right approach, a patch that moves code around should not contain any other changes.

Quoted 13 lines
Quoted 8 lines
Quoted 4 lines

ARM: ep93xx: ts72xx: Provide include guards for ts72xx.h file
ARM: ep93xx: ts72xx: Exclude reusable part of the ts72xx board
ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx
derivative

I tend to agree with Hartley, if you'd just add all BK3-related extras to ts72xx.c it would be less than 60 LoCs, you probably even do not need new Kconfig options.

Some Kconfig option would be welcome (MACH_BK3 ?) if it turns out that I do need to adjust some things later (like change HAMMING NAND ECC to BCH for plat_nand driver).

Quoted 7 lines
Quoted 2 lines

The separate bk3.c file is more appealing (for me) in terms of extending the code latter.

I think keeping everything in one file, but adding a new Kconfig option that uses 'select MACH_TS72XX' to enable the existing board would be simpler, we can split it out later once we think it gets too big.

Ok. Thanks for the suggestion. I will prepare v2.

Quoted 2 lines

Arnd

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171120/aceeacbd/attachment.sig>

author maintainer
#9 lore raw

v2 cover ARM: ep93xx: ts72xx: Add support for BK3 board

In reply to Lukasz Majewski

This patch series adds support for Liebherr's BK3 board, being a derivative of TS72XX design.

This patchset consists of following patches:

- ts72xx.[c|h] cosmetic cleanup/improvement
- Rewrite ts72xx.c to be reusable by bk3
- The Liebherr's BK3 board has been added with re-using code of ts72xx.c

This series applies on top of v4.14

Lukasz Majewski (6):
ARM: ep93xx: ts72xx: Use DEFINE_RES_MEM macros where applicable
ARM: ep93xx: ts72xx: Provide include guards for ts72xx.h file
ARM: ep93xx: ts72xx: Rewrite ts72xx_register_flash() to accept
parameters
ARM: ep93xx: ts72xx: Rewrite map IO code to be reusable
ARM: ep93xx: ts72xx: cosmetic: Add some description to ts72xx code
ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

 arch/arm/mach-ep93xx/Kconfig  |   7 +++
 arch/arm/mach-ep93xx/ts72xx.c | 137 +++++++++++++++++++++++++++++++-----------
 arch/arm/mach-ep93xx/ts72xx.h |   9 +++
 arch/arm/tools/mach-types     |   1 +
 4 files changed, 120 insertions(+), 34 deletions(-)
Signature · 1 line
2.11.0
author maintainer
#10 lore raw

PATCH v2 1/6 ARM: ep93xx: ts72xx: Use DEFINE_RES_MEM macros where applicable

This commit cleans up the code by using dedicated macros instead of full definitions.

---
Changes for v2:
- None

---
 arch/arm/mach-ep93xx/ts72xx.c | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)
arch/arm/mach-ep93xx/ts72xx.c +3 -15
index 8745162ec05d..06345b85f27c 100644
@@ -187,16 +187,8 @@ static struct platform_device ts72xx_rtc_device = {
 };
 
 static struct resource ts72xx_wdt_resources[] = {
-	{
-		.start	= TS72XX_WDT_CONTROL_PHYS_BASE,
-		.end	= TS72XX_WDT_CONTROL_PHYS_BASE + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	{
-		.start	= TS72XX_WDT_FEED_PHYS_BASE,
-		.end	= TS72XX_WDT_FEED_PHYS_BASE + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
+	DEFINE_RES_MEM(TS72XX_WDT_CONTROL_PHYS_BASE, SZ_4K),
+	DEFINE_RES_MEM(TS72XX_WDT_FEED_PHYS_BASE, SZ_4K),
 };
 
 static struct platform_device ts72xx_wdt_device = {
@@ -216,11 +208,7 @@ static struct ep93xx_eth_data __initdata ts72xx_eth_data = {
 #define TS73XX_FPGA_LOADER_BASE		0x03c00000
 
 static struct resource ts73xx_fpga_resources[] = {
-	{
-		.start	= EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE,
-		.end	= EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE + 1,
-		.flags	= IORESOURCE_MEM,
-	},
+	DEFINE_RES_MEM(EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE, 0x01),
 };
 
 static struct platform_device ts73xx_fpga_device = {
Signature · 1 line
2.11.0
maintainer Acked-by on v2 1/6
#11 lore raw

Re: [PATCH v2 1/6] ARM: ep93xx: ts72xx: Use DEFINE_RES_MEM macros where applicable

Hi!

Quoted 4 lines · Lukasz Majewski

This commit cleans up the code by using dedicated macros instead of full definitions.

Quoted 43 lines

---
Changes for v2:
- None

---
 arch/arm/mach-ep93xx/ts72xx.c | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)
arch/arm/mach-ep93xx/ts72xx.c +3 -15
index 8745162ec05d..06345b85f27c 100644
@@ -187,16 +187,8 @@ static struct platform_device ts72xx_rtc_device = {
 };
 
 static struct resource ts72xx_wdt_resources[] = {
-	{
-		.start	= TS72XX_WDT_CONTROL_PHYS_BASE,
-		.end	= TS72XX_WDT_CONTROL_PHYS_BASE + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	{
-		.start	= TS72XX_WDT_FEED_PHYS_BASE,
-		.end	= TS72XX_WDT_FEED_PHYS_BASE + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
+	DEFINE_RES_MEM(TS72XX_WDT_CONTROL_PHYS_BASE, SZ_4K),
+	DEFINE_RES_MEM(TS72XX_WDT_FEED_PHYS_BASE, SZ_4K),
 };
 
 static struct platform_device ts72xx_wdt_device = {
@@ -216,11 +208,7 @@ static struct ep93xx_eth_data __initdata ts72xx_eth_data = {
 #define TS73XX_FPGA_LOADER_BASE		0x03c00000
 
 static struct resource ts73xx_fpga_resources[] = {
-	{
-		.start	= EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE,
-		.end	= EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE + 1,
-		.flags	= IORESOURCE_MEM,
-	},
+	DEFINE_RES_MEM(EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE, 0x01),
 };
 
 static struct platform_device ts73xx_fpga_device = {
author maintainer
#12 lore raw

PATCH v2 2/6 ARM: ep93xx: ts72xx: Provide include guards for ts72xx.h file

In reply to Lukasz Majewski

This commit adds include file guards to ts72xx.h

---
Changes for v2:
- None

---
 arch/arm/mach-ep93xx/ts72xx.h | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/mach-ep93xx/ts72xx.h +4 -0
index b89850f1a965..d9ff04db3221 100644
@@ -12,6 +12,9 @@
  * febfd000	22800000	4K	options register #2
  */
 
+#ifndef __TS72XX_H_
+#define __TS72XX_H_
+
 #define TS72XX_MODEL_PHYS_BASE		0x22000000
 #define TS72XX_MODEL_VIRT_BASE		IOMEM(0xfebff000)
 #define TS72XX_MODEL_SIZE		0x00001000
@@ -86,3 +89,4 @@ static inline int is_ts9420_installed(void)
 					TS72XX_OPTIONS2_TS9420);
 }
 #endif
+#endif /* __TS72XX_H_ */
Signature · 1 line
2.11.0
maintainer Acked-by on v2 2/6
#13 lore raw

Re: [PATCH v2 2/6] ARM: ep93xx: ts72xx: Provide include guards for ts72xx.h file

Hi!

Quoted 3 lines · Lukasz Majewski

This commit adds include file guards to ts72xx.h

Quoted 26 lines

---
Changes for v2:
- None

---
 arch/arm/mach-ep93xx/ts72xx.h | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/mach-ep93xx/ts72xx.h +4 -0
index b89850f1a965..d9ff04db3221 100644
@@ -12,6 +12,9 @@
  * febfd000	22800000	4K	options register #2
  */
 
+#ifndef __TS72XX_H_
+#define __TS72XX_H_
+
 #define TS72XX_MODEL_PHYS_BASE		0x22000000
 #define TS72XX_MODEL_VIRT_BASE		IOMEM(0xfebff000)
 #define TS72XX_MODEL_SIZE		0x00001000
@@ -86,3 +89,4 @@ static inline int is_ts9420_installed(void)
 					TS72XX_OPTIONS2_TS9420);
 }
 #endif
+#endif /* __TS72XX_H_ */
author maintainer
#14 lore raw

PATCH v2 3/6 ARM: ep93xx: ts72xx: Rewrite ts72xx_register_flash() to accept parameters

In reply to Lukasz Majewski

This commit extend the ts72xx_register_flash() to accept passed parameters, which makes it more reusable.

Now it is possible to accept ep93xx flash start address and partitions.

---
Changes for v2:
- New patch

---
 arch/arm/mach-ep93xx/ts72xx.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)
arch/arm/mach-ep93xx/ts72xx.c +8 -12
index 06345b85f27c..00e0e5b8babf 100644
@@ -120,8 +120,6 @@ static struct platform_nand_data ts72xx_nand_data = {
 		.nr_chips	= 1,
 		.chip_offset	= 0,
 		.chip_delay	= 15,
-		.partitions	= ts72xx_nand_parts,
-		.nr_partitions	= ARRAY_SIZE(ts72xx_nand_parts),
 	},
 	.ctrl = {
 		.cmd_ctrl	= ts72xx_nand_hwcontrol,
@@ -145,8 +143,8 @@ static struct platform_device ts72xx_nand_flash = {
 	.num_resources		= ARRAY_SIZE(ts72xx_nand_resource),
 };
 
-
-static void __init ts72xx_register_flash(void)
+void __init ts72xx_register_flash(struct mtd_partition *parts, int n,
+				  resource_size_t start)
 {
 	/*
 	 * TS7200 has NOR flash all other TS72xx board have NAND flash.
@@ -154,16 +152,12 @@ static void __init ts72xx_register_flash(void)
 	if (board_is_ts7200()) {
 		ep93xx_register_flash(2, EP93XX_CS6_PHYS_BASE, SZ_16M);
 	} else {
-		resource_size_t start;
-
-		if (is_ts9420_installed())
-			start = EP93XX_CS7_PHYS_BASE;
-		else
-			start = EP93XX_CS6_PHYS_BASE;
-
 		ts72xx_nand_resource[0].start = start;
 		ts72xx_nand_resource[0].end = start + SZ_16M - 1;
 
+		ts72xx_nand_data.chip.partitions = parts;
+		ts72xx_nand_data.chip.nr_partitions = n;
+
 		platform_device_register(&ts72xx_nand_flash);
 	}
 }
@@ -223,7 +217,9 @@ static struct platform_device ts73xx_fpga_device = {
 static void __init ts72xx_init_machine(void)
 {
 	ep93xx_init_devices();
-	ts72xx_register_flash();
+	ts72xx_register_flash(ts72xx_nand_parts, ARRAY_SIZE(ts72xx_nand_parts),
+			      is_ts9420_installed() ?
+			      EP93XX_CS7_PHYS_BASE : EP93XX_CS6_PHYS_BASE);
 	platform_device_register(&ts72xx_rtc_device);
 	platform_device_register(&ts72xx_wdt_device);
 
Signature · 1 line
2.11.0
maintainer Acked-by on v2 3/6
#15 lore raw

Re: [PATCH v2 3/6] ARM: ep93xx: ts72xx: Rewrite ts72xx_register_flash() to accept parameters

Hi!

Quoted 6 lines · Lukasz Majewski

This commit extend the ts72xx_register_flash() to accept passed parameters, which makes it more reusable.

Now it is possible to accept ep93xx flash start address and partitions.

Quoted 63 lines

---
Changes for v2:
- New patch

---
 arch/arm/mach-ep93xx/ts72xx.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)
arch/arm/mach-ep93xx/ts72xx.c +8 -12
index 06345b85f27c..00e0e5b8babf 100644
@@ -120,8 +120,6 @@ static struct platform_nand_data ts72xx_nand_data = {
 		.nr_chips	= 1,
 		.chip_offset	= 0,
 		.chip_delay	= 15,
-		.partitions	= ts72xx_nand_parts,
-		.nr_partitions	= ARRAY_SIZE(ts72xx_nand_parts),
 	},
 	.ctrl = {
 		.cmd_ctrl	= ts72xx_nand_hwcontrol,
@@ -145,8 +143,8 @@ static struct platform_device ts72xx_nand_flash = {
 	.num_resources		= ARRAY_SIZE(ts72xx_nand_resource),
 };
 
-
-static void __init ts72xx_register_flash(void)
+void __init ts72xx_register_flash(struct mtd_partition *parts, int n,
+				  resource_size_t start)
 {
 	/*
 	 * TS7200 has NOR flash all other TS72xx board have NAND flash.
@@ -154,16 +152,12 @@ static void __init ts72xx_register_flash(void)
 	if (board_is_ts7200()) {
 		ep93xx_register_flash(2, EP93XX_CS6_PHYS_BASE, SZ_16M);
 	} else {
-		resource_size_t start;
-
-		if (is_ts9420_installed())
-			start = EP93XX_CS7_PHYS_BASE;
-		else
-			start = EP93XX_CS6_PHYS_BASE;
-
 		ts72xx_nand_resource[0].start = start;
 		ts72xx_nand_resource[0].end = start + SZ_16M - 1;
 
+		ts72xx_nand_data.chip.partitions = parts;
+		ts72xx_nand_data.chip.nr_partitions = n;
+
 		platform_device_register(&ts72xx_nand_flash);
 	}
 }
@@ -223,7 +217,9 @@ static struct platform_device ts73xx_fpga_device = {
 static void __init ts72xx_init_machine(void)
 {
 	ep93xx_init_devices();
-	ts72xx_register_flash();
+	ts72xx_register_flash(ts72xx_nand_parts, ARRAY_SIZE(ts72xx_nand_parts),
+			      is_ts9420_installed() ?
+			      EP93XX_CS7_PHYS_BASE : EP93XX_CS6_PHYS_BASE);
 	platform_device_register(&ts72xx_rtc_device);
 	platform_device_register(&ts72xx_wdt_device);
 
author maintainer
#16 lore raw

PATCH v2 4/6 ARM: ep93xx: ts72xx: Rewrite map IO code to be reusable

In reply to Lukasz Majewski

The map IO common code has been excluded to be reused by other ts72xx clones.

---
Changes for v2:
- New patch

---
 arch/arm/mach-ep93xx/ts72xx.c | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)
arch/arm/mach-ep93xx/ts72xx.c +16 -7
index 00e0e5b8babf..a6e473b3dcf6 100644
@@ -30,11 +30,6 @@
 
 static struct map_desc ts72xx_io_desc[] __initdata = {
 	{
-		.virtual	= (unsigned long)TS72XX_MODEL_VIRT_BASE,
-		.pfn		= __phys_to_pfn(TS72XX_MODEL_PHYS_BASE),
-		.length		= TS72XX_MODEL_SIZE,
-		.type		= MT_DEVICE,
-	}, {
 		.virtual	= (unsigned long)TS72XX_OPTIONS_VIRT_BASE,
 		.pfn		= __phys_to_pfn(TS72XX_OPTIONS_PHYS_BASE),
 		.length		= TS72XX_OPTIONS_SIZE,
@@ -47,12 +42,26 @@ static struct map_desc ts72xx_io_desc[] __initdata = {
 	}
 };
 
-static void __init ts72xx_map_io(void)
+static struct map_desc ts72xx_common_io_desc[] __initdata = {
+	{
+		.virtual	= (unsigned long)TS72XX_MODEL_VIRT_BASE,
+		.pfn		= __phys_to_pfn(TS72XX_MODEL_PHYS_BASE),
+		.length		= TS72XX_MODEL_SIZE,
+		.type		= MT_DEVICE,
+	}
+};
+
+void __init ts72xx_common_map_io(void)
 {
 	ep93xx_map_io();
-	iotable_init(ts72xx_io_desc, ARRAY_SIZE(ts72xx_io_desc));
+	iotable_init(ts72xx_common_io_desc, ARRAY_SIZE(ts72xx_common_io_desc));
 }
 
+static void __init ts72xx_map_io(void)
+{
+	ts72xx_common_map_io();
+	iotable_init(ts72xx_io_desc, ARRAY_SIZE(ts72xx_io_desc));
+}
 
 /*************************************************************************
  * NAND flash
Signature · 1 line
2.11.0
maintainer Acked-by on v2 4/6
#17 lore raw

Re: [PATCH v2 4/6] ARM: ep93xx: ts72xx: Rewrite map IO code to be reusable

Hi!

Quoted 4 lines · Lukasz Majewski

The map IO common code has been excluded to be reused by other ts72xx clones.

Quoted 53 lines

---
Changes for v2:
- New patch

---
 arch/arm/mach-ep93xx/ts72xx.c | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)
arch/arm/mach-ep93xx/ts72xx.c +16 -7
index 00e0e5b8babf..a6e473b3dcf6 100644
@@ -30,11 +30,6 @@
 
 static struct map_desc ts72xx_io_desc[] __initdata = {
 	{
-		.virtual	= (unsigned long)TS72XX_MODEL_VIRT_BASE,
-		.pfn		= __phys_to_pfn(TS72XX_MODEL_PHYS_BASE),
-		.length		= TS72XX_MODEL_SIZE,
-		.type		= MT_DEVICE,
-	}, {
 		.virtual	= (unsigned long)TS72XX_OPTIONS_VIRT_BASE,
 		.pfn		= __phys_to_pfn(TS72XX_OPTIONS_PHYS_BASE),
 		.length		= TS72XX_OPTIONS_SIZE,
@@ -47,12 +42,26 @@ static struct map_desc ts72xx_io_desc[] __initdata = {
 	}
 };
 
-static void __init ts72xx_map_io(void)
+static struct map_desc ts72xx_common_io_desc[] __initdata = {
+	{
+		.virtual	= (unsigned long)TS72XX_MODEL_VIRT_BASE,
+		.pfn		= __phys_to_pfn(TS72XX_MODEL_PHYS_BASE),
+		.length		= TS72XX_MODEL_SIZE,
+		.type		= MT_DEVICE,
+	}
+};
+
+void __init ts72xx_common_map_io(void)
 {
 	ep93xx_map_io();
-	iotable_init(ts72xx_io_desc, ARRAY_SIZE(ts72xx_io_desc));
+	iotable_init(ts72xx_common_io_desc, ARRAY_SIZE(ts72xx_common_io_desc));
 }
 
+static void __init ts72xx_map_io(void)
+{
+	ts72xx_common_map_io();
+	iotable_init(ts72xx_io_desc, ARRAY_SIZE(ts72xx_io_desc));
+}
 
 /*************************************************************************
  * NAND flash
author maintainer
#18 lore raw

PATCH v2 5/6 ARM: ep93xx: ts72xx: cosmetic: Add some description to ts72xx code

In reply to Lukasz Majewski

This patch extends readability of ts72xx.c code.

---
Changes for v2:
- New patch

---
 arch/arm/mach-ep93xx/ts72xx.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/mach-ep93xx/ts72xx.c +12 -0
index a6e473b3dcf6..2e8fcc6e87b6 100644
@@ -28,6 +28,9 @@
 #include "soc.h"
 #include "ts72xx.h"
 
+/*************************************************************************
+ * IO map
+ *************************************************************************/
 static struct map_desc ts72xx_io_desc[] __initdata = {
 	{
 		.virtual	= (unsigned long)TS72XX_OPTIONS_VIRT_BASE,
@@ -189,6 +192,9 @@ static struct platform_device ts72xx_rtc_device = {
 	.num_resources 	= ARRAY_SIZE(ts72xx_rtc_resources),
 };
 
+/*************************************************************************
+ * WATCHDOG
+ *************************************************************************/
 static struct resource ts72xx_wdt_resources[] = {
 	DEFINE_RES_MEM(TS72XX_WDT_CONTROL_PHYS_BASE, SZ_4K),
 	DEFINE_RES_MEM(TS72XX_WDT_FEED_PHYS_BASE, SZ_4K),
@@ -201,10 +207,16 @@ static struct platform_device ts72xx_wdt_device = {
 	.resource	= ts72xx_wdt_resources,
 };
 
+/*************************************************************************
+ * ETH
+ *************************************************************************/
 static struct ep93xx_eth_data __initdata ts72xx_eth_data = {
 	.phy_id		= 1,
 };
 
+/*************************************************************************
+ * TS72XX support code
+ *************************************************************************/
 #if IS_ENABLED(CONFIG_FPGA_MGR_TS73XX)
 
 /* Relative to EP93XX_CS1_PHYS_BASE */
Signature · 1 line
2.11.0
author maintainer
#19 lore raw

PATCH v2 6/6 ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

In reply to Lukasz Majewski

The BK3 board is a derivative of the ts72xx reference design.

---
Changes for v2:
- Place bk3 support code to the ts72xx.c file

---
 arch/arm/mach-ep93xx/Kconfig  |  7 +++++
 arch/arm/mach-ep93xx/ts72xx.c | 64 +++++++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-ep93xx/ts72xx.h |  5 ++++
 arch/arm/tools/mach-types     |  1 +
 4 files changed, 77 insertions(+)
arch/arm/mach-ep93xx/Kconfig +7 -0
index 61a75ca3684e..c095236d7ff8 100644
@@ -21,6 +21,13 @@ config MACH_ADSSPHERE
 	  Say 'Y' here if you want your kernel to support the ADS
 	  Sphere board.
 
+config MACH_BK3
+	bool "Support Liebherr BK3.1"
+	select MACH_TS72XX
+	help
+	  Say 'Y' here if you want your kernel to support the
+	  Liebherr controller BK3.1.
+
 config MACH_EDB93XX
 	bool
 
arch/arm/mach-ep93xx/ts72xx.c +64 -0

75 lines not on this page · raw message

arch/arm/mach-ep93xx/ts72xx.h +5 -0
index d9ff04db3221..d3165bb9ee78 100644
@@ -45,6 +45,11 @@
 #define TS72XX_WDT_CONTROL_PHYS_BASE	0x23800000
 #define TS72XX_WDT_FEED_PHYS_BASE	0x23c00000
 
+/* BK3 specific defines */
+#define BK3_CPLDVER_PHYS_BASE		0x23400000
+#define BK3_CPLDVER_VIRT_BASE		0xfebfd000
+#define BK3_CPLDVER_SIZE		0x00001000
+
 #ifndef __ASSEMBLY__
 
 static inline int ts72xx_model(void)
arch/arm/tools/mach-types +1 -0
index a9313b66f770..4eac94c1eb6f 100644
@@ -345,6 +345,7 @@ mxlads			MACH_MXLADS		MXLADS			1851
 linkstation_mini	MACH_LINKSTATION_MINI	LINKSTATION_MINI	1858
 afeb9260		MACH_AFEB9260		AFEB9260		1859
 imx27ipcam		MACH_IMX27IPCAM		IMX27IPCAM		1871
+bk3			MACH_BK3		BK3			1880
 rd88f6183ap_ge		MACH_RD88F6183AP_GE	RD88F6183AP_GE		1894
 realview_pba8		MACH_REALVIEW_PBA8	REALVIEW_PBA8		1897
 realview_pbx		MACH_REALVIEW_PBX	REALVIEW_PBX		1901
Signature · 1 line
2.11.0
#20 lore raw

Re: [PATCH v2 6/6] ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

Hello Lukasz,

some nitpicking below...

Quoted 48 lines · Lukasz Majewski

The BK3 board is a derivative of the ts72xx reference design.

---
Changes for v2:
- Place bk3 support code to the ts72xx.c file

---
 arch/arm/mach-ep93xx/Kconfig  |  7 +++++
 arch/arm/mach-ep93xx/ts72xx.c | 64 +++++++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-ep93xx/ts72xx.h |  5 ++++
 arch/arm/tools/mach-types     |  1 +
 4 files changed, 77 insertions(+)
arch/arm/mach-ep93xx/Kconfig +7 -0
index 61a75ca3684e..c095236d7ff8 100644
@@ -21,6 +21,13 @@ config MACH_ADSSPHERE
 	  Say 'Y' here if you want your kernel to support the ADS
 	  Sphere board.
 
+config MACH_BK3
+	bool "Support Liebherr BK3.1"
+	select MACH_TS72XX
+	help
+	  Say 'Y' here if you want your kernel to support the
+	  Liebherr controller BK3.1.
+
 config MACH_EDB93XX
 	bool
 
arch/arm/mach-ep93xx/ts72xx.c +2 -0
index 2e8fcc6e87b6..0de19b136ad0 100644
@@ -18,8 +18,10 @@
 #include <linux/io.h>
 #include <linux/mtd/rawnand.h>
 #include <linux/mtd/partitions.h>
+#include <linux/amba/bus.h>
 
 #include <mach/hardware.h>
+#include <mach/irqs.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
@@ -261,3 +263,65 @@ MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
 	.init_late	= ep93xx_init_late,

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 273

Quoted 10 lines
arch/arm/mach-ep93xx/ts72xx.c +8 -0
 	.restart	= ep93xx_restart,
 MACHINE_END
+
+/*************************************************************************
+ * BK3 support code
+ *************************************************************************/
+static struct mtd_partition bk3_nand_parts[] = {
+	{
+		.name		= "System",
+		.offset	= 0x00000000,

I see the above and below lines as unaligned

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 277

Quoted 4 lines
arch/arm/mach-ep93xx/ts72xx.c +4 -0
+		.size		= 0x01e00000,
+	}, {
+		.name		= "Data",
+		.offset	= 0x01e00000,

same here

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 281

Quoted 4 lines
arch/arm/mach-ep93xx/ts72xx.c +4 -0
+		.size		= 0x05f20000
+	}, {
+		.name		= "RedBoot",
+		.offset	= 0x07d20000,

same here

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 294

Quoted 13 lines
arch/arm/mach-ep93xx/ts72xx.c +13 -0
+		.size		= 0x002e0000,
+		.mask_flags	= MTD_WRITEABLE,	/* force RO */
+	},
+};
+
+static AMBA_APB_DEVICE(i2s1, "apb:i2s", 1, EP93XX_I2S_PHYS_BASE,
+		       { IRQ_EP93XX_SAI }, NULL);
+
+static struct map_desc bk3_io_desc[] __initdata = {
+	{
+		.virtual	= BK3_CPLDVER_VIRT_BASE,
+		.pfn		= __phys_to_pfn(BK3_CPLDVER_PHYS_BASE),
+		.length	= BK3_CPLDVER_SIZE,

same here

Quoted 15 lines
arch/arm/mach-ep93xx/ts72xx.c +15 -0
+		.type		= MT_DEVICE,
+	}
+};
+
+static void __init bk3_map_io(void)
+{
+	ts72xx_common_map_io();
+	iotable_init(bk3_io_desc, ARRAY_SIZE(bk3_io_desc));
+}
+
+static void __init bk3_init_machine(void)
+{
+	ep93xx_init_devices();
+
+	ts72xx_register_flash(bk3_nand_parts, ARRAY_SIZE(bk3_nand_parts),

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 319

Quoted 10 lines
arch/arm/mach-ep93xx/ts72xx.c +10 -0
+			      EP93XX_CS6_PHYS_BASE);
+
+	platform_device_register(&ts72xx_wdt_device);
+	ep93xx_register_eth(&ts72xx_eth_data, 1);
+
+	amba_device_register(&i2s1_device, &iomem_resource);
+}
+
+MACHINE_START(BK3, "Liebherr controller BK3.1")
+	/* Maintainer: Lukasz Majewski <[email protected]> */

Don't you want to add an entry to the MAINTAINERS file instead? Then get_maintainer.pl would be able to suggest your email.

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 321

Quoted 2 lines
arch/arm/mach-ep93xx/ts72xx.c +2 -0
+	.atag_offset	= 0x100,
+	.map_io	= bk3_map_io,

again, inconsistent alignment...

Quoted 34 lines
arch/arm/mach-ep93xx/ts72xx.c +6 -0
+	.init_irq	= ep93xx_init_irq,
+	.init_time	= ep93xx_timer_init,
+	.init_machine	= bk3_init_machine,
+	.init_late	= ep93xx_init_late,
+	.restart	= ep93xx_restart,
+MACHINE_END
arch/arm/mach-ep93xx/ts72xx.h +5 -0
index d9ff04db3221..d3165bb9ee78 100644
@@ -45,6 +45,11 @@
 #define TS72XX_WDT_CONTROL_PHYS_BASE	0x23800000
 #define TS72XX_WDT_FEED_PHYS_BASE	0x23c00000
 
+/* BK3 specific defines */
+#define BK3_CPLDVER_PHYS_BASE		0x23400000
+#define BK3_CPLDVER_VIRT_BASE		0xfebfd000
+#define BK3_CPLDVER_SIZE		0x00001000
+
 #ifndef __ASSEMBLY__
 
 static inline int ts72xx_model(void)
arch/arm/tools/mach-types +1 -0
index a9313b66f770..4eac94c1eb6f 100644
@@ -345,6 +345,7 @@ mxlads			MACH_MXLADS		MXLADS			1851
 linkstation_mini	MACH_LINKSTATION_MINI	LINKSTATION_MINI	1858
 afeb9260		MACH_AFEB9260		AFEB9260		1859
 imx27ipcam		MACH_IMX27IPCAM		IMX27IPCAM		1871
+bk3			MACH_BK3		BK3			1880
 rd88f6183ap_ge		MACH_RD88F6183AP_GE	RD88F6183AP_GE		1894
 realview_pba8		MACH_REALVIEW_PBA8	REALVIEW_PBA8		1897
 realview_pbx		MACH_REALVIEW_PBX	REALVIEW_PBX		1901
author maintainer
#21 lore raw

Re: [PATCH v2 6/6] ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

Hi Alexander,

Quoted 59 lines

Hello Lukasz,

some nitpicking below...

Quoted 54 lines · Lukasz Majewski

The BK3 board is a derivative of the ts72xx reference design.

---
Changes for v2:
- Place bk3 support code to the ts72xx.c file

---
 arch/arm/mach-ep93xx/Kconfig  |  7 +++++
 arch/arm/mach-ep93xx/ts72xx.c | 64
+++++++++++++++++++++++++++++++++++++++++++
arch/arm/mach-ep93xx/ts72xx.h |  5 ++++
arch/arm/tools/mach-types     |  1 + 4 files changed, 77

insertions(+)

(quoted diff) +0 -0

b/arch/arm/mach-ep93xx/Kconfig index 61a75ca3684e..c095236d7ff8 100644 --- a/arch/arm/mach-ep93xx/Kconfig
+++ b/arch/arm/mach-ep93xx/Kconfig

arch/arm/mach-ep93xx/Kconfig +7 -0
@@ -21,6 +21,13 @@ config MACH_ADSSPHERE
 	  Say 'Y' here if you want your kernel to support the ADS
 	  Sphere board.
 
+config MACH_BK3
+	bool "Support Liebherr BK3.1"
+	select MACH_TS72XX
+	help
+	  Say 'Y' here if you want your kernel to support the
+	  Liebherr controller BK3.1.
+
 config MACH_EDB93XX
 	bool
 
(quoted diff) +0 -0

b/arch/arm/mach-ep93xx/ts72xx.c index 2e8fcc6e87b6..0de19b136ad0 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c

arch/arm/mach-ep93xx/ts72xx.c +5 -0
@@ -18,8 +18,10 @@
 #include <linux/io.h>
 #include <linux/mtd/rawnand.h>
 #include <linux/mtd/partitions.h>
+#include <linux/amba/bus.h>
 
 #include <mach/hardware.h>
+#include <mach/irqs.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
@@ -261,3 +263,65 @@ MACHINE_START(TS72XX, "Technologic Systems
 TS-72xx SBC") .init_late	= ep93xx_init_late,
 	.restart	= ep93xx_restart,
 MACHINE_END
+
+/*************************************************************************
+ * BK3 support code
Quoted 8 lines

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 273

Quoted 6 lines
(quoted diff) +1 -0
+

*************************************************************************/

arch/arm/mach-ep93xx/ts72xx.c +4 -0
+static struct mtd_partition bk3_nand_parts[] = {
+	{
+		.name		= "System",
+		.offset	= 0x00000000,  

I see the above and below lines as unaligned

This is strange.... I'm using emacs with extension to have coding style for kernel.

Probably tabs get unaligned...

Quoted 54 lines

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 277

Quoted 5 lines
arch/arm/mach-ep93xx/ts72xx.c +4 -0
+		.size		= 0x01e00000,
+	}, {
+		.name		= "Data",
+		.offset	= 0x01e00000,  

same here

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 281

Quoted 4 lines
arch/arm/mach-ep93xx/ts72xx.c +4 -0
+		.size		= 0x05f20000
+	}, {
+		.name		= "RedBoot",
+		.offset	= 0x07d20000,  

same here

Quoted 14 lines
(quoted diff) +2 -0
+		.size		= 0x002e0000,
+		.mask_flags	= MTD_WRITEABLE,	/*

force RO */

arch/arm/mach-ep93xx/ts72xx.c +10 -0
+	},
+};
+
+static AMBA_APB_DEVICE(i2s1, "apb:i2s", 1, EP93XX_I2S_PHYS_BASE,
+		       { IRQ_EP93XX_SAI }, NULL);
+
+static struct map_desc bk3_io_desc[] __initdata = {
+	{
+		.virtual	= BK3_CPLDVER_VIRT_BASE,
+		.pfn		=

__phys_to_pfn(BK3_CPLDVER_PHYS_BASE),

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 294

Quoted 1 line
arch/arm/mach-ep93xx/ts72xx.c +1 -0
+		.length	= BK3_CPLDVER_SIZE,  

same here

Quoted 21 lines
arch/arm/mach-ep93xx/ts72xx.c +15 -0
+		.type		= MT_DEVICE,
+	}
+};
+
+static void __init bk3_map_io(void)
+{
+	ts72xx_common_map_io();
+	iotable_init(bk3_io_desc, ARRAY_SIZE(bk3_io_desc));
+}
+
+static void __init bk3_init_machine(void)
+{
+	ep93xx_init_devices();
+
+	ts72xx_register_flash(bk3_nand_parts,

ARRAY_SIZE(bk3_nand_parts),

arch/arm/mach-ep93xx/ts72xx.c +5 -0
+			      EP93XX_CS6_PHYS_BASE);
+
+	platform_device_register(&ts72xx_wdt_device);
+	ep93xx_register_eth(&ts72xx_eth_data, 1);
+
Quoted 8 lines

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 319

Quoted 5 lines
arch/arm/mach-ep93xx/ts72xx.c +5 -0
+	amba_device_register(&i2s1_device, &iomem_resource);
+}
+
+MACHINE_START(BK3, "Liebherr controller BK3.1")
+	/* Maintainer: Lukasz Majewski <[email protected]> */  

Don't you want to add an entry to the MAINTAINERS file instead? Then get_maintainer.pl would be able to suggest your email.

Yes. This would be a good idea (I've followed the "style" of other boards in the mach-ep93xx directory).

I will fix that ....... and send v3 with included some extra code - as I've found and fixed several issues since last posting.

Anyway, many thanks for review.

Quoted 5 lines

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 321

Quoted 3 lines
arch/arm/mach-ep93xx/ts72xx.c +2 -0
+	.atag_offset	= 0x100,
+	.map_io	= bk3_map_io,  

again, inconsistent alignment...

Even more..... checkpatch.pl did not complained....

Quoted 32 lines
Quoted 32 lines
arch/arm/mach-ep93xx/ts72xx.c +6 -0
+	.init_irq	= ep93xx_init_irq,
+	.init_time	= ep93xx_timer_init,
+	.init_machine	= bk3_init_machine,
+	.init_late	= ep93xx_init_late,
+	.restart	= ep93xx_restart,
+MACHINE_END
(quoted diff) +0 -0

b/arch/arm/mach-ep93xx/ts72xx.h index d9ff04db3221..d3165bb9ee78 100644 --- a/arch/arm/mach-ep93xx/ts72xx.h
+++ b/arch/arm/mach-ep93xx/ts72xx.h

arch/arm/mach-ep93xx/ts72xx.h +5 -0
@@ -45,6 +45,11 @@
 #define TS72XX_WDT_CONTROL_PHYS_BASE	0x23800000
 #define TS72XX_WDT_FEED_PHYS_BASE	0x23c00000
 
+/* BK3 specific defines */
+#define BK3_CPLDVER_PHYS_BASE		0x23400000
+#define BK3_CPLDVER_VIRT_BASE		0xfebfd000
+#define BK3_CPLDVER_SIZE		0x00001000
+
 #ifndef __ASSEMBLY__
 
 static inline int ts72xx_model(void)
arch/arm/tools/mach-types +0 -0
index a9313b66f770..4eac94c1eb6f 100644
@@ -345,6 +345,7 @@ mxlads

MACH_MXLADS MXLADS 1851
linkstation_mini MACH_LINKSTATION_MINI
LINKSTATION_MINI 1858 afeb9260
MACH_AFEB9260 AFEB9260 1859

Quoted 8 lines
Quoted 8 lines

imx27ipcam MACH_IMX27IPCAM
IMX27IPCAM 1871 +bk3
MACH_BK3 BK3 1880
rd88f6183ap_ge MACH_RD88F6183AP_GE
RD88F6183AP_GE 1894 realview_pba8
MACH_REALVIEW_PBA8 REALVIEW_PBA8 1897
realview_pbx MACH_REALVIEW_PBX
REALVIEW_PBX 1901

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171129/1e13ddbe/attachment.sig>

author maintainer
#22 lore raw

Re: [PATCH v2 6/6] ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

Quoted 147 lines · On Wed, 29 Nov 2017 23:07:04 +0100 Lukasz Majewski <[email protected]> wrote:

Hi Alexander,

Quoted 59 lines

Hello Lukasz,

some nitpicking below...

Quoted 54 lines · Lukasz Majewski

The BK3 board is a derivative of the ts72xx reference design.

---
Changes for v2:
- Place bk3 support code to the ts72xx.c file

---
 arch/arm/mach-ep93xx/Kconfig  |  7 +++++
 arch/arm/mach-ep93xx/ts72xx.c | 64
+++++++++++++++++++++++++++++++++++++++++++
arch/arm/mach-ep93xx/ts72xx.h |  5 ++++
arch/arm/tools/mach-types     |  1 + 4 files changed, 77

insertions(+)

(quoted diff) +0 -0

b/arch/arm/mach-ep93xx/Kconfig index 61a75ca3684e..c095236d7ff8 100644 --- a/arch/arm/mach-ep93xx/Kconfig
+++ b/arch/arm/mach-ep93xx/Kconfig

arch/arm/mach-ep93xx/Kconfig +7 -0
@@ -21,6 +21,13 @@ config MACH_ADSSPHERE
 	  Say 'Y' here if you want your kernel to support the ADS
 	  Sphere board.
 
+config MACH_BK3
+	bool "Support Liebherr BK3.1"
+	select MACH_TS72XX
+	help
+	  Say 'Y' here if you want your kernel to support the
+	  Liebherr controller BK3.1.
+
 config MACH_EDB93XX
 	bool
 
(quoted diff) +0 -0

b/arch/arm/mach-ep93xx/ts72xx.c index 2e8fcc6e87b6..0de19b136ad0 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c

arch/arm/mach-ep93xx/ts72xx.c +5 -0
@@ -18,8 +18,10 @@
 #include <linux/io.h>
 #include <linux/mtd/rawnand.h>
 #include <linux/mtd/partitions.h>
+#include <linux/amba/bus.h>
 
 #include <mach/hardware.h>
+#include <mach/irqs.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
@@ -261,3 +263,65 @@ MACHINE_START(TS72XX, "Technologic Systems
 TS-72xx SBC") .init_late	= ep93xx_init_late,
 	.restart	= ep93xx_restart,
 MACHINE_END
+
+/*************************************************************************
+ * BK3 support code
Quoted 8 lines

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 273

Quoted 6 lines
(quoted diff) +1 -0
+

*************************************************************************/

arch/arm/mach-ep93xx/ts72xx.c +4 -0
+static struct mtd_partition bk3_nand_parts[] = {
+	{
+		.name		= "System",
+		.offset	= 0x00000000,    

I see the above and below lines as unaligned

This is strange.... I'm using emacs with extension to have coding style for kernel.

Probably tabs get unaligned...

Quoted 54 lines

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 277

Quoted 5 lines
arch/arm/mach-ep93xx/ts72xx.c +4 -0
+		.size		= 0x01e00000,
+	}, {
+		.name		= "Data",
+		.offset	= 0x01e00000,    

same here

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 281

Quoted 4 lines
arch/arm/mach-ep93xx/ts72xx.c +4 -0
+		.size		= 0x05f20000
+	}, {
+		.name		= "RedBoot",
+		.offset	= 0x07d20000,    

same here

Quoted 14 lines
(quoted diff) +2 -0
+		.size		= 0x002e0000,
+		.mask_flags	= MTD_WRITEABLE,	/*

force RO */

arch/arm/mach-ep93xx/ts72xx.c +10 -0
+	},
+};
+
+static AMBA_APB_DEVICE(i2s1, "apb:i2s", 1, EP93XX_I2S_PHYS_BASE,
+		       { IRQ_EP93XX_SAI }, NULL);
+
+static struct map_desc bk3_io_desc[] __initdata = {
+	{
+		.virtual	= BK3_CPLDVER_VIRT_BASE,
+		.pfn		=

__phys_to_pfn(BK3_CPLDVER_PHYS_BASE),

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 294

Quoted 1 line
arch/arm/mach-ep93xx/ts72xx.c +1 -0
+		.length	= BK3_CPLDVER_SIZE,    

same here

Quoted 21 lines
arch/arm/mach-ep93xx/ts72xx.c +15 -0
+		.type		= MT_DEVICE,
+	}
+};
+
+static void __init bk3_map_io(void)
+{
+	ts72xx_common_map_io();
+	iotable_init(bk3_io_desc, ARRAY_SIZE(bk3_io_desc));
+}
+
+static void __init bk3_init_machine(void)
+{
+	ep93xx_init_devices();
+
+	ts72xx_register_flash(bk3_nand_parts,

ARRAY_SIZE(bk3_nand_parts),

arch/arm/mach-ep93xx/ts72xx.c +5 -0
+			      EP93XX_CS6_PHYS_BASE);
+
+	platform_device_register(&ts72xx_wdt_device);
+	ep93xx_register_eth(&ts72xx_eth_data, 1);
+
Quoted 8 lines

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 319

Quoted 5 lines
arch/arm/mach-ep93xx/ts72xx.c +5 -0
+	amba_device_register(&i2s1_device, &iomem_resource);
+}
+
+MACHINE_START(BK3, "Liebherr controller BK3.1")
+	/* Maintainer: Lukasz Majewski <[email protected]> */    

Don't you want to add an entry to the MAINTAINERS file instead? Then get_maintainer.pl would be able to suggest your email.

Yes. This would be a good idea (I've followed the "style" of other boards in the mach-ep93xx directory).

I will fix that ....... and send v3 with included some extra code - as I've found and fixed several issues since last posting.

Anyway, many thanks for review.

Quoted 1 line
Quoted 6 lines
Quoted 4 lines

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 321

Quoted 2 lines
arch/arm/mach-ep93xx/ts72xx.c +2 -0
+	.atag_offset	= 0x100,
+	.map_io	= bk3_map_io,    

again, inconsistent alignment...

Even more..... checkpatch.pl did not complained....

I've double checked - this misalignment seems to be only in e-mail.

In the ts72xx.c file it is all "tabifi'ed".

(and no checkpatch errors).

Quoted 46 lines
Quoted 33 lines
Quoted 33 lines
arch/arm/mach-ep93xx/ts72xx.c +6 -0
+	.init_irq	= ep93xx_init_irq,
+	.init_time	= ep93xx_timer_init,
+	.init_machine	= bk3_init_machine,
+	.init_late	= ep93xx_init_late,
+	.restart	= ep93xx_restart,
+MACHINE_END
(quoted diff) +0 -0

b/arch/arm/mach-ep93xx/ts72xx.h index d9ff04db3221..d3165bb9ee78 100644 --- a/arch/arm/mach-ep93xx/ts72xx.h
+++ b/arch/arm/mach-ep93xx/ts72xx.h

arch/arm/mach-ep93xx/ts72xx.h +5 -0
@@ -45,6 +45,11 @@
 #define TS72XX_WDT_CONTROL_PHYS_BASE	0x23800000
 #define TS72XX_WDT_FEED_PHYS_BASE	0x23c00000
 
+/* BK3 specific defines */
+#define BK3_CPLDVER_PHYS_BASE		0x23400000
+#define BK3_CPLDVER_VIRT_BASE		0xfebfd000
+#define BK3_CPLDVER_SIZE		0x00001000
+
 #ifndef __ASSEMBLY__
 
 static inline int ts72xx_model(void)
arch/arm/tools/mach-types +0 -0
index a9313b66f770..4eac94c1eb6f 100644
@@ -345,6 +345,7 @@ mxlads

MACH_MXLADS MXLADS 1851
linkstation_mini MACH_LINKSTATION_MINI
LINKSTATION_MINI 1858 afeb9260
MACH_AFEB9260 AFEB9260 1859

Quoted 8 lines
Quoted 8 lines

imx27ipcam MACH_IMX27IPCAM
IMX27IPCAM 1871 +bk3
MACH_BK3 BK3 1880
rd88f6183ap_ge MACH_RD88F6183AP_GE
RD88F6183AP_GE 1894 realview_pba8
MACH_REALVIEW_PBA8 REALVIEW_PBA8 1897
realview_pbx MACH_REALVIEW_PBX
REALVIEW_PBX 1901

Best regards,

Quoted 7 lines

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171130/1b620095/attachment.sig>

#23 lore raw

Re: [PATCH v2 6/6] ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

In reply to Lukasz Majewski

Hello Lukasz,

Quoted 11 lines · On Wed, 29 Nov 2017 23:07:04 +0100 Lukasz Majewski <[email protected]> wrote:
Quoted 10 lines

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 273

Quoted 8 lines
arch/arm/mach-ep93xx/ts72xx.c +3 -0
+/*************************************************************************
+ * BK3 support code
+

*************************************************************************/

arch/arm/mach-ep93xx/ts72xx.c +4 -0
+static struct mtd_partition bk3_nand_parts[] = {
+	{
+		.name		= "System",
+		.offset	= 0x00000000,  

I see the above and below lines as unaligned

Quoted 4 lines

This is strange.... I'm using emacs with extension to have coding style for kernel.

Probably tabs get unaligned...

Yes, seems that they are.

[...]

Quoted 7 lines
Quoted 5 lines

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 321

Quoted 3 lines
arch/arm/mach-ep93xx/ts72xx.c +2 -0
+	.atag_offset	= 0x100,
+	.map_io	= bk3_map_io,  

again, inconsistent alignment...

Even more..... checkpatch.pl did not complained....

checkpatch.pl wouldn't complain, as there are basically two styles, some people do not align the individual assignments in the structures at all. But I was quite confident in the beginning and now even applied your v3 to the code. And indeed it's unaligned... I even checked with emacs. Still unaligned.

Signature · 1 line
Alexander Sverdlin.
author maintainer
#24 lore raw
In reply to Lukasz Majewski

Dear All,

Quoted 11 lines

This patch series adds support for Liebherr's BK3 board, being a derivative of TS72XX design.

This patchset consists of following patches:

- ts72xx.[c|h] cosmetic cleanup/improvement
- Rewrite ts72xx.c to be reusable by bk3
- The Liebherr's BK3 board has been added with re-using code of ts72xx.c

This series applies on top of v4.14

Do you have any comments regarding this patch series?

Quoted 10 lines

Lukasz Majewski (6):
ARM: ep93xx: ts72xx: Use DEFINE_RES_MEM macros where applicable
ARM: ep93xx: ts72xx: Provide include guards for ts72xx.h file
ARM: ep93xx: ts72xx: Rewrite ts72xx_register_flash() to accept
parameters
ARM: ep93xx: ts72xx: Rewrite map IO code to be reusable
ARM: ep93xx: ts72xx: cosmetic: Add some description to ts72xx code
ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

Quoted 6 lines
 arch/arm/mach-ep93xx/Kconfig  |   7 +++
 arch/arm/mach-ep93xx/ts72xx.c | 137

+++++++++++++++++++++++++++++++-----------
arch/arm/mach-ep93xx/ts72xx.h | 9 +++ arch/arm/tools/mach-types
| 1 + 4 files changed, 120 insertions(+), 34 deletions(-)

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171129/72d37d17/attachment.sig>

#25 lore raw
Quoted 7 lines · Lukasz Majewski

Dear All,

Quoted 5 lines

This patch series adds support for Liebherr's BK3 board, being a derivative of TS72XX design.

This patchset consists of following patches:

Quoted 8 lines
Quoted 6 lines

- ts72xx.[c|h] cosmetic cleanup/improvement
- Rewrite ts72xx.c to be reusable by bk3
- The Liebherr's BK3 board has been added with re-using code of ts72xx.c

This series applies on top of v4.14

Do you have any comments regarding this patch series?

Looks all good to me.

Arnd

author maintainer
#26 lore raw

v3 cover ARM: ep93xx: ts72xx: Add support for BK3 board

In reply to Lukasz Majewski

This patch series adds support for Liebherr's BK3 board, being a derivative of TS72XX design.

This patchset consists of following patches:

- ts72xx.[c|h] cosmetic cleanup/improvement
- Rewrite ts72xx.c to be reusable by bk3
- The Liebherr's BK3 board has been added with re-using code of ts72xx.c (detalied list of changes can be found in patch 6/6)

This series applies on top of v4.14

Lukasz Majewski (6):
ARM: ep93xx: ts72xx: Use DEFINE_RES_MEM macros where applicable
ARM: ep93xx: ts72xx: Provide include guards for ts72xx.h file
ARM: ep93xx: ts72xx: Rewrite ts72xx_register_flash() to accept
parameters
ARM: ep93xx: ts72xx: Rewrite map IO code to be reusable
ARM: ep93xx: ts72xx: cosmetic: Add some description to ts72xx code
ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

 MAINTAINERS                   |   6 ++
 arch/arm/mach-ep93xx/Kconfig  |   7 ++
 arch/arm/mach-ep93xx/ts72xx.c | 222 +++++++++++++++++++++++++++++++++++-------
 arch/arm/mach-ep93xx/ts72xx.h |   9 ++
 arch/arm/tools/mach-types     |   1 +
 5 files changed, 211 insertions(+), 34 deletions(-)
Signature · 1 line
2.11.0
author maintainer
#27 lore raw

PATCH v3 1/6 ARM: ep93xx: ts72xx: Use DEFINE_RES_MEM macros where applicable

This commit cleans up the code by using dedicated macros instead of full definitions.

---
Changes for v2:
- None
Changes for v3:
- None

---
 arch/arm/mach-ep93xx/ts72xx.c | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)
arch/arm/mach-ep93xx/ts72xx.c +3 -15
index 8745162ec05d..06345b85f27c 100644
@@ -187,16 +187,8 @@ static struct platform_device ts72xx_rtc_device = {
 };
 
 static struct resource ts72xx_wdt_resources[] = {
-	{
-		.start	= TS72XX_WDT_CONTROL_PHYS_BASE,
-		.end	= TS72XX_WDT_CONTROL_PHYS_BASE + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	{
-		.start	= TS72XX_WDT_FEED_PHYS_BASE,
-		.end	= TS72XX_WDT_FEED_PHYS_BASE + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
+	DEFINE_RES_MEM(TS72XX_WDT_CONTROL_PHYS_BASE, SZ_4K),
+	DEFINE_RES_MEM(TS72XX_WDT_FEED_PHYS_BASE, SZ_4K),
 };
 
 static struct platform_device ts72xx_wdt_device = {
@@ -216,11 +208,7 @@ static struct ep93xx_eth_data __initdata ts72xx_eth_data = {
 #define TS73XX_FPGA_LOADER_BASE		0x03c00000
 
 static struct resource ts73xx_fpga_resources[] = {
-	{
-		.start	= EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE,
-		.end	= EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE + 1,
-		.flags	= IORESOURCE_MEM,
-	},
+	DEFINE_RES_MEM(EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE, 0x01),
 };
 
 static struct platform_device ts73xx_fpga_device = {
Signature · 1 line
2.11.0
#28 lore raw

RE: [PATCH v3 1/6] ARM: ep93xx: ts72xx: Use DEFINE_RES_MEM macros where applicable

Quoted 4 lines · Lukasz Majewski

This commit cleans up the code by using dedicated macros instead of full definitions.

<snip>

Quoted 6 lines
arch/arm/mach-ep93xx/ts72xx.c +0 -3
@@ -187,16 +187,8 @@ static struct platform_device ts72xx_rtc_device = {  };
 
 static struct resource ts72xx_wdt_resources[] = {
-	{
-		.start	= TS72XX_WDT_CONTROL_PHYS_BASE,
-		.end	= TS72XX_WDT_CONTROL_PHYS_BASE + SZ_4K - 1,

arch/arm/mach-ep93xx/ts72xx.c static struct platform_device ts72xx_rtc_device = { }; · line 191

Quoted 10 lines
arch/arm/mach-ep93xx/ts72xx.c +2 -7
-		.flags	= IORESOURCE_MEM,
-	},
-	{
-		.start	= TS72XX_WDT_FEED_PHYS_BASE,
-		.end	= TS72XX_WDT_FEED_PHYS_BASE + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
+	DEFINE_RES_MEM(TS72XX_WDT_CONTROL_PHYS_BASE, SZ_4K),
+	DEFINE_RES_MEM(TS72XX_WDT_FEED_PHYS_BASE, SZ_4K),
 };

Lukasz,

The chunk above is already cleaned up in linux-next by:

commit 97c3bca922468996c864917c9a8ea6a410233985
ARM: ep93xx: tidy up TS-72xx Watchdog resources

Can you please rebase this series against linux-next?

I'm reviewing the rest of the series now and will reply with any other issues.

Thanks,
Hartley

author maintainer
#29 lore raw

PATCH v3 2/6 ARM: ep93xx: ts72xx: Provide include guards for ts72xx.h file

In reply to Lukasz Majewski

This commit adds include file guards to ts72xx.h

---
Changes for v2:
- None
Changes for v3:
- None

---
 arch/arm/mach-ep93xx/ts72xx.h | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/mach-ep93xx/ts72xx.h +4 -0
index b89850f1a965..d9ff04db3221 100644
@@ -12,6 +12,9 @@
  * febfd000	22800000	4K	options register #2
  */
 
+#ifndef __TS72XX_H_
+#define __TS72XX_H_
+
 #define TS72XX_MODEL_PHYS_BASE		0x22000000
 #define TS72XX_MODEL_VIRT_BASE		IOMEM(0xfebff000)
 #define TS72XX_MODEL_SIZE		0x00001000
@@ -86,3 +89,4 @@ static inline int is_ts9420_installed(void)
 					TS72XX_OPTIONS2_TS9420);
 }
 #endif
+#endif /* __TS72XX_H_ */
Signature · 1 line
2.11.0
author maintainer
#30 lore raw

PATCH v3 3/6 ARM: ep93xx: ts72xx: Rewrite ts72xx_register_flash() to accept parameters

In reply to Lukasz Majewski

This commit extend the ts72xx_register_flash() to accept passed parameters, which makes it more reusable.

Now it is possible to accept ep93xx flash start address and partitions.

---
Changes for v2:
- New patch
Changes for v3:
- None

---
 arch/arm/mach-ep93xx/ts72xx.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)
arch/arm/mach-ep93xx/ts72xx.c +8 -12
index 06345b85f27c..00e0e5b8babf 100644
@@ -120,8 +120,6 @@ static struct platform_nand_data ts72xx_nand_data = {
 		.nr_chips	= 1,
 		.chip_offset	= 0,
 		.chip_delay	= 15,
-		.partitions	= ts72xx_nand_parts,
-		.nr_partitions	= ARRAY_SIZE(ts72xx_nand_parts),
 	},
 	.ctrl = {
 		.cmd_ctrl	= ts72xx_nand_hwcontrol,
@@ -145,8 +143,8 @@ static struct platform_device ts72xx_nand_flash = {
 	.num_resources		= ARRAY_SIZE(ts72xx_nand_resource),
 };
 
-
-static void __init ts72xx_register_flash(void)
+void __init ts72xx_register_flash(struct mtd_partition *parts, int n,
+				  resource_size_t start)
 {
 	/*
 	 * TS7200 has NOR flash all other TS72xx board have NAND flash.
@@ -154,16 +152,12 @@ static void __init ts72xx_register_flash(void)
 	if (board_is_ts7200()) {
 		ep93xx_register_flash(2, EP93XX_CS6_PHYS_BASE, SZ_16M);
 	} else {
-		resource_size_t start;
-
-		if (is_ts9420_installed())
-			start = EP93XX_CS7_PHYS_BASE;
-		else
-			start = EP93XX_CS6_PHYS_BASE;
-
 		ts72xx_nand_resource[0].start = start;
 		ts72xx_nand_resource[0].end = start + SZ_16M - 1;
 
+		ts72xx_nand_data.chip.partitions = parts;
+		ts72xx_nand_data.chip.nr_partitions = n;
+
 		platform_device_register(&ts72xx_nand_flash);
 	}
 }
@@ -223,7 +217,9 @@ static struct platform_device ts73xx_fpga_device = {
 static void __init ts72xx_init_machine(void)
 {
 	ep93xx_init_devices();
-	ts72xx_register_flash();
+	ts72xx_register_flash(ts72xx_nand_parts, ARRAY_SIZE(ts72xx_nand_parts),
+			      is_ts9420_installed() ?
+			      EP93XX_CS7_PHYS_BASE : EP93XX_CS6_PHYS_BASE);
 	platform_device_register(&ts72xx_rtc_device);
 	platform_device_register(&ts72xx_wdt_device);
 
Signature · 1 line
2.11.0
#31 lore raw

RE: [PATCH v3 3/6] ARM: ep93xx: ts72xx: Rewrite ts72xx_register_flash() to accept parameters

Quoted 3 lines · Lukasz Majewski

This commit extend the ts72xx_register_flash() to accept passed parameters, which makes it more reusable.

Now it is possible to accept ep93xx flash start address and partitions.

<snip>

@@ -223,7 +217,9 @@ static struct platform_device ts73xx_fpga_device = { static void __init ts72xx_init_machine(void) {

Lukasz,

The line above is corrupted in the patch and will not apply. Not sure what happened...

arch/arm/mach-ep93xx/ts72xx.c static struct platform_device ts73xx_fpga_device = { · line 224

Quoted 7 lines
arch/arm/mach-ep93xx/ts72xx.c +3 -1
 	ep93xx_init_devices();
-	ts72xx_register_flash();
+	ts72xx_register_flash(ts72xx_nand_parts, ARRAY_SIZE(ts72xx_nand_parts),
+			      is_ts9420_installed() ?
+			      EP93XX_CS7_PHYS_BASE : EP93XX_CS6_PHYS_BASE);
 	platform_device_register(&ts72xx_rtc_device);
 	platform_device_register(&ts72xx_wdt_device);

Regards,
Hartley

author maintainer
#32 lore raw

PATCH v3 4/6 ARM: ep93xx: ts72xx: Rewrite map IO code to be reusable

In reply to Lukasz Majewski

The map IO common code has been excluded to be reused by other ts72xx clones.

---
Changes for v2:
- New patch
Changes for v3:
- None

---
 arch/arm/mach-ep93xx/ts72xx.c | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)
arch/arm/mach-ep93xx/ts72xx.c +16 -7
index 00e0e5b8babf..a6e473b3dcf6 100644
@@ -30,11 +30,6 @@
 
 static struct map_desc ts72xx_io_desc[] __initdata = {
 	{
-		.virtual	= (unsigned long)TS72XX_MODEL_VIRT_BASE,
-		.pfn		= __phys_to_pfn(TS72XX_MODEL_PHYS_BASE),
-		.length		= TS72XX_MODEL_SIZE,
-		.type		= MT_DEVICE,
-	}, {
 		.virtual	= (unsigned long)TS72XX_OPTIONS_VIRT_BASE,
 		.pfn		= __phys_to_pfn(TS72XX_OPTIONS_PHYS_BASE),
 		.length		= TS72XX_OPTIONS_SIZE,
@@ -47,12 +42,26 @@ static struct map_desc ts72xx_io_desc[] __initdata = {
 	}
 };
 
-static void __init ts72xx_map_io(void)
+static struct map_desc ts72xx_common_io_desc[] __initdata = {
+	{
+		.virtual	= (unsigned long)TS72XX_MODEL_VIRT_BASE,
+		.pfn		= __phys_to_pfn(TS72XX_MODEL_PHYS_BASE),
+		.length		= TS72XX_MODEL_SIZE,
+		.type		= MT_DEVICE,
+	}
+};
+
+void __init ts72xx_common_map_io(void)
 {
 	ep93xx_map_io();
-	iotable_init(ts72xx_io_desc, ARRAY_SIZE(ts72xx_io_desc));
+	iotable_init(ts72xx_common_io_desc, ARRAY_SIZE(ts72xx_common_io_desc));
 }
 
+static void __init ts72xx_map_io(void)
+{
+	ts72xx_common_map_io();
+	iotable_init(ts72xx_io_desc, ARRAY_SIZE(ts72xx_io_desc));
+}
 
 /*************************************************************************
  * NAND flash
Signature · 1 line
2.11.0
#33 lore raw

RE: [PATCH v3 4/6] ARM: ep93xx: ts72xx: Rewrite map IO code to be reusable

Quoted 4 lines · Lukasz Majewski

The map IO common code has been excluded to be reused by other ts72xx clones.

<snip>

Quoted 27 lines

arch/arm/mach-ep93xx/ts72xx.c | 23 ++++++++++++++++-------

 1 file changed, 16 insertions(+), 7 deletions(-)
arch/arm/mach-ep93xx/ts72xx.c +4 -6
@@ -30,11 +30,6 @@
 
 static struct map_desc ts72xx_io_desc[] __initdata = {
 	{
-		.virtual	= (unsigned long)TS72XX_MODEL_VIRT_BASE,
-		.pfn		= __phys_to_pfn(TS72XX_MODEL_PHYS_BASE),
-		.length		= TS72XX_MODEL_SIZE,
-		.type		= MT_DEVICE,
-	}, {
 		.virtual	= (unsigned long)TS72XX_OPTIONS_VIRT_BASE,
 		.pfn		= __phys_to_pfn(TS72XX_OPTIONS_PHYS_BASE),
 		.length		= TS72XX_OPTIONS_SIZE,
@@ -47,12 +42,26 @@ static struct map_desc ts72xx_io_desc[] __initdata = {
 	}
 };
 
-static void __init ts72xx_map_io(void)
+static struct map_desc ts72xx_common_io_desc[] __initdata = {
+	{
+		.virtual	= (unsigned long)TS72XX_MODEL_VIRT_BASE,
+		.pfn		= __phys_to_pfn(TS72XX_MODEL_PHYS_BASE),

arch/arm/mach-ep93xx/ts72xx.c static struct map_desc ts72xx_io_desc[] __initdata = { · line 57

Quoted 10 lines
arch/arm/mach-ep93xx/ts72xx.c +7 -1
+		.length		= TS72XX_MODEL_SIZE,
+		.type		= MT_DEVICE,
+	}
+};
+
+void __init ts72xx_common_map_io(void)
 {
 	ep93xx_map_io();
-	iotable_init(ts72xx_io_desc, ARRAY_SIZE(ts72xx_io_desc));
+	iotable_init(ts72xx_common_io_desc, 

There is a trailing whitespace on the line above.

arch/arm/mach-ep93xx/ts72xx.c static struct map_desc ts72xx_io_desc[] __initdata = { · line 58

Quoted 1 line
arch/arm/mach-ep93xx/ts72xx.c +1 -0
+ARRAY_SIZE(ts72xx_common_io_desc));

This line is missing an indent.

arch/arm/mach-ep93xx/ts72xx.c static struct map_desc ts72xx_io_desc[] __initdata = { · line 67

Quoted 9 lines
arch/arm/mach-ep93xx/ts72xx.c +4 -0
 }
 
+static void __init ts72xx_map_io(void)
+{
+	ts72xx_common_map_io();
+	iotable_init(ts72xx_io_desc, ARRAY_SIZE(ts72xx_io_desc)); }
 
 /*************************************************************************
  * NAND flash

Hartley

author maintainer
#34 lore raw

PATCH v3 5/6 ARM: ep93xx: ts72xx: cosmetic: Add some description to ts72xx code

In reply to Lukasz Majewski

This patch extends readability of ts72xx.c code.

---
Changes for v2:
- New patch

---
 arch/arm/mach-ep93xx/ts72xx.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/mach-ep93xx/ts72xx.c +12 -0
index a6e473b3dcf6..2e8fcc6e87b6 100644
@@ -28,6 +28,9 @@
 #include "soc.h"
 #include "ts72xx.h"
 
+/*************************************************************************
+ * IO map
+ *************************************************************************/
 static struct map_desc ts72xx_io_desc[] __initdata = {
 	{
 		.virtual	= (unsigned long)TS72XX_OPTIONS_VIRT_BASE,
@@ -189,6 +192,9 @@ static struct platform_device ts72xx_rtc_device = {
 	.num_resources 	= ARRAY_SIZE(ts72xx_rtc_resources),
 };
 
+/*************************************************************************
+ * WATCHDOG
+ *************************************************************************/
 static struct resource ts72xx_wdt_resources[] = {
 	DEFINE_RES_MEM(TS72XX_WDT_CONTROL_PHYS_BASE, SZ_4K),
 	DEFINE_RES_MEM(TS72XX_WDT_FEED_PHYS_BASE, SZ_4K),
@@ -201,10 +207,16 @@ static struct platform_device ts72xx_wdt_device = {
 	.resource	= ts72xx_wdt_resources,
 };
 
+/*************************************************************************
+ * ETH
+ *************************************************************************/
 static struct ep93xx_eth_data __initdata ts72xx_eth_data = {
 	.phy_id		= 1,
 };
 
+/*************************************************************************
+ * TS72XX support code
+ *************************************************************************/
 #if IS_ENABLED(CONFIG_FPGA_MGR_TS73XX)
 
 /* Relative to EP93XX_CS1_PHYS_BASE */
Signature · 1 line
2.11.0
#35 lore raw

RE: [PATCH v3 5/6] ARM: ep93xx: ts72xx: cosmetic: Add some description to ts72xx code

Quoted 9 lines · Lukasz Majewski

This patch extends readability of ts72xx.c code.

---
Changes for v2:
- New patch

---
 arch/arm/mach-ep93xx/ts72xx.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

This patch does not apply to linux-next.

arch/arm/mach-ep93xx/ts72xx.c line 36

Quoted 13 lines
arch/arm/mach-ep93xx/ts72xx.c +6 -0
@@ -28,6 +28,9 @@
 #include "soc.h"
 #include "ts72xx.h"
 
+/**********************************************************************
+***
+ * IO map
+ 
+***********************************************************************
+**/

There is also something funny with the patch. The lines above appear to be getting split incorrectly.

The same thing is seen in PATCH 6/6.

Please rebase the series against linux-next and I'll take another look at is.

Thanks,
Hartley

#36 lore raw

Re: [PATCH v3 5/6] ARM: ep93xx: ts72xx: cosmetic: Add some description to ts72xx code

Hello Hartley!

Quoted 8 lines · On Thu, 30 Nov 2017 17:23:02 +0000 Hartley Sweeten…

Review

Quoted 6 lines
(quoted diff) +6 -0
+/**********************************************************************
+***
+ * IO map
+ 
+***********************************************************************
+**/

There is also something funny with the patch. The lines above appear to be getting split incorrectly.

That's definitely not the case, I can apply the patch to 4.14 just fine and there is no funny wrapping. But you are right about the rest, it should be re-based.

Signature · 1 line
Alexander Sverdlin.
author maintainer
#37 lore raw

PATCH v3 6/6 ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

In reply to Lukasz Majewski

The BK3 board is a derivative of the ts72xx reference design.

---
Changes for v2:
- Place bk3 support code to the ts72xx.c file

Changes for v3:
- Add SD card support (via SPI) for BK3
- Remove definition of apb:i2s bus
- Remove board registration of CPLD WDT device
- Add I2S platform device to BK3
- Add MAINTAINERS entry for BK3 maintainer

---
 MAINTAINERS                   |   6 ++
 arch/arm/mach-ep93xx/Kconfig  |   7 ++
 arch/arm/mach-ep93xx/ts72xx.c | 149 ++++++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-ep93xx/ts72xx.h |   5 ++
 arch/arm/tools/mach-types     |   1 +
 5 files changed, 168 insertions(+)
MAINTAINERS +6 -0
index 2811a211632c..470856b74832 100644
@@ -1255,6 +1255,12 @@ L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
 S:	Supported
 F:	drivers/net/ethernet/cavium/thunder/
 
+ARM/CIRRUS LOGIC BK3 MACHINE SUPPORT
+M:	Lukasz Majewski <[email protected]>
+L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
+S:	Maintained
+F:	arch/arm/mach-ep93xx/ts72xx.c
+
 ARM/CIRRUS LOGIC CLPS711X ARM ARCHITECTURE
 M:	Alexander Shiyan <[email protected]>
 L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
arch/arm/mach-ep93xx/Kconfig +7 -0
index 61a75ca3684e..c095236d7ff8 100644
@@ -21,6 +21,13 @@ config MACH_ADSSPHERE
 	  Say 'Y' here if you want your kernel to support the ADS
 	  Sphere board.
 
+config MACH_BK3
+	bool "Support Liebherr BK3.1"
+	select MACH_TS72XX
+	help
+	  Say 'Y' here if you want your kernel to support the
+	  Liebherr controller BK3.1.
+
 config MACH_EDB93XX
 	bool
 
arch/arm/mach-ep93xx/ts72xx.c +149 -0

166 lines not on this page · raw message

arch/arm/mach-ep93xx/ts72xx.h +5 -0
index d9ff04db3221..d3165bb9ee78 100644
@@ -45,6 +45,11 @@
 #define TS72XX_WDT_CONTROL_PHYS_BASE	0x23800000
 #define TS72XX_WDT_FEED_PHYS_BASE	0x23c00000
 
+/* BK3 specific defines */
+#define BK3_CPLDVER_PHYS_BASE		0x23400000
+#define BK3_CPLDVER_VIRT_BASE		0xfebfd000
+#define BK3_CPLDVER_SIZE		0x00001000
+
 #ifndef __ASSEMBLY__
 
 static inline int ts72xx_model(void)
arch/arm/tools/mach-types +1 -0
index a9313b66f770..4eac94c1eb6f 100644
@@ -345,6 +345,7 @@ mxlads			MACH_MXLADS		MXLADS			1851
 linkstation_mini	MACH_LINKSTATION_MINI	LINKSTATION_MINI	1858
 afeb9260		MACH_AFEB9260		AFEB9260		1859
 imx27ipcam		MACH_IMX27IPCAM		IMX27IPCAM		1871
+bk3			MACH_BK3		BK3			1880
 rd88f6183ap_ge		MACH_RD88F6183AP_GE	RD88F6183AP_GE		1894
 realview_pba8		MACH_REALVIEW_PBA8	REALVIEW_PBA8		1897
 realview_pbx		MACH_REALVIEW_PBX	REALVIEW_PBX		1901
Signature · 1 line
2.11.0
#38 lore raw
In reply to Lukasz Majewski
Quoted 11 lines · Lukasz Majewski

This patch series adds support for Liebherr's BK3 board, being a derivative of TS72XX design.

This patchset consists of following patches:

- ts72xx.[c|h] cosmetic cleanup/improvement
- Rewrite ts72xx.c to be reusable by bk3
- The Liebherr's BK3 board has been added with re-using code of ts72xx.c (detalied list of changes can be found in patch 6/6)

This series applies on top of v4.14

Can we clarify who is picking up ep93xx patches these days? The last time I think Linus Walleij offered to do it for the 4.14 merge window, as neither Hartley nor Alexander had a git tree.

I don't care too much who does it in the end, between Hartley, Alexander, Linus and even Lukasz directly, but I'd like whoever feels responsible for the platform to be listed in the MAINTAINERS file and pick up the patches from everyone else to forward them to me as either pull requests or separate patches to arm at kernel.org when the patches are ready, so I don't have to make a decision about when to pick them up from the list.

Arnd

#39 lore raw

v3 cover ARM: ep93xx: ts72xx: Add support for BK3 board

Hello Arnd!

Quoted 11 lines · On Thu Nov 30 10:02:26 2017 Arnd Bergmann <[email protected]> wrote:

Can we clarify who is picking up ep93xx patches these days? The last time I think Linus Walleij offered to do it for the 4.14 merge window, as neither Hartley nor Alexander had a git tree.

I don't care too much who does it in the end, between Hartley, Alexander, Linus and even Lukasz directly, but I'd like whoever feels responsible for the platform to be listed in the MAINTAINERS file and pick up the patches from everyone else to forward them to me as either pull requests or separate patches to arm at kernel.org when the patches are ready, so I don't have to make a decision about when to pick them up from the list.

As I stepped in as a maintainer there was a common understanding, that ep93xx is so inactive these days, that is doesn't deserve a separate tree. But I feel also that we will benefit from one, so let me create one this evening and I'll send you pull request when we agree with Lukasz. Just let me know if you'd be fine with github or should I care about kernel.org?

--
Regards,
Alexander.

#40 lore raw
Quoted 15 lines · Alexander Sverdlin

Hello Arnd!

Quoted 11 lines · On Thu Nov 30 10:02:26 2017 Arnd Bergmann <[email protected]> wrote:

Can we clarify who is picking up ep93xx patches these days? The last time I think Linus Walleij offered to do it for the 4.14 merge window, as neither Hartley nor Alexander had a git tree.

I don't care too much who does it in the end, between Hartley, Alexander, Linus and even Lukasz directly, but I'd like whoever feels responsible for the platform to be listed in the MAINTAINERS file and pick up the patches from everyone else to forward them to me as either pull requests or separate patches to arm at kernel.org when the patches are ready, so I don't have to make a decision about when to pick them up from the list.

Quoted 6 lines

As I stepped in as a maintainer there was a common understanding, that ep93xx is so inactive these days, that is doesn't deserve a separate tree. But I feel also that we will benefit from one, so let me create one this evening and I'll send you pull request when we agree with Lukasz. Just let me know if you'd be fine with github or should I care about kernel.org?

Up to you. Normally I try to avoid github for more active trees, but if you don't already have kernel.org account, it's probably not worth the effort of getting one just for the few ep93xx patches. As I said, we're probably also fine with picking up the patches individually, as long as the process is clear to everyone, i.e. you pick up the patches from any other contributors and notify them about the status of their patches, and then you send them to arm at kernel.org in whatever way makes most sense for you.

Arnd

author maintainer
#41 lore raw

v4 cover ARM: ep93xx: ts72xx: Add support for BK3 board

In reply to Lukasz Majewski

This patch series adds support for Liebherr's BK3 board, being a derivative of TS72XX design.

This patchset consists of following patches:

- ts72xx.[c|h] cosmetic cleanup/improvement
- Rewrite ts72xx.c to be reusable by bk3
- The Liebherr's BK3 board has been added with re-using code of ts72xx.c (detalied list of changes can be found in patch 6/6)

This series applies on top of linux-next/master (next-20171130)

Lukasz Majewski (5):
ARM: ep93xx: ts72xx: Provide include guards for ts72xx.h file
ARM: ep93xx: ts72xx: Rewrite ts72xx_register_flash() to accept
parameters
ARM: ep93xx: ts72xx: Rewrite map IO code to be reusable
ARM: ep93xx: ts72xx: cosmetic: Add some description to ts72xx code
ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

 MAINTAINERS                   |   6 ++
 arch/arm/mach-ep93xx/Kconfig  |   7 ++
 arch/arm/mach-ep93xx/ts72xx.c | 198 ++++++++++++++++++++++++++++++++++++++----
 arch/arm/mach-ep93xx/ts72xx.h |   9 ++
 arch/arm/tools/mach-types     |   1 +
 5 files changed, 202 insertions(+), 19 deletions(-)
Signature · 1 line
2.11.0
author maintainer
#42 lore raw

PATCH v4 1/5 ARM: ep93xx: ts72xx: Provide include guards for ts72xx.h file

This commit adds include file guards to ts72xx.h

---
Changes for v2:
- None
Changes for v3:
- None
Changes for v4:
- None

---
 arch/arm/mach-ep93xx/ts72xx.h | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/mach-ep93xx/ts72xx.h +4 -0
index 8a3206a54b39..7b7490f10fa9 100644
@@ -12,6 +12,9 @@
  * febfd000	22800000	4K	options register #2
  */
 
+#ifndef __TS72XX_H_
+#define __TS72XX_H_
+
 #define TS72XX_MODEL_PHYS_BASE		0x22000000
 #define TS72XX_MODEL_VIRT_BASE		IOMEM(0xfebff000)
 #define TS72XX_MODEL_SIZE		0x00001000
@@ -83,3 +86,4 @@ static inline int is_ts9420_installed(void)
 					TS72XX_OPTIONS2_TS9420);
 }
 #endif
+#endif /* __TS72XX_H_ */
Signature · 1 line
2.11.0
author maintainer
#43 lore raw

PATCH v4 2/5 ARM: ep93xx: ts72xx: Rewrite ts72xx_register_flash() to accept parameters

In reply to Lukasz Majewski

This commit extend the ts72xx_register_flash() to accept passed parameters, which makes it more reusable.

Now it is possible to accept ep93xx flash start address and partitions.

---
Changes for v2:
- New patch
Changes for v3:
- None
Changes for v4:
- None

---
 arch/arm/mach-ep93xx/ts72xx.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)
arch/arm/mach-ep93xx/ts72xx.c +8 -12
index f386ebae0163..141ae4c65a81 100644
@@ -123,8 +123,6 @@ static struct platform_nand_data ts72xx_nand_data = {
 		.nr_chips	= 1,
 		.chip_offset	= 0,
 		.chip_delay	= 15,
-		.partitions	= ts72xx_nand_parts,
-		.nr_partitions	= ARRAY_SIZE(ts72xx_nand_parts),
 	},
 	.ctrl = {
 		.cmd_ctrl	= ts72xx_nand_hwcontrol,
@@ -148,8 +146,8 @@ static struct platform_device ts72xx_nand_flash = {
 	.num_resources		= ARRAY_SIZE(ts72xx_nand_resource),
 };
 
-
-static void __init ts72xx_register_flash(void)
+void __init ts72xx_register_flash(struct mtd_partition *parts, int n,
+				  resource_size_t start)
 {
 	/*
 	 * TS7200 has NOR flash all other TS72xx board have NAND flash.
@@ -157,16 +155,12 @@ static void __init ts72xx_register_flash(void)
 	if (board_is_ts7200()) {
 		ep93xx_register_flash(2, EP93XX_CS6_PHYS_BASE, SZ_16M);
 	} else {
-		resource_size_t start;
-
-		if (is_ts9420_installed())
-			start = EP93XX_CS7_PHYS_BASE;
-		else
-			start = EP93XX_CS6_PHYS_BASE;
-
 		ts72xx_nand_resource[0].start = start;
 		ts72xx_nand_resource[0].end = start + SZ_16M - 1;
 
+		ts72xx_nand_data.chip.partitions = parts;
+		ts72xx_nand_data.chip.nr_partitions = n;
+
 		platform_device_register(&ts72xx_nand_flash);
 	}
 }
@@ -257,7 +251,9 @@ static struct ep93xx_spi_info ts72xx_spi_info __initdata = {
 static void __init ts72xx_init_machine(void)
 {
 	ep93xx_init_devices();
-	ts72xx_register_flash();
+	ts72xx_register_flash(ts72xx_nand_parts, ARRAY_SIZE(ts72xx_nand_parts),
+			      is_ts9420_installed() ?
+			      EP93XX_CS7_PHYS_BASE : EP93XX_CS6_PHYS_BASE);
 	platform_device_register(&ts72xx_rtc_device);
 	platform_device_register(&ts72xx_wdt_device);
 
Signature · 1 line
2.11.0
author maintainer
#44 lore raw

PATCH v4 3/5 ARM: ep93xx: ts72xx: Rewrite map IO code to be reusable

In reply to Lukasz Majewski

The map IO common code has been excluded to be reused by other ts72xx clones.

---
Changes for v2:
- New patch
Changes for v3:
- None
Changes for v4:
- None

---
 arch/arm/mach-ep93xx/ts72xx.c | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)
arch/arm/mach-ep93xx/ts72xx.c +16 -7
index 141ae4c65a81..19b23c9a2efa 100644
@@ -33,11 +33,6 @@
 
 static struct map_desc ts72xx_io_desc[] __initdata = {
 	{
-		.virtual	= (unsigned long)TS72XX_MODEL_VIRT_BASE,
-		.pfn		= __phys_to_pfn(TS72XX_MODEL_PHYS_BASE),
-		.length		= TS72XX_MODEL_SIZE,
-		.type		= MT_DEVICE,
-	}, {
 		.virtual	= (unsigned long)TS72XX_OPTIONS_VIRT_BASE,
 		.pfn		= __phys_to_pfn(TS72XX_OPTIONS_PHYS_BASE),
 		.length		= TS72XX_OPTIONS_SIZE,
@@ -50,12 +45,26 @@ static struct map_desc ts72xx_io_desc[] __initdata = {
 	}
 };
 
-static void __init ts72xx_map_io(void)
+static struct map_desc ts72xx_common_io_desc[] __initdata = {
+	{
+		.virtual	= (unsigned long)TS72XX_MODEL_VIRT_BASE,
+		.pfn		= __phys_to_pfn(TS72XX_MODEL_PHYS_BASE),
+		.length		= TS72XX_MODEL_SIZE,
+		.type		= MT_DEVICE,
+	}
+};
+
+void __init ts72xx_common_map_io(void)
 {
 	ep93xx_map_io();
-	iotable_init(ts72xx_io_desc, ARRAY_SIZE(ts72xx_io_desc));
+	iotable_init(ts72xx_common_io_desc, ARRAY_SIZE(ts72xx_common_io_desc));
 }
 
+static void __init ts72xx_map_io(void)
+{
+	ts72xx_common_map_io();
+	iotable_init(ts72xx_io_desc, ARRAY_SIZE(ts72xx_io_desc));
+}
 
 /*************************************************************************
  * NAND flash
Signature · 1 line
2.11.0
author maintainer
#45 lore raw

PATCH v4 4/5 ARM: ep93xx: ts72xx: cosmetic: Add some description to ts72xx code

In reply to Lukasz Majewski

This patch extends readability of ts72xx.c code.

---
Changes for v2:
- New patch
Changes for v3:
- None
Changes to v4:
- Adjust the code to be applicable to linux-next/master

---
 arch/arm/mach-ep93xx/ts72xx.c | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/mach-ep93xx/ts72xx.c +9 -0
index 19b23c9a2efa..cf269b5397e5 100644
@@ -31,6 +31,9 @@
 #include "soc.h"
 #include "ts72xx.h"
 
+/*************************************************************************
+ * IO map
+ *************************************************************************/
 static struct map_desc ts72xx_io_desc[] __initdata = {
 	{
 		.virtual	= (unsigned long)TS72XX_OPTIONS_VIRT_BASE,
@@ -210,10 +213,16 @@ static struct platform_device ts72xx_wdt_device = {
 	.num_resources	= ARRAY_SIZE(ts72xx_wdt_resources),
 };
 
+/*************************************************************************
+ * ETH
+ *************************************************************************/
 static struct ep93xx_eth_data __initdata ts72xx_eth_data = {
 	.phy_id		= 1,
 };
 
+/*************************************************************************
+ * TS72XX support code
+ *************************************************************************/
 #if IS_ENABLED(CONFIG_FPGA_MGR_TS73XX)
 
 /* Relative to EP93XX_CS1_PHYS_BASE */
Signature · 1 line
2.11.0
author maintainer
#46 lore raw

PATCH v4 5/5 ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

In reply to Lukasz Majewski

The BK3 board is a derivative of the ts72xx reference design.

---
Changes for v2:
- Place bk3 support code to the ts72xx.c file Changes for v3:
- Add SD card support (via SPI) for BK3
- Remove definition of apb:i2s bus
- Remove board registration of CPLD WDT device
- Add I2S platform device to BK3
- Add MAINTAINERS entry for BK3 maintainer
Changes for v4:
- Adjust the code to be applicable on top of linux-next/master

---
 MAINTAINERS                   |   6 ++
 arch/arm/mach-ep93xx/Kconfig  |   7 ++
 arch/arm/mach-ep93xx/ts72xx.c | 146 ++++++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-ep93xx/ts72xx.h |   5 ++
 arch/arm/tools/mach-types     |   1 +
 5 files changed, 165 insertions(+)
MAINTAINERS +6 -0
index 4149cd992825..2fc98b40268d 100644
@@ -1254,6 +1254,12 @@ L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
 S:	Supported
 F:	drivers/net/ethernet/cavium/thunder/
 
+ARM/CIRRUS LOGIC BK3 MACHINE SUPPORT
+M:	Lukasz Majewski <[email protected]>
+L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
+S:	Maintained
+F:	arch/arm/mach-ep93xx/ts72xx.c
+
 ARM/CIRRUS LOGIC CLPS711X ARM ARCHITECTURE
 M:	Alexander Shiyan <[email protected]>
 L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
arch/arm/mach-ep93xx/Kconfig +7 -0
index 61a75ca3684e..c095236d7ff8 100644
@@ -21,6 +21,13 @@ config MACH_ADSSPHERE
 	  Say 'Y' here if you want your kernel to support the ADS
 	  Sphere board.
 
+config MACH_BK3
+	bool "Support Liebherr BK3.1"
+	select MACH_TS72XX
+	help
+	  Say 'Y' here if you want your kernel to support the
+	  Liebherr controller BK3.1.
+
 config MACH_EDB93XX
 	bool
 
arch/arm/mach-ep93xx/ts72xx.c +146 -0

165 lines not on this page · raw message

arch/arm/mach-ep93xx/ts72xx.h +5 -0
index 7b7490f10fa9..61410faa3785 100644
@@ -42,6 +42,11 @@
 #define TS72XX_OPTIONS2_TS9420		0x04
 #define TS72XX_OPTIONS2_TS9420_BOOT	0x02
 
+/* BK3 specific defines */
+#define BK3_CPLDVER_PHYS_BASE		0x23400000
+#define BK3_CPLDVER_VIRT_BASE		0xfebfd000
+#define BK3_CPLDVER_SIZE		0x00001000
+
 #ifndef __ASSEMBLY__
 
 static inline int ts72xx_model(void)
arch/arm/tools/mach-types +1 -0
index a9313b66f770..4eac94c1eb6f 100644
@@ -345,6 +345,7 @@ mxlads			MACH_MXLADS		MXLADS			1851
 linkstation_mini	MACH_LINKSTATION_MINI	LINKSTATION_MINI	1858
 afeb9260		MACH_AFEB9260		AFEB9260		1859
 imx27ipcam		MACH_IMX27IPCAM		IMX27IPCAM		1871
+bk3			MACH_BK3		BK3			1880
 rd88f6183ap_ge		MACH_RD88F6183AP_GE	RD88F6183AP_GE		1894
 realview_pba8		MACH_REALVIEW_PBA8	REALVIEW_PBA8		1897
 realview_pbx		MACH_REALVIEW_PBX	REALVIEW_PBX		1901
Signature · 1 line
2.11.0
#47 lore raw

RE: [PATCH v4 5/5] ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

Quoted 2 lines · Lukasz Majewski

The BK3 board is a derivative of the ts72xx reference design.

Lukasz,

I was just reviewing the other TS-72xx boards and noticed this:

<snip>

Quoted 5 lines
arch/arm/mach-ep93xx/ts72xx.h +5 -0
+/* BK3 specific defines */
+#define BK3_CPLDVER_PHYS_BASE		0x23400000
+#define BK3_CPLDVER_VIRT_BASE		0xfebfd000
+#define BK3_CPLDVER_SIZE		0x00001000
+

<snip>

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 409

Quoted 9 lines
arch/arm/mach-ep93xx/ts72xx.c +9 -0
+static struct map_desc bk3_io_desc[] __initdata = {
+	{
+		.virtual	= BK3_CPLDVER_VIRT_BASE,
+		.pfn		= __phys_to_pfn(BK3_CPLDVER_PHYS_BASE),
+		.length	= BK3_CPLDVER_SIZE,
+		.type		= MT_DEVICE,
+	}
+};
+

This register appears to be common to all the TS-72xx boards.

I don't think Arnd has pulled the series yet. Would you mind renaming the defines and rebasing this patch? The BK3 board and other TS-72xx boards can then have a common .map_io.

Thanks,
Hartley

author maintainer
#48 lore raw

Re: [PATCH v4 5/5] ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

Hi Hartley,

Quoted 18 lines · Lukasz Majewski
Quoted 2 lines

The BK3 board is a derivative of the ts72xx reference design.

Lukasz,

I was just reviewing the other TS-72xx boards and noticed this:

<snip>

Quoted 5 lines
arch/arm/mach-ep93xx/ts72xx.h +5 -0
+/* BK3 specific defines */
+#define BK3_CPLDVER_PHYS_BASE		0x23400000
+#define BK3_CPLDVER_VIRT_BASE		0xfebfd000
+#define BK3_CPLDVER_SIZE		0x00001000
+  

<snip>

Quoted 12 lines

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 409

Quoted 10 lines
arch/arm/mach-ep93xx/ts72xx.c +4 -0
+static struct map_desc bk3_io_desc[] __initdata = {
+	{
+		.virtual	= BK3_CPLDVER_VIRT_BASE,
+		.pfn		=

__phys_to_pfn(BK3_CPLDVER_PHYS_BASE),

arch/arm/mach-ep93xx/ts72xx.c +5 -0
+		.length	= BK3_CPLDVER_SIZE,
+		.type		= MT_DEVICE,
+	}
+};
+  

This register appears to be common to all the TS-72xx boards.

The CPLD was used on the reference ts-72xx boards, but support for it seems to not be present in the mainline kernel.

Do you have a ts72xx board with CPLD embedded? Is any of your design using it?

My another concern - is it safe to perform IO mapping on memory regions which are not used / specified? When I do a single ts72xx mapping - for all boards - then we may end up with some mappings which are not needed.

With the code as it is - I only map regions which are already used on relevant boards.

Quoted 3 lines

I don't think Arnd has pulled the series yet. Would you mind renaming the defines and rebasing this patch?

If needed I can resend the patch series, or prepare a single fix patch. No problem.

Quoted 6 lines

The BK3 board and other TS-72xx
boards can then have a common .map_io.

Thanks,
Hartley

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171211/0cfc9f29/attachment.sig>

#49 lore raw

RE: [PATCH v4 5/5] ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

Quoted 33 lines · Lukasz Majewski

Hi Hartley,

Quoted 18 lines · Lukasz Majewski
Quoted 2 lines

The BK3 board is a derivative of the ts72xx reference design.

Lukasz,

I was just reviewing the other TS-72xx boards and noticed this:

<snip>

Quoted 5 lines
arch/arm/mach-ep93xx/ts72xx.h +5 -0
+/* BK3 specific defines */
+#define BK3_CPLDVER_PHYS_BASE		0x23400000
+#define BK3_CPLDVER_VIRT_BASE		0xfebfd000
+#define BK3_CPLDVER_SIZE		0x00001000
+  

<snip>

Quoted 12 lines

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 409

Quoted 10 lines
arch/arm/mach-ep93xx/ts72xx.c +4 -0
+static struct map_desc bk3_io_desc[] __initdata = {
+	{
+		.virtual	= BK3_CPLDVER_VIRT_BASE,
+		.pfn		=

__phys_to_pfn(BK3_CPLDVER_PHYS_BASE),

arch/arm/mach-ep93xx/ts72xx.c +5 -0
+		.length	= BK3_CPLDVER_SIZE,
+		.type		= MT_DEVICE,
+	}
+};
+  

This register appears to be common to all the TS-72xx boards.

Quoted 2 lines

The CPLD was used on the reference ts-72xx boards, but support for it seems to not be present in the mainline kernel.

The CPLD is not directly called out but some parts of it are supported in the mainline kernel.

The RTC index and data registers are chip selected by the CPLD and Watchdog is in the CPLD. Also, the model number, options, and options2 registers are in the CPLD.

There are a couple other registers in the CPLD that are not currently present in mainline. Some aren't because I haven't figured a good way to utilize them (the COM2 RS485 registers and the PC/104 memory/IO spaces) or they simply have not been necessary yet (the two status registers). There are a couple listed in the manuals that are specific to the TS-7260 that also have not been added.

Basically, anything in the EP93xx CS1 or CS2 memory region is in or controlled by the CPLD.

Quoted 1 line

Do you have a ts72xx board with CPLD embedded? Is any of your design using it?

I have a stock TS-7300 board.

Quoted 2 lines

My another concern - is it safe to perform IO mapping on memory regions which are not used / specified?

The mapping is safe. If there is nothing at the address you just read back the static state (noise) of the bus and writing doesn't do anything.

Quoted 2 lines

When I do a single ts72xx mapping - for all boards - then we may end up with some
mappings which are not needed.

True, but it's harmless and it keeps the platform init code cleaner.

Quoted 1 line

With the code as it is - I only map regions which are already used on relevant boards.

Yes, but this register in particular exists in the CPLD on all the TS-72xx boards.

Quoted 5 lines
Quoted 2 lines

I don't think Arnd has pulled the series yet. Would you mind renaming the defines and rebasing this patch?

If needed I can resend the patch series, or prepare a single fix patch. No problem.

Fixing it after Arnd merges your series is fine. I just wanted to make sure it was pointed out.

BTW, is there a reason the BK3 board needs this register mapped? It was mapped in the Technologic Systems 2.4, 2.6, and 3.x kernels but I never found anything that used it. Of course the stock boards probably always had the same revision in the CPLD, the BK3 board might have multiple revisions...

Hartley

author maintainer
#50 lore raw

Re: [PATCH v4 5/5] ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

Hi Hartley,

Quoted 57 lines · Lukasz Majewski
Quoted 33 lines

Hi Hartley,

Quoted 18 lines · Lukasz Majewski
Quoted 2 lines

The BK3 board is a derivative of the ts72xx reference design.

Lukasz,

I was just reviewing the other TS-72xx boards and noticed this:

<snip>

Quoted 5 lines
arch/arm/mach-ep93xx/ts72xx.h +5 -0
+/* BK3 specific defines */
+#define BK3_CPLDVER_PHYS_BASE		0x23400000
+#define BK3_CPLDVER_VIRT_BASE		0xfebfd000
+#define BK3_CPLDVER_SIZE		0x00001000
+    

<snip>

Quoted 12 lines

arch/arm/mach-ep93xx/ts72xx.c MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") · line 409

Quoted 10 lines
arch/arm/mach-ep93xx/ts72xx.c +4 -0
+static struct map_desc bk3_io_desc[] __initdata = {
+	{
+		.virtual	= BK3_CPLDVER_VIRT_BASE,
+		.pfn		=

__phys_to_pfn(BK3_CPLDVER_PHYS_BASE),

arch/arm/mach-ep93xx/ts72xx.c +5 -0
+		.length	= BK3_CPLDVER_SIZE,
+		.type		= MT_DEVICE,
+	}
+};
+    

This register appears to be common to all the TS-72xx boards.

Quoted 2 lines

The CPLD was used on the reference ts-72xx boards, but support for it seems to not be present in the mainline kernel.

The CPLD is not directly called out but some parts of it are supported in the mainline kernel.

The RTC index and data registers are chip selected by the CPLD and Watchdog is in the CPLD. Also, the model number, options, and options2 registers are in the CPLD.

There are a couple other registers in the CPLD that are not currently present in mainline. Some aren't because I haven't figured a good way to utilize them (the COM2 RS485 registers and the PC/104 memory/IO spaces) or they simply have not been necessary yet (the two status registers). There are a couple listed in the manuals that are specific to the TS-7260 that also have not been added.

Basically, anything in the EP93xx CS1 or CS2 memory region is in or controlled by the CPLD.

Quoted 2 lines

Do you have a ts72xx board with CPLD embedded? Is any of your design using it?

Quoted 8 lines

I have a stock TS-7300 board.

Quoted 2 lines

My another concern - is it safe to perform IO mapping on memory regions which are not used / specified?

The mapping is safe. If there is nothing at the address you just read back the static state (noise) of the bus and writing doesn't do anything.

Ok.

Quoted 5 lines
Quoted 3 lines

When I do a single ts72xx mapping - for all boards - then we may
end up with some mappings which are not needed.

True, but it's harmless and it keeps the platform init code cleaner.

I will add all the mappings.

Quoted 7 lines
Quoted 3 lines

With the code as it is - I only map regions which are already used on relevant boards.

Yes, but this register in particular exists in the CPLD on all the TS-72xx boards.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I don't think Arnd has pulled the series yet. Would you mind renaming the defines and rebasing this patch?

If needed I can resend the patch series, or prepare a single fix patch. No problem.

Fixing it after Arnd merges your series is fine. I just wanted to make sure it was pointed out.

I've checked a few minutes ago and it seems like arm-soc hasn't been pulled to for-next.

I may resend the whole series.

Quoted 4 lines

BTW, is there a reason the BK3 board needs this register mapped? It was mapped in the Technologic Systems 2.4, 2.6, and 3.x kernels but I never found anything that used it.

It is used to check the version. BK3 has some CPLD modifications and it is important to know which version we do have as the board is already deployed for some time in the field.

Quoted 3 lines

Of course the stock boards
probably always had the same revision in the CPLD, the BK3 board might have multiple revisions...

Yes, correct.

Quoted 2 lines

Hartley

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171211/4003dd39/attachment-0001.sig>

Acked-by H Hartley Sweeten on the v4 series
#51 lore raw
In reply to Lukasz Majewski
Quoted 20 lines · Lukasz Majewski

This patch series adds support for Liebherr's BK3 board, being a derivative of TS72XX design.

This patchset consists of following patches:

- ts72xx.[c|h] cosmetic cleanup/improvement
- Rewrite ts72xx.c to be reusable by bk3
- The Liebherr's BK3 board has been added with re-using code of ts72xx.c (detalied list of changes can be found in patch 6/6)

This series applies on top of linux-next/master (next-20171130)

Lukasz Majewski (5):
ARM: ep93xx: ts72xx: Provide include guards for ts72xx.h file
ARM: ep93xx: ts72xx: Rewrite ts72xx_register_flash() to accept
parameters
ARM: ep93xx: ts72xx: Rewrite map IO code to be reusable
ARM: ep93xx: ts72xx: cosmetic: Add some description to ts72xx code
ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

Quoted 6 lines
 MAINTAINERS                   |   6 ++
 arch/arm/mach-ep93xx/Kconfig  |   7 ++
 arch/arm/mach-ep93xx/ts72xx.c | 198 ++++++++++++++++++++++++++++++++++++++----
 arch/arm/mach-ep93xx/ts72xx.h |   9 ++
 arch/arm/tools/mach-types     |   1 +
 5 files changed, 202 insertions(+), 19 deletions(-)

Looks good.

Linus,

Would you mind picking this series up?

Thanks,
Hartley

#52 lore raw

Hello Hartley,

Quoted 25 lines · Hartley Sweeten
Quoted 19 lines

This patch series adds support for Liebherr's BK3 board, being a derivative of TS72XX design.

This patchset consists of following patches:

- ts72xx.[c|h] cosmetic cleanup/improvement
- Rewrite ts72xx.c to be reusable by bk3
- The Liebherr's BK3 board has been added with re-using code of ts72xx.c (detalied list of changes can be found in patch 6/6)

This series applies on top of linux-next/master (next-20171130)

Lukasz Majewski (5):
ARM: ep93xx: ts72xx: Provide include guards for ts72xx.h file
ARM: ep93xx: ts72xx: Rewrite ts72xx_register_flash() to accept
parameters
ARM: ep93xx: ts72xx: Rewrite map IO code to be reusable
ARM: ep93xx: ts72xx: cosmetic: Add some description to ts72xx code
ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

Quoted 6 lines
 MAINTAINERS                   |   6 ++
 arch/arm/mach-ep93xx/Kconfig  |   7 ++
 arch/arm/mach-ep93xx/ts72xx.c | 198 ++++++++++++++++++++++++++++++++++++++----
 arch/arm/mach-ep93xx/ts72xx.h |   9 ++
 arch/arm/tools/mach-types     |   1 +
 5 files changed, 202 insertions(+), 19 deletions(-)
Quoted 3 lines

Looks good.

I can prepare pull request to Arnd, as we discussed previously, just waited for your review.

Regards,
Alexander.

author maintainer
#53 lore raw

v5 cover ARM: ep93xx: ts72xx: Add support for BK3 board

In reply to Lukasz Majewski

This patch series adds support for Liebherr's BK3 board, being a derivative of TS72XX design.

This patchset consists of following patches:

- ts72xx.[c|h] cosmetic cleanup/improvement
- Rewrite ts72xx.c to be reusable by bk3
- The Liebherr's BK3 board has been added with re-using code of ts72xx.c (detalied list of changes can be found in patch 4/4)

This series applies on top of linux-next/master (next-20171211)

Lukasz Majewski (4):
ARM: ep93xx: ts72xx: Provide include guards for ts72xx.h file
ARM: ep93xx: ts72xx: Rewrite ts72xx_register_flash() to accept
parameters
ARM: ep93xx: ts72xx: cosmetic: Add some description to ts72xx code
ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

 MAINTAINERS                   |   6 ++
 arch/arm/mach-ep93xx/Kconfig  |   7 ++
 arch/arm/mach-ep93xx/ts72xx.c | 165 +++++++++++++++++++++++++++++++++++++++---
 arch/arm/mach-ep93xx/ts72xx.h |   9 +++
 arch/arm/tools/mach-types     |   1 +
 5 files changed, 176 insertions(+), 12 deletions(-)
Signature · 1 line
2.11.0
author maintainer
#54 lore raw

PATCH v5 1/4 ARM: ep93xx: ts72xx: Provide include guards for ts72xx.h file

This commit adds include file guards to ts72xx.h

---
Changes for v2:
- None
Changes for v3:
- None
Changes for v4:
- None
Changes for v5:
- None

---
 arch/arm/mach-ep93xx/ts72xx.h | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/mach-ep93xx/ts72xx.h +4 -0
index 8a3206a54b39..7b7490f10fa9 100644
@@ -12,6 +12,9 @@
  * febfd000	22800000	4K	options register #2
  */
 
+#ifndef __TS72XX_H_
+#define __TS72XX_H_
+
 #define TS72XX_MODEL_PHYS_BASE		0x22000000
 #define TS72XX_MODEL_VIRT_BASE		IOMEM(0xfebff000)
 #define TS72XX_MODEL_SIZE		0x00001000
@@ -83,3 +86,4 @@ static inline int is_ts9420_installed(void)
 					TS72XX_OPTIONS2_TS9420);
 }
 #endif
+#endif /* __TS72XX_H_ */
Signature · 1 line
2.11.0
author maintainer
#55 lore raw

PATCH v5 2/4 ARM: ep93xx: ts72xx: Rewrite ts72xx_register_flash() to accept parameters

In reply to Lukasz Majewski

This commit extend the ts72xx_register_flash() to accept passed parameters, which makes it more reusable.

Now it is possible to accept ep93xx flash start address and partitions.

---
Changes for v2:
- New patch
Changes for v3:
- None
Changes for v4:
- None
Changes for v5:
- None

---
 arch/arm/mach-ep93xx/ts72xx.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)
arch/arm/mach-ep93xx/ts72xx.c +8 -12
index f386ebae0163..141ae4c65a81 100644
@@ -123,8 +123,6 @@ static struct platform_nand_data ts72xx_nand_data = {
 		.nr_chips	= 1,
 		.chip_offset	= 0,
 		.chip_delay	= 15,
-		.partitions	= ts72xx_nand_parts,
-		.nr_partitions	= ARRAY_SIZE(ts72xx_nand_parts),
 	},
 	.ctrl = {
 		.cmd_ctrl	= ts72xx_nand_hwcontrol,
@@ -148,8 +146,8 @@ static struct platform_device ts72xx_nand_flash = {
 	.num_resources		= ARRAY_SIZE(ts72xx_nand_resource),
 };
 
-
-static void __init ts72xx_register_flash(void)
+void __init ts72xx_register_flash(struct mtd_partition *parts, int n,
+				  resource_size_t start)
 {
 	/*
 	 * TS7200 has NOR flash all other TS72xx board have NAND flash.
@@ -157,16 +155,12 @@ static void __init ts72xx_register_flash(void)
 	if (board_is_ts7200()) {
 		ep93xx_register_flash(2, EP93XX_CS6_PHYS_BASE, SZ_16M);
 	} else {
-		resource_size_t start;
-
-		if (is_ts9420_installed())
-			start = EP93XX_CS7_PHYS_BASE;
-		else
-			start = EP93XX_CS6_PHYS_BASE;
-
 		ts72xx_nand_resource[0].start = start;
 		ts72xx_nand_resource[0].end = start + SZ_16M - 1;
 
+		ts72xx_nand_data.chip.partitions = parts;
+		ts72xx_nand_data.chip.nr_partitions = n;
+
 		platform_device_register(&ts72xx_nand_flash);
 	}
 }
@@ -257,7 +251,9 @@ static struct ep93xx_spi_info ts72xx_spi_info __initdata = {
 static void __init ts72xx_init_machine(void)
 {
 	ep93xx_init_devices();
-	ts72xx_register_flash();
+	ts72xx_register_flash(ts72xx_nand_parts, ARRAY_SIZE(ts72xx_nand_parts),
+			      is_ts9420_installed() ?
+			      EP93XX_CS7_PHYS_BASE : EP93XX_CS6_PHYS_BASE);
 	platform_device_register(&ts72xx_rtc_device);
 	platform_device_register(&ts72xx_wdt_device);
 
Signature · 1 line
2.11.0
author maintainer
#56 lore raw

PATCH v5 3/4 ARM: ep93xx: ts72xx: cosmetic: Add some description to ts72xx code

In reply to Lukasz Majewski

This patch extends readability of ts72xx.c code.

---
Changes for v2:
- New patch
Changes for v3:
- None
Changes to v4:
- Adjust the code to be applicable to linux-next/master Changes for v5:
- None

---
 arch/arm/mach-ep93xx/ts72xx.c | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/mach-ep93xx/ts72xx.c +9 -0
index 141ae4c65a81..17af9d834b51 100644
@@ -31,6 +31,9 @@
 #include "soc.h"
 #include "ts72xx.h"
 
+/*************************************************************************
+ * IO map
+ *************************************************************************/
 static struct map_desc ts72xx_io_desc[] __initdata = {
 	{
 		.virtual	= (unsigned long)TS72XX_MODEL_VIRT_BASE,
@@ -201,10 +204,16 @@ static struct platform_device ts72xx_wdt_device = {
 	.num_resources	= ARRAY_SIZE(ts72xx_wdt_resources),
 };
 
+/*************************************************************************
+ * ETH
+ *************************************************************************/
 static struct ep93xx_eth_data __initdata ts72xx_eth_data = {
 	.phy_id		= 1,
 };
 
+/*************************************************************************
+ * TS72XX support code
+ *************************************************************************/
 #if IS_ENABLED(CONFIG_FPGA_MGR_TS73XX)
 
 /* Relative to EP93XX_CS1_PHYS_BASE */
Signature · 1 line
2.11.0
author maintainer
#57 lore raw

PATCH v5 4/4 ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

In reply to Lukasz Majewski

The BK3 board is a derivative of the ts72xx reference design.

---
Changes for v2:
- Place bk3 support code to the ts72xx.c file Changes for v3:
- Add SD card support (via SPI) for BK3
- Remove definition of apb:i2s bus
- Remove board registration of CPLD WDT device
- Add I2S platform device to BK3
- Add MAINTAINERS entry for BK3 maintainer
Changes for v4:
- Adjust the code to be applicable on top of linux-next/master Changes for v5:
- Combine map_io to be reused across all ts72xx boards

---
 MAINTAINERS                   |   6 ++
 arch/arm/mach-ep93xx/Kconfig  |   7 +++
 arch/arm/mach-ep93xx/ts72xx.c | 136 ++++++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-ep93xx/ts72xx.h |   5 ++
 arch/arm/tools/mach-types     |   1 +
 5 files changed, 155 insertions(+)
MAINTAINERS +6 -0
index 7d195739f892..17e1263b085d 100644
@@ -1258,6 +1258,12 @@ L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
 S:	Supported
 F:	drivers/net/ethernet/cavium/thunder/
 
+ARM/CIRRUS LOGIC BK3 MACHINE SUPPORT
+M:	Lukasz Majewski <[email protected]>
+L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
+S:	Maintained
+F:	arch/arm/mach-ep93xx/ts72xx.c
+
 ARM/CIRRUS LOGIC CLPS711X ARM ARCHITECTURE
 M:	Alexander Shiyan <[email protected]>
 L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
arch/arm/mach-ep93xx/Kconfig +7 -0
index 61a75ca3684e..c095236d7ff8 100644
@@ -21,6 +21,13 @@ config MACH_ADSSPHERE
 	  Say 'Y' here if you want your kernel to support the ADS
 	  Sphere board.
 
+config MACH_BK3
+	bool "Support Liebherr BK3.1"
+	select MACH_TS72XX
+	help
+	  Say 'Y' here if you want your kernel to support the
+	  Liebherr controller BK3.1.
+
 config MACH_EDB93XX
 	bool
 
arch/arm/mach-ep93xx/ts72xx.c +136 -0

161 lines not on this page · raw message

arch/arm/mach-ep93xx/ts72xx.h +5 -0
index 7b7490f10fa9..00b4941d29c9 100644
@@ -10,6 +10,7 @@
  * febff000	22000000	4K	model number register (bits 0-2)
  * febfe000	22400000	4K	options register
  * febfd000	22800000	4K	options register #2
+ * febfc000     23400000        4K      CPLD version register
  */
 
 #ifndef __TS72XX_H_
@@ -42,6 +43,10 @@
 #define TS72XX_OPTIONS2_TS9420		0x04
 #define TS72XX_OPTIONS2_TS9420_BOOT	0x02
 
+#define TS72XX_CPLDVER_PHYS_BASE	0x23400000
+#define TS72XX_CPLDVER_VIRT_BASE	IOMEM(0xfebfc000)
+#define TS72XX_CPLDVER_SIZE		0x00001000
+
 #ifndef __ASSEMBLY__
 
 static inline int ts72xx_model(void)
arch/arm/tools/mach-types +1 -0
index a9313b66f770..4eac94c1eb6f 100644
@@ -345,6 +345,7 @@ mxlads			MACH_MXLADS		MXLADS			1851
 linkstation_mini	MACH_LINKSTATION_MINI	LINKSTATION_MINI	1858
 afeb9260		MACH_AFEB9260		AFEB9260		1859
 imx27ipcam		MACH_IMX27IPCAM		IMX27IPCAM		1871
+bk3			MACH_BK3		BK3			1880
 rd88f6183ap_ge		MACH_RD88F6183AP_GE	RD88F6183AP_GE		1894
 realview_pba8		MACH_REALVIEW_PBA8	REALVIEW_PBA8		1897
 realview_pbx		MACH_REALVIEW_PBX	REALVIEW_PBX		1901
Signature · 1 line
2.11.0
Acked-by H Hartley Sweeten on the v5 series
#58 lore raw
In reply to Lukasz Majewski
Quoted 18 lines · Lukasz Majewski

This patch series adds support for Liebherr's BK3 board, being a derivative of TS72XX design.

This patchset consists of following patches:

- ts72xx.[c|h] cosmetic cleanup/improvement
- Rewrite ts72xx.c to be reusable by bk3
- The Liebherr's BK3 board has been added with re-using code of ts72xx.c (detalied list of changes can be found in patch 4/4)

This series applies on top of linux-next/master (next-20171211)

Lukasz Majewski (4):
ARM: ep93xx: ts72xx: Provide include guards for ts72xx.h file
ARM: ep93xx: ts72xx: Rewrite ts72xx_register_flash() to accept
parameters
ARM: ep93xx: ts72xx: cosmetic: Add some description to ts72xx code
ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative

Quoted 6 lines
 MAINTAINERS                   |   6 ++
 arch/arm/mach-ep93xx/Kconfig  |   7 ++
 arch/arm/mach-ep93xx/ts72xx.c | 165 +++++++++++++++++++++++++++++++++++++++---
 arch/arm/mach-ep93xx/ts72xx.h |   9 +++
 arch/arm/tools/mach-types     |   1 +
 5 files changed, 176 insertions(+), 12 deletions(-)

Looks good. Thanks!

Acked-by on the v5 series
#59 lore raw
In reply to Lukasz Majewski
Quoted 2 lines · Lukasz Majewski

This patch series adds support for Liebherr's BK3 board, being a derivative of TS72XX design.

All looks good.

Out of curiosity: Liebherr is obviously doing heavy-duty industrial control systems. Likewise Hartley is doing similar business over at Vision Engravings.

Is the situation such that there is a whole bunch of industrial systems out there, in active use and needing future upgrades, that use the EP93xx?

Arnd has been nudging me to do DT conversion for EP93xx so if there are many active industrial users of these I should prioritize it, because these things have 20+ years support cycles.

We also need to think about upholding support in GCC for ARMv4(t) for the foreseeable future if there is a big web of random deeply embedded systems out there that will need updates.

Yours,
Linus Walleij

#60 lore raw

Hello Linus!

Quoted 8 lines · On Wed Dec 13 08:34:22 2017 Linus Walleij <[email protected]> wrote:

On Tue, Dec 12, 2017 at 12:36 AM, Lukasz Majewski <[email protected]> wrote:
Out of curiosity: Liebherr is obviously doing heavy-duty industrial control systems. Likewise Hartley is doing similar business over at Vision Engravings.

Is the situation such that there is a whole bunch of industrial systems out there, in active use and needing future upgrades, that use the EP93xx?

That's definitely the case. I'm as well aware of several thousands of industrial devices which are expected to run 24/7 for the next 5 years at least. And they are updated from time to time.

Quoted 4 lines

Arnd has been nudging me to do DT conversion for EP93xx so if there are many active industrial users of these I should prioritize it, because these things have 20+ years support cycles.

I'm not sure how important or necessary at all is to change anything in these legacy platforms.

Quoted 4 lines

We also need to think about upholding support in GCC for ARMv4(t) for the foreseeable future if there is a big web of random deeply embedded systems out there that will need updates.

But we should definitely preserve at least what we have.

--
Alexander.

author maintainer
#61 lore raw

Hi Alexander, Linus

Quoted 9 lines

Hello Linus!

Quoted 5 lines · On Wed Dec 13 08:34:22 2017 Linus Walleij <[email protected]> wrote:

On Tue, Dec 12, 2017 at 12:36 AM, Lukasz Majewski <[email protected]>
wrote: Out of curiosity: Liebherr is obviously doing heavy-duty industrial control systems. Likewise Hartley is doing similar business over at Vision Engravings.

Quoted 7 lines
Quoted 3 lines

Is the situation such that there is a whole bunch of industrial systems out there, in active use and needing future upgrades, that use the EP93xx?

That's definitely the case. I'm as well aware of several thousands of industrial devices which are expected to run 24/7 for the next 5 years at least. And they are updated from time to time.

I can agree with this statement.

Quoted 8 lines
Quoted 5 lines

Arnd has been nudging me to do DT conversion for EP93xx so if there are many active industrial users of these I should prioritize it, because these things have 20+ years support cycles.

I'm not sure how important or necessary at all is to change anything in these legacy platforms.

+1

Quoted 7 lines
Quoted 5 lines

We also need to think about upholding support in GCC for ARMv4(t) for the foreseeable future if there is a big web of random deeply embedded systems out there that will need updates.

But we should definitely preserve at least what we have.

I'm using OE to build toolchain (SDK). I can confirm that gcc 7.2 works with it.

And yes, armv4 support shall be preserved in GCC ....

Quoted 4 lines

--
Alexander.

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171213/d6dfd68c/attachment-0001.sig>

#62 lore raw
Quoted 11 lines · Lukasz Majewski
Quoted 11 lines
Quoted 8 lines · On Wed Dec 13 08:34:22 2017 Linus Walleij <[email protected]> wrote:

On Tue, Dec 12, 2017 at 12:36 AM, Lukasz Majewski <[email protected]>
wrote: Out of curiosity: Liebherr is obviously doing heavy-duty industrial control systems. Likewise Hartley is doing similar business over at Vision Engravings.

Is the situation such that there is a whole bunch of industrial systems out there, in active use and needing future upgrades, that use the EP93xx?

Quoted 5 lines
Quoted 3 lines

That's definitely the case. I'm as well aware of several thousands of industrial devices which are expected to run 24/7 for the next 5 years at least. And they are updated from time to time.

I can agree with this statement.

OK I'm coloring this platform with a highlight for ARM32 maintenance.

Quoted 9 lines
Quoted 7 lines
Quoted 4 lines

Arnd has been nudging me to do DT conversion for EP93xx so if there are many active industrial users of these I should prioritize it, because these things have 20+ years support cycles.

I'm not sure how important or necessary at all is to change anything in these legacy platforms.

+1

That is an understandable conservative stance.

There is a fine line between "it works, don't touch it" and "modernize the ARM32 ecosystem".

There is a point where supporting old board files will stand in the way and cost a lot in maintenance (like moving drivers our of arch/arm, or modernizing misc subsystems). Then moving the platform over to device tree should be preferred.

Quoted 4 lines

I'm using OE to build toolchain (SDK). I can confirm that gcc 7.2 works with it.

And yes, armv4 support shall be preserved in GCC ....

Yes that is the same toochain I use.

Yours,
Linus Walleij

#63 lore raw
Quoted 7 lines · Linus Walleij

On Wed, Dec 13, 2017 at 9:52 AM, Lukasz Majewski <[email protected]> wrote:

There is a point where supporting old board files will stand in the way and cost a lot in maintenance (like moving drivers our of arch/arm, or modernizing misc subsystems). Then moving the platform over to device tree should be preferred.

I'm generally more interested in the multiplatform conversion than the DT conversion, and I think converting this one to multiplatform isn't actually that hard, and doesn't have a significant risk for regressions, the main work is to convert the clock handling.

Arnd

#64 lore raw

Hi!

Quoted 4 lines · On Wed Dec 20 13:50:28 2017 Arnd Bergmann <[email protected]> wrote:

I'm generally more interested in the multiplatform conversion than the DT conversion, and I think converting this one to multiplatform isn't actually that hard, and doesn't have a significant risk for regressions, the main work is to convert the clock handling.

If it will be still possible to build the binary kernel of the same size after the conversion, I'm in for testing, otherwise it will not fit into Flash any more...

--
Alex.

#65 lore raw
Quoted 10 lines · Alexander Sverdlin

Hi!

Quoted 4 lines · On Wed Dec 20 13:50:28 2017 Arnd Bergmann <[email protected]> wrote:

I'm generally more interested in the multiplatform conversion than the DT conversion, and I think converting this one to multiplatform isn't actually that hard, and doesn't have a significant risk for regressions, the main work is to convert the clock handling.

If it will be still possible to build the binary kernel of the same size after the conversion, I'm in for testing, otherwise it will not fit into Flash any more...

I think there is an increase in code size that comes mainly from the common clock layer itself, plus a few bytes here and there. Obviously the increase is much bigger if you actually enable multiple platforms.

Here is the size of the uncompressed vmlinux file with the current clk implementation, compared to a build with a build containing the common clk code but no clock driver, and the separate clock implementation we have today:

text data bss dec hex filename
4752655 1036028 128260 5916943 5a490f build/tmp/vmlinux-old-clk 4780174 1040524 128284 5948982 5ac636 build/tmp/vmlinux-common-clk
2491 1700 0 4191 105f build/tmp/arch/arm/mach-ep93xx/clock.o

The difference would come to about 0.7% of the current image size, I guess around 1% when the other changes are included. Is that within the margins you have, or is this already critical?

Arnd

#66 lore raw

Hi Arnd!

Quoted 19 lines · On Wed Dec 20 14:14:07 2017 Arnd Bergmann <[email protected]> wrote:
Quoted 3 lines

If it will be still possible to build the binary kernel of the same size after the conversion, I'm in for testing, otherwise it will not fit into Flash any more...

I think there is an increase in code size that comes mainly from the common clock layer itself, plus a few bytes here and there. Obviously the increase is much bigger if you actually enable multiple platforms.

Here is the size of the uncompressed vmlinux file with the current clk implementation, compared to a build with a build containing the common clk code but no clock driver, and the separate clock implementation we have today:

      text      data        bss        dec        hex filename 4752655 1036028 128260 5916943 5a490f build/tmp/vmlinux-old-clk 4780174 1040524 128284 5948982 5ac636 build/tmp/vmlinux-common-clk 2491      1700            0      4191      105f build/tmp/arch/arm/mach-ep93xx/clock.o

Quoted 3 lines

The difference would come to about 0.7% of the current image size, I guess around 1% when the other changes are included. Is that within the margins you have, or is this already critical?

No, your numbers are promising, I was afraid of the increase of other orders of magnitude. So this should be fine.

Thanks for this info.

--
Alex.

author maintainer
#67 lore raw
In reply to Arnd Bergmann

Hi Arnd,

Quoted 11 lines
Quoted 8 lines · Linus Walleij

On Wed, Dec 13, 2017 at 9:52 AM, Lukasz Majewski <[email protected]> wrote:

There is a point where supporting old board files will stand in the way and cost a lot in maintenance (like moving drivers our of arch/arm, or modernizing misc subsystems). Then moving the platform over to device tree should be preferred.

Quoted 4 lines

I'm generally more interested in the multiplatform conversion than the DT conversion, and I think converting this one to multiplatform isn't actually that hard, and doesn't have a significant risk for regressions, the main work is to convert the clock handling.

Maybe we need some kind of a schedule (or roadmap)?

Quoted 2 lines

Arnd

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171220/c753049a/attachment.sig>

author maintainer
#68 lore raw
In reply to Linus Walleij

Hi Linus,

Quoted 29 lines
Quoted 11 lines · Lukasz Majewski
Quoted 11 lines
Quoted 8 lines · On Wed Dec 13 08:34:22 2017 Linus Walleij <[email protected]> wrote:

On Tue, Dec 12, 2017 at 12:36 AM, Lukasz Majewski <[email protected]>
wrote: Out of curiosity: Liebherr is obviously doing heavy-duty industrial control systems. Likewise Hartley is doing similar business over at Vision Engravings.

Is the situation such that there is a whole bunch of industrial systems out there, in active use and needing future upgrades, that use the EP93xx?

Quoted 5 lines
Quoted 3 lines

That's definitely the case. I'm as well aware of several thousands of industrial devices which are expected to run 24/7 for the next 5 years at least. And they are updated from time to time.

I can agree with this statement.

OK I'm coloring this platform with a highlight for ARM32 maintenance.

Quoted 8 lines
Quoted 7 lines
Quoted 4 lines

Arnd has been nudging me to do DT conversion for EP93xx so if there are many active industrial users of these I should prioritize it, because these things have 20+ years support cycles.

I'm not sure how important or necessary at all is to change anything in these legacy platforms.

Quoted 6 lines
Quoted 1 line

+1

That is an understandable conservative stance.

There is a fine line between "it works, don't touch it" and "modernize the ARM32 ecosystem".

There may be a more pragmatic reason. If those boards are deployed (widely) in the industry - there may be a problem with re-validation of the SW.

Quoted 5 lines

There is a point where supporting old board files will stand in the way and cost a lot in maintenance (like moving drivers our of arch/arm, or modernizing misc subsystems). Then moving the platform over to device tree should be preferred.

With my limited experience - those platforms have more similarities to x86. Multiplatform may be the goal here....

Quoted 5 lines
Quoted 5 lines

I'm using OE to build toolchain (SDK). I can confirm that gcc 7.2 works with it.

And yes, armv4 support shall be preserved in GCC ....

I should have be more peculiar - this is armv4t (arm920t)

Quoted 5 lines

Yes that is the same toochain I use.

Yours,
Linus Walleij

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171220/7d527241/attachment.sig>

#69 lore raw
In reply to Alexander Sverdlin
Quoted 7 lines · Alexander Sverdlin
Quoted 4 lines · On Wed Dec 13 08:34:22 2017 Linus Walleij <[email protected]> wrote:

Arnd has been nudging me to do DT conversion for EP93xx so if there are many active industrial users of these I should prioritize it, because these things have 20+ years support cycles.

I'm not sure how important or necessary at all is to change anything in these legacy platforms.

I suspect that at several points in the next 5 to 10 years, we will remove additional platforms or CPU types, as we tend to do when a platform becomes a maintenance burden and is clearly not used by anyone.

It's hard to predict in advance what triggers the removal, but as the number of platforms that are not using DT or ARCH_MULTIPLATFORM goes down to a small number, there will be increased interested in either removing or converting the remaining ones. This is not an immediate danger at the moment, since we still have 14 platforms that are not using ARCH_MULTIPLATFORM, and 23 that have remaining
board files, but you don't want to be the last user of the last platform after the other ones are done ;-)

Quoted 6 lines
Quoted 4 lines

We also need to think about upholding support in GCC for ARMv4(t) for the foreseeable future if there is a big web of random deeply embedded systems out there that will need updates.

But we should definitely preserve at least what we have.

Plain ARMv4 (and earlier) support in gcc is already marked 'deprecated' and will likely be gone in gcc-8 (it's still there as of last week). ARMv4T is going to be around for a while, and you can even keep building for ARMv4 using "-march=armv4t -marm" when linking with 'ld --fix-v4bx'.

Debian recently did a survey to find out whether there were still users on ARMv4 or ARMv4T, and the result was that probably everyone is on ARMv5E or ARMv6 for the ARM port (which is separate from the ARMHF port that is ARMv7+). See also
https://lists.debian.org/debian-user/2017/11/msg00379.html
and let them know quickly if you use Debian stable releases and plan to update to Debian 10 (Buster) in the future.

Arnd

author maintainer
#70 lore raw

Hi Arnd,

Quoted 9 lines
Quoted 7 lines · Alexander Sverdlin
Quoted 4 lines · On Wed Dec 13 08:34:22 2017 Linus Walleij <[email protected]> wrote:

Arnd has been nudging me to do DT conversion for EP93xx so if there are many active industrial users of these I should prioritize it, because these things have 20+ years support cycles.

Quoted 7 lines
Quoted 2 lines

I'm not sure how important or necessary at all is to change anything in these legacy platforms.

I suspect that at several points in the next 5 to 10 years, we will remove additional platforms or CPU types, as we tend to do when a platform becomes a maintenance burden and is clearly not used by anyone.

I suppose that at least the last argument is not the case here :-).

Quoted 9 lines

It's hard to predict in advance what triggers the removal, but as the number of platforms that are not using DT or ARCH_MULTIPLATFORM goes down to a small number, there will be increased interested in either removing or converting the remaining ones. This is not an immediate danger at the moment, since we still have 14 platforms that are not using ARCH_MULTIPLATFORM, and 23 that have remaining board files, but you don't want to be the last user of the last platform after the other ones are done ;-)

:-)

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

We also need to think about upholding support in GCC for ARMv4(t) for the foreseeable future if there is a big web of random deeply embedded systems out there that will need updates.

Quoted 7 lines
Quoted 1 line

But we should definitely preserve at least what we have.

Plain ARMv4 (and earlier) support in gcc is already marked 'deprecated' and will likely be gone in gcc-8 (it's still there as of last week). ARMv4T is going to be around for a while, and you can even keep building for ARMv4 using "-march=armv4t -marm" when linking with 'ld --fix-v4bx'.

I think that we shall start complaining on the gcc-devel mailing list now.

I would be hard to wake up in 2 years time and realise that we don't have a modern compiler.

Quoted 10 lines

Debian recently did a survey to find out whether there were still users on ARMv4 or ARMv4T, and the result was that probably everyone is on ARMv5E or ARMv6 for the ARM port (which is separate from the ARMHF port that is ARMv7+). See also
https://lists.debian.org/debian-user/2017/11/msg00379.html
and let them know quickly if you use Debian stable releases and plan to update to Debian 10 (Buster) in the future.

Arnd

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171217/56d4973a/attachment.sig>

#71 lore raw
Quoted 13 lines · Lukasz Majewski
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

We also need to think about upholding support in GCC for ARMv4(t) for the foreseeable future if there is a big web of random deeply embedded systems out there that will need updates.

Quoted 7 lines
Quoted 1 line

But we should definitely preserve at least what we have.

Plain ARMv4 (and earlier) support in gcc is already marked 'deprecated' and will likely be gone in gcc-8 (it's still there as of last week). ARMv4T is going to be around for a while, and you can even keep building for ARMv4 using "-march=armv4t -marm" when linking with 'ld --fix-v4bx'.

Quoted 5 lines

I think that we shall start complaining on the gcc-devel mailing list now.

I would be hard to wake up in 2 years time and realise that we don't have a modern compiler.

What distro or build system are you using? It would also be helpful to test whether the -march=armv4t/--fix-v4bx workaround produces working binaries for you, in that case you could report to the gcc developers that the removal of armv4 can continue but that the --fix-v4bx option in ld needs to stay around.

Arnd

author maintainer
#72 lore raw

Hi Arnd,

Quoted 15 lines
Quoted 13 lines · Lukasz Majewski
Quoted 12 lines
Quoted 6 lines
Quoted 4 lines

We also need to think about upholding support in GCC for ARMv4(t) for the foreseeable future if there is a big web of random deeply embedded systems out there that will need updates.

But we should definitely preserve at least what we have.

Plain ARMv4 (and earlier) support in gcc is already marked 'deprecated' and will likely be gone in gcc-8 (it's still there as of last week). ARMv4T is going to be around for a while, and you can even keep building for ARMv4 using "-march=armv4t -marm" when linking with 'ld --fix-v4bx'.

Quoted 7 lines
Quoted 5 lines

I think that we shall start complaining on the gcc-devel mailing list now.

I would be hard to wake up in 2 years time and realise that we don't have a modern compiler.

What distro or build system are you using?

I'm using OE with the "include conf/machine/include/tune-arm920t.inc"

GCC 7.2 is working

Quoted 5 lines

It would also be helpful
to test whether the -march=armv4t/--fix-v4bx workaround produces working binaries for you, in that case you could report to the gcc developers that the removal of armv4 can continue but that the --fix-v4bx option in ld needs to stay around.

I may ask this issue on OE/Yocto mailing list as well....

Thanks for hint.

Quoted 2 lines

Arnd

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171217/bec5a31a/attachment-0001.sig>

#73 lore raw
Quoted 20 lines · Lukasz Majewski

Hi Arnd,

Quoted 18 lines
Quoted 16 lines · Lukasz Majewski
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

We also need to think about upholding support in GCC for ARMv4(t) for the foreseeable future if there is a big web of random deeply embedded systems out there that will need updates.

Quoted 7 lines
Quoted 1 line

But we should definitely preserve at least what we have.

Plain ARMv4 (and earlier) support in gcc is already marked 'deprecated' and will likely be gone in gcc-8 (it's still there as of last week). ARMv4T is going to be around for a while, and you can even keep building for ARMv4 using "-march=armv4t -marm" when linking with 'ld --fix-v4bx'.

I think that we shall start complaining on the gcc-devel mailing list now.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

I would be hard to wake up in 2 years time and realise that we don't have a modern compiler.

What distro or build system are you using?

I'm using OE with the "include conf/machine/include/tune-arm920t.inc"

GCC 7.2 is working

Ah wait, this is still for ep93xx, which is always at least armv4t, right? So it won't have a problem with the armv4 deprecation anyway, even the older ep72xx/73xx were ARM720T based and don't have a problem. I'm not entirely sure about their clps711x predecessors, which were some earlier arm7 variant, but Linux doesn't support them any more anyway, and the ARM710T would already be fine without --fix-v4bx.

Quoted 7 lines
Quoted 5 lines

It would also be helpful
to test whether the -march=armv4t/--fix-v4bx workaround produces working binaries for you, in that case you could report to the gcc developers that the removal of armv4 can continue but that the --fix-v4bx option in ld needs to stay around.

I may ask this issue on OE/Yocto mailing list as well....

To clarify, the only affected platforms are those based on either DEC/Intel StrongARM or Faraday FA526, i.e. EBSA-110, FootBridge, RPC, SA1100, Moxart and Gemini.

Arnd

#74 lore raw

Hi!

Quoted 4 lines · On Mon Dec 18 12:55:40 2017 Arnd Bergmann <[email protected]> wrote:
Quoted 1 line

GCC 7.2 is working

Ah wait, this is still for ep93xx, which is always at least armv4t, right? So it won't have a problem with the armv4 deprecation anyway, even

Correct.

--
Alex.

author maintainer
#75 lore raw

Hi Arnd,

Quoted 10 lines

Hi!

Quoted 5 lines · On Mon Dec 18 12:55:40 2017 Arnd Bergmann <[email protected]> wrote:
Quoted 1 line

GCC 7.2 is working

Ah wait, this is still for ep93xx, which is always at least armv4t, right? So it won't have a problem with the armv4 deprecation anyway, even

Correct.

Maybe a bit off topic :-)

Are there any more comments regarding this patch series? Are those patches eligible for applying them to -next?

Quoted 3 lines

--
Alex.

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171219/bc84a3eb/attachment.sig>

#76 lore raw
Quoted 11 lines · Lukasz Majewski

Hi Arnd,

Quoted 9 lines

Hi!

Quoted 5 lines · On Mon Dec 18 12:55:40 2017 Arnd Bergmann <[email protected]> wrote:
Quoted 1 line

GCC 7.2 is working

Ah wait, this is still for ep93xx, which is always at least armv4t, right? So it won't have a problem with the armv4 deprecation anyway, even

Quoted 6 lines
Quoted 1 line

Correct.

Maybe a bit off topic :-)

Are there any more comments regarding this patch series? Are those patches eligible for applying them to -next?

Alexander already sent a pull request, I just haven't pulled them. If there are any other comments or additional patches, they should be done on top of the first pull request, unless there is a major regression in the original pull (which is unlikely).

Arnd

author maintainer
#77 lore raw

Hi Arnd,

Quoted 17 lines
Quoted 15 lines · Lukasz Majewski

Hi Arnd,

Quoted 10 lines

Hi!

Quoted 5 lines · On Mon Dec 18 12:55:40 2017 Arnd Bergmann <[email protected]> wrote:
Quoted 1 line

GCC 7.2 is working

Ah wait, this is still for ep93xx, which is always at least armv4t, right? So it won't have a problem with the armv4 deprecation anyway, even

Correct.

Maybe a bit off topic :-)

Quoted 7 lines
Quoted 2 lines

Are there any more comments regarding this patch series? Are those patches eligible for applying them to -next?

Alexander already sent a pull request, I just haven't pulled them. If there are any other comments or additional patches, they should be done on top of the first pull request, unless there is a major regression in the original pull (which is unlikely).

Thanks for reply.

Quoted 2 lines

Arnd

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171220/391d72da/attachment-0001.sig>

#78 lore raw
In reply to Arnd Bergmann
Quoted 21 lines · Arnd Bergmann
Quoted 20 lines · Lukasz Majewski
Quoted 20 lines
Quoted 18 lines · Lukasz Majewski
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

We also need to think about upholding support in GCC for ARMv4(t) for the foreseeable future if there is a big web of random deeply embedded systems out there that will need updates.

Quoted 7 lines
Quoted 1 line

But we should definitely preserve at least what we have.

Plain ARMv4 (and earlier) support in gcc is already marked 'deprecated' and will likely be gone in gcc-8 (it's still there as of last week). ARMv4T is going to be around for a while, and you can even keep building for ARMv4 using "-march=armv4t -marm" when linking with 'ld --fix-v4bx'.

I think that we shall start complaining on the gcc-devel mailing list now.

I would be hard to wake up in 2 years time and realise that we don't have a modern compiler.

(...)

Quoted 11 lines
Quoted 7 lines
Quoted 5 lines

It would also be helpful
to test whether the -march=armv4t/--fix-v4bx workaround produces working binaries for you, in that case you could report to the gcc developers that the removal of armv4 can continue but that the --fix-v4bx option in ld needs to stay around.

I may ask this issue on OE/Yocto mailing list as well....

To clarify, the only affected platforms are those based on either DEC/Intel StrongARM or Faraday FA526, i.e. EBSA-110, FootBridge, RPC, SA1100, Moxart and Gemini.

It's a bit unfortunate since there are users and active contributors to these architectures, I think the OE community is being missed out just because they "are not Debian". :/

Even NetWinder.org is still up and kicking.

Some of it may be nostalgia and platform-hugging with regards to SA110 and SA1100 systems, I am certainly aware of such tendencies in myself. And I understand if GCC drops support for old systems that only have a bunch of elderly gentlemen running it for the fun of it.

What really worries me is if there are widely deployed SA110, SA1100, FA526 or similar embedded systems using plain ARMv4 and doing regular kernel builds and userspaces for them, in items with 20+ years support cycles.

With reports in the media about things like nuclear powerplants running unsupported versions of Windows NT or 95, I want to make sure that we're not creating a similar situation somewhere for deeply embedded Linux. Sadly these users mostly seem to come out
of the shadows after-the-fact.

My own experiments with an upgraded Gemini platform are mostly related to the fact that home routers using this ARMv4 SoC are still being sold and deployed, using a v2.6 kernel (contributing to the world of botnets I suppose). The hardware-accelerated gigabit ethernet on these routers for the home make them still fully usable despite the ARMv4 core, but securitywise they are a nightmare.

Yours,
Linus Walleij

#79 lore raw
Quoted 10 lines · Linus Walleij
Quoted 9 lines · Arnd Bergmann
Quoted 7 lines · Lukasz Majewski
Quoted 5 lines

It would also be helpful
to test whether the -march=armv4t/--fix-v4bx workaround produces working binaries for you, in that case you could report to the gcc developers that the removal of armv4 can continue but that the --fix-v4bx option in ld needs to stay around.

I may ask this issue on OE/Yocto mailing list as well....

Quoted 7 lines
Quoted 3 lines

To clarify, the only affected platforms are those based on either DEC/Intel StrongARM or Faraday FA526, i.e. EBSA-110, FootBridge, RPC, SA1100, Moxart and Gemini.

It's a bit unfortunate since there are users and active contributors to these architectures, I think the OE community is being missed out just because they "are not Debian". :/

IIRC, OE already uses the --fix-v4bx workaround. I had an older patch to do the same in the kernel, let me resend it now, so you can try it and see if that works for you.

Arnd