You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
power: reset: reboot-mode: Register callback for kernel pre restart
This patch register boot mode into kernel pre restart call chain to support 'reset [cmd]' e.g. /# fiq Welcome to fiq debugger mode Enter ? to get command help debug> help FIQ Debugger commands: reset [<c>] Hard reset with command <c> debug> debug> reset loader DDR Version V1.04 20201030 DDR4, 328MHz BW=32 Col=10 Bk=4 BG=2 CS0 Row=16 CS=1 Die BW=16 Size=2048MB ... boot mode: loader ... RKUSB: LUN 0, dev 0, hwpart 0, sector 0x0, count 0x1d1f000 Change-Id: Ic1792bdd0262c77a09fd780c7ac3e6d912b09008 Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This commit is contained in:
@@ -153,6 +153,7 @@ int reboot_mode_register(struct reboot_mode_driver *reboot)
|
||||
reboot->reboot_notifier.notifier_call = reboot_mode_notify;
|
||||
reboot->panic_notifier.notifier_call = reboot_mode_panic_notify;
|
||||
register_reboot_notifier(&reboot->reboot_notifier);
|
||||
register_pre_restart_handler(&reboot->reboot_notifier);
|
||||
atomic_notifier_chain_register(&panic_notifier_list,
|
||||
&reboot->panic_notifier);
|
||||
ret = sysfs_create_file(kernel_kobj, &kobj_boot_mode.attr);
|
||||
|
||||
Reference in New Issue
Block a user