diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2024-09-05 13:49:49 +0200 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2024-11-12 13:03:20 +0900 |
commit | ee5e7f0e1dc28123109f4c0651328aa310a6a8e7 (patch) | |
tree | 2f1ced965af1ca82822b1b3aeb9471fd911d2978 | |
parent | ef42d5799ec6ac7e0b0bb13cfa9fe5be11f5bdd9 (diff) | |
download | linux-rpi-ee5e7f0e1dc28123109f4c0651328aa310a6a8e7.tar.gz linux-rpi-ee5e7f0e1dc28123109f4c0651328aa310a6a8e7.tar.bz2 linux-rpi-ee5e7f0e1dc28123109f4c0651328aa310a6a8e7.zip |
Revert "misc: add Tizen reboot notifier for passing reboot parameter"
Tizen specific inform-reboot kernel module has been moved to
linux-tizen-modules-source repository, so keeping a copy of it
in each kernel repository is not needed anymore.
This reverts commit c9458239ab7b0103ff1d94958eb1b9a97968f938.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ic73b4f6fc30ebb9699acbfa2bd98e0cf97ff6c7a
-rw-r--r-- | drivers/misc/Kconfig | 16 | ||||
-rw-r--r-- | drivers/misc/Makefile | 1 | ||||
-rw-r--r-- | drivers/misc/tizen-inform-reboot.c | 71 |
3 files changed, 0 insertions, 88 deletions
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 75cdf211be73..a76c6c9eca45 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -570,22 +570,6 @@ config TPS6594_PFSM This driver can also be built as a module. If so, the module will be called tps6594-pfsm. -config TIZEN_INFORM_REBOOT - bool "Tizen reboot parameter passing support" - default "n" - help - This enables support for passing reboot parameter through inform - partition. It is required to determine booting mode (e.g., fota or - normal). After passing reboot parameter, u-boot checks the contents - of inform file and then determines proper booting mode. - -config TIZEN_INFORM_PATH - depends on TIZEN_INFORM_REBOOT - string "Absolute path of inform file for passing reboot parameter" - help - This option determines the absolute path of inform file for passing - reboot parameter. - source "drivers/misc/c2port/Kconfig" source "drivers/misc/eeprom/Kconfig" source "drivers/misc/cb710/Kconfig" diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index 777161c64c2d..02bc5669370e 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -68,4 +68,3 @@ obj-$(CONFIG_TMR_MANAGER) += xilinx_tmr_manager.o obj-$(CONFIG_TMR_INJECT) += xilinx_tmr_inject.o obj-$(CONFIG_TPS6594_ESM) += tps6594-esm.o obj-$(CONFIG_TPS6594_PFSM) += tps6594-pfsm.o -obj-$(CONFIG_TIZEN_INFORM_REBOOT) += tizen-inform-reboot.o diff --git a/drivers/misc/tizen-inform-reboot.c b/drivers/misc/tizen-inform-reboot.c deleted file mode 100644 index f85386e8b7d2..000000000000 --- a/drivers/misc/tizen-inform-reboot.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Tizen reboot parameter passing notifier - * - * Written by: Junghoon Kim <jhoon20.kim@samsung.com> - * - * Copyright (C) 2017 Samsung Electronics Co., Ltd. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include <linux/notifier.h> -#include <linux/reboot.h> -#include <linux/syscalls.h> -#include <linux/file.h> -#include <linux/fcntl.h> -#include <linux/uaccess.h> - -static int inform_reboot_notifier(struct notifier_block *nb, - unsigned long val, void *buf) -{ - char *cmd = buf; - char *filename = CONFIG_TIZEN_INFORM_PATH; - struct file *file; - loff_t pos = 0; - - file = filp_open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0644); - if (!IS_ERR(file)) { - struct super_block *sb = file->f_path.dentry->d_sb; - - if (cmd) { - if (!strncmp(cmd, "fota", 4)) - cmd = "upgr"; - else if (!strncmp(cmd, "recovery", 8)) - cmd = "rcvr"; - else if (!strncmp(cmd, "download", 8)) - cmd = "dwnl"; - else - cmd = "ndef"; - } else - cmd = "norm"; - - kernel_write(file, cmd, strlen(cmd), &pos); - - down_read(&sb->s_umount); - sync_filesystem(sb); - up_read(&sb->s_umount); - - fput(file); - } else { - pr_err("Reboot parameter passing is failed.\n" - "Inform file path should be described correctly in config.\n"); - } - - return NOTIFY_DONE; -} - -static struct notifier_block nb_inform_reboot_block = { - .notifier_call = inform_reboot_notifier, - .priority = 256, -}; - -static int __init inform_reboot_init(void) -{ - /* to support reboot parameter passing */ - register_reboot_notifier(&nb_inform_reboot_block); - return 0; -} - -subsys_initcall(inform_reboot_init); |