summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-10-11 13:49:27 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-10-12 14:17:52 +0200
commit749b0b8104af277d330b24cfc6f0f1bf4678acf4 (patch)
tree0c1d725cedfe41fe2fbc5c962a83dacc48dd0ab1
parenta471c714fa64241c30cc7db3bee50a104643514c (diff)
downloadbarebox-749b0b8104af277d330b24cfc6f0f1bf4678acf4.tar.gz
barebox-749b0b8104af277d330b24cfc6f0f1bf4678acf4.tar.xz
ARM: start: drop support for machine type casted to boarddata pointer
Commit 84d28cec7f49 ("ARM: add a machine number mechanism for boarddata") added in 2015 added a struct barebox_arm_boarddata mechanism for PBL to pass machine type to barebox proper without going the legacy router of casting the machine type integer to a pointer directly. The legacy way with casting was mostly broken two years ago with commit 390bc7834ffc ("ARM: start: check for machine type last"). Only user that complained about it was using an in-tree board that has in the meantime been fixed to use struct barebox_arm_boarddata instead. Take this as indication that the code is dead and can be safely removed. This may introduce regressions for boards that happened to work, despite their machine type integer being dereferenced as a pointer. If you happen to have such a board, please pass a pointer to a struct barebox_arm_boarddata instead. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Tested-by: Bastian Krause <bst@pengutronix.de> Link: https://lore.barebox.org/20221011114927.546670-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/cpu/start.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
index 672f26e006..f9b617aa85 100644
--- a/arch/arm/cpu/start.c
+++ b/arch/arm/cpu/start.c
@@ -189,18 +189,6 @@ __noreturn __no_sanitize_address void barebox_non_pbl_start(unsigned long membas
} else if (blob_is_arm_boarddata(boarddata)) {
totalsize = sizeof(struct barebox_arm_boarddata);
name = "machine type";
- } else if ((unsigned long)boarddata < 8192) {
- struct barebox_arm_boarddata *bd;
- uint32_t machine_type = (unsigned long)boarddata;
- unsigned long mem = arm_mem_boarddata(membase, endmem,
- sizeof(*bd));
- pr_debug("found machine type %d in boarddata\n",
- machine_type);
- bd = barebox_boarddata = (void *)mem;
- barebox_boarddata_size = sizeof(*bd);
- bd->magic = BAREBOX_ARM_BOARDDATA_MAGIC;
- bd->machine = machine_type;
- malloc_end = mem;
}
if (totalsize) {