arm: mvebu: Updates for xcat3
Subsystems (5)
cover arm: mvebu: Updates for xcat3
This series fixes an issue I was seeing on some xcat3 boards. I've also included a new board that we've had in a downstream fork for some time.
Chris Packham (3):
mtd: nand: pxa3xx: Use pr_err() in some places
arm: mvebu: db-xc3-24g4xg: Remove marvell,nand-keep-config
arm: mvebu: Add Allied Telesis x220
arch/arm/dts/Makefile | 1 + arch/arm/dts/armada-xp-atl-x220.dts | 162 ++++++++++++++++++ .../dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi | 1 - arch/arm/mach-mvebu/Kconfig | 7 + board/alliedtelesis/x220/.gitattributes | 1 + board/alliedtelesis/x220/.gitignore | 1 + board/alliedtelesis/x220/MAINTAINERS | 7 + board/alliedtelesis/x220/Makefile | 14 ++ board/alliedtelesis/x220/README | 4 + board/alliedtelesis/x220/binary.0 | Bin 0 -> 423 bytes board/alliedtelesis/x220/kwbimage.cfg.in | 12 ++ board/alliedtelesis/x220/x220.c | 67 ++++++++ configs/x220_defconfig | 76 ++++++++ drivers/mtd/nand/raw/pxa3xx_nand.c | 9 +- include/configs/x220.h | 20 +++ 15 files changed, 375 insertions(+), 7 deletions(-) create mode 100644 arch/arm/dts/armada-xp-atl-x220.dts create mode 100644 board/alliedtelesis/x220/.gitattributes create mode 100644 board/alliedtelesis/x220/.gitignore create mode 100644 board/alliedtelesis/x220/MAINTAINERS create mode 100644 board/alliedtelesis/x220/Makefile create mode 100644 board/alliedtelesis/x220/README create mode 100644 board/alliedtelesis/x220/binary.0 create mode 100644 board/alliedtelesis/x220/kwbimage.cfg.in create mode 100644 board/alliedtelesis/x220/x220.c create mode 100644 configs/x220_defconfig create mode 100644 include/configs/x220.h
Signature · 1 line
2.52.0
PATCH 1/3 mtd: nand: pxa3xx: Use pr_err() in some places
info->controller.active is not initialised so the dev_err() call ends up dereferencing a null pointer causing a crash instead of outputting the error. Use pr_err() instead as there isn't a convenient dev in the places info->controller.active->mtd.dev was being used.
--- drivers/mtd/nand/raw/pxa3xx_nand.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/mtd/nand/raw/pxa3xx_nand.c +4 -7
@@ -588,8 +588,7 @@ static void drain_fifo(struct pxa3xx_nand_info *info, void *data, int len) ts =get_timer (0 );while (!(nand_readl (info,NDSR ) &NDSR_RDDREQ )) {if (get_timer (ts) >TIMEOUT_DRAIN_FIFO ) { -dev_err (info->controller.active->mtd.dev, -"Timeout on RDDREQ while draining the FIFO\n" ); +pr_err ("Timeout on RDDREQ while draining the FIFO\n" );return ; } }
@@ -641,8 +640,7 @@ static void handle_data_pio(struct pxa3xx_nand_info *info) DIV_ROUND_UP(info->step_spare_size, 4));break ;default : -dev_err (info->controller.active->mtd.dev, -"%s: invalid state %d\n" , __func__, info->state); +pr_err ("%s: invalid state %d\n" , __func__, info->state);BUG (); }
@@ -1560,9 +1558,8 @@ static int pxa_ecc_init(struct pxa3xx_nand_info *info, ecc->size =512 ;if (ecc_stepsize !=512 || !(nfc_layouts[i].strength)) { -dev_err (info->controller.active->mtd.dev, -"ECC strength %d at page size %d is not supported\n" , - strength, page_size); +pr_err ("ECC strength %d at page size %d is not supported\n" , + strength, page_size);return -ENODEV ; }
Signature · 1 line
2.52.0
PATCH 2/3 arm: mvebu: db-xc3-24g4xg: Remove marvell, nand-keep-config
In reply to Chris Packhamnand-keep-config is used to retain the NAND controller configuration from an earlier boot stage. In U-Boot's case there isn't an earlier boot stage so reconfiguring the NAND controller is required.
--- arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi | 1 - 1 file changed, 1 deletion(-)
arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi +0 -1
@@ -5,7 +5,6 @@ status = "okay"; label = "pxa3xx_nand-0"; nand-rb = <0>; - marvell,nand-keep-config; nand-on-flash-bbt; nand-ecc-strength = <4>; nand-ecc-step-size = <512>;
Signature · 1 line
2.52.0
PATCH 3/3 arm: mvebu: Add Allied Telesis x220
In reply to Chris PackhamAdd the Allied Telesis x220 board. There are a number of other variants with the same CPU block that are sold under some different brand names but the x220 was first.
The x220 uses the AlleyCat3 switch chip with integrated ARMv7 CPU. Because of this it is reliant on a binary blob for the DDR training. In upstream u-boot this is replaced by an empty file.
--- arch/arm/dts/Makefile | 1 + arch/arm/dts/armada-xp-atl-x220.dts | 162 +++++++++++++++++++++++ arch/arm/mach-mvebu/Kconfig | 7 + board/alliedtelesis/x220/.gitattributes | 1 + board/alliedtelesis/x220/.gitignore | 1 + board/alliedtelesis/x220/MAINTAINERS | 7 + board/alliedtelesis/x220/Makefile | 14 ++ board/alliedtelesis/x220/README | 4 + board/alliedtelesis/x220/binary.0 | Bin 0 -> 423 bytes board/alliedtelesis/x220/kwbimage.cfg.in | 12 ++ board/alliedtelesis/x220/x220.c | 67 ++++++++++ configs/x220_defconfig | 76 +++++++++++ include/configs/x220.h | 20 +++ 13 files changed, 372 insertions(+) create mode 100644 arch/arm/dts/armada-xp-atl-x220.dts create mode 100644 board/alliedtelesis/x220/.gitattributes create mode 100644 board/alliedtelesis/x220/.gitignore create mode 100644 board/alliedtelesis/x220/MAINTAINERS create mode 100644 board/alliedtelesis/x220/Makefile create mode 100644 board/alliedtelesis/x220/README create mode 100644 board/alliedtelesis/x220/binary.0 create mode 100644 board/alliedtelesis/x220/kwbimage.cfg.in create mode 100644 board/alliedtelesis/x220/x220.c create mode 100644 configs/x220_defconfig create mode 100644 include/configs/x220.h
arch/arm/dts/Makefile +1 -0
@@ -155,6 +155,7 @@ dtb-$(CONFIG_ARCH_MVEBU) += \ armada-388-gp.dtb \ armada-388-helios4.dtb \ armada-38x-controlcenterdc.dtb \ + armada-xp-atl-x220.dtb \ armada-xp-crs305-1g-4s.dtb \ armada-xp-crs305-1g-4s-bit.dtb \ armada-xp-crs326-24g-2s.dtb \
arch/arm/dts/armada-xp-atl-x220.dts new file +162 -0
162 lines not on this page · raw message
arch/arm/mach-mvebu/Kconfig +7 -0
@@ -226,6 +226,10 @@ config TARGET_X240 select ALLEYCAT_5 imply BOOTSTD_DEFAULTS +config TARGET_X220 + bool "Support Allied Telesis x220" + select 98DX3336 + config TARGET_DB_XC3_24G4XG bool "Support DB-XC3-24G4XG" select 98DX3336
@@ -310,6 +314,7 @@ config SYS_BOARD default "x530" if TARGET_X530 default "x250" if TARGET_X250 default "x240" if TARGET_X240 + default "x220" if TARGET_X220 default "db-xc3-24g4xg" if TARGET_DB_XC3_24G4XG default "crs3xx-98dx3236" if TARGET_CRS3XX_98DX3236 default "mvebu_alleycat-5" if TARGET_MVEBU_ALLEYCAT5
@@ -335,6 +340,7 @@ config SYS_CONFIG_NAME default "x530" if TARGET_X530 default "x250" if TARGET_X250 default "x240" if TARGET_X240 + default "x220" if TARGET_X220 default "db-xc3-24g4xg" if TARGET_DB_XC3_24G4XG default "crs3xx-98dx3236" if TARGET_CRS3XX_98DX3236 default "mvebu_alleycat-5" if TARGET_MVEBU_ALLEYCAT5
@@ -360,6 +366,7 @@ config SYS_VENDOR default "alliedtelesis" if TARGET_X530 default "alliedtelesis" if TARGET_X250 default "alliedtelesis" if TARGET_X240 + default "alliedtelesis" if TARGET_X220 default "mikrotik" if TARGET_CRS3XX_98DX3236 default "Marvell" if TARGET_MVEBU_ALLEYCAT5
board/alliedtelesis/x220/.gitattributes new file +1 -0
@@ -0,0 +1 @@ +binary.0 binary
board/alliedtelesis/x220/.gitignore new file +1 -0
@@ -0,0 +1 @@ +kwbimage.cfg
board/alliedtelesis/x220/MAINTAINERS new file +7 -0
@@ -0,0 +1,7 @@ +x220 BOARD +M: Chris Packham <[email protected]> +S: Maintained +F: board/alliedtelesis/x220 +F: include/configs/x220.h +F: configs/x220_defconfig +F: arch/arm/dts/armada-xp-atl-x220.dts
board/alliedtelesis/x220/Makefile new file +14 -0
@@ -0,0 +1,14 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2025 Allied Telesis Labs + +obj-y := x220.o +extra-y := kwbimage.cfg + +quiet_cmd_sed = SED $@ + cmd_sed = sed $(SEDFLAGS_$(@F)) $< >$(dir $@)$(@F) + +SEDFLAGS_kwbimage.cfg =-e "s|^BINARY.*|BINARY $(srctree)/$(@D)/binary.0 0000005b 00000068|" +$(obj)/kwbimage.cfg: $(src)/kwbimage.cfg.in include/autoconf.mk \ + include/config/auto.conf + $(call if_changed,sed)
board/alliedtelesis/x220/README new file +4 -0
@@ -0,0 +1,4 @@ +To generate binary.0 from Marvell's bin_hdr.elf use the following command + + arm-softfloat-linux-gnueabi-objcopy -S -O binary bin_hdr.elf \ + board/alliedtelesis/x220/binary.0
board/alliedtelesis/x220/binary.0 new file binary +0 -0
board/alliedtelesis/x220/kwbimage.cfg.in new file +12 -0
@@ -0,0 +1,12 @@ +# +# Copyright (C) 2025 Allied Telesis Labs +# + +# Armada XP uses version 1 image format +VERSION 1 + +# Boot Media configurations +BOOT_FROM spi + +# Binary Header (bin_hdr) with DDR3 training code +BINARY board/alliedtelesis/x220/binary.0 0000005b 00000068
board/alliedtelesis/x220/x220.c new file +67 -0
67 lines not on this page · raw message
configs/x220_defconfig new file +76 -0
76 lines not on this page · raw message
include/configs/x220.h new file +20 -0
@@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (C) 2025 Allied Telesis Labs +*/ + +#ifndef _CONFIG_X220_H +#define _CONFIG_X220_H + +/* Keep device tree and initrd in lower memory so the kernel can access them */ +#define CFG_EXTRA_ENV_SETTINGS \ + "fdt_high=0x10000000\0" \ + "initrd_high=0x10000000\0" + +/* +* mv-common.h should be defined after CMD configs since it used them +* to enable certain macros +*/ +#include "mv-common.h" + +#endif /* _CONFIG_X220_H */
Signature · 1 line
2.52.0