All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/22] board: lsxl: major update and DM conversion
@ 2022-08-17 19:37 Michael Walle
  2022-08-17 19:37 ` [PATCH 01/22] time: move the CONFIG_SYS_TIMER_RATE handling to the compiler Michael Walle
                   ` (23 more replies)
  0 siblings, 24 replies; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:37 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle

Convert the Buffalo Linkstation LS-CHLv2 and XHL boards to DM_GPIO,
DM_ETH, DM_SERIAL and CONFIG_TIMER.

Patches 01-02 fix TCLK handling on the kirkwood SoC if the clock is
166MHz.
Patches 03-04 add CONFIG_TIMER support for kirkwood/mvebu.
Patches 05-21 will then update the lsxl board

Michael Walle (21):
  time: move the CONFIG_SYS_TIMER_RATE handling to the compiler
  arm: kirkwood: make it CONFIG_TIMER aware
  timer: add orion-timer support
  button: gpio: add DM_GPIO dependency
  board: lsxl: limit size to 384kiB
  board: lsxl: remove unused features
  board: lsxl: remove eraseenv script
  board: lsxl: remove CONFIG_ENV_OVERWRITE
  board: lsxl: remove unused header files
  board: lsxl: automatically select CONFIG_MISC_INIT_R
  board: lsxl: use CONFIG_DEFAULT_FDT_FILE
  board: lsxl: reorder image loading and remove ramdisk_len
  board: lsxl: use proper *_r variables
  board: lsxl: enable ATAGS support
  board: lsxl: make last resort recovery more reliable
  board: lsxl: convert to DM_GPIO
  board: lsxl: convert to DM_ETH
  board: lsxl: convert to DM_SERIAL
  board: lsxl: convert to CONFIG_TIMER
  board: lsxl: disable eth0
  board: lsxl: update the README

Pali Rohár (1):
  arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register

 arch/arm/dts/kirkwood-lschlv2-u-boot.dtsi     |  13 ++
 arch/arm/dts/kirkwood-lsxhl-u-boot.dtsi       |  13 ++
 arch/arm/mach-kirkwood/Kconfig                |   2 +
 arch/arm/mach-kirkwood/include/mach/config.h  |   2 +
 .../mach-kirkwood/include/mach/kw88f6281.h    |   3 +-
 arch/arm/mach-kirkwood/include/mach/soc.h     |   2 +
 arch/arm/mach-mvebu/Makefile                  |   3 +
 board/buffalo/lsxl/README                     |  32 ++--
 board/buffalo/lsxl/lsxl.c                     | 165 +++++++++++-------
 configs/lschlv2_defconfig                     |  31 +++-
 configs/lsxhl_defconfig                       |  31 +++-
 drivers/button/Kconfig                        |   1 +
 drivers/timer/Kconfig                         |   6 +
 drivers/timer/Makefile                        |   1 +
 drivers/timer/orion-timer.c                   |  63 +++++++
 include/configs/lsxl.h                        |  76 +++-----
 lib/time.c                                    |  15 +-
 17 files changed, 300 insertions(+), 159 deletions(-)
 create mode 100644 arch/arm/dts/kirkwood-lschlv2-u-boot.dtsi
 create mode 100644 arch/arm/dts/kirkwood-lsxhl-u-boot.dtsi
 create mode 100644 drivers/timer/orion-timer.c

-- 
2.30.2


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [PATCH 01/22] time: move the CONFIG_SYS_TIMER_RATE handling to the compiler
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
@ 2022-08-17 19:37 ` Michael Walle
  2022-08-17 19:51   ` Pali Rohár
  2022-08-17 19:37 ` [PATCH 02/22] arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register Michael Walle
                   ` (22 subsequent siblings)
  23 siblings, 1 reply; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:37 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle, Pali Rohár

CONFIG_SYS_TIMER_RATE might be a dynamic value, i.e. a function call
instead of a static value, thus it has to be evaluated at runtime. If it
is a static value, the compiler should be able to optimize the unused
branches out.

This will be needed for kirkwoods dynamic CONFIG_SYS_TCLK setting.

Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Walle <michael@walle.cc>
---
 lib/time.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/lib/time.c b/lib/time.c
index 96074b84af..bbf191f673 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -47,12 +47,15 @@ ulong timer_get_boot_us(void)
 {
 	ulong count = timer_read_counter();
 
-#if CONFIG_SYS_TIMER_RATE == 1000000
-	return count;
-#elif CONFIG_SYS_TIMER_RATE > 1000000
-	return lldiv(count, CONFIG_SYS_TIMER_RATE / 1000000);
-#elif defined(CONFIG_SYS_TIMER_RATE)
-	return (unsigned long long)count * 1000000 / CONFIG_SYS_TIMER_RATE;
+#ifdef CONFIG_SYS_TIMER_RATE
+	const ulong timer_rate = CONFIG_SYS_TIMER_RATE;
+
+	if (timer_rate == 1000000)
+		return count;
+	else if (timer_rate > 1000000)
+		return lldiv(count, timer_rate / 1000000);
+	else
+		return (unsigned long long)count * 1000000 / timer_rate;
 #else
 	/* Assume the counter is in microseconds */
 	return count;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 02/22] arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
  2022-08-17 19:37 ` [PATCH 01/22] time: move the CONFIG_SYS_TIMER_RATE handling to the compiler Michael Walle
@ 2022-08-17 19:37 ` Michael Walle
  2022-08-23  5:02   ` Stefan Roese
  2022-08-17 19:37 ` [PATCH 03/22] arm: kirkwood: make it CONFIG_TIMER aware Michael Walle
                   ` (21 subsequent siblings)
  23 siblings, 1 reply; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:37 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Pali Rohár

From: Pali Rohár <pali@kernel.org>

Bit 21 in SAR register specifies if TCLK is running at 166 MHz or 200 MHz.
This information is undocumented in public Marvell Kirkwood Functional
Specifications [2], but is available in Linux v3.15 kirkwood code [1].

Commit 8ac303d49f89 ("arm: kirkwood: Do not overwrite CONFIG_SYS_TCLK")
broke support for Marvell 88F6281 SoCs because it was expected that all
those SoCs have TCLK running at 200 MHz as specified in Marvell 88F6281
Hardware Specifications [3].

Fix broken support for 88F6281 by detecting CONFIG_SYS_TCLK from SAR
register, like it was doing Linux v3.15.

[1] - https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm/mach-kirkwood/common.c?h=v3.15#n542
[2] - https://web.archive.org/web/20130730091033/http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
[3] - https://web.archive.org/web/20120620073511/http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6281_OpenSource.pdf

Fixes: 8ac303d49f89 ("arm: kirkwood: Do not overwrite CONFIG_SYS_TCLK")
Signed-off-by: Pali Rohár <pali@kernel.org>
---
 arch/arm/mach-kirkwood/include/mach/kw88f6281.h | 3 ++-
 arch/arm/mach-kirkwood/include/mach/soc.h       | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-kirkwood/include/mach/kw88f6281.h b/arch/arm/mach-kirkwood/include/mach/kw88f6281.h
index 87406081cf..f86cd0bb60 100644
--- a/arch/arm/mach-kirkwood/include/mach/kw88f6281.h
+++ b/arch/arm/mach-kirkwood/include/mach/kw88f6281.h
@@ -15,6 +15,7 @@
 #define KW_REGS_PHY_BASE		KW88F6281_REGS_PHYS_BASE
 
 /* TCLK Core Clock definition */
-#define CONFIG_SYS_TCLK	200000000 /* 200MHz */
+#define CONFIG_SYS_TCLK			((readl(CONFIG_SAR_REG) & BIT(21)) ? \
+					166666667 : 200000000)
 
 #endif /* _ASM_ARCH_KW88F6281_H */
diff --git a/arch/arm/mach-kirkwood/include/mach/soc.h b/arch/arm/mach-kirkwood/include/mach/soc.h
index 1d7f2828cd..5f545c6f43 100644
--- a/arch/arm/mach-kirkwood/include/mach/soc.h
+++ b/arch/arm/mach-kirkwood/include/mach/soc.h
@@ -62,6 +62,8 @@
 #define MVCPU_WIN_ENABLE	KWCPU_WIN_ENABLE
 #define MVCPU_WIN_DISABLE	KWCPU_WIN_DISABLE
 
+#define CONFIG_SAR_REG		(KW_MPP_BASE + 0x0030)
+
 #if defined (CONFIG_KW88F6281)
 #include <asm/arch/kw88f6281.h>
 #elif defined (CONFIG_KW88F6192)
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 03/22] arm: kirkwood: make it CONFIG_TIMER aware
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
  2022-08-17 19:37 ` [PATCH 01/22] time: move the CONFIG_SYS_TIMER_RATE handling to the compiler Michael Walle
  2022-08-17 19:37 ` [PATCH 02/22] arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register Michael Walle
@ 2022-08-17 19:37 ` Michael Walle
  2022-08-17 19:51   ` Pali Rohár
  2022-08-17 19:37 ` [PATCH 04/22] timer: add orion-timer support Michael Walle
                   ` (20 subsequent siblings)
  23 siblings, 1 reply; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:37 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle, Pali Rohár

If we switch to CONFIG_TIMER, we don't need the legacy timer macros and
functions anymore. Add the proper guards to exclude them from compiling.

Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Walle <michael@walle.cc>
---
 arch/arm/mach-kirkwood/include/mach/config.h | 2 ++
 arch/arm/mach-mvebu/Makefile                 | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/arch/arm/mach-kirkwood/include/mach/config.h b/arch/arm/mach-kirkwood/include/mach/config.h
index 90e86ab99b..d877be119f 100644
--- a/arch/arm/mach-kirkwood/include/mach/config.h
+++ b/arch/arm/mach-kirkwood/include/mach/config.h
@@ -51,8 +51,10 @@
 #endif /* CONFIG_IDE */
 
 /* Use common timer */
+#ifndef CONFIG_TIMER
 #define CONFIG_SYS_TIMER_COUNTS_DOWN
 #define CONFIG_SYS_TIMER_COUNTER	(MVEBU_TIMER_BASE + 0x14)
 #define CONFIG_SYS_TIMER_RATE		CONFIG_SYS_TCLK
+#endif
 
 #endif /* _KW_CONFIG_H */
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
index 61eeb9c8c1..103e64cf20 100644
--- a/arch/arm/mach-mvebu/Makefile
+++ b/arch/arm/mach-mvebu/Makefile
@@ -15,7 +15,10 @@ ifdef CONFIG_ARCH_KIRKWOOD
 obj-y	= dram.o
 obj-y	+= gpio.o
 obj-y	+= mbus.o
+
+ifndef CONFIG_TIMER
 obj-y	+= timer.o
+endif
 
 else # CONFIG_ARCH_KIRKWOOD
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 04/22] timer: add orion-timer support
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
                   ` (2 preceding siblings ...)
  2022-08-17 19:37 ` [PATCH 03/22] arm: kirkwood: make it CONFIG_TIMER aware Michael Walle
@ 2022-08-17 19:37 ` Michael Walle
  2022-08-17 19:52   ` Pali Rohár
  2022-08-17 19:37 ` [PATCH 05/22] button: gpio: add DM_GPIO dependency Michael Walle
                   ` (19 subsequent siblings)
  23 siblings, 1 reply; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:37 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle, Pali Rohár

Add timer support for Kirkwood and MVEBU devices.

Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Walle <michael@walle.cc>
---
 drivers/timer/Kconfig       |  6 ++++
 drivers/timer/Makefile      |  1 +
 drivers/timer/orion-timer.c | 63 +++++++++++++++++++++++++++++++++++++
 3 files changed, 70 insertions(+)
 create mode 100644 drivers/timer/orion-timer.c

diff --git a/drivers/timer/Kconfig b/drivers/timer/Kconfig
index 20b5af7e26..4049290148 100644
--- a/drivers/timer/Kconfig
+++ b/drivers/timer/Kconfig
@@ -194,6 +194,12 @@ config OMAP_TIMER
 	help
 	  Select this to enable an timer for Omap devices.
 
+config ORION_TIMER
+	bool "Orion timer support"
+	depends on TIMER
+	help
+	  Select this to enable an timer for Orion devices.
+
 config RISCV_TIMER
 	bool "RISC-V timer support"
 	depends on TIMER && RISCV
diff --git a/drivers/timer/Makefile b/drivers/timer/Makefile
index d9822a5370..560e2d27e1 100644
--- a/drivers/timer/Makefile
+++ b/drivers/timer/Makefile
@@ -17,6 +17,7 @@ obj-$(CONFIG_MPC83XX_TIMER) += mpc83xx_timer.o
 obj-$(CONFIG_NOMADIK_MTU_TIMER)	+= nomadik-mtu-timer.o
 obj-$(CONFIG_NPCM_TIMER)        += npcm-timer.o
 obj-$(CONFIG_OMAP_TIMER)	+= omap-timer.o
+obj-$(CONFIG_ORION_TIMER)	+= orion-timer.o
 obj-$(CONFIG_RENESAS_OSTM_TIMER) += ostm_timer.o
 obj-$(CONFIG_RISCV_TIMER) += riscv_timer.o
 obj-$(CONFIG_ROCKCHIP_TIMER) += rockchip_timer.o
diff --git a/drivers/timer/orion-timer.c b/drivers/timer/orion-timer.c
new file mode 100644
index 0000000000..fd30e1bf03
--- /dev/null
+++ b/drivers/timer/orion-timer.c
@@ -0,0 +1,63 @@
+// SPDX-License-Identifier: GPL-2.0+
+#include <asm/io.h>
+#include <common.h>
+#include <dm/device.h>
+#include <dm/fdtaddr.h>
+#include <timer.h>
+
+#define TIMER_CTRL		0x00
+#define TIMER0_EN		BIT(0)
+#define TIMER0_RELOAD_EN	BIT(1)
+#define TIMER0_RELOAD		0x10
+#define TIMER0_VAL		0x14
+
+struct orion_timer_priv {
+	void *base;
+};
+
+static uint64_t orion_timer_get_count(struct udevice *dev)
+{
+	struct orion_timer_priv *priv = dev_get_priv(dev);
+
+	return ~readl(priv->base + TIMER0_VAL);
+}
+
+static int orion_timer_probe(struct udevice *dev)
+{
+	struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev);
+	struct orion_timer_priv *priv = dev_get_priv(dev);
+
+	priv->base = devfdt_remap_addr_index(dev, 0);
+	if (!priv->base) {
+		debug("unable to map registers\n");
+		return -ENOMEM;
+	}
+
+	uc_priv->clock_rate = CONFIG_SYS_TCLK;
+
+	writel(~0, priv->base + TIMER0_VAL);
+	writel(~0, priv->base + TIMER0_RELOAD);
+
+	/* enable timer */
+	setbits_le32(priv->base + TIMER_CTRL, TIMER0_EN | TIMER0_RELOAD_EN);
+
+	return 0;
+}
+
+static const struct timer_ops orion_timer_ops = {
+	.get_count = orion_timer_get_count,
+};
+
+static const struct udevice_id orion_timer_ids[] = {
+	{ .compatible = "marvell,orion-timer" },
+	{}
+};
+
+U_BOOT_DRIVER(orion_timer) = {
+	.name	= "orion_timer",
+	.id	= UCLASS_TIMER,
+	.of_match = orion_timer_ids,
+	.probe = orion_timer_probe,
+	.ops	= &orion_timer_ops,
+	.priv_auto	= sizeof(struct orion_timer_priv),
+};
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 05/22] button: gpio: add DM_GPIO dependency
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
                   ` (3 preceding siblings ...)
  2022-08-17 19:37 ` [PATCH 04/22] timer: add orion-timer support Michael Walle
@ 2022-08-17 19:37 ` Michael Walle
  2022-08-17 19:37 ` [PATCH 06/22] board: lsxl: limit size to 384kiB Michael Walle
                   ` (18 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:37 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle

The gpio-button driver depends on DM_GPIO, add it to Kconfig to avoid
build errors.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 drivers/button/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/button/Kconfig b/drivers/button/Kconfig
index 6db3c5e93a..8ce2de37d6 100644
--- a/drivers/button/Kconfig
+++ b/drivers/button/Kconfig
@@ -20,6 +20,7 @@ config BUTTON_ADC
 config BUTTON_GPIO
 	bool "Button gpio"
 	depends on BUTTON
+	depends on DM_GPIO
 	help
 	  Enable support for buttons which are connected to GPIO lines. These
 	  GPIOs may be on the SoC or some other device which provides GPIOs.
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 06/22] board: lsxl: limit size to 384kiB
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
                   ` (4 preceding siblings ...)
  2022-08-17 19:37 ` [PATCH 05/22] button: gpio: add DM_GPIO dependency Michael Walle
@ 2022-08-17 19:37 ` Michael Walle
  2022-08-17 19:37 ` [PATCH 07/22] board: lsxl: remove unused features Michael Walle
                   ` (17 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:37 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle

The board only has a 4Mbit flash and two sectors are reserved for the
u-boot environment and the device tree.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 configs/lschlv2_defconfig | 2 ++
 configs/lsxhl_defconfig   | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/configs/lschlv2_defconfig b/configs/lschlv2_defconfig
index 0da058302c..cabedeb460 100644
--- a/configs/lschlv2_defconfig
+++ b/configs/lschlv2_defconfig
@@ -18,6 +18,8 @@ CONFIG_DISTRO_DEFAULTS=y
 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
 CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc8012000
 CONFIG_API=y
+CONFIG_HAS_BOARD_SIZE_LIMIT=y
+CONFIG_BOARD_SIZE_LIMIT=393216
 CONFIG_SHOW_BOOT_PROGRESS=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
diff --git a/configs/lsxhl_defconfig b/configs/lsxhl_defconfig
index d847255d5e..3003f0abcb 100644
--- a/configs/lsxhl_defconfig
+++ b/configs/lsxhl_defconfig
@@ -19,6 +19,8 @@ CONFIG_DISTRO_DEFAULTS=y
 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
 CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc8012000
 CONFIG_API=y
+CONFIG_HAS_BOARD_SIZE_LIMIT=y
+CONFIG_BOARD_SIZE_LIMIT=393216
 CONFIG_SHOW_BOOT_PROGRESS=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 07/22] board: lsxl: remove unused features
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
                   ` (5 preceding siblings ...)
  2022-08-17 19:37 ` [PATCH 06/22] board: lsxl: limit size to 384kiB Michael Walle
@ 2022-08-17 19:37 ` Michael Walle
  2022-08-17 19:37 ` [PATCH 08/22] board: lsxl: remove eraseenv script Michael Walle
                   ` (16 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:37 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle

Make the binary smaller by removing unused features.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 configs/lschlv2_defconfig | 3 +--
 configs/lsxhl_defconfig   | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/configs/lschlv2_defconfig b/configs/lschlv2_defconfig
index cabedeb460..aa8e523784 100644
--- a/configs/lschlv2_defconfig
+++ b/configs/lschlv2_defconfig
@@ -17,15 +17,14 @@ CONFIG_SYS_LOAD_ADDR=0x800000
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
 CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc8012000
-CONFIG_API=y
 CONFIG_HAS_BOARD_SIZE_LIMIT=y
 CONFIG_BOARD_SIZE_LIMIT=393216
+# CONFIG_BOOTSTD is not set
 CONFIG_SHOW_BOOT_PROGRESS=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/sda2"
 CONFIG_BOOTCOMMAND="run bootcmd_${bootsource}"
-CONFIG_USE_PREBOOT=y
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_BOARDINFO is not set
diff --git a/configs/lsxhl_defconfig b/configs/lsxhl_defconfig
index 3003f0abcb..f56743a578 100644
--- a/configs/lsxhl_defconfig
+++ b/configs/lsxhl_defconfig
@@ -18,15 +18,14 @@ CONFIG_SYS_LOAD_ADDR=0x800000
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
 CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc8012000
-CONFIG_API=y
 CONFIG_HAS_BOARD_SIZE_LIMIT=y
 CONFIG_BOARD_SIZE_LIMIT=393216
+# CONFIG_BOOTSTD is not set
 CONFIG_SHOW_BOOT_PROGRESS=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/sda2"
 CONFIG_BOOTCOMMAND="run bootcmd_${bootsource}"
-CONFIG_USE_PREBOOT=y
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_BOARDINFO is not set
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 08/22] board: lsxl: remove eraseenv script
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
                   ` (6 preceding siblings ...)
  2022-08-17 19:37 ` [PATCH 07/22] board: lsxl: remove unused features Michael Walle
@ 2022-08-17 19:37 ` Michael Walle
  2022-08-17 19:37 ` [PATCH 09/22] board: lsxl: remove CONFIG_ENV_OVERWRITE Michael Walle
                   ` (15 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:37 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle

This is not needed. The user can do a "env default -f -a".

Signed-off-by: Michael Walle <michael@walle.cc>
---
 include/configs/lsxl.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/include/configs/lsxl.h b/include/configs/lsxl.h
index e1108619f2..db5f7a93f9 100644
--- a/include/configs/lsxl.h
+++ b/include/configs/lsxl.h
@@ -62,9 +62,6 @@
 		"&& bootz ${kernel_addr} "				\
 			"${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0"	\
 	"bootcmd_rescue=run config_nc_dhcp; run nc\0"			\
-	"eraseenv=sf probe 0 "						\
-		"&& sf erase " __stringify(CONFIG_ENV_OFFSET)		\
-			" +" __stringify(CONFIG_ENV_SIZE) "\0"		\
 	"config_nc_dhcp=setenv autoload_old ${autoload}; "		\
 		"setenv autoload no "					\
 		"&& bootp "						\
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 09/22] board: lsxl: remove CONFIG_ENV_OVERWRITE
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
                   ` (7 preceding siblings ...)
  2022-08-17 19:37 ` [PATCH 08/22] board: lsxl: remove eraseenv script Michael Walle
@ 2022-08-17 19:37 ` Michael Walle
  2022-08-17 19:37 ` [PATCH 10/22] board: lsxl: remove unused header files Michael Walle
                   ` (14 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:37 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle

This is not needed. The user can force setting the variables with
"setenv -f".

Signed-off-by: Michael Walle <michael@walle.cc>
---
 board/buffalo/lsxl/lsxl.c | 4 ----
 configs/lschlv2_defconfig | 1 -
 configs/lsxhl_defconfig   | 1 -
 3 files changed, 6 deletions(-)

diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c
index 31d532b752..106d46d436 100644
--- a/board/buffalo/lsxl/lsxl.c
+++ b/board/buffalo/lsxl/lsxl.c
@@ -45,10 +45,6 @@
  * Additionally, the bootsource is set to 'rescue'.
  */
 
-#ifndef CONFIG_ENV_OVERWRITE
-# error "You need to set CONFIG_ENV_OVERWRITE"
-#endif
-
 DECLARE_GLOBAL_DATA_PTR;
 
 int board_early_init_f(void)
diff --git a/configs/lschlv2_defconfig b/configs/lschlv2_defconfig
index aa8e523784..87dc1be61b 100644
--- a/configs/lschlv2_defconfig
+++ b/configs/lschlv2_defconfig
@@ -36,7 +36,6 @@ CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_CONTROL=y
-CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_NET_RANDOM_ETHADDR=y
diff --git a/configs/lsxhl_defconfig b/configs/lsxhl_defconfig
index f56743a578..35e414f059 100644
--- a/configs/lsxhl_defconfig
+++ b/configs/lsxhl_defconfig
@@ -37,7 +37,6 @@ CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_CONTROL=y
-CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_NET_RANDOM_ETHADDR=y
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 10/22] board: lsxl: remove unused header files
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
                   ` (8 preceding siblings ...)
  2022-08-17 19:37 ` [PATCH 09/22] board: lsxl: remove CONFIG_ENV_OVERWRITE Michael Walle
@ 2022-08-17 19:37 ` Michael Walle
  2022-08-17 19:37 ` [PATCH 11/22] board: lsxl: automatically select CONFIG_MISC_INIT_R Michael Walle
                   ` (13 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:37 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle

Cleanup the included header files in the board code. These are all
leftovers from earlier days.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 board/buffalo/lsxl/lsxl.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c
index 106d46d436..42221eef3a 100644
--- a/board/buffalo/lsxl/lsxl.c
+++ b/board/buffalo/lsxl/lsxl.c
@@ -11,12 +11,7 @@
 #include <bootstage.h>
 #include <command.h>
 #include <env.h>
-#include <env_internal.h>
 #include <init.h>
-#include <net.h>
-#include <malloc.h>
-#include <netdev.h>
-#include <miiphy.h>
 #include <spi.h>
 #include <spi_flash.h>
 #include <asm/arch/soc.h>
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 11/22] board: lsxl: automatically select CONFIG_MISC_INIT_R
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
                   ` (9 preceding siblings ...)
  2022-08-17 19:37 ` [PATCH 10/22] board: lsxl: remove unused header files Michael Walle
@ 2022-08-17 19:37 ` Michael Walle
  2022-08-17 19:37 ` [PATCH 12/22] board: lsxl: use CONFIG_DEFAULT_FDT_FILE Michael Walle
                   ` (12 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:37 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle

The board code needs this to be set. Otherwise, the recovery mechanism
doesn't work. Therefore, select this option automatically with the
board.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 arch/arm/mach-kirkwood/Kconfig | 1 +
 board/buffalo/lsxl/lsxl.c      | 2 --
 configs/lschlv2_defconfig      | 1 -
 configs/lsxhl_defconfig        | 1 -
 4 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 98bb10c2de..f5460f3bd3 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -45,6 +45,7 @@ config TARGET_LSXL
 	bool "lsxl Board"
 	select FEROCEON_88FR131
 	select KW88F6281
+	select MISC_INIT_R
 
 config TARGET_POGO_E02
 	bool "pogo_e02 Board"
diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c
index 42221eef3a..eca7da2f6d 100644
--- a/board/buffalo/lsxl/lsxl.c
+++ b/board/buffalo/lsxl/lsxl.c
@@ -172,7 +172,6 @@ int board_init(void)
 	return 0;
 }
 
-#ifdef CONFIG_MISC_INIT_R
 static void check_power_switch(void)
 {
 	if (kw_gpio_get_value(GPIO_POWER_SWITCH)) {
@@ -259,7 +258,6 @@ int misc_init_r(void)
 
 	return 0;
 }
-#endif
 
 #if CONFIG_IS_ENABLED(BOOTSTAGE)
 void show_boot_progress(int progress)
diff --git a/configs/lschlv2_defconfig b/configs/lschlv2_defconfig
index 87dc1be61b..081a2448fc 100644
--- a/configs/lschlv2_defconfig
+++ b/configs/lschlv2_defconfig
@@ -28,7 +28,6 @@ CONFIG_BOOTCOMMAND="run bootcmd_${bootsource}"
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_BOARDINFO is not set
-CONFIG_MISC_INIT_R=y
 CONFIG_SYS_MAXARGS=32
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_SATA=y
diff --git a/configs/lsxhl_defconfig b/configs/lsxhl_defconfig
index 35e414f059..33bec60147 100644
--- a/configs/lsxhl_defconfig
+++ b/configs/lsxhl_defconfig
@@ -29,7 +29,6 @@ CONFIG_BOOTCOMMAND="run bootcmd_${bootsource}"
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_BOARDINFO is not set
-CONFIG_MISC_INIT_R=y
 CONFIG_SYS_MAXARGS=32
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_SATA=y
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 12/22] board: lsxl: use CONFIG_DEFAULT_FDT_FILE
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
                   ` (10 preceding siblings ...)
  2022-08-17 19:37 ` [PATCH 11/22] board: lsxl: automatically select CONFIG_MISC_INIT_R Michael Walle
