From: Sascha Hauer <s.hauer@pengutronix.de>
To: "open list:BAREBOX" <barebox@lists.infradead.org>
Subject: [PATCH v2 18/20] ARM: am625-sk: cleanup board entry
Date: Wed, 12 Feb 2025 15:09:31 +0100 [thread overview]
Message-ID: <20250212-k3-emmc-v2-18-8dd1bb0ce60a@pengutronix.de> (raw)
In-Reply-To: <20250212-k3-emmc-v2-0-8dd1bb0ce60a@pengutronix.de>
We used to genrate a Linux Kernel compatible image that can be started
from U-Boot. This is no longer necessary as we have full 1st stage
support now in barebox. A FIT image to be started from U-Boot can still
be generated with BOARD_GENERIC_FIT.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/am625-sk/Makefile | 1 -
arch/arm/boards/am625-sk/entry.S | 29 -----------------------------
arch/arm/boards/am625-sk/lowlevel.c | 13 +++----------
3 files changed, 3 insertions(+), 40 deletions(-)
diff --git a/arch/arm/boards/am625-sk/Makefile b/arch/arm/boards/am625-sk/Makefile
index 8c45b1e154..8cba450528 100644
--- a/arch/arm/boards/am625-sk/Makefile
+++ b/arch/arm/boards/am625-sk/Makefile
@@ -1,4 +1,3 @@
pbl-y += lowlevel.o
obj-y += board.o
-pbl-$(CONFIG_MACH_K3_CORTEX_A) += entry.o
pbl-$(CONFIG_MACH_K3_CORTEX_R5) += entry-r5.o am625-sk-ddr.o am625sip-sk-ddr.o
diff --git a/arch/arm/boards/am625-sk/entry.S b/arch/arm/boards/am625-sk/entry.S
deleted file mode 100644
index 5fc9297d50..0000000000
--- a/arch/arm/boards/am625-sk/entry.S
+++ /dev/null
@@ -1,29 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-#include <linux/linkage.h>
-#include <asm/barebox-arm64.h>
-#include <asm/image.h>
-
-#define IMAGE_FLAGS \
- (ARM64_IMAGE_FLAG_PAGE_SIZE_4K << ARM64_IMAGE_FLAG_PAGE_SIZE_SHIFT) | \
- (ARM64_IMAGE_FLAG_PHYS_BASE << ARM64_IMAGE_FLAG_PHYS_BASE_SHIFT)
-
-.section .text_head_entry_start_vivavis_cu33d
-ENTRY("start_am625_sk")
- adr x1, 0 /* code0 */
- b 2f /* code1 */
- .xword 0x80000 /* Image load offset */
- .xword _barebox_image_size /* Effective Image size */
- .xword IMAGE_FLAGS /* Kernel flags */
- .xword 0 /* reserved */
- .xword 0 /* reserved */
- .xword 0 /* reserved */
- .ascii ARM64_IMAGE_MAGIC /* magic number */
- .int 0 /* reserved (PE-COFF offset) */
- .asciz "barebox" /* unused for now */
-2:
- mov sp, x1
- /* Stack now grows into the 0x80000 image load offset specified
- * above. This is more than enough until FDT /memory is decoded.
- */
- b am625_sk
-ENTRY_PROC_END(start_am625_sk)
diff --git a/arch/arm/boards/am625-sk/lowlevel.c b/arch/arm/boards/am625-sk/lowlevel.c
index 5c1c38e325..10da8731ca 100644
--- a/arch/arm/boards/am625-sk/lowlevel.c
+++ b/arch/arm/boards/am625-sk/lowlevel.c
@@ -14,14 +14,10 @@
#include "ddr.h"
-/* Called from assembly */
-void am625_sk(void *dtb);
-
-static noinline void am625_sk_continue(void *dtb)
+static noinline void am625_sk_continue(void)
{
unsigned long membase = 0x80000000, memsize;
extern char __dtb_z_k3_am625_sk_start[];
- unsigned int size;
memsize = am625_sdram_size();
@@ -33,13 +29,10 @@ static noinline void am625_sk_continue(void *dtb)
if (memsize == SZ_512M)
memsize = SZ_512M - 0x04000000; /* substract space needed for TF-A, OP-TEE, ... */
- if (blob_is_valid_fdt_ptr(dtb, membase, memsize, &size))
- handoff_data_add(HANDOFF_DATA_EXTERNAL_DT, dtb, size);
-
barebox_arm_entry(membase, memsize, __dtb_z_k3_am625_sk_start);
}
-void am625_sk(void *dtb)
+ENTRY_FUNCTION_WITHSTACK(start_am625_sk, 0x80800000, r0, r1, r2)
{
putc_ll('>');
@@ -49,7 +42,7 @@ void am625_sk(void *dtb)
setup_c();
- am625_sk_continue(dtb);
+ am625_sk_continue();
}
static noinline void am625_sk_r5_continue(void)
--
2.39.5
next prev parent reply other threads:[~2025-02-12 14:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-12 14:09 [PATCH v2 00/20] ARM: K3 updates Sascha Hauer
2025-02-12 14:09 ` [PATCH v2 01/20] ARM: k3: Add function to enable 32k crystal Sascha Hauer
2025-02-12 14:09 ` [PATCH v2 02/20] ARM: k3: add function to detect eMMC boot Sascha Hauer
2025-02-12 14:09 ` [PATCH v2 03/20] ARM: k3: do not mount /boot when booting from eMMC Sascha Hauer
2025-02-12 14:09 ` [PATCH v2 04/20] fip: drop typedefs Sascha Hauer
2025-02-12 14:09 ` [PATCH v2 05/20] fip: use linux list implementation Sascha Hauer
2025-02-12 14:09 ` [PATCH v2 06/20] fip: use uuid_equal() and uuid_is_null() Sascha Hauer
2025-02-12 14:09 ` [PATCH v2 07/20] fiptool: do not typedef structs Sascha Hauer
2025-02-12 14:09 ` [PATCH v2 08/20] fip: add fip_ prefix Sascha Hauer
2025-02-12 14:09 ` [PATCH v2 09/20] fip: add fip_image_open() Sascha Hauer
2025-02-12 14:09 ` [PATCH v2 10/20] ARM: k3: r5: add USB DFU and eMMC boot support Sascha Hauer
2025-02-12 14:09 ` [PATCH v2 11/20] ARM: am625-sk: enable 32k crystal Sascha Hauer
2025-02-12 14:09 ` [PATCH v2 12/20] mci: am654: parse generic mmc node properties Sascha Hauer
2025-02-12 14:09 ` [PATCH v2 13/20] ARM: k3: limit eMMC frequency to 26MHz Sascha Hauer
2025-02-12 14:09 ` [PATCH v2 14/20] ARM: k3: add eMMC barebox update handler Sascha Hauer
2025-02-12 14:09 ` [PATCH v2 15/20] ARM: am625-sk: put environment on eMMC when booting from it Sascha Hauer
2025-02-12 14:09 ` [PATCH v2 16/20] serial: omap: Use ttyS as Linux console name Sascha Hauer
2025-02-12 14:09 ` [PATCH v2 17/20] ARM: k3: remove beagleplay FIT image Sascha Hauer
2025-02-12 14:09 ` Sascha Hauer [this message]
2025-02-12 14:09 ` [PATCH v2 19/20] ARM: beagleplay: cleanup board entry Sascha Hauer
2025-02-12 14:09 ` [PATCH v2 20/20] ARM: k3: Add k3-r5_defconfig Sascha Hauer
2025-02-17 11:14 ` [PATCH v2 00/20] ARM: K3 updates Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250212-k3-emmc-v2-18-8dd1bb0ce60a@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox