mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 02/13] ARM: mvebu: Use ENTRY_FUNCTION_HEAD
Date: Thu,  2 Mar 2023 12:15:55 +0100	[thread overview]
Message-ID: <20230302111606.1054037-3-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20230302111606.1054037-1-s.hauer@pengutronix.de>

Use ENTRY_FUNCTION_HEAD in the mvebu boards to customize the barebox
image header without having to hook into a generic include file.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/Kconfig                                    |  1 -
 arch/arm/boards/globalscale-guruplug/lowlevel.c     |  4 ++--
 arch/arm/boards/globalscale-mirabox/lowlevel.c      |  4 ++--
 arch/arm/boards/lenovo-ix4-300d/lowlevel.c          |  4 ++--
 arch/arm/boards/marvell-armada-xp-db/lowlevel.c     |  4 ++--
 arch/arm/boards/marvell-armada-xp-gp/lowlevel.c     |  4 ++--
 arch/arm/boards/netgear-rn104/lowlevel.c            |  4 ++--
 arch/arm/boards/netgear-rn2120/lowlevel.c           |  4 ++--
 arch/arm/boards/plathome-openblocks-a6/lowlevel.c   |  4 ++--
 arch/arm/boards/plathome-openblocks-ax3/lowlevel.c  |  4 ++--
 arch/arm/boards/solidrun-cubox/lowlevel.c           |  4 ++--
 arch/arm/boards/turris-omnia/lowlevel.c             |  4 ++--
 arch/arm/boards/usi-topkick/lowlevel.c              |  4 ++--
 arch/arm/mach-mvebu/include/mach/barebox-arm-head.h | 12 ++++--------
 14 files changed, 28 insertions(+), 33 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c5645c540e..1281b8be38 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -126,7 +126,6 @@ config ARCH_MVEBU
 	select CLKDEV_LOOKUP
 	select GPIOLIB
 	select HAS_DEBUG_LL
-	select HAVE_MACH_ARM_HEAD
 	select HAVE_PBL_MULTI_IMAGES
 	select HW_HAS_PCI
 	select MVEBU_MBUS
diff --git a/arch/arm/boards/globalscale-guruplug/lowlevel.c b/arch/arm/boards/globalscale-guruplug/lowlevel.c
index 964d3510ee..35b2150960 100644
--- a/arch/arm/boards/globalscale-guruplug/lowlevel.c
+++ b/arch/arm/boards/globalscale-guruplug/lowlevel.c
@@ -4,12 +4,12 @@
 #include <common.h>
 #include <linux/sizes.h>
 #include <asm/barebox-arm.h>
-#include <asm/barebox-arm-head.h>
+#include <mach/barebox-arm-head.h>
 #include <mach/lowlevel.h>
 
 extern char __dtb_kirkwood_guruplug_server_plus_bb_start[];
 
