ARM: move the only use of machine_desc.reboot_mode into mach-omap2
Subsystems (3)
PATCH 1/1 ARM: move the only use of machine_desc.reboot_mode into mach-omap2
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 <[email protected]>
--- 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(-)
arch/arm/include/asm/mach/arch.h +0 -1
@@ -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 );
arch/arm/kernel/setup.c +0 -3
@@ -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 */
arch/arm/mach-omap2/board-generic.c +0 -6
@@ -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
arch/arm/mach-omap2/io.c +7 -0
@@ -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 ();
Signature · 1 line
2.43.0