From: Ethan Nelson-Moore <enelsonmoore@gmail.com>
To: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org
Cc: Russell King <linux@armlinux.org.uk>,
Ethan Nelson-Moore <enelsonmoore@gmail.com>,
Aaro Koskinen <aaro.koskinen@iki.fi>,
Andreas Kemnade <andreas@kemnade.info>,
Kevin Hilman <khilman@baylibre.com>,
Roger Quadros <rogerq@kernel.org>,
Tony Lindgren <tony@atomide.com>,
Andrew Morton <akpm@linux-foundation.org>,
Jiri Bohac <jbohac@suse.cz>
Subject: [PATCH] ARM: move the only use of machine_desc.reboot_mode into mach-omap2
Date: Sun, 10 May 2026 19:18:00 -0700 [thread overview]
Message-ID: <20260511021806.180107-1-enelsonmoore@gmail.com> (raw)
struct machine_desc defines a reboot_mode field which is only set by
mach-omap2. Simplify the code and make it more generic by moving the
code to set reboot_mode from arch/arm/kernel/setup.c into mach-omap2.
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
arch/arm/include/asm/mach/arch.h | 1 -
arch/arm/kernel/setup.c | 3 ---
arch/arm/mach-omap2/board-generic.c | 6 ------
arch/arm/mach-omap2/io.c | 7 +++++++
4 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
index 2b18a258204d..d4688cd1f080 100644
--- a/arch/arm/include/asm/mach/arch.h
+++ b/arch/arm/include/asm/mach/arch.h
@@ -40,7 +40,6 @@ struct machine_desc {
unsigned char reserve_lp0 :1; /* never has lp0 */
unsigned char reserve_lp1 :1; /* never has lp1 */
unsigned char reserve_lp2 :1; /* never has lp2 */
- enum reboot_mode reboot_mode; /* default restart mode */
unsigned l2c_aux_val; /* L2 cache aux value */
unsigned l2c_aux_mask; /* L2 cache aux mask */
void (*l2c_write_sec)(unsigned long, unsigned);
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 0bfd66c7ada0..6430646a46bf 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -1123,9 +1123,6 @@ void __init setup_arch(char **cmdline_p)
machine_name = mdesc->name;
dump_stack_set_arch_desc("%s", mdesc->name);
- if (mdesc->reboot_mode != REBOOT_HARD)
- reboot_mode = mdesc->reboot_mode;
-
setup_initial_init_mm(_text, _etext, _edata, _end);
/* populate cmd_line too for later use, preserving boot_command_line */
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 68e0baad2bbf..fde6ccb3df6e 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -246,12 +246,6 @@ DT_MACHINE_START(AM33XX_DT, "Generic AM33XX (Flattened Device Tree)")
.init_time = omap_init_time_of,
.dt_compat = am33xx_boards_compat,
.restart = am33xx_restart,
- /*
- * Historically am33xx supported only REBOOT_WARM even though default
- * reboot_mode was REBOOT_COLD. Reflect legacy de-facto behaviour in
- * SYSFS.
- */
- .reboot_mode = REBOOT_WARM,
MACHINE_END
#endif
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 14ec3f78000b..26a12d083dce 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -15,6 +15,7 @@
*/
#include <linux/module.h>
#include <linux/kernel.h>
+#include <linux/reboot.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/clk.h>
@@ -546,6 +547,12 @@ void __init ti816x_init_early(void)
#ifdef CONFIG_SOC_AM33XX
void __init am33xx_init_early(void)
{
+ /*
+ * Historically am33xx supported only REBOOT_WARM even though default
+ * reboot_mode was REBOOT_COLD. Reflect legacy de-facto behaviour in
+ * SYSFS.
+ */
+ reboot_mode = REBOOT_WARM;
omap2_set_globals_tap(AM335X_CLASS,
AM33XX_L4_WK_IO_ADDRESS(AM33XX_TAP_BASE));
omap2_control_base_init();
--
2.43.0
reply other threads:[~2026-05-11 2:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260511021806.180107-1-enelsonmoore@gmail.com \
--to=enelsonmoore@gmail.com \
--cc=aaro.koskinen@iki.fi \
--cc=akpm@linux-foundation.org \
--cc=andreas@kemnade.info \
--cc=jbohac@suse.cz \
--cc=khilman@baylibre.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=rogerq@kernel.org \
--cc=tony@atomide.com \
/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 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.