@ 2022-08-17 19:37 ` Michael Walle
  2022-08-17 19:38 ` [PATCH 13/22] board: lsxl: reorder image loading and remove ramdisk_len Michael Walle
                   ` (11 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:37 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle

Drop our own CONFIG_FDTFILE handling in favor of the generic
CONFIG_DEFAULT_FDT_FILE one.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 configs/lschlv2_defconfig |  1 +
 configs/lsxhl_defconfig   |  1 +
 include/configs/lsxl.h    | 14 +++-----------
 3 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/configs/lschlv2_defconfig b/configs/lschlv2_defconfig
index 081a2448fc..d5cd0d5575 100644
--- a/configs/lschlv2_defconfig
+++ b/configs/lschlv2_defconfig
@@ -25,6 +25,7 @@ CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/sda2"
 CONFIG_BOOTCOMMAND="run bootcmd_${bootsource}"
+CONFIG_DEFAULT_FDT_FILE="kirkwood-lschlv2.dtb"
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_BOARDINFO is not set
diff --git a/configs/lsxhl_defconfig b/configs/lsxhl_defconfig
index 33bec60147..8f0672b189 100644
--- a/configs/lsxhl_defconfig
+++ b/configs/lsxhl_defconfig
@@ -26,6 +26,7 @@ CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/sda2"
 CONFIG_BOOTCOMMAND="run bootcmd_${bootsource}"
+CONFIG_DEFAULT_FDT_FILE="kirkwood-lsxhl.dtb"
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_BOARDINFO is not set
diff --git a/include/configs/lsxl.h b/include/configs/lsxl.h
index db5f7a93f9..fb9a8c5032 100644
--- a/include/configs/lsxl.h
+++ b/include/configs/lsxl.h
@@ -22,21 +22,13 @@
 /*
  * Default environment variables
  */
-
-#if defined(CONFIG_LSXHL)
-#define CONFIG_FDTFILE "kirkwood-lsxhl.dtb"
-#elif defined(CONFIG_LSCHLV2)
-#define CONFIG_FDTFILE "kirkwood-lschlv2.dtb"
-#else
-#error "Unsupported board"
-#endif
-
 #define CONFIG_EXTRA_ENV_SETTINGS					\
 	"bootsource=legacy\0"						\
 	"hdpart=0:1\0"							\
 	"kernel_addr=0x00800000\0"					\
 	"ramdisk_addr=0x01000000\0"					\
 	"fdt_addr=0x00ff0000\0"						\
+	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0"				\
 	"bootcmd_legacy=sata init "					\
 		"&& load sata ${hdpart} ${kernel_addr} /uImage.buffalo "\
 		"&& load sata ${hdpart} ${ramdisk_addr} /initrd.buffalo "\
@@ -44,7 +36,7 @@
 	"bootcmd_net=bootp ${kernel_addr} vmlinuz "			\
 		"&& tftpboot ${ramdisk_addr} initrd.img "		\
 		"&& setenv ramdisk_len ${filesize} "			\
-		"&& tftpboot ${fdt_addr} " CONFIG_FDTFILE " "		\
+		"&& tftpboot ${fdt_addr} ${fdtfile} "			\
 		"&& bootz ${kernel_addr} "				\
 			"${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0"	\
 	"bootcmd_hdd=sata init "					\
@@ -58,7 +50,7 @@
 		"&& load usb 0:1 ${kernel_addr} /vmlinuz "		\
 		"&& load usb 0:1 ${ramdisk_addr} /initrd.img "		\
 		"&& setenv ramdisk_len ${filesize} "			\
-		"&& load usb 0:1 ${fdt_addr} " CONFIG_FDTFILE " "	\
+		"&& load usb 0:1 ${fdt_addr} ${fdtfile} "		\
 		"&& bootz ${kernel_addr} "				\
 			"${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0"	\
 	"bootcmd_rescue=run config_nc_dhcp; run nc\0"			\
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 13/22] board: lsxl: reorder image loading and remove ramdisk_len
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
                   ` (11 preceding siblings ...)
  2022-08-17 19:37 ` [PATCH 12/22] board: lsxl: use CONFIG_DEFAULT_FDT_FILE Michael Walle
@ 2022-08-17 19:38 ` Michael Walle
  2022-08-17 19:38 ` [PATCH 14/22] board: lsxl: use proper *_r variables Michael Walle
                   ` (10 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:38 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle

We can load the ramdisk as the last step. This way we don't have to set
the intermediate variable 'ramdisk_len' and can remove it.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 include/configs/lsxl.h | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/include/configs/lsxl.h b/include/configs/lsxl.h
index fb9a8c5032..7c2c0e22ad 100644
--- a/include/configs/lsxl.h
+++ b/include/configs/lsxl.h
@@ -34,25 +34,22 @@
 		"&& load sata ${hdpart} ${ramdisk_addr} /initrd.buffalo "\
 		"&& bootm ${kernel_addr} ${ramdisk_addr}\0"		\
 	"bootcmd_net=bootp ${kernel_addr} vmlinuz "			\
-		"&& tftpboot ${ramdisk_addr} initrd.img "		\
-		"&& setenv ramdisk_len ${filesize} "			\
 		"&& tftpboot ${fdt_addr} ${fdtfile} "			\
+		"&& tftpboot ${ramdisk_addr} initrd.img "		\
 		"&& bootz ${kernel_addr} "				\
-			"${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0"	\
+			"${ramdisk_addr}:${filesize} ${fdt_addr}\0"	\
 	"bootcmd_hdd=sata init "					\
 		"&& load sata ${hdpart} ${kernel_addr} /vmlinuz "	\
-		"&& load sata ${hdpart} ${ramdisk_addr} /initrd.img "	\
-		"&& setenv ramdisk_len ${filesize} "			\
 		"&& load sata ${hdpart} ${fdt_addr} /dtb "		\
+		"&& load sata ${hdpart} ${ramdisk_addr} /initrd.img "	\
 		"&& bootz ${kernel_addr} "				\
-			"${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0"	\
+			"${ramdisk_addr}:${filesize} ${fdt_addr}\0"	\
 	"bootcmd_usb=usb start "					\
 		"&& load usb 0:1 ${kernel_addr} /vmlinuz "		\
-		"&& load usb 0:1 ${ramdisk_addr} /initrd.img "		\
-		"&& setenv ramdisk_len ${filesize} "			\
 		"&& load usb 0:1 ${fdt_addr} ${fdtfile} "		\
+		"&& load usb 0:1 ${ramdisk_addr} /initrd.img "		\
 		"&& bootz ${kernel_addr} "				\
-			"${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0"	\
+			"${ramdisk_addr}:${filesize} ${fdt_addr}\0"	\
 	"bootcmd_rescue=run config_nc_dhcp; run nc\0"			\
 	"config_nc_dhcp=setenv autoload_old ${autoload}; "		\
 		"setenv autoload no "					\
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 14/22] board: lsxl: use proper *_r variables
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
                   ` (12 preceding siblings ...)
  2022-08-17 19:38 ` [PATCH 13/22] board: lsxl: reorder image loading and remove ramdisk_len Michael Walle
@ 2022-08-17 19:38 ` Michael Walle
  2022-08-17 19:38 ` [PATCH 15/22] board: lsxl: enable ATAGS support Michael Walle
                   ` (9 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:38 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle

Use the common kernel_addr_r, ramdisk_addr_r and fdt_addr_r variable
names.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 include/configs/lsxl.h | 42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/include/configs/lsxl.h b/include/configs/lsxl.h
index 7c2c0e22ad..162f07790f 100644
--- a/include/configs/lsxl.h
+++ b/include/configs/lsxl.h
@@ -25,31 +25,31 @@
 #define CONFIG_EXTRA_ENV_SETTINGS					\
 	"bootsource=legacy\0"						\
 	"hdpart=0:1\0"							\
-	"kernel_addr=0x00800000\0"					\
-	"ramdisk_addr=0x01000000\0"					\
-	"fdt_addr=0x00ff0000\0"						\
+	"kernel_addr_r=0x00800000\0"					\
+	"ramdisk_addr_r=0x01000000\0"					\
+	"fdt_addr_r=0x00ff0000\0"					\
 	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0"				\
 	"bootcmd_legacy=sata init "					\
-		"&& load sata ${hdpart} ${kernel_addr} /uImage.buffalo "\
-		"&& load sata ${hdpart} ${ramdisk_addr} /initrd.buffalo "\
-		"&& bootm ${kernel_addr} ${ramdisk_addr}\0"		\
-	"bootcmd_net=bootp ${kernel_addr} vmlinuz "			\
-		"&& tftpboot ${fdt_addr} ${fdtfile} "			\
-		"&& tftpboot ${ramdisk_addr} initrd.img "		\
-		"&& bootz ${kernel_addr} "				\
-			"${ramdisk_addr}:${filesize} ${fdt_addr}\0"	\
+		"&& load sata ${hdpart} ${kernel_addr_r} /uImage.buffalo "\
+		"&& load sata ${hdpart} ${ramdisk_addr_r} /initrd.buffalo "\
+		"&& bootm ${kernel_addr_r} ${ramdisk_addr_r}\0"		\
+	"bootcmd_net=bootp ${kernel_addr_r} vmlinuz "			\
+		"&& tftpboot ${fdt_addr_r} ${fdtfile} "			\
+		"&& tftpboot ${ramdisk_addr_r} initrd.img "		\
+		"&& bootz ${kernel_addr_r} "				\
+			"${ramdisk_addr_r}:${filesize} ${fdt_addr_r}\0"	\
 	"bootcmd_hdd=sata init "					\
-		"&& load sata ${hdpart} ${kernel_addr} /vmlinuz "	\
-		"&& load sata ${hdpart} ${fdt_addr} /dtb "		\
-		"&& load sata ${hdpart} ${ramdisk_addr} /initrd.img "	\
-		"&& bootz ${kernel_addr} "				\
-			"${ramdisk_addr}:${filesize} ${fdt_addr}\0"	\
+		"&& load sata ${hdpart} ${kernel_addr_r} /vmlinuz "	\
+		"&& load sata ${hdpart} ${fdt_addr_r} /dtb "		\
+		"&& load sata ${hdpart} ${ramdisk_addr_r} /initrd.img "	\
+		"&& bootz ${kernel_addr_r} "				\
+			"${ramdisk_addr_r}:${filesize} ${fdt_addr_r}\0"	\
 	"bootcmd_usb=usb start "					\
-		"&& load usb 0:1 ${kernel_addr} /vmlinuz "		\
-		"&& load usb 0:1 ${fdt_addr} ${fdtfile} "		\
-		"&& load usb 0:1 ${ramdisk_addr} /initrd.img "		\
-		"&& bootz ${kernel_addr} "				\
-			"${ramdisk_addr}:${filesize} ${fdt_addr}\0"	\
+		"&& load usb 0:1 ${kernel_addr_r} /vmlinuz "		\
+		"&& load usb 0:1 ${fdt_addr_r} ${fdtfile} "		\
+		"&& load usb 0:1 ${ramdisk_addr_r} /initrd.img "	\
+		"&& bootz ${kernel_addr_r} "				\
+			"${ramdisk_addr_r}:${filesize} ${fdt_addr_r}\0"	\
 	"bootcmd_rescue=run config_nc_dhcp; run nc\0"			\
 	"config_nc_dhcp=setenv autoload_old ${autoload}; "		\
 		"setenv autoload no "					\
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 15/22] board: lsxl: enable ATAGS support
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
                   ` (13 preceding siblings ...)
  2022-08-17 19:38 ` [PATCH 14/22] board: lsxl: use proper *_r variables Michael Walle
@ 2022-08-17 19:38 ` Michael Walle
  2022-08-17 19:38 ` [PATCH 16/22] board: lsxl: make last resort recovery more reliable Michael Walle
                   ` (8 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:38 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle

We still need to be able to boot legacy images. Esp. the debian
installer will have a kernel with an appended DTB.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 configs/lschlv2_defconfig | 3 +++
 configs/lsxhl_defconfig   | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/configs/lschlv2_defconfig b/configs/lschlv2_defconfig
index d5cd0d5575..f4ffb9c6a2 100644
--- a/configs/lschlv2_defconfig
+++ b/configs/lschlv2_defconfig
@@ -3,6 +3,9 @@ CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_SYS_DCACHE_OFF=y
 CONFIG_ARCH_CPU_INIT=y
 CONFIG_ARCH_KIRKWOOD=y
+CONFIG_SUPPORT_PASSING_ATAGS=y
+CONFIG_CMDLINE_TAG=y
+CONFIG_INITRD_TAG=y
 CONFIG_SYS_KWD_CONFIG="board/buffalo/lsxl/kwbimage-lschl.cfg"
 CONFIG_SYS_TEXT_BASE=0x600000
 CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/lsxhl_defconfig b/configs/lsxhl_defconfig
index 8f0672b189..e8fb87ddda 100644
--- a/configs/lsxhl_defconfig
+++ b/configs/lsxhl_defconfig
@@ -3,6 +3,9 @@ CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_SYS_DCACHE_OFF=y
 CONFIG_ARCH_CPU_INIT=y
 CONFIG_ARCH_KIRKWOOD=y
+CONFIG_SUPPORT_PASSING_ATAGS=y
+CONFIG_CMDLINE_TAG=y
+CONFIG_INITRD_TAG=y
 CONFIG_SYS_KWD_CONFIG="board/buffalo/lsxl/kwbimage-lsxhl.cfg"
 CONFIG_SYS_TEXT_BASE=0x600000
 CONFIG_SYS_MALLOC_F_LEN=0x400
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 16/22] board: lsxl: make last resort recovery more reliable
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
                   ` (14 preceding siblings ...)
  2022-08-17 19:38 ` [PATCH 15/22] board: lsxl: enable ATAGS support Michael Walle
@ 2022-08-17 19:38 ` Michael Walle
  2022-08-17 19:38 ` [PATCH 17/22] board: lsxl: convert to DM_GPIO Michael Walle
                   ` (7 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:38 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle

If something is wrong with the environment, we cannot rely on a proper
u-boot operation anymore. In fact, it is possible, that we never reach
misc_init_r() with a broken environment.

Also don't enable the netconsole by environment settings. This way the
user don't have to reconfigure the environment. Instead the network
console is only enabled when the push button is pressed during boot.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 arch/arm/mach-kirkwood/Kconfig |  1 +
 board/buffalo/lsxl/lsxl.c      | 14 ++++++++++++--
 configs/lschlv2_defconfig      |  1 -
 configs/lsxhl_defconfig        |  1 -
 include/configs/lsxl.h         | 10 ----------
 5 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index f5460f3bd3..c8a193dd4c 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -45,6 +45,7 @@ config TARGET_LSXL
 	bool "lsxl Board"
 	select FEROCEON_88FR131
 	select KW88F6281
+	select BOARD_EARLY_INIT_R
 	select MISC_INIT_R
 
 config TARGET_POGO_E02
diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c
index eca7da2f6d..7fab5fbe44 100644
--- a/board/buffalo/lsxl/lsxl.c
+++ b/board/buffalo/lsxl/lsxl.c
@@ -42,6 +42,8 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+static bool force_rescue_mode;
+
 int board_early_init_f(void)
 {
 	/*
@@ -247,14 +249,22 @@ static void check_push_button(void)
 	if (i >= 100)
 		erase_environment();
 	else if (i >= 10)
-		rescue_mode();
+		force_rescue_mode = true;
+}
+
+int board_early_init_r(void)
+{
+	check_push_button();
+
+	return 0;
 }
 
 int misc_init_r(void)
 {
 	check_power_switch();
 	check_enetaddr();
-	check_push_button();
+	if (force_rescue_mode)
+		rescue_mode();
 
 	return 0;
 }
diff --git a/configs/lschlv2_defconfig b/configs/lschlv2_defconfig
index f4ffb9c6a2..b3ad20c4db 100644
--- a/configs/lschlv2_defconfig
+++ b/configs/lschlv2_defconfig
@@ -29,7 +29,6 @@ CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/sda2"
 CONFIG_BOOTCOMMAND="run bootcmd_${bootsource}"
 CONFIG_DEFAULT_FDT_FILE="kirkwood-lschlv2.dtb"
-CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SYS_MAXARGS=32
diff --git a/configs/lsxhl_defconfig b/configs/lsxhl_defconfig
index e8fb87ddda..747a224999 100644
--- a/configs/lsxhl_defconfig
+++ b/configs/lsxhl_defconfig
@@ -30,7 +30,6 @@ CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/sda2"
 CONFIG_BOOTCOMMAND="run bootcmd_${bootsource}"
 CONFIG_DEFAULT_FDT_FILE="kirkwood-lsxhl.dtb"
-CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SYS_MAXARGS=32
diff --git a/include/configs/lsxl.h b/include/configs/lsxl.h
index 162f07790f..4d5908d236 100644
--- a/include/configs/lsxl.h
+++ b/include/configs/lsxl.h
@@ -57,17 +57,7 @@
 		"&& setenv ncip "					\
 		"&& setenv autoload ${autoload_old}; "			\
 		"setenv autoload_old\0"					\
-	"standard_env=setenv ipaddr; setenv netmask; setenv serverip; "	\
-		"setenv ncip; setenv gatewayip; setenv ethact; "	\
-		"setenv bootfile; setenv dnsip; "			\
-		"setenv bootsource legacy; run ser\0"			\
-	"restore_env=run standard_env; saveenv; reset\0"		\
-	"ser=setenv stdin serial; setenv stdout serial; "		\
-		"setenv stderr serial\0"				\
 	"nc=setenv stdin nc; setenv stdout nc; setenv stderr nc\0"	\
-	"stdin=serial\0"						\
-	"stdout=serial\0"						\
-	"stderr=serial\0"
 
 /*
  * Ethernet Driver configuration
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 17/22] board: lsxl: convert to DM_GPIO
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
                   ` (15 preceding siblings ...)
  2022-08-17 19:38 ` [PATCH 16/22] board: lsxl: make last resort recovery more reliable Michael Walle
@ 2022-08-17 19:38 ` Michael Walle
  2022-08-17 19:38 ` [PATCH 18/22] board: lsxl: convert to DM_ETH Michael Walle
                   ` (6 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:38 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle

Use the new mvebu GPIO driver and convert all the function calls to the
former kirkwood GPIO driver. This means that we are now using the LED
uclass and the regulator uclass. Unfortunately, the GPIO LED doesn't
offer a blinking method. Thus we are now stuck with solid on and off
states, which makes debugging a bit harder. Also, there is no GPIO fan
driver for now.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 arch/arm/dts/kirkwood-lschlv2-u-boot.dtsi |   9 ++
 arch/arm/dts/kirkwood-lsxhl-u-boot.dtsi   |   9 ++
 board/buffalo/lsxl/lsxl.c                 | 140 +++++++++++++---------
 configs/lschlv2_defconfig                 |  11 +-
 configs/lsxhl_defconfig                   |  11 +-
 5 files changed, 124 insertions(+), 56 deletions(-)
 create mode 100644 arch/arm/dts/kirkwood-lschlv2-u-boot.dtsi
 create mode 100644 arch/arm/dts/kirkwood-lsxhl-u-boot.dtsi

diff --git a/arch/arm/dts/kirkwood-lschlv2-u-boot.dtsi b/arch/arm/dts/kirkwood-lschlv2-u-boot.dtsi
new file mode 100644
index 0000000000..208b02c9da
--- /dev/null
+++ b/arch/arm/dts/kirkwood-lschlv2-u-boot.dtsi
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+&hdd_power {
+	/delete-property/ regulator-always-on;
+};
+
+&usb_power {
+	/delete-property/ regulator-always-on;
+};
diff --git a/arch/arm/dts/kirkwood-lsxhl-u-boot.dtsi b/arch/arm/dts/kirkwood-lsxhl-u-boot.dtsi
new file mode 100644
index 0000000000..208b02c9da
--- /dev/null
+++ b/arch/arm/dts/kirkwood-lsxhl-u-boot.dtsi
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+&hdd_power {
+	/delete-property/ regulator-always-on;
+};
+
+&usb_power {
+	/delete-property/ regulator-always-on;
+};
diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c
index 7fab5fbe44..6a866b5470 100644
--- a/board/buffalo/lsxl/lsxl.c
+++ b/board/buffalo/lsxl/lsxl.c
@@ -9,16 +9,18 @@
 
 #include <common.h>
 #include <bootstage.h>
+#include <button.h>
 #include <command.h>
 #include <env.h>
 #include <init.h>
+#include <led.h>
+#include <power/regulator.h>
 #include <spi.h>
 #include <spi_flash.h>
-#include <asm/arch/soc.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/mpp.h>
-#include <asm/arch/gpio.h>
 #include <asm/global_data.h>
+#include <asm/io.h>
 #include <linux/delay.h>
 
 #include "lsxl.h"
@@ -118,48 +120,43 @@ int board_early_init_f(void)
 	return 0;
 }
 
-#define LED_OFF             0
-#define LED_ALARM_ON        1
-#define LED_ALARM_BLINKING  2
-#define LED_POWER_ON        3
-#define LED_POWER_BLINKING  4
-#define LED_INFO_ON         5
-#define LED_INFO_BLINKING   6
+enum {
+	LSXL_LED_OFF,
+	LSXL_LED_ALARM,
+	LSXL_LED_POWER,
+	LSXL_LED_INFO,
+};
 
-static void __set_led(int blink_alarm, int blink_info, int blink_power,
-		int value_alarm, int value_info, int value_power)
+static void __set_led(int alarm, int info, int power)
 {
-	kw_gpio_set_blink(GPIO_ALARM_LED, blink_alarm);
-	kw_gpio_set_blink(GPIO_INFO_LED, blink_info);
-	kw_gpio_set_blink(GPIO_POWER_LED, blink_power);
-	kw_gpio_set_value(GPIO_ALARM_LED, value_alarm);
-	kw_gpio_set_value(GPIO_INFO_LED, value_info);
-	kw_gpio_set_value(GPIO_POWER_LED, value_power);
+	struct udevice *led;
+	int ret;
+
+	ret = led_get_by_label("lsxl:red:alarm", &led);
+	if (!ret)
+		led_set_state(led, alarm);
+	ret = led_get_by_label("lsxl:amber:info", &led);
+	if (!ret)
+		led_set_state(led, info);
+	ret = led_get_by_label("lsxl:blue:power", &led);
+	if (!ret)
+		led_set_state(led, power);
 }
 
 static void set_led(int state)
 {
 	switch (state) {
-	case LED_OFF:
-		__set_led(0, 0, 0, 1, 1, 1);
+	case LSXL_LED_OFF:
+		__set_led(0, 0, 0);
 		break;
-	case LED_ALARM_ON:
-		__set_led(0, 0, 0, 0, 1, 1);
+	case LSXL_LED_ALARM:
+		__set_led(1, 0, 0);
 		break;
-	case LED_ALARM_BLINKING:
-		__set_led(1, 0, 0, 1, 1, 1);
+	case LSXL_LED_INFO:
+		__set_led(0, 1, 0);
 		break;
-	case LED_INFO_ON:
-		__set_led(0, 0, 0, 1, 0, 1);
-		break;
-	case LED_INFO_BLINKING:
-		__set_led(0, 1, 0, 1, 1, 1);
-		break;
-	case LED_POWER_ON:
-		__set_led(0, 0, 0, 1, 1, 0);
-		break;
-	case LED_POWER_BLINKING:
-		__set_led(0, 0, 1, 1, 1, 1);
+	case LSXL_LED_POWER:
+		__set_led(0, 0, 1);
 		break;
 	}
 }
@@ -169,32 +166,56 @@ int board_init(void)
 	/* address of boot parameters */
 	gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;
 
-	set_led(LED_POWER_BLINKING);
+	set_led(LSXL_LED_POWER);
 
 	return 0;
 }
 
 static void check_power_switch(void)
 {
-	if (kw_gpio_get_value(GPIO_POWER_SWITCH)) {
-		/* turn off fan, HDD and USB power */
-		kw_gpio_set_value(GPIO_HDD_POWER, 0);
-		kw_gpio_set_value(GPIO_USB_VBUS, 0);
-		kw_gpio_set_value(GPIO_FAN_HIGH, 1);
-		kw_gpio_set_value(GPIO_FAN_LOW, 1);
-		set_led(LED_OFF);
+	struct udevice *power_button, *hdd_power, *usb_power;
+	int ret;
+
+	ret = button_get_by_label("Power-on Switch", &power_button);
+	if (ret)
+		goto err;
+
+	ret = regulator_get_by_platname("HDD Power", &hdd_power);
+	if (ret)
+		goto err;
+
+	ret = regulator_get_by_platname("USB Power", &usb_power);
+	if (ret)
+		goto err;
+
+	if (button_get_state(power_button) == BUTTON_OFF) {
+		ret = regulator_set_enable(hdd_power, false);
+		if (ret)
+			goto err;
+		ret = regulator_set_enable(usb_power, false);
+		if (ret)
+			goto err;
+		/* TODO: fan off */
+		set_led(LSXL_LED_OFF);
 
 		/* loop until released */
-		while (kw_gpio_get_value(GPIO_POWER_SWITCH))
+		while (button_get_state(power_button) == BUTTON_OFF)
 			;
 
 		/* turn power on again */
-		kw_gpio_set_value(GPIO_HDD_POWER, 1);
-		kw_gpio_set_value(GPIO_USB_VBUS, 1);
-		kw_gpio_set_value(GPIO_FAN_HIGH, 0);
-		kw_gpio_set_value(GPIO_FAN_LOW, 0);
-		set_led(LED_POWER_BLINKING);
-	}
+		ret = regulator_set_enable(hdd_power, true);
+		if (ret)
+			goto err;
+		ret = regulator_set_enable(usb_power, true);
+		if (ret)
+			goto err;
+		/* TODO: fan on */
+		set_led(LSXL_LED_POWER);
+	};
+
+	return;
+err:
+	printf("error in %s\n", __func__);
 }
 
 void check_enetaddr(void)
@@ -203,7 +224,7 @@ void check_enetaddr(void)
 
 	if (!eth_env_get_enetaddr("ethaddr", enetaddr)) {
 		/* signal unset/invalid ethaddr to user */
-		set_led(LED_INFO_BLINKING);
+		set_led(LSXL_LED_INFO);
 	}
 }
 
@@ -231,17 +252,24 @@ static void rescue_mode(void)
 
 static void check_push_button(void)
 {
+	struct udevice *func_button;
 	int i = 0;
 
-	while (!kw_gpio_get_value(GPIO_FUNC_BUTTON)) {
+	int ret;
+
+	ret = button_get_by_label("Function Button", &func_button);
+	if (ret)
+		goto err;
+
+	while (button_get_state(func_button) == BUTTON_ON) {
 		udelay(100000);
 		i++;
 
 		if (i == 10)
-			set_led(LED_INFO_ON);
+			set_led(LSXL_LED_INFO);
 
 		if (i >= 100) {
-			set_led(LED_INFO_BLINKING);
+			set_led(LSXL_LED_ALARM);
 			break;
 		}
 	}
@@ -250,6 +278,10 @@ static void check_push_button(void)
 		erase_environment();
 	else if (i >= 10)
 		force_rescue_mode = true;
+
+	return;
+err:
+	printf("error in %s\n", __func__);
 }
 
 int board_early_init_r(void)
@@ -279,6 +311,6 @@ void show_boot_progress(int progress)
 	if (progress == -BOOTSTAGE_ID_NET_LOADED)
 		return;
 
-	set_led(LED_ALARM_BLINKING);
+	set_led(LSXL_LED_ALARM);
 }
 #endif
diff --git a/configs/lschlv2_defconfig b/configs/lschlv2_defconfig
index b3ad20c4db..2146a33276 100644
--- a/configs/lschlv2_defconfig
+++ b/configs/lschlv2_defconfig
@@ -14,6 +14,7 @@ CONFIG_TARGET_LSXL=y
 CONFIG_ENV_SIZE=0x10000
 CONFIG_ENV_OFFSET=0x70000
 CONFIG_ENV_SECT_SIZE=0x10000
+CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="kirkwood-lschlv2"
 CONFIG_IDENT_STRING=" LS-CHLv2"
 CONFIG_SYS_LOAD_ADDR=0x800000
@@ -37,6 +38,9 @@ CONFIG_CMD_SATA=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
+# CONFIG_CMD_BUTTON is not set
+# CONFIG_CMD_LED is not set
+CONFIG_CMD_REGULATOR=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
@@ -48,7 +52,10 @@ CONFIG_SATA_MV=y
 CONFIG_SYS_SATA_MAX_DEVICE=1
 CONFIG_LBA48=y
 CONFIG_SYS_64BIT_LBA=y
-CONFIG_KIRKWOOD_GPIO=y
+CONFIG_BUTTON=y
+CONFIG_BUTTON_GPIO=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_DM_SPI_FLASH=y
@@ -56,6 +63,8 @@ CONFIG_SF_DEFAULT_SPEED=25000000
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/lsxhl_defconfig b/configs/lsxhl_defconfig
index 747a224999..d8953128e0 100644
--- a/configs/lsxhl_defconfig
+++ b/configs/lsxhl_defconfig
@@ -15,6 +15,7 @@ CONFIG_LSXHL=y
 CONFIG_ENV_SIZE=0x10000
 CONFIG_ENV_OFFSET=0x70000
 CONFIG_ENV_SECT_SIZE=0x10000
+CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="kirkwood-lsxhl"
 CONFIG_IDENT_STRING=" LS-XHL"
 CONFIG_SYS_LOAD_ADDR=0x800000
@@ -38,6 +39,9 @@ CONFIG_CMD_SATA=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
+# CONFIG_CMD_BUTTON is not set
+# CONFIG_CMD_LED is not set
+CONFIG_CMD_REGULATOR=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
@@ -49,7 +53,10 @@ CONFIG_SATA_MV=y
 CONFIG_SYS_SATA_MAX_DEVICE=1
 CONFIG_LBA48=y
 CONFIG_SYS_64BIT_LBA=y
-CONFIG_KIRKWOOD_GPIO=y
+CONFIG_BUTTON=y
+CONFIG_BUTTON_GPIO=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_DM_SPI_FLASH=y
@@ -57,6 +64,8 @@ CONFIG_SF_DEFAULT_SPEED=25000000
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 18/22] board: lsxl: convert to DM_ETH
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
                   ` (16 preceding siblings ...)
  2022-08-17 19:38 ` [PATCH 17/22] board: lsxl: convert to DM_GPIO Michael Walle