-ENTRY_FUNCTION(start_globalscale_guruplug, r0, r1, r2)
+ENTRY_FUNCTION_MVEBU(start_globalscale_guruplug, r0, r1, r2)
 {
 	void *fdt;
 
diff --git a/arch/arm/boards/globalscale-mirabox/lowlevel.c b/arch/arm/boards/globalscale-mirabox/lowlevel.c
index 094792d461..9d03dfd418 100644
--- a/arch/arm/boards/globalscale-mirabox/lowlevel.c
+++ b/arch/arm/boards/globalscale-mirabox/lowlevel.c
@@ -4,12 +4,12 @@
 #include <common.h>
 #include <linux/sizes.h>
 #include <asm/barebox-arm.h>
-#include <asm/barebox-arm-head.h>
+#include <mach/barebox-arm-head.h>
 #include <mach/lowlevel.h>
 
 extern char __dtb_armada_370_mirabox_bb_start[];
 
-ENTRY_FUNCTION(start_globalscale_mirabox, r0, r1, r2)
+ENTRY_FUNCTION_MVEBU(start_globalscale_mirabox, r0, r1, r2)
 {
 	void *fdt;
 
diff --git a/arch/arm/boards/lenovo-ix4-300d/lowlevel.c b/arch/arm/boards/lenovo-ix4-300d/lowlevel.c
index c0a695908f..2ca6c6b5f9 100644
--- a/arch/arm/boards/lenovo-ix4-300d/lowlevel.c
+++ b/arch/arm/boards/lenovo-ix4-300d/lowlevel.c
@@ -3,13 +3,13 @@
 
 #include <common.h>
 #include <asm/barebox-arm.h>
-#include <asm/barebox-arm-head.h>
+#include <mach/barebox-arm-head.h>
 #include <linux/sizes.h>
 #include <mach/lowlevel.h>
 
 extern char __dtb_armada_xp_lenovo_ix4_300d_bb_start[];
 
-ENTRY_FUNCTION(start_lenovo_ix4_300d, r0, r1, r2)
+ENTRY_FUNCTION_MVEBU(start_lenovo_ix4_300d, r0, r1, r2)
 {
 	void *fdt;
 
diff --git a/arch/arm/boards/marvell-armada-xp-db/lowlevel.c b/arch/arm/boards/marvell-armada-xp-db/lowlevel.c
index 4752bbf1b4..4850cf4c2f 100644
--- a/arch/arm/boards/marvell-armada-xp-db/lowlevel.c
+++ b/arch/arm/boards/marvell-armada-xp-db/lowlevel.c
@@ -7,13 +7,13 @@
 #include <common.h>
 #include <linux/sizes.h>
 #include <asm/barebox-arm.h>
-#include <asm/barebox-arm-head.h>
+#include <mach/barebox-arm-head.h>
 #include <mach/lowlevel.h>
 #include <io.h>
 
 extern char __dtb_armada_xp_db_bb_start[];
 
-ENTRY_FUNCTION(start_marvell_armada_xp_db, r0, r1, r2)
+ENTRY_FUNCTION_MVEBU(start_marvell_armada_xp_db, r0, r1, r2)
 {
 	void *fdt;
 	uint32_t reg;
diff --git a/arch/arm/boards/marvell-armada-xp-gp/lowlevel.c b/arch/arm/boards/marvell-armada-xp-gp/lowlevel.c
index 43b1ba8c9a..e6242e36a7 100644
--- a/arch/arm/boards/marvell-armada-xp-gp/lowlevel.c
+++ b/arch/arm/boards/marvell-armada-xp-gp/lowlevel.c
@@ -4,12 +4,12 @@
 #include <common.h>
 #include <linux/sizes.h>
 #include <asm/barebox-arm.h>
-#include <asm/barebox-arm-head.h>
+#include <mach/barebox-arm-head.h>
 #include <mach/lowlevel.h>
 
 extern char __dtb_armada_xp_gp_bb_start[];
 
-ENTRY_FUNCTION(start_marvell_armada_xp_gp, r0, r1, r2)
+ENTRY_FUNCTION_MVEBU(start_marvell_armada_xp_gp, r0, r1, r2)
 {
 	void *fdt;
 
diff --git a/arch/arm/boards/netgear-rn104/lowlevel.c b/arch/arm/boards/netgear-rn104/lowlevel.c
index c6c8e84023..5005129555 100644
--- a/arch/arm/boards/netgear-rn104/lowlevel.c
+++ b/arch/arm/boards/netgear-rn104/lowlevel.c
@@ -6,12 +6,12 @@
 
 #include <common.h>
 #include <asm/barebox-arm.h>
-#include <asm/barebox-arm-head.h>
+#include <mach/barebox-arm-head.h>
 #include <mach/lowlevel.h>
 
 extern char __dtb_armada_370_rn104_bb_start[];
 
-ENTRY_FUNCTION(start_netgear_rn104, r0, r1, r2)
+ENTRY_FUNCTION_MVEBU(start_netgear_rn104, r0, r1, r2)
 {
 	void *fdt;
 
diff --git a/arch/arm/boards/netgear-rn2120/lowlevel.c b/arch/arm/boards/netgear-rn2120/lowlevel.c
index c78d3644b5..f88f46c037 100644
--- a/arch/arm/boards/netgear-rn2120/lowlevel.c
+++ b/arch/arm/boards/netgear-rn2120/lowlevel.c
@@ -3,14 +3,14 @@
 
 #include <common.h>
 #include <asm/barebox-arm.h>
-#include <asm/barebox-arm-head.h>
+#include <mach/barebox-arm-head.h>
 #include <asm/io.h>
 #include <mach/lowlevel.h>
 #include <mach/common.h>
 
 extern char __dtb_armada_xp_rn2120_bb_start[];
 
-ENTRY_FUNCTION(start_netgear_rn2120, r0, r1, r2)
+ENTRY_FUNCTION_MVEBU(start_netgear_rn2120, r0, r1, r2)
 {
 	void *fdt;
 	void __iomem *base = mvebu_get_initial_int_reg_base();
diff --git a/arch/arm/boards/plathome-openblocks-a6/lowlevel.c b/arch/arm/boards/plathome-openblocks-a6/lowlevel.c
index a480c966a4..daa482dd4f 100644
--- a/arch/arm/boards/plathome-openblocks-a6/lowlevel.c
+++ b/arch/arm/boards/plathome-openblocks-a6/lowlevel.c
@@ -3,12 +3,12 @@
 #include <common.h>
 #include <linux/sizes.h>
 #include <asm/barebox-arm.h>
-#include <asm/barebox-arm-head.h>
+#include <mach/barebox-arm-head.h>
 #include <mach/lowlevel.h>
 
 extern char __dtb_kirkwood_openblocks_a6_bb_start[];
 
-ENTRY_FUNCTION(start_plathome_openblocks_a6, r0, r1, r2)
+ENTRY_FUNCTION_MVEBU(start_plathome_openblocks_a6, r0, r1, r2)
 {
 	void *fdt;
 
diff --git a/arch/arm/boards/plathome-openblocks-ax3/lowlevel.c b/arch/arm/boards/plathome-openblocks-ax3/lowlevel.c
index 42b291df9f..bab44590c7 100644
--- a/arch/arm/boards/plathome-openblocks-ax3/lowlevel.c
+++ b/arch/arm/boards/plathome-openblocks-ax3/lowlevel.c
@@ -4,12 +4,12 @@
 #include <common.h>
 #include <linux/sizes.h>
 #include <asm/barebox-arm.h>
-#include <asm/barebox-arm-head.h>
+#include <mach/barebox-arm-head.h>
 #include <mach/lowlevel.h>
 
 extern char __dtb_armada_xp_openblocks_ax3_4_bb_start[];
 
-ENTRY_FUNCTION(start_plathome_openblocks_ax3, r0, r1, r2)
+ENTRY_FUNCTION_MVEBU(start_plathome_openblocks_ax3, r0, r1, r2)
 {
 	void *fdt;
 
diff --git a/arch/arm/boards/solidrun-cubox/lowlevel.c b/arch/arm/boards/solidrun-cubox/lowlevel.c
index 94ed9a4fd7..5bcd0751fc 100644
--- a/arch/arm/boards/solidrun-cubox/lowlevel.c
+++ b/arch/arm/boards/solidrun-cubox/lowlevel.c
@@ -5,12 +5,12 @@
 #include <common.h>
 #include <linux/sizes.h>
 #include <asm/barebox-arm.h>
-#include <asm/barebox-arm-head.h>
+#include <mach/barebox-arm-head.h>
 #include <mach/lowlevel.h>
 
 extern char __dtb_dove_cubox_bb_start[];
 
-ENTRY_FUNCTION(start_solidrun_cubox, r0, r1, r2)
+ENTRY_FUNCTION_MVEBU(start_solidrun_cubox, r0, r1, r2)
 {
 	void *fdt;
 
diff --git a/arch/arm/boards/turris-omnia/lowlevel.c b/arch/arm/boards/turris-omnia/lowlevel.c
index b6520b5775..8ec2a0bf82 100644
--- a/arch/arm/boards/turris-omnia/lowlevel.c
+++ b/arch/arm/boards/turris-omnia/lowlevel.c
@@ -3,14 +3,14 @@
 
 #include <common.h>
 #include <asm/barebox-arm.h>
-#include <asm/barebox-arm-head.h>
+#include <mach/barebox-arm-head.h>
 #include <mach/lowlevel.h>
 
 #include <asm/io.h>
 
 extern char __dtb_armada_385_turris_omnia_bb_start[];
 
-ENTRY_FUNCTION(start_turris_omnia, r0, r1, r2)
+ENTRY_FUNCTION_MVEBU(start_turris_omnia, r0, r1, r2)
 {
 	void *fdt;
 
diff --git a/arch/arm/boards/usi-topkick/lowlevel.c b/arch/arm/boards/usi-topkick/lowlevel.c
index 0193deadbe..51aa29e047 100644
--- a/arch/arm/boards/usi-topkick/lowlevel.c
+++ b/arch/arm/boards/usi-topkick/lowlevel.c
@@ -4,12 +4,12 @@
 #include <common.h>
 #include <linux/sizes.h>
 #include <asm/barebox-arm.h>
-#include <asm/barebox-arm-head.h>
+#include <mach/barebox-arm-head.h>
 #include <mach/lowlevel.h>
 
 extern char __dtb_kirkwood_topkick_bb_start[];
 
-ENTRY_FUNCTION(start_usi_topkick, r0, r1, r2)
+ENTRY_FUNCTION_MVEBU(start_usi_topkick, r0, r1, r2)
 {
 	void *fdt;
 
diff --git a/arch/arm/mach-mvebu/include/mach/barebox-arm-head.h b/arch/arm/mach-mvebu/include/mach/barebox-arm-head.h
index 2ef3377402..72afd10005 100644
--- a/arch/arm/mach-mvebu/include/mach/barebox-arm-head.h
+++ b/arch/arm/mach-mvebu/include/mach/barebox-arm-head.h
@@ -3,7 +3,7 @@
 #include <linux/stringify.h>
 #include <mach/common.h>
 
-static inline void __barebox_arm_head(void)
+static inline void __barebox_mvebu_head(void)
 {
 	__asm__ __volatile__ (
 #ifdef CONFIG_THUMB2_BAREBOX
@@ -53,10 +53,6 @@ static inline void __barebox_arm_head(void)
 #endif
 	);
 }
-static inline void barebox_arm_head(void)
-{
-	__barebox_arm_head();
-	__asm__ __volatile__ (
-		"b barebox_arm_reset_vector\n"
-	);
-}
+
+#define ENTRY_FUNCTION_MVEBU(name, arg0, arg1, arg2) \
+	ENTRY_FUNCTION_HEAD(name, __barebox_mvebu_head, arg0, arg1, arg2)
-- 
2.30.2




  parent reply	other threads:[~2023-03-02 11:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-02 11:15 [PATCH 00/13] ARM: misc cleanups Sascha Hauer
2023-03-02 11:15 ` [PATCH 01/13] ARM: add ENTRY_FUNCTION_HEAD macro Sascha Hauer
2023-03-02 11:15 ` Sascha Hauer [this message]
2023-03-02 11:15 ` [PATCH 03/13] ARM: at91: Use ENTRY_FUNCTION_HEAD Sascha Hauer
2023-03-02 16:40   ` Ahmad Fatoum
2023-03-03  8:32     ` Sascha Hauer
2023-03-02 11:15 ` [PATCH 04/13] ARM: Drop HAVE_MACH_ARM_HEAD Sascha Hauer
2023-03-02 11:15 ` [PATCH 05/13] ARM: drop CONFIG_HAS_ASM_DEBUG_LL Sascha Hauer
2023-03-02 11:15 ` [PATCH 06/13] regulator: pfuze: remove unused include Sascha Hauer
2023-03-02 11:16 ` [PATCH 07/13] ARM: drop unused zynq code in Makefile Sascha Hauer
2023-03-02 11:16 ` [PATCH 08/13] ARM: drop unused mvebu " Sascha Hauer
2023-03-02 11:16 ` [PATCH 09/13] ARM: drop unused am35xx " Sascha Hauer
2023-03-02 11:16 ` [PATCH 10/13] ARM: Makefile: Drop board-y Sascha Hauer
2023-03-02 11:16 ` [PATCH 11/13] ARM: i.MX: Add missing include Sascha Hauer
2023-03-02 11:16 ` [PATCH 12/13] ARM: stm32mp_defconfig: Enable remaining boards Sascha Hauer
2023-03-02 11:16 ` [PATCH 13/13] mci: imx-esdhc-pbl: add missing include 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=20230302111606.1054037-3-s.hauer@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