@ 2022-08-17 19:38 ` Michael Walle
  2022-08-17 19:38 ` [PATCH 19/22] board: lsxl: convert to DM_SERIAL Michael Walle
                   ` (5 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:38 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle

Just enabling the Kconfig option for DM_ETH and DM_MDIO is enough.
Additionally, we can remove the old hardcoded config.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 configs/lschlv2_defconfig | 2 ++
 configs/lsxhl_defconfig   | 2 ++
 include/configs/lsxl.h    | 8 --------
 3 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/configs/lschlv2_defconfig b/configs/lschlv2_defconfig
index 2146a33276..4e356fb150 100644
--- a/configs/lschlv2_defconfig
+++ b/configs/lschlv2_defconfig
@@ -61,6 +61,8 @@ CONFIG_MTD=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=25000000
 CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_DM_ETH=y
+CONFIG_DM_MDIO=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
 CONFIG_DM_REGULATOR=y
diff --git a/configs/lsxhl_defconfig b/configs/lsxhl_defconfig
index d8953128e0..6de0322bfa 100644
--- a/configs/lsxhl_defconfig
+++ b/configs/lsxhl_defconfig
@@ -62,6 +62,8 @@ CONFIG_MTD=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=25000000
 CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_DM_ETH=y
+CONFIG_DM_MDIO=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
 CONFIG_DM_REGULATOR=y
diff --git a/include/configs/lsxl.h b/include/configs/lsxl.h
index 4d5908d236..c82eb8b04b 100644
--- a/include/configs/lsxl.h
+++ b/include/configs/lsxl.h
@@ -59,12 +59,4 @@
 		"setenv autoload_old\0"					\
 	"nc=setenv stdin nc; setenv stdout nc; setenv stderr nc\0"	\
 
-/*
- * Ethernet Driver configuration
- */
-#ifdef CONFIG_CMD_NET
-#define CONFIG_MVGBE_PORTS		{0, 1} /* enable port 1 only */
-#define CONFIG_PHY_BASE_ADR		7
-#endif /* CONFIG_CMD_NET */
-
 #endif /* _CONFIG_LSXL_H */
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 19/22] board: lsxl: convert to DM_SERIAL
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
                   ` (17 preceding siblings ...)
  2022-08-17 19:38 ` [PATCH 18/22] board: lsxl: convert to DM_ETH Michael Walle
@ 2022-08-17 19:38 ` Michael Walle
  2022-08-17 19:38 ` [PATCH 20/22] board: lsxl: convert to CONFIG_TIMER Michael Walle
                   ` (4 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:38 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle

DM_SERIAL needs early malloc. The on-chip RAM is pretty tight, it's only
2kiB, with DM_SERIAL enabled, this doesn't work anymore. Fortunately for
us, we don't need the on-chip RAM because the DRAM is already
initialized before u-boot starts. Just put the early malloc area there
and use the default early malloc size.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 configs/lschlv2_defconfig | 4 ++--
 configs/lsxhl_defconfig   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configs/lschlv2_defconfig b/configs/lschlv2_defconfig
index 4e356fb150..57e54130d2 100644
--- a/configs/lschlv2_defconfig
+++ b/configs/lschlv2_defconfig
@@ -8,7 +8,6 @@ CONFIG_CMDLINE_TAG=y
 CONFIG_INITRD_TAG=y
 CONFIG_SYS_KWD_CONFIG="board/buffalo/lsxl/kwbimage-lschl.cfg"
 CONFIG_SYS_TEXT_BASE=0x600000
-CONFIG_SYS_MALLOC_F_LEN=0x400
 CONFIG_NR_DRAM_BANKS=2
 CONFIG_TARGET_LSXL=y
 CONFIG_ENV_SIZE=0x10000
@@ -20,7 +19,7 @@ CONFIG_IDENT_STRING=" LS-CHLv2"
 CONFIG_SYS_LOAD_ADDR=0x800000
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc8012000
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x5ff000
 CONFIG_HAS_BOARD_SIZE_LIMIT=y
 CONFIG_BOARD_SIZE_LIMIT=393216
 # CONFIG_BOOTSTD is not set
@@ -67,6 +66,7 @@ CONFIG_MVGBE=y
 CONFIG_MII=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/lsxhl_defconfig b/configs/lsxhl_defconfig
index 6de0322bfa..fc87424a6f 100644
--- a/configs/lsxhl_defconfig
+++ b/configs/lsxhl_defconfig
@@ -8,7 +8,6 @@ CONFIG_CMDLINE_TAG=y
 CONFIG_INITRD_TAG=y
 CONFIG_SYS_KWD_CONFIG="board/buffalo/lsxl/kwbimage-lsxhl.cfg"
 CONFIG_SYS_TEXT_BASE=0x600000
-CONFIG_SYS_MALLOC_F_LEN=0x400
 CONFIG_NR_DRAM_BANKS=2
 CONFIG_TARGET_LSXL=y
 CONFIG_LSXHL=y
@@ -21,7 +20,7 @@ CONFIG_IDENT_STRING=" LS-XHL"
 CONFIG_SYS_LOAD_ADDR=0x800000
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc8012000
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x5ff000
 CONFIG_HAS_BOARD_SIZE_LIMIT=y
 CONFIG_BOARD_SIZE_LIMIT=393216
 # CONFIG_BOOTSTD is not set
@@ -68,6 +67,7 @@ CONFIG_MVGBE=y
 CONFIG_MII=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 20/22] board: lsxl: convert to CONFIG_TIMER
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
                   ` (18 preceding siblings ...)
  2022-08-17 19:38 ` [PATCH 19/22] board: lsxl: convert to DM_SERIAL Michael Walle
@ 2022-08-17 19:38 ` Michael Walle
  2022-08-17 19:38 ` [PATCH 21/22] board: lsxl: disable eth0 Michael Walle
                   ` (3 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:38 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle

Enable the orion timer driver and we are good.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 configs/lschlv2_defconfig | 2 ++
 configs/lsxhl_defconfig   | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/configs/lschlv2_defconfig b/configs/lschlv2_defconfig
index 57e54130d2..e9cc632696 100644
--- a/configs/lschlv2_defconfig
+++ b/configs/lschlv2_defconfig
@@ -71,5 +71,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_KIRKWOOD_SPI=y
+CONFIG_TIMER=y
+CONFIG_ORION_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/lsxhl_defconfig b/configs/lsxhl_defconfig
index fc87424a6f..b83a072b04 100644
--- a/configs/lsxhl_defconfig
+++ b/configs/lsxhl_defconfig
@@ -72,5 +72,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_KIRKWOOD_SPI=y
+CONFIG_TIMER=y
+CONFIG_ORION_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 21/22] board: lsxl: disable eth0
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
                   ` (19 preceding siblings ...)
  2022-08-17 19:38 ` [PATCH 20/22] board: lsxl: convert to CONFIG_TIMER Michael Walle
@ 2022-08-17 19:38 ` Michael Walle
  2022-08-17 19:38 ` [PATCH 22/22] board: lsxl: update the README Michael Walle
                   ` (2 subsequent siblings)
  23 siblings, 0 replies; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:38 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle

The board has only one network interface. The linux kernel will
gracefully skip a the ethernet interface if no connected PHY could be
probed. u-boot on the other hand will throw an error message. The kernel
device tree is about to be fixed. For now, just disable the ethernet
interface in our -u-boot.dtsi.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 arch/arm/dts/kirkwood-lschlv2-u-boot.dtsi | 4 ++++
 arch/arm/dts/kirkwood-lsxhl-u-boot.dtsi   | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/arch/arm/dts/kirkwood-lschlv2-u-boot.dtsi b/arch/arm/dts/kirkwood-lschlv2-u-boot.dtsi
index 208b02c9da..7fc2d7d3b4 100644
--- a/arch/arm/dts/kirkwood-lschlv2-u-boot.dtsi
+++ b/arch/arm/dts/kirkwood-lschlv2-u-boot.dtsi
@@ -1,5 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0+
 
+&eth0 {
+	status = "disabled";
+};
+
 &hdd_power {
 	/delete-property/ regulator-always-on;
 };
diff --git a/arch/arm/dts/kirkwood-lsxhl-u-boot.dtsi b/arch/arm/dts/kirkwood-lsxhl-u-boot.dtsi
index 208b02c9da..7fc2d7d3b4 100644
--- a/arch/arm/dts/kirkwood-lsxhl-u-boot.dtsi
+++ b/arch/arm/dts/kirkwood-lsxhl-u-boot.dtsi
@@ -1,5 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0+
 
+&eth0 {
+	status = "disabled";
+};
+
 &hdd_power {
 	/delete-property/ regulator-always-on;
 };
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 22/22] board: lsxl: update the README
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
                   ` (20 preceding siblings ...)
  2022-08-17 19:38 ` [PATCH 21/22] board: lsxl: disable eth0 Michael Walle
@ 2022-08-17 19:38 ` Michael Walle
  2022-08-22  7:13 ` [PATCH 00/22] board: lsxl: major update and DM conversion Stefan Roese
  2022-08-23 15:01 ` Stefan Roese
  23 siblings, 0 replies; 36+ messages in thread
From: Michael Walle @ 2022-08-17 19:38 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Michael Walle

Update the board's README to reflect all the recent changes.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 board/buffalo/lsxl/README | 32 +++++++++++++++++---------------
 1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/board/buffalo/lsxl/README b/board/buffalo/lsxl/README
index fffb1ce8ec..dd9e943380 100644
--- a/board/buffalo/lsxl/README
+++ b/board/buffalo/lsxl/README
@@ -31,8 +31,8 @@ generated if no valid address could be loaded from the environment variable
 'ethaddr' and a DHCP request is sent. After a successful DHCP response is
 received, the network settings are configured and the ncip is unset. Thus
 all netconsole packets are broadcasted and you can use the netconsole to
-access board from any host within the network segment. To determine the IP
-address assigned to the board, you either have to sniff the traffic or
+access the board from any host within the network segment. To determine the
+IP address assigned to the board, you either have to sniff the traffic or
 check the logs/leases of your DHCP server.
 
 The resuce mode is selected by holding the push button for at least one
@@ -42,41 +42,43 @@ the resuce mode is enabled, thus providing a visual feedback.
 Pressing the same button for at least 10 seconds on power-up will erase the
 environment and reset the board. In this case the visual indication will
 be:
-- blinking blue, for about one second
-- solid amber, for about nine seconds
-- blinking amber, until you release the button
+- blue, for about one second
+- amber, for about nine seconds
+- red, until you release the button
 
 This ensures, that you still can recover a device with a broken
 environment by first erasing the environment and then entering the rescue
 mode.
 
 Once the rescue mode is started, use the ncb binary from the tools/
-directory to access your board. There is a helper script named
-'restore_env' to save your changes. It unsets all the network variables
-which were set by the rescue mode, saves your changes and then resets the
-board.
+directory to access your board.
 
 The common use case for this is setting a MAC address. Let us assume you
-have an empty environment, the board comes up with the amber LED blinking.
+have an empty environment, the board comes up with the amber LED turned on.
 Then you enter the rescue mode, connect to the board with the ncb tool and
 use the following commands to set your MAC address:
 
-  setenv ethaddr 00:00:00:00:00:00
-  run restore_env
+  setenv -f ethaddr 00:00:00:00:00:00
+  saveenv
+  reset
 
 Of course you need to replace the 00:00:00:00:00:00 with your valid MAC
 address, which can be found on a sticker on the bottom of your box.
 
+You cannot store the network console setting in the environment. On reset
+it is automatically restored to serial. Therefore, you have to use the
+push-button to enter resuce mode again.
+
 
 Status LED
 ----------
-blinking blue
+blue
   Bootloader is running normally.
 
-blinking amber
+amber
   No ethaddr set. Use the `Rescue Mode` to set one.
 
-blinking red
+red
   Something bad happend during loading the operating system.
 
 The default behavior of the linux kernel is to turn on the blue LED. So if
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PATCH 01/22] time: move the CONFIG_SYS_TIMER_RATE handling to the compiler
  2022-08-17 19:37 ` [PATCH 01/22] time: move the CONFIG_SYS_TIMER_RATE handling to the compiler Michael Walle
@ 2022-08-17 19:51   ` Pali Rohár
  0 siblings, 0 replies; 36+ messages in thread
From: Pali Rohár @ 2022-08-17 19:51 UTC (permalink / raw)
  To: Michael Walle; +Cc: Stefan Roese, u-boot

On Wednesday 17 August 2022 21:37:48 Michael Walle wrote:
> CONFIG_SYS_TIMER_RATE might be a dynamic value, i.e. a function call
> instead of a static value, thus it has to be evaluated at runtime. If it
> is a static value, the compiler should be able to optimize the unused
> branches out.
> 
> This will be needed for kirkwoods dynamic CONFIG_SYS_TCLK setting.
> 
> Cc: Pali Rohár <pali@kernel.org>
> Signed-off-by: Michael Walle <michael@walle.cc>

Reviewed-by: Pali Rohár <pali@kernel.org>

> ---
>  lib/time.c | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/lib/time.c b/lib/time.c
> index 96074b84af..bbf191f673 100644
> --- a/lib/time.c
> +++ b/lib/time.c
> @@ -47,12 +47,15 @@ ulong timer_get_boot_us(void)
>  {
>  	ulong count = timer_read_counter();
>  
> -#if CONFIG_SYS_TIMER_RATE == 1000000
> -	return count;
> -#elif CONFIG_SYS_TIMER_RATE > 1000000
> -	return lldiv(count, CONFIG_SYS_TIMER_RATE / 1000000);
> -#elif defined(CONFIG_SYS_TIMER_RATE)
> -	return (unsigned long long)count * 1000000 / CONFIG_SYS_TIMER_RATE;
> +#ifdef CONFIG_SYS_TIMER_RATE
> +	const ulong timer_rate = CONFIG_SYS_TIMER_RATE;
> +
> +	if (timer_rate == 1000000)
> +		return count;
> +	else if (timer_rate > 1000000)
> +		return lldiv(count, timer_rate / 1000000);
> +	else
> +		return (unsigned long long)count * 1000000 / timer_rate;
>  #else
>  	/* Assume the counter is in microseconds */
>  	return count;
> -- 
> 2.30.2
> 

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 03/22] arm: kirkwood: make it CONFIG_TIMER aware
  2022-08-17 19:37 ` [PATCH 03/22] arm: kirkwood: make it CONFIG_TIMER aware Michael Walle
@ 2022-08-17 19:51   ` Pali Rohár
  0 siblings, 0 replies; 36+ messages in thread
From: Pali Rohár @ 2022-08-17 19:51 UTC (permalink / raw)
  To: Michael Walle; +Cc: Stefan Roese, u-boot

On Wednesday 17 August 2022 21:37:50 Michael Walle wrote:
> If we switch to CONFIG_TIMER, we don't need the legacy timer macros and
> functions anymore. Add the proper guards to exclude them from compiling.
> 
> Cc: Pali Rohár <pali@kernel.org>
> Signed-off-by: Michael Walle <michael@walle.cc>

Reviewed-by: Pali Rohár <pali@kernel.org>

> ---
>  arch/arm/mach-kirkwood/include/mach/config.h | 2 ++
>  arch/arm/mach-mvebu/Makefile                 | 3 +++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/arch/arm/mach-kirkwood/include/mach/config.h b/arch/arm/mach-kirkwood/include/mach/config.h
> index 90e86ab99b..d877be119f 100644
> --- a/arch/arm/mach-kirkwood/include/mach/config.h
> +++ b/arch/arm/mach-kirkwood/include/mach/config.h
> @@ -51,8 +51,10 @@
>  #endif /* CONFIG_IDE */
>  
>  /* Use common timer */
> +#ifndef CONFIG_TIMER
>  #define CONFIG_SYS_TIMER_COUNTS_DOWN
>  #define CONFIG_SYS_TIMER_COUNTER	(MVEBU_TIMER_BASE + 0x14)
>  #define CONFIG_SYS_TIMER_RATE		CONFIG_SYS_TCLK
> +#endif
>  
>  #endif /* _KW_CONFIG_H */
> diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
> index 61eeb9c8c1..103e64cf20 100644
> --- a/arch/arm/mach-mvebu/Makefile
> +++ b/arch/arm/mach-mvebu/Makefile
> @@ -15,7 +15,10 @@ ifdef CONFIG_ARCH_KIRKWOOD
>  obj-y	= dram.o
>  obj-y	+= gpio.o
>  obj-y	+= mbus.o
> +
> +ifndef CONFIG_TIMER
>  obj-y	+= timer.o
> +endif
>  
>  else # CONFIG_ARCH_KIRKWOOD
>  
> -- 
> 2.30.2
> 

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 04/22] timer: add orion-timer support
  2022-08-17 19:37 ` [PATCH 04/22] timer: add orion-timer support Michael Walle
@ 2022-08-17 19:52   ` Pali Rohár
  0 siblings, 0 replies; 36+ messages in thread
From: Pali Rohár @ 2022-08-17 19:52 UTC (permalink / raw)
  To: Michael Walle; +Cc: Stefan Roese, u-boot

On Wednesday 17 August 2022 21:37:51 Michael Walle wrote:
> Add timer support for Kirkwood and MVEBU devices.
> 
> Cc: Pali Rohár <pali@kernel.org>
> Signed-off-by: Michael Walle <michael@walle.cc>

Acked-by: Pali Rohár <pali@kernel.org>

> ---
>  drivers/timer/Kconfig       |  6 ++++
>  drivers/timer/Makefile      |  1 +
>  drivers/timer/orion-timer.c | 63 +++++++++++++++++++++++++++++++++++++
>  3 files changed, 70 insertions(+)
>  create mode 100644 drivers/timer/orion-timer.c
> 
> diff --git a/drivers/timer/Kconfig b/drivers/timer/Kconfig
> index 20b5af7e26..4049290148 100644
> --- a/drivers/timer/Kconfig
> +++ b/drivers/timer/Kconfig
> @@ -194,6 +194,12 @@ config OMAP_TIMER
>  	help
>  	  Select this to enable an timer for Omap devices.
>  
> +config ORION_TIMER
> +	bool "Orion timer support"
> +	depends on TIMER
> +	help
> +	  Select this to enable an timer for Orion devices.
> +
>  config RISCV_TIMER
>  	bool "RISC-V timer support"
>  	depends on TIMER && RISCV
> diff --git a/drivers/timer/Makefile b/drivers/timer/Makefile
> index d9822a5370..560e2d27e1 100644
> --- a/drivers/timer/Makefile
> +++ b/drivers/timer/Makefile
> @@ -17,6 +17,7 @@ obj-$(CONFIG_MPC83XX_TIMER) += mpc83xx_timer.o
>  obj-$(CONFIG_NOMADIK_MTU_TIMER)	+= nomadik-mtu-timer.o
>  obj-$(CONFIG_NPCM_TIMER)        += npcm-timer.o
>  obj-$(CONFIG_OMAP_TIMER)	+= omap-timer.o
> +obj-$(CONFIG_ORION_TIMER)	+= orion-timer.o
>  obj-$(CONFIG_RENESAS_OSTM_TIMER) += ostm_timer.o
>  obj-$(CONFIG_RISCV_TIMER) += riscv_timer.o
>  obj-$(CONFIG_ROCKCHIP_TIMER) += rockchip_timer.o
> diff --git a/drivers/timer/orion-timer.c b/drivers/timer/orion-timer.c
> new file mode 100644
> index 0000000000..fd30e1bf03
> --- /dev/null
> +++ b/drivers/timer/orion-timer.c
> @@ -0,0 +1,63 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +#include <asm/io.h>
> +#include <common.h>
> +#include <dm/device.h>
> +#include <dm/fdtaddr.h>
> +#include <timer.h>
> +
> +#define TIMER_CTRL		0x00
> +#define TIMER0_EN		BIT(0)
> +#define TIMER0_RELOAD_EN	BIT(1)
> +#define TIMER0_RELOAD		0x10
> +#define TIMER0_VAL		0x14
> +
> +struct orion_timer_priv {
> +	void *base;
> +};
> +
> +static uint64_t orion_timer_get_count(struct udevice *dev)
> +{
> +	struct orion_timer_priv *priv = dev_get_priv(dev);
> +
> +	return ~readl(priv->base + TIMER0_VAL);
> +}
> +
> +static int orion_timer_probe(struct udevice *dev)
> +{
> +	struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev);
> +	struct orion_timer_priv *priv = dev_get_priv(dev);
> +
> +	priv->base = devfdt_remap_addr_index(dev, 0);
> +	if (!priv->base) {
> +		debug("unable to map registers\n");
> +		return -ENOMEM;
> +	}
> +
> +	uc_priv->clock_rate = CONFIG_SYS_TCLK;
> +
> +	writel(~0, priv->base + TIMER0_VAL);
> +	writel(~0, priv->base + TIMER0_RELOAD);
> +
> +	/* enable timer */
> +	setbits_le32(priv->base + TIMER_CTRL, TIMER0_EN | TIMER0_RELOAD_EN);
> +
> +	return 0;
> +}
> +
> +static const struct timer_ops orion_timer_ops = {
> +	.get_count = orion_timer_get_count,
> +};
> +
> +static const struct udevice_id orion_timer_ids[] = {
> +	{ .compatible = "marvell,orion-timer" },
> +	{}
> +};
> +
> +U_BOOT_DRIVER(orion_timer) = {
> +	.name	= "orion_timer",
> +	.id	= UCLASS_TIMER,
> +	.of_match = orion_timer_ids,
> +	.probe = orion_timer_probe,
> +	.ops	= &orion_timer_ops,
> +	.priv_auto	= sizeof(struct orion_timer_priv),
> +};
> -- 
> 2.30.2
> 

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 00/22] board: lsxl: major update and DM conversion
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
                   ` (21 preceding siblings ...)
  2022-08-17 19:38 ` [PATCH 22/22] board: lsxl: update the README Michael Walle
@ 2022-08-22  7:13 ` Stefan Roese
  2022-08-23 15:01 ` Stefan Roese
  23 siblings, 0 replies; 36+ messages in thread
From: Stefan Roese @ 2022-08-22  7:13 UTC (permalink / raw)
  To: Michael Walle; +Cc: u-boot

On 17.08.22 21:37, Michael Walle wrote:
> Convert the Buffalo Linkstation LS-CHLv2 and XHL boards to DM_GPIO,
> DM_ETH, DM_SERIAL and CONFIG_TIMER.
> 
> Patches 01-02 fix TCLK handling on the kirkwood SoC if the clock is
> 166MHz.
> Patches 03-04 add CONFIG_TIMER support for kirkwood/mvebu.
> Patches 05-21 will then update the lsxl board
> 
> Michael Walle (21):
>    time: move the CONFIG_SYS_TIMER_RATE handling to the compiler
>    arm: kirkwood: make it CONFIG_TIMER aware
>    timer: add orion-timer support
>    button: gpio: add DM_GPIO dependency
>    board: lsxl: limit size to 384kiB
>    board: lsxl: remove unused features
>    board: lsxl: remove eraseenv script
>    board: lsxl: remove CONFIG_ENV_OVERWRITE
>    board: lsxl: remove unused header files
>    board: lsxl: automatically select CONFIG_MISC_INIT_R
>    board: lsxl: use CONFIG_DEFAULT_FDT_FILE
>    board: lsxl: reorder image loading and remove ramdisk_len
>    board: lsxl: use proper *_r variables
>    board: lsxl: enable ATAGS support
>    board: lsxl: make last resort recovery more reliable
>    board: lsxl: convert to DM_GPIO
>    board: lsxl: convert to DM_ETH
>    board: lsxl: convert to DM_SERIAL
>    board: lsxl: convert to CONFIG_TIMER
>    board: lsxl: disable eth0
>    board: lsxl: update the README
> 
> Pali Rohár (1):
>    arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register
> 
>   arch/arm/dts/kirkwood-lschlv2-u-boot.dtsi     |  13 ++
>   arch/arm/dts/kirkwood-lsxhl-u-boot.dtsi       |  13 ++
>   arch/arm/mach-kirkwood/Kconfig                |   2 +
>   arch/arm/mach-kirkwood/include/mach/config.h  |   2 +
>   .../mach-kirkwood/include/mach/kw88f6281.h    |   3 +-
>   arch/arm/mach-kirkwood/include/mach/soc.h     |   2 +
>   arch/arm/mach-mvebu/Makefile                  |   3 +
>   board/buffalo/lsxl/README                     |  32 ++--
>   board/buffalo/lsxl/lsxl.c                     | 165 +++++++++++-------
>   configs/lschlv2_defconfig                     |  31 +++-
>   configs/lsxhl_defconfig                       |  31 +++-
>   drivers/button/Kconfig                        |   1 +
>   drivers/timer/Kconfig                         |   6 +
>   drivers/timer/Makefile                        |   1 +
>   drivers/timer/orion-timer.c                   |  63 +++++++
>   include/configs/lsxl.h                        |  76 +++-----
>   lib/time.c                                    |  15 +-
>   17 files changed, 300 insertions(+), 159 deletions(-)
>   create mode 100644 arch/arm/dts/kirkwood-lschlv2-u-boot.dtsi
>   create mode 100644 arch/arm/dts/kirkwood-lsxhl-u-boot.dtsi
>   create mode 100644 drivers/timer/orion-timer.c
> 

Nice updates and conversion, thanks:

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 02/22] arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register
  2022-08-17 19:37 ` [PATCH 02/22] arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register Michael Walle
@ 2022-08-23  5:02   ` Stefan Roese
  2022-08-23  8:17     ` michael
  0 siblings, 1 reply; 36+ messages in thread
From: Stefan Roese @ 2022-08-23  5:02 UTC (permalink / raw)
  To: Michael Walle; +Cc: u-boot, Pali Rohár

Hi Michael,

On 17.08.22 21:37, Michael Walle wrote:
> From: Pali Rohár <pali@kernel.org>
> 
> Bit 21 in SAR register specifies if TCLK is running at 166 MHz or 200 MHz.
> This information is undocumented in public Marvell Kirkwood Functional
> Specifications [2], but is available in Linux v3.15 kirkwood code [1].
> 
> Commit 8ac303d49f89 ("arm: kirkwood: Do not overwrite CONFIG_SYS_TCLK")
> broke support for Marvell 88F6281 SoCs because it was expected that all
> those SoCs have TCLK running at 200 MHz as specified in Marvell 88F6281
> Hardware Specifications [3].
> 
> Fix broken support for 88F6281 by detecting CONFIG_SYS_TCLK from SAR
> register, like it was doing Linux v3.15.
> 
> [1] - https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm/mach-kirkwood/common.c?h=v3.15#n542
> [2] - https://web.archive.org/web/20130730091033/http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
> [3] - https://web.archive.org/web/20120620073511/http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6281_OpenSource.pdf
> 
> Fixes: 8ac303d49f89 ("arm: kirkwood: Do not overwrite CONFIG_SYS_TCLK")
> Signed-off-by: Pali Rohár <pali@kernel.org>

I've applied your patch series on master (from yesterday) and see
these error(s):

$ make ds109_defconfig
$ make -sj
...
In file included from ./arch/arm/include/asm/arch/config.h:18,
                  from include/configs/mv-common.h:58,
                  from include/configs/ds109.h:14,
                  from include/config.h:4,
                  from include/common.h:16,
                  from board/Synology/ds109/ds109.c:8:
board/Synology/ds109/ds109.c: In function 'reset_misc':
./arch/arm/include/asm/arch/kw88f6281.h:18:43: warning: implicit 
declaration of function 'readl' [-Wimplicit-function-declaration]
    18 | #define CONFIG_SYS_TCLK                 ((readl(CONFIG_SAR_REG) 
& BIT(21)) ? \
       |                                           ^~~~~
include/configs/mv-common.h:36:41: note: in expansion of macro 
'CONFIG_SYS_TCLK'
    36 | #define CONFIG_SYS_NS16550_CLK          CONFIG_SYS_TCLK
       |                                         ^~~~~~~~~~~~~~~
board/Synology/ds109/ds109.c:111:36: note: in expansion of macro 
'CONFIG_SYS_NS16550_CLK'
   111 |                                    CONFIG_SYS_NS16550_CLK, 9600);
       |                                    ^~~~~~~~~~~~~~~~~~~~~~
/opt/kernel.org/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ld.bfd: 
board/Synology/ds109/ds109.o: in function `reset_misc':
/home/stefan/git/u-boot/u-boot-marvell/board/Synology/ds109/ds109.c:111: 
undefined reference to `readl'
make: *** [Makefile:1823: u-boot] Error 1

Could you please take a look and fix this?

Thanks,
Stefan

> ---
>   arch/arm/mach-kirkwood/include/mach/kw88f6281.h | 3 ++-
>   arch/arm/mach-kirkwood/include/mach/soc.h       | 2 ++
>   2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-kirkwood/include/mach/kw88f6281.h b/arch/arm/mach-kirkwood/include/mach/kw88f6281.h
> index 87406081cf..f86cd0bb60 100644
> --- a/arch/arm/mach-kirkwood/include/mach/kw88f6281.h
> +++ b/arch/arm/mach-kirkwood/include/mach/kw88f6281.h
> @@ -15,6 +15,7 @@
>   #define KW_REGS_PHY_BASE		KW88F6281_REGS_PHYS_BASE
>   
>   /* TCLK Core Clock definition */
> -#define CONFIG_SYS_TCLK	200000000 /* 200MHz */
> +#define CONFIG_SYS_TCLK			((readl(CONFIG_SAR_REG) & BIT(21)) ? \
> +					166666667 : 200000000)
>   
>   #endif /* _ASM_ARCH_KW88F6281_H */
> diff --git a/arch/arm/mach-kirkwood/include/mach/soc.h b/arch/arm/mach-kirkwood/include/mach/soc.h
> index 1d7f2828cd..5f545c6f43 100644
> --- a/arch/arm/mach-kirkwood/include/mach/soc.h
> +++ b/arch/arm/mach-kirkwood/include/mach/soc.h
> @@ -62,6 +62,8 @@
>   #define MVCPU_WIN_ENABLE	KWCPU_WIN_ENABLE
>   #define MVCPU_WIN_DISABLE	KWCPU_WIN_DISABLE
>   
> +#define CONFIG_SAR_REG		(KW_MPP_BASE + 0x0030)
> +
>   #if defined (CONFIG_KW88F6281)
>   #include <asm/arch/kw88f6281.h>
>   #elif defined (CONFIG_KW88F6192)

Viele Grüße,
Stefan Roese

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

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 02/22] arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register
  2022-08-23  5:02   ` Stefan Roese
@ 2022-08-23  8:17     ` michael
  2022-08-23  8:24       ` michael
  2022-08-23  8:46       ` Pali Rohár
  0 siblings, 2 replies; 36+ messages in thread
From: michael @ 2022-08-23  8:17 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Pali Rohár

Am 2022-08-23 07:02, schrieb Stefan Roese:
> Hi Michael,
> 
> On 17.08.22 21:37, Michael Walle wrote:
>> From: Pali Rohár <pali@kernel.org>
>> 
>> Bit 21 in SAR register specifies if TCLK is running at 166 MHz or 200 
>> MHz.
>> This information is undocumented in public Marvell Kirkwood Functional
>> Specifications [2], but is available in Linux v3.15 kirkwood code [1].
>> 
>> Commit 8ac303d49f89 ("arm: kirkwood: Do not overwrite 
>> CONFIG_SYS_TCLK")
>> broke support for Marvell 88F6281 SoCs because it was expected that 
>> all
>> those SoCs have TCLK running at 200 MHz as specified in Marvell 
>> 88F6281
>> Hardware Specifications [3].
>> 
>> Fix broken support for 88F6281 by detecting CONFIG_SYS_TCLK from SAR
>> register, like it was doing Linux v3.15.
>> 
>> [1] - 
>> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm/mach-kirkwood/common.c?h=v3.15#n542
>> [2] - 
>> https://web.archive.org/web/20130730091033/http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
>> [3] - 
>> https://web.archive.org/web/20120620073511/http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6281_OpenSource.pdf
>> 
>> Fixes: 8ac303d49f89 ("arm: kirkwood: Do not overwrite 
>> CONFIG_SYS_TCLK")
>> Signed-off-by: Pali Rohár <pali@kernel.org>
> 
> I've applied your patch series on master (from yesterday) and see
> these error(s):
> 
> $ make ds109_defconfig
> $ make -sj
> ...
> In file included from ./arch/arm/include/asm/arch/config.h:18,
>                  from include/configs/mv-common.h:58,
>                  from include/configs/ds109.h:14,
>                  from include/config.h:4,
>                  from include/common.h:16,
>                  from board/Synology/ds109/ds109.c:8:
> board/Synology/ds109/ds109.c: In function 'reset_misc':
> ./arch/arm/include/asm/arch/kw88f6281.h:18:43: warning: implicit
> declaration of function 'readl' [-Wimplicit-function-declaration]
>    18 | #define CONFIG_SYS_TCLK
> ((readl(CONFIG_SAR_REG) & BIT(21)) ? \
>       |                                           ^~~~~
> include/configs/mv-common.h:36:41: note: in expansion of macro 
> 'CONFIG_SYS_TCLK'
>    36 | #define CONFIG_SYS_NS16550_CLK          CONFIG_SYS_TCLK
>       |                                         ^~~~~~~~~~~~~~~
> board/Synology/ds109/ds109.c:111:36: note: in expansion of macro
> 'CONFIG_SYS_NS16550_CLK'
>   111 |                                    CONFIG_SYS_NS16550_CLK, 
> 9600);
>       |                                    ^~~~~~~~~~~~~~~~~~~~~~
> /opt/kernel.org/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ld.bfd:
> board/Synology/ds109/ds109.o: in function `reset_misc':
> /home/stefan/git/u-boot/u-boot-marvell/board/Synology/ds109/ds109.c:111:
> undefined reference to `readl'
> make: *** [Makefile:1823: u-boot] Error 1
> 
> Could you please take a look and fix this?

I guess soc.h should also include <asm/io.h> because now it is
using that hidden readl().

Pali?

-michael

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 02/22] arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register
  2022-08-23  8:17     ` michael
@ 2022-08-23  8:24       ` michael
  2022-08-23  8:47         ` Pali Rohár
  2022-08-23  8:46       ` Pali Rohár
  1 sibling, 1 reply; 36+ messages in thread
From: michael @ 2022-08-23  8:24 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot, Pali Rohár

Am 2022-08-23 10:17, schrieb michael@walle.cc:
> Am 2022-08-23 07:02, schrieb Stefan Roese:
>> Hi Michael,
>> 
>> On 17.08.22 21:37, Michael Walle wrote:
>>> From: Pali Rohár <pali@kernel.org>
>>> 
>>> Bit 21 in SAR register specifies if TCLK is running at 166 MHz or 200 
>>> MHz.
>>> This information is undocumented in public Marvell Kirkwood 
>>> Functional
>>> Specifications [2], but is available in Linux v3.15 kirkwood code 
>>> [1].
>>> 
>>> Commit 8ac303d49f89 ("arm: kirkwood: Do not overwrite 
>>> CONFIG_SYS_TCLK")
>>> broke support for Marvell 88F6281 SoCs because it was expected that 
>>> all
>>> those SoCs have TCLK running at 200 MHz as specified in Marvell 
>>> 88F6281
>>> Hardware Specifications [3].
>>> 
>>> Fix broken support for 88F6281 by detecting CONFIG_SYS_TCLK from SAR
>>> register, like it was doing Linux v3.15.
>>> 
>>> [1] - 
>>> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm/mach-kirkwood/common.c?h=v3.15#n542
>>> [2] - 
>>> https://web.archive.org/web/20130730091033/http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
>>> [3] - 
>>> https://web.archive.org/web/20120620073511/http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6281_OpenSource.pdf
>>> 
>>> Fixes: 8ac303d49f89 ("arm: kirkwood: Do not overwrite 
>>> CONFIG_SYS_TCLK")
>>> Signed-off-by: Pali Rohár <pali@kernel.org>
>> 
>> I've applied your patch series on master (from yesterday) and see
>> these error(s):
>> 
>> $ make ds109_defconfig
>> $ make -sj
>> ...
>> In file included from ./arch/arm/include/asm/arch/config.h:18,
>>                  from include/configs/mv-common.h:58,
>>                  from include/configs/ds109.h:14,
>>                  from include/config.h:4,
>>                  from include/common.h:16,
>>                  from board/Synology/ds109/ds109.c:8:
>> board/Synology/ds109/ds109.c: In function 'reset_misc':
>> ./arch/arm/include/asm/arch/kw88f6281.h:18:43: warning: implicit
>> declaration of function 'readl' [-Wimplicit-function-declaration]
>>    18 | #define CONFIG_SYS_TCLK
>> ((readl(CONFIG_SAR_REG) & BIT(21)) ? \
>>       |                                           ^~~~~
>> include/configs/mv-common.h:36:41: note: in expansion of macro 
>> 'CONFIG_SYS_TCLK'
>>    36 | #define CONFIG_SYS_NS16550_CLK          CONFIG_SYS_TCLK
>>       |                                         ^~~~~~~~~~~~~~~
>> board/Synology/ds109/ds109.c:111:36: note: in expansion of macro
>> 'CONFIG_SYS_NS16550_CLK'
>>   111 |                                    CONFIG_SYS_NS16550_CLK, 
>> 9600);
>>       |                                    ^~~~~~~~~~~~~~~~~~~~~~
>> /opt/kernel.org/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ld.bfd:
>> board/Synology/ds109/ds109.o: in function `reset_misc':
>> /home/stefan/git/u-boot/u-boot-marvell/board/Synology/ds109/ds109.c:111:
>> undefined reference to `readl'
>> make: *** [Makefile:1823: u-boot] Error 1
>> 
>> Could you please take a look and fix this?
> 
> I guess soc.h should also include <asm/io.h> because now it is
> using that hidden readl().

..which isn't working because it somehow finds its way to the
hosttools. Hum.

In the meantime, Stefan, could you just drop patch 1 and 2 and still
take this series. The rest of the series doesn't really depend
on them. lschlv2 will just be broken until the TCLK issue is fixed.
This way, I don't have to repost all the patches.

-michael

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 02/22] arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register
  2022-08-23  8:17     ` michael
  2022-08-23  8:24       ` michael
@ 2022-08-23  8:46       ` Pali Rohár
  1 sibling, 0 replies; 36+ messages in thread
From: Pali Rohár @ 2022-08-23  8:46 UTC (permalink / raw)
  To: michael; +Cc: Stefan Roese, u-boot

On Tuesday 23 August 2022 10:17:31 michael@walle.cc wrote:
> Am 2022-08-23 07:02, schrieb Stefan Roese:
> > Hi Michael,
> > 
> > On 17.08.22 21:37, Michael Walle wrote:
> > > From: Pali Rohár <pali@kernel.org>
> > > 
> > > Bit 21 in SAR register specifies if TCLK is running at 166 MHz or
> > > 200 MHz.
> > > This information is undocumented in public Marvell Kirkwood Functional
> > > Specifications [2], but is available in Linux v3.15 kirkwood code [1].
> > > 
> > > Commit 8ac303d49f89 ("arm: kirkwood: Do not overwrite
> > > CONFIG_SYS_TCLK")
> > > broke support for Marvell 88F6281 SoCs because it was expected that
> > > all
> > > those SoCs have TCLK running at 200 MHz as specified in Marvell
> > > 88F6281
> > > Hardware Specifications [3].
> > > 
> > > Fix broken support for 88F6281 by detecting CONFIG_SYS_TCLK from SAR
> > > register, like it was doing Linux v3.15.
> > > 
> > > [1] - https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm/mach-kirkwood/common.c?h=v3.15#n542
> > > [2] - https://web.archive.org/web/20130730091033/http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
> > > [3] - https://web.archive.org/web/20120620073511/http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6281_OpenSource.pdf
> > > 
> > > Fixes: 8ac303d49f89 ("arm: kirkwood: Do not overwrite
> > > CONFIG_SYS_TCLK")
> > > Signed-off-by: Pali Rohár <pali@kernel.org>
> > 
> > I've applied your patch series on master (from yesterday) and see
> > these error(s):
> > 
> > $ make ds109_defconfig
> > $ make -sj
> > ...
> > In file included from ./arch/arm/include/asm/arch/config.h:18,
> >                  from include/configs/mv-common.h:58,
> >                  from include/configs/ds109.h:14,
> >                  from include/config.h:4,
> >                  from include/common.h:16,
> >                  from board/Synology/ds109/ds109.c:8:
> > board/Synology/ds109/ds109.c: In function 'reset_misc':
> > ./arch/arm/include/asm/arch/kw88f6281.h:18:43: warning: implicit
> > declaration of function 'readl' [-Wimplicit-function-declaration]
> >    18 | #define CONFIG_SYS_TCLK
> > ((readl(CONFIG_SAR_REG) & BIT(21)) ? \
> >       |                                           ^~~~~
> > include/configs/mv-common.h:36:41: note: in expansion of macro
> > 'CONFIG_SYS_TCLK'
> >    36 | #define CONFIG_SYS_NS16550_CLK          CONFIG_SYS_TCLK
> >       |                                         ^~~~~~~~~~~~~~~
> > board/Synology/ds109/ds109.c:111:36: note: in expansion of macro
> > 'CONFIG_SYS_NS16550_CLK'
> >   111 |                                    CONFIG_SYS_NS16550_CLK,
> > 9600);
> >       |                                    ^~~~~~~~~~~~~~~~~~~~~~
> > /opt/kernel.org/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ld.bfd:
> > board/Synology/ds109/ds109.o: in function `reset_misc':
> > /home/stefan/git/u-boot/u-boot-marvell/board/Synology/ds109/ds109.c:111:
> > undefined reference to `readl'
> > make: *** [Makefile:1823: u-boot] Error 1
> > 
> > Could you please take a look and fix this?
> 
> I guess soc.h should also include <asm/io.h> because now it is
> using that hidden readl().
> 
> Pali?
> 
> -michael

Yes!

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 02/22] arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register
  2022-08-23  8:24       ` michael
@ 2022-08-23  8:47         ` Pali Rohár
  2022-08-23  8:51           ` Stefan Roese
  2022-08-23  8:51           ` michael
  0 siblings, 2 replies; 36+ messages in thread
From: Pali Rohár @ 2022-08-23  8:47 UTC (permalink / raw)
  To: michael; +Cc: Stefan Roese, u-boot

On Tuesday 23 August 2022 10:24:10 michael@walle.cc wrote:
> Am 2022-08-23 10:17, schrieb michael@walle.cc:
> > Am 2022-08-23 07:02, schrieb Stefan Roese:
> > > Hi Michael,
> > > 
> > > On 17.08.22 21:37, Michael Walle wrote:
> > > > From: Pali Rohár <pali@kernel.org>
> > > > 
> > > > Bit 21 in SAR register specifies if TCLK is running at 166 MHz
> > > > or 200 MHz.
> > > > This information is undocumented in public Marvell Kirkwood
> > > > Functional
> > > > Specifications [2], but is available in Linux v3.15 kirkwood
> > > > code [1].
> > > > 
> > > > Commit 8ac303d49f89 ("arm: kirkwood: Do not overwrite
> > > > CONFIG_SYS_TCLK")
> > > > broke support for Marvell 88F6281 SoCs because it was expected
> > > > that all
> > > > those SoCs have TCLK running at 200 MHz as specified in Marvell
> > > > 88F6281
> > > > Hardware Specifications [3].
> > > > 
> > > > Fix broken support for 88F6281 by detecting CONFIG_SYS_TCLK from SAR
> > > > register, like it was doing Linux v3.15.
> > > > 
> > > > [1] - https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm/mach-kirkwood/common.c?h=v3.15#n542
> > > > [2] - https://web.archive.org/web/20130730091033/http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
> > > > [3] - https://web.archive.org/web/20120620073511/http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6281_OpenSource.pdf
> > > > 
> > > > Fixes: 8ac303d49f89 ("arm: kirkwood: Do not overwrite
> > > > CONFIG_SYS_TCLK")
> > > > Signed-off-by: Pali Rohár <pali@kernel.org>
> > > 
> > > I've applied your patch series on master (from yesterday) and see
> > > these error(s):
> > > 
> > > $ make ds109_defconfig
> > > $ make -sj
> > > ...
> > > In file included from ./arch/arm/include/asm/arch/config.h:18,
> > >                  from include/configs/mv-common.h:58,
> > >                  from include/configs/ds109.h:14,
> > >                  from include/config.h:4,
> > >                  from include/common.h:16,
> > >                  from board/Synology/ds109/ds109.c:8:
> > > board/Synology/ds109/ds109.c: In function 'reset_misc':
> > > ./arch/arm/include/asm/arch/kw88f6281.h:18:43: warning: implicit
> > > declaration of function 'readl' [-Wimplicit-function-declaration]
> > >    18 | #define CONFIG_SYS_TCLK
> > > ((readl(CONFIG_SAR_REG) & BIT(21)) ? \
> > >       |                                           ^~~~~
> > > include/configs/mv-common.h:36:41: note: in expansion of macro
> > > 'CONFIG_SYS_TCLK'
> > >    36 | #define CONFIG_SYS_NS16550_CLK          CONFIG_SYS_TCLK
> > >       |                                         ^~~~~~~~~~~~~~~
> > > board/Synology/ds109/ds109.c:111:36: note: in expansion of macro
> > > 'CONFIG_SYS_NS16550_CLK'
> > >   111 |                                    CONFIG_SYS_NS16550_CLK,
> > > 9600);
> > >       |                                    ^~~~~~~~~~~~~~~~~~~~~~
> > > /opt/kernel.org/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ld.bfd:
> > > board/Synology/ds109/ds109.o: in function `reset_misc':
> > > /home/stefan/git/u-boot/u-boot-marvell/board/Synology/ds109/ds109.c:111:
> > > undefined reference to `readl'
> > > make: *** [Makefile:1823: u-boot] Error 1
> > > 
> > > Could you please take a look and fix this?
> > 
> > I guess soc.h should also include <asm/io.h> because now it is
> > using that hidden readl().
> 
> ..which isn't working because it somehow finds its way to the
> hosttools. Hum.

Or you can include it in ds109/ds109.c file.

> In the meantime, Stefan, could you just drop patch 1 and 2 and still
> take this series. The rest of the series doesn't really depend
> on them. lschlv2 will just be broken until the TCLK issue is fixed.
> This way, I don't have to repost all the patches.
> 
> -michael

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 02/22] arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register
  2022-08-23  8:47         ` Pali Rohár
@ 2022-08-23  8:51           ` Stefan Roese
  2022-08-23  8:51           ` michael
  1 sibling, 0 replies; 36+ messages in thread
From: Stefan Roese @ 2022-08-23  8:51 UTC (permalink / raw)
  To: Pali Rohár, michael; +Cc: u-boot

On 23.08.22 10:47, Pali Rohár wrote:
> On Tuesday 23 August 2022 10:24:10 michael@walle.cc wrote:
>> Am 2022-08-23 10:17, schrieb michael@walle.cc:
>>> Am 2022-08-23 07:02, schrieb Stefan Roese:
>>>> Hi Michael,
>>>>
>>>> On 17.08.22 21:37, Michael Walle wrote:
>>>>> From: Pali Rohár <pali@kernel.org>
>>>>>
>>>>> Bit 21 in SAR register specifies if TCLK is running at 166 MHz
>>>>> or 200 MHz.
>>>>> This information is undocumented in public Marvell Kirkwood
>>>>> Functional
>>>>> Specifications [2], but is available in Linux v3.15 kirkwood
>>>>> code [1].
>>>>>
>>>>> Commit 8ac303d49f89 ("arm: kirkwood: Do not overwrite
>>>>> CONFIG_SYS_TCLK")
>>>>> broke support for Marvell 88F6281 SoCs because it was expected
>>>>> that all
>>>>> those SoCs have TCLK running at 200 MHz as specified in Marvell
>>>>> 88F6281
>>>>> Hardware Specifications [3].
>>>>>
>>>>> Fix broken support for 88F6281 by detecting CONFIG_SYS_TCLK from SAR
>>>>> register, like it was doing Linux v3.15.
>>>>>
>>>>> [1] - https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm/mach-kirkwood/common.c?h=v3.15#n542
>>>>> [2] - https://web.archive.org/web/20130730091033/http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
>>>>> [3] - https://web.archive.org/web/20120620073511/http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6281_OpenSource.pdf
>>>>>
>>>>> Fixes: 8ac303d49f89 ("arm: kirkwood: Do not overwrite
>>>>> CONFIG_SYS_TCLK")
>>>>> Signed-off-by: Pali Rohár <pali@kernel.org>
>>>>
>>>> I've applied your patch series on master (from yesterday) and see
>>>> these error(s):
>>>>
>>>> $ make ds109_defconfig
>>>> $ make -sj
>>>> ...
>>>> In file included from ./arch/arm/include/asm/arch/config.h:18,
>>>>                   from include/configs/mv-common.h:58,
>>>>                   from include/configs/ds109.h:14,
>>>>                   from include/config.h:4,
>>>>                   from include/common.h:16,
>>>>                   from board/Synology/ds109/ds109.c:8:
>>>> board/Synology/ds109/ds109.c: In function 'reset_misc':
>>>> ./arch/arm/include/asm/arch/kw88f6281.h:18:43: warning: implicit
>>>> declaration of function 'readl' [-Wimplicit-function-declaration]
>>>>     18 | #define CONFIG_SYS_TCLK
>>>> ((readl(CONFIG_SAR_REG) & BIT(21)) ? \
>>>>        |                                           ^~~~~
>>>> include/configs/mv-common.h:36:41: note: in expansion of macro
>>>> 'CONFIG_SYS_TCLK'
>>>>     36 | #define CONFIG_SYS_NS16550_CLK          CONFIG_SYS_TCLK
>>>>        |                                         ^~~~~~~~~~~~~~~
>>>> board/Synology/ds109/ds109.c:111:36: note: in expansion of macro
>>>> 'CONFIG_SYS_NS16550_CLK'
>>>>    111 |                                    CONFIG_SYS_NS16550_CLK,
>>>> 9600);
>>>>        |                                    ^~~~~~~~~~~~~~~~~~~~~~
>>>> /opt/kernel.org/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ld.bfd:
>>>> board/Synology/ds109/ds109.o: in function `reset_misc':
>>>> /home/stefan/git/u-boot/u-boot-marvell/board/Synology/ds109/ds109.c:111:
>>>> undefined reference to `readl'
>>>> make: *** [Makefile:1823: u-boot] Error 1
>>>>
>>>> Could you please take a look and fix this?
>>>
>>> I guess soc.h should also include <asm/io.h> because now it is
>>> using that hidden readl().
>>
>> ..which isn't working because it somehow finds its way to the
>> hosttools. Hum.
> 
> Or you can include it in ds109/ds109.c file.

Yes, this works. I'll squash this in, while applying - if everything
else is okay.

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 02/22] arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register
  2022-08-23  8:47         ` Pali Rohár
  2022-08-23  8:51           ` Stefan Roese
@ 2022-08-23  8:51           ` michael
  1 sibling, 0 replies; 36+ messages in thread
From: michael @ 2022-08-23  8:51 UTC (permalink / raw)
  To: Pali Rohár; +Cc: Stefan Roese, u-boot

Am 2022-08-23 10:47, schrieb Pali Rohár:
> On Tuesday 23 August 2022 10:24:10 michael@walle.cc wrote:
>> Am 2022-08-23 10:17, schrieb michael@walle.cc:
>> > Am 2022-08-23 07:02, schrieb Stefan Roese:
>> > > Hi Michael,
>> > >
>> > > On 17.08.22 21:37, Michael Walle wrote:
>> > > > From: Pali Rohár <pali@kernel.org>
>> > > >
>> > > > Bit 21 in SAR register specifies if TCLK is running at 166 MHz
>> > > > or 200 MHz.
>> > > > This information is undocumented in public Marvell Kirkwood
>> > > > Functional
>> > > > Specifications [2], but is available in Linux v3.15 kirkwood
>> > > > code [1].
>> > > >
>> > > > Commit 8ac303d49f89 ("arm: kirkwood: Do not overwrite
>> > > > CONFIG_SYS_TCLK")
>> > > > broke support for Marvell 88F6281 SoCs because it was expected
>> > > > that all
>> > > > those SoCs have TCLK running at 200 MHz as specified in Marvell
>> > > > 88F6281
>> > > > Hardware Specifications [3].
>> > > >
>> > > > Fix broken support for 88F6281 by detecting CONFIG_SYS_TCLK from SAR
>> > > > register, like it was doing Linux v3.15.
>> > > >
>> > > > [1] - https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm/mach-kirkwood/common.c?h=v3.15#n542
>> > > > [2] - https://web.archive.org/web/20130730091033/http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
>> > > > [3] - https://web.archive.org/web/20120620073511/http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6281_OpenSource.pdf
>> > > >
>> > > > Fixes: 8ac303d49f89 ("arm: kirkwood: Do not overwrite
>> > > > CONFIG_SYS_TCLK")
>> > > > Signed-off-by: Pali Rohár <pali@kernel.org>
>> > >
>> > > I've applied your patch series on master (from yesterday) and see
>> > > these error(s):
>> > >
>> > > $ make ds109_defconfig
>> > > $ make -sj
>> > > ...
>> > > In file included from ./arch/arm/include/asm/arch/config.h:18,
>> > >                  from include/configs/mv-common.h:58,
>> > >                  from include/configs/ds109.h:14,
>> > >                  from include/config.h:4,
>> > >                  from include/common.h:16,
>> > >                  from board/Synology/ds109/ds109.c:8:
>> > > board/Synology/ds109/ds109.c: In function 'reset_misc':
>> > > ./arch/arm/include/asm/arch/kw88f6281.h:18:43: warning: implicit
>> > > declaration of function 'readl' [-Wimplicit-function-declaration]
>> > >    18 | #define CONFIG_SYS_TCLK
>> > > ((readl(CONFIG_SAR_REG) & BIT(21)) ? \
>> > >       |                                           ^~~~~
>> > > include/configs/mv-common.h:36:41: note: in expansion of macro
>> > > 'CONFIG_SYS_TCLK'
>> > >    36 | #define CONFIG_SYS_NS16550_CLK          CONFIG_SYS_TCLK
>> > >       |                                         ^~~~~~~~~~~~~~~
>> > > board/Synology/ds109/ds109.c:111:36: note: in expansion of macro
>> > > 'CONFIG_SYS_NS16550_CLK'
>> > >   111 |                                    CONFIG_SYS_NS16550_CLK,
>> > > 9600);
>> > >       |                                    ^~~~~~~~~~~~~~~~~~~~~~
>> > > /opt/kernel.org/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ld.bfd:
>> > > board/Synology/ds109/ds109.o: in function `reset_misc':
>> > > /home/stefan/git/u-boot/u-boot-marvell/board/Synology/ds109/ds109.c:111:
>> > > undefined reference to `readl'
>> > > make: *** [Makefile:1823: u-boot] Error 1
>> > >
>> > > Could you please take a look and fix this?
>> >
>> > I guess soc.h should also include <asm/io.h> because now it is
>> > using that hidden readl().
>> 
>> ..which isn't working because it somehow finds its way to the
>> hosttools. Hum.
> 
> Or you can include it in ds109/ds109.c file.

And maybe other files, too. Mh. Somehow this feels wrong, but as we
cannot include it in the soc.h I don't see another possibility.

-michael

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 00/22] board: lsxl: major update and DM conversion
  2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
                   ` (22 preceding siblings ...)
  2022-08-22  7:13 ` [PATCH 00/22] board: lsxl: major update and DM conversion Stefan Roese
@ 2022-08-23 15:01 ` Stefan Roese
  2022-08-23 15:04   ` Michael Walle
  23 siblings, 1 reply; 36+ messages in thread
From: Stefan Roese @ 2022-08-23 15:01 UTC (permalink / raw)
  To: Michael Walle; +Cc: u-boot

On 17.08.22 21:37, Michael Walle wrote:
> Convert the Buffalo Linkstation LS-CHLv2 and XHL boards to DM_GPIO,
> DM_ETH, DM_SERIAL and CONFIG_TIMER.
> 
> Patches 01-02 fix TCLK handling on the kirkwood SoC if the clock is
> 166MHz.
> Patches 03-04 add CONFIG_TIMER support for kirkwood/mvebu.
> Patches 05-21 will then update the lsxl board
> 
> Michael Walle (21):
>    time: move the CONFIG_SYS_TIMER_RATE handling to the compiler
>    arm: kirkwood: make it CONFIG_TIMER aware
>    timer: add orion-timer support
>    button: gpio: add DM_GPIO dependency
>    board: lsxl: limit size to 384kiB
>    board: lsxl: remove unused features
>    board: lsxl: remove eraseenv script
>    board: lsxl: remove CONFIG_ENV_OVERWRITE
>    board: lsxl: remove unused header files
>    board: lsxl: automatically select CONFIG_MISC_INIT_R
>    board: lsxl: use CONFIG_DEFAULT_FDT_FILE
>    board: lsxl: reorder image loading and remove ramdisk_len
>    board: lsxl: use proper *_r variables
>    board: lsxl: enable ATAGS support
>    board: lsxl: make last resort recovery more reliable
>    board: lsxl: convert to DM_GPIO
>    board: lsxl: convert to DM_ETH
>    board: lsxl: convert to DM_SERIAL
>    board: lsxl: convert to CONFIG_TIMER
>    board: lsxl: disable eth0
>    board: lsxl: update the README
> 
> Pali Rohár (1):
>    arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register
> 
>   arch/arm/dts/kirkwood-lschlv2-u-boot.dtsi     |  13 ++
>   arch/arm/dts/kirkwood-lsxhl-u-boot.dtsi       |  13 ++
>   arch/arm/mach-kirkwood/Kconfig                |   2 +
>   arch/arm/mach-kirkwood/include/mach/config.h  |   2 +
>   .../mach-kirkwood/include/mach/kw88f6281.h    |   3 +-
>   arch/arm/mach-kirkwood/include/mach/soc.h     |   2 +
>   arch/arm/mach-mvebu/Makefile                  |   3 +
>   board/buffalo/lsxl/README                     |  32 ++--
>   board/buffalo/lsxl/lsxl.c                     | 165 +++++++++++-------
>   configs/lschlv2_defconfig                     |  31 +++-
>   configs/lsxhl_defconfig                       |  31 +++-
>   drivers/button/Kconfig                        |   1 +
>   drivers/timer/Kconfig                         |   6 +
>   drivers/timer/Makefile                        |   1 +
>   drivers/timer/orion-timer.c                   |  63 +++++++
>   include/configs/lsxl.h                        |  76 +++-----
>   lib/time.c                                    |  15 +-
>   17 files changed, 300 insertions(+), 159 deletions(-)
>   create mode 100644 arch/arm/dts/kirkwood-lschlv2-u-boot.dtsi
>   create mode 100644 arch/arm/dts/kirkwood-lsxhl-u-boot.dtsi
>   create mode 100644 drivers/timer/orion-timer.c
> 

Applied to u-boot-marvell/master, with my small fix for the ds109
board

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 00/22] board: lsxl: major update and DM conversion
  2022-08-23 15:01 ` Stefan Roese
@ 2022-08-23 15:04   ` Michael Walle
  0 siblings, 0 replies; 36+ messages in thread
From: Michael Walle @ 2022-08-23 15:04 UTC (permalink / raw)
  To: Stefan Roese; +Cc: u-boot

Am 2022-08-23 17:01, schrieb Stefan Roese:
> Applied to u-boot-marvell/master, with my small fix for the ds109
> board

Great! Thanks, Stefan.

-michael

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2022-08-23 15:04 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-17 19:37 [PATCH 00/22] board: lsxl: major update and DM conversion Michael Walle
2022-08-17 19:37 ` [PATCH 01/22] time: move the CONFIG_SYS_TIMER_RATE handling to the compiler Michael Walle
2022-08-17 19:51   ` Pali Rohár
2022-08-17 19:37 ` [PATCH 02/22] arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register Michael Walle
2022-08-23  5:02   ` Stefan Roese
2022-08-23  8:17     ` michael
2022-08-23  8:24       ` michael
2022-08-23  8:47         ` Pali Rohár
2022-08-23  8:51           ` Stefan Roese
2022-08-23  8:51           ` michael
2022-08-23  8:46       ` Pali Rohár
2022-08-17 19:37 ` [PATCH 03/22] arm: kirkwood: make it CONFIG_TIMER aware Michael Walle
2022-08-17 19:51   ` Pali Rohár
2022-08-17 19:37 ` [PATCH 04/22] timer: add orion-timer support Michael Walle
2022-08-17 19:52   ` Pali Rohár
2022-08-17 19:37 ` [PATCH 05/22] button: gpio: add DM_GPIO dependency Michael Walle
2022-08-17 19:37 ` [PATCH 06/22] board: lsxl: limit size to 384kiB Michael Walle
2022-08-17 19:37 ` [PATCH 07/22] board: lsxl: remove unused features Michael Walle
2022-08-17 19:37 ` [PATCH 08/22] board: lsxl: remove eraseenv script Michael Walle
2022-08-17 19:37 ` [PATCH 09/22] board: lsxl: remove CONFIG_ENV_OVERWRITE Michael Walle
2022-08-17 19:37 ` [PATCH 10/22] board: lsxl: remove unused header files Michael Walle
2022-08-17 19:37 ` [PATCH 11/22] board: lsxl: automatically select CONFIG_MISC_INIT_R Michael Walle
2022-08-17 19:37 ` [PATCH 12/22] board: lsxl: use CONFIG_DEFAULT_FDT_FILE Michael Walle
2022-08-17 19:38 ` [PATCH 13/22] board: lsxl: reorder image loading and remove ramdisk_len Michael Walle
2022-08-17 19:38 ` [PATCH 14/22] board: lsxl: use proper *_r variables Michael Walle
2022-08-17 19:38 ` [PATCH 15/22] board: lsxl: enable ATAGS support Michael Walle
2022-08-17 19:38 ` [PATCH 16/22] board: lsxl: make last resort recovery more reliable Michael Walle
2022-08-17 19:38 ` [PATCH 17/22] board: lsxl: convert to DM_GPIO Michael Walle
2022-08-17 19:38 ` [PATCH 18/22] board: lsxl: convert to DM_ETH Michael Walle
2022-08-17 19:38 ` [PATCH 19/22] board: lsxl: convert to DM_SERIAL Michael Walle
2022-08-17 19:38 ` [PATCH 20/22] board: lsxl: convert to CONFIG_TIMER Michael Walle
2022-08-17 19:38 ` [PATCH 21/22] board: lsxl: disable eth0 Michael Walle
2022-08-17 19:38 ` [PATCH 22/22] board: lsxl: update the README Michael Walle
2022-08-22  7:13 ` [PATCH 00/22] board: lsxl: major update and DM conversion Stefan Roese
2022-08-23 15:01 ` Stefan Roese
2022-08-23 15:04   ` Michael Walle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.