From 26f3d9df87588eaf66fedd92cf70fcfc151316c7 Mon Sep 17 00:00:00 2001 From: YoungSoo Shin Date: Tue, 28 Apr 2026 16:13:15 +0900 Subject: [PATCH] ODROID-C5: gki: disable AMLOGIC_GKI_TOOL and fix compile error Signed-off-by: YoungSoo Shin Change-Id: I1ef1bd80d9aefc4ae7387f9dedb7db91057c406b --- drivers/amfc/amfc.c | 4 ++++ drivers/clk/meson/clk-common-init.c | 2 ++ drivers/cpufreq/aml_cpufreq.c | 2 ++ drivers/debug/aml_iotm.c | 2 ++ drivers/debug/aml_iotrace.c | 16 ++++++++++++++++ drivers/debug/ftrace_ramoops.c | 6 ++++++ drivers/debug/iotm_v1.c | 2 ++ drivers/debug/kprobes.c | 3 +++ drivers/debug/lockup.c | 8 ++++++++ drivers/debug/sched.c | 2 ++ drivers/drm/meson_crtc.c | 2 ++ drivers/drm/meson_drv.c | 2 ++ drivers/drm/meson_logo.c | 8 ++++++++ drivers/input/ir/meson_ir_main.c | 2 ++ drivers/media/common/vpu/vpu_clk.c | 2 ++ drivers/media/deinterlace/deinterlace.c | 2 ++ drivers/media/di_multi/deinterlace.c | 2 ++ drivers/media/enhancement/amdolby_vision/amdv.c | 2 ++ drivers/media/video_sink/video.c | 2 ++ drivers/media/vin/tvin/vdin/vdin_drv.c | 4 ++++ drivers/media/vin/tvin/vdin/vdin_drv.h | 2 ++ drivers/media/vout/eDPTX/dptx_vout.c | 2 ++ .../hdmi_tx_connector/hdmitx_boot_parameters.c | 2 ++ .../media/vout/hdmi_tx_connector/hdmitx_log.c | 2 ++ drivers/media/vout/lcd/backlight/lcd_bl.c | 2 ++ drivers/media/vout/lcd/lcd_vout.c | 2 ++ drivers/media/vout/vout_serve/dummy_venc.c | 2 ++ drivers/media/vout/vout_serve/vout2_serve.c | 2 ++ drivers/media/vout/vout_serve/vout3_serve.c | 2 ++ drivers/media/vout/vout_serve/vout_serve.c | 4 ++++ drivers/memory_debug/ddr_tool/ddr_bandwidth.c | 4 ++++ drivers/memory_debug/ddr_tool/dmc_monitor.c | 4 ++++ drivers/memory_debug/ramdump/ram_dump.c | 2 ++ drivers/mmc/host/meson-gx-mmc.c | 2 ++ drivers/pm/gx_pm.c | 4 ++++ drivers/pm/reboot.c | 2 ++ drivers/power/main.c | 2 ++ drivers/thermal/meson_tsensor.c | 2 ++ drivers/usb/crgdrdphy/phy-aml-crg-drd-usb2.c | 2 ++ .../usb/phy_meson_usb/phy-meson-aml-usb2-com.c | 2 ++ drivers/usb/usb_main.c | 2 ++ drivers/watchdog/meson_gxbb_wdt.c | 4 ++++ drivers/wireless/bluetooth/bt_device.c | 2 ++ drivers/wireless/wifi/wifi_dt.c | 2 ++ include/linux/amlogic/gki_module.h | 2 ++ sound/soc/amlogic/auge/vad/vad_open.c | 2 ++ 46 files changed, 137 insertions(+) diff --git a/drivers/amfc/amfc.c b/drivers/amfc/amfc.c index 1a12387a1..8bab3d28d 100644 --- a/drivers/amfc/amfc.c +++ b/drivers/amfc/amfc.c @@ -118,6 +118,7 @@ static unsigned int amfc_clk[] = { static unsigned int init_clk; +#ifndef MODULE static int early_amfc_clk_set(char *buf) { int clk = 0; @@ -136,9 +137,11 @@ static int early_amfc_clk_set(char *buf) return -EINVAL; } __setup("amfc_clk=", early_amfc_clk_set); +#endif //MODULE static unsigned int default_log; +#ifndef MODULE static int early_amfc_log_set(char *buf) { int i = 0; @@ -151,6 +154,7 @@ static int early_amfc_log_set(char *buf) return 1; } __setup("amfc_log=", early_amfc_log_set); +#endif //MODULE static int amfc_hw_init(void) diff --git a/drivers/clk/meson/clk-common-init.c b/drivers/clk/meson/clk-common-init.c index 91dc70707..94dd4be33 100644 --- a/drivers/clk/meson/clk-common-init.c +++ b/drivers/clk/meson/clk-common-init.c @@ -9,6 +9,7 @@ int bypass_clk_disable; +#ifndef MODULE static int bypass_clk_disable_setup(char *buf) { if (!buf) @@ -22,6 +23,7 @@ static int bypass_clk_disable_setup(char *buf) return 1; } __setup("bypass_clk_disable=", bypass_clk_disable_setup); +#endif //MODULE static int __init clk_module_init(void) { diff --git a/drivers/cpufreq/aml_cpufreq.c b/drivers/cpufreq/aml_cpufreq.c index bd6923786..d0de0e89b 100644 --- a/drivers/cpufreq/aml_cpufreq.c +++ b/drivers/cpufreq/aml_cpufreq.c @@ -37,6 +37,7 @@ static DEFINE_MUTEX(cluster_list_lock); static DEFINE_MUTEX(cpufreq_target_lock); static unsigned int freqmax[CLUSTER_MAX]; +#ifndef MODULE static int freqmax0_param_v2(char *buff) { if (!buff) @@ -61,6 +62,7 @@ static int freqmax1_param_v2(char *buff) __setup("freqmax0=", freqmax0_param_v2); __setup("freqmax1=", freqmax1_param_v2); +#endif //MODULE static struct cluster_data *find_cluster_data_by_cpu(int cpu) { diff --git a/drivers/debug/aml_iotm.c b/drivers/debug/aml_iotm.c index 262b71303..5c1ff432e 100644 --- a/drivers/debug/aml_iotm.c +++ b/drivers/debug/aml_iotm.c @@ -309,6 +309,7 @@ static const struct kernel_param_ops iotm_en_ops = { }; module_param_cb(iotm_en, &iotm_en_ops, &iotm_en, 0644); +#ifndef MODULE static int iotm_en_setup(char *buf) { if (!buf) @@ -365,6 +366,7 @@ static int iotm_dump_cnt_setup(char *buf) return 1; } __setup("iotm_dump_cnt=", iotm_dump_cnt_setup); +#endif //MODULE /* interface for the software to record data */ void iotm_sw_record_write(u32 sw_type, u32 val1, u32 val2) diff --git a/drivers/debug/aml_iotrace.c b/drivers/debug/aml_iotrace.c index 68393b695..59a6c1157 100644 --- a/drivers/debug/aml_iotrace.c +++ b/drivers/debug/aml_iotrace.c @@ -49,6 +49,7 @@ EXPORT_SYMBOL(ramoops_ftrace_en); int ramoops_trace_mask = 0x1f; EXPORT_SYMBOL(ramoops_trace_mask); +#ifndef MODULE static int ramoops_trace_mask_setup(char *buf) { if (!buf) @@ -62,9 +63,11 @@ static int ramoops_trace_mask_setup(char *buf) return 1; } __setup("ramoops_trace_mask=", ramoops_trace_mask_setup); +#endif //MODULE int ramoops_io_skip; +#ifndef MODULE static int ramoops_io_skip_setup(char *buf) { if (!buf) @@ -81,9 +84,11 @@ static int ramoops_io_skip_setup(char *buf) return 1; } __setup("ramoops_io_skip=", ramoops_io_skip_setup); +#endif //MODULE int ramoops_io_stack = 1; +#ifndef MODULE static int ramoops_io_stack_setup(char *buf) { if (!buf) @@ -97,6 +102,7 @@ static int ramoops_io_stack_setup(char *buf) return 1; } __setup("ramoops_io_stack=", ramoops_io_stack_setup); +#endif //MODULE /* * module_debug = 0:disable insmod/rmmod @@ -104,6 +110,7 @@ __setup("ramoops_io_stack=", ramoops_io_stack_setup); * module_debug > 1:enable rmmod */ static int module_debug = 2; +#ifndef MODULE static int module_debug_setup(char *buf) { if (!buf) @@ -117,9 +124,11 @@ static int module_debug_setup(char *buf) return 1; } __setup("module_debug=", module_debug_setup); +#endif //MODULE static int ramoops_io_en; +#ifndef MODULE static int ramoops_io_en_setup(char *buf) { if (!buf) @@ -133,9 +142,11 @@ static int ramoops_io_en_setup(char *buf) return 0; } __setup("ramoops_io_en=", ramoops_io_en_setup); +#endif //MODULE int ramoops_io_dump = 1; +#ifndef MODULE static int ramoops_io_dump_setup(char *buf) { if (!buf) @@ -149,12 +160,14 @@ static int ramoops_io_dump_setup(char *buf) return 1; } __setup("ramoops_io_dump=", ramoops_io_dump_setup); +#endif //MODULE /* ramoops_io_dump_delay_secs : iotrace dump delayed time, s */ static int ramoops_io_dump_delay_secs = 10; /* default : 10s */ static struct delayed_work iotrace_work; +#ifndef MODULE static int ramoops_io_dump_delay_secs_setup(char *buf) { if (!buf) @@ -168,6 +181,7 @@ static int ramoops_io_dump_delay_secs_setup(char *buf) return 1; } __setup("ramoops_io_dump_delay_secs=", ramoops_io_dump_delay_secs_setup); +#endif //MODULE struct prz_record_iter { void *ptr; @@ -360,6 +374,7 @@ static inline size_t buffer_start(struct aml_persistent_ram_zone *prz) } static char reboot_mode[16]; +#ifndef MODULE static int reboot_mode_setup(char *s) { if (s) @@ -368,6 +383,7 @@ static int reboot_mode_setup(char *s) return 1; } __setup("reboot_mode=", reboot_mode_setup); +#endif //MODULE static bool is_shutdown_reboot(void) { diff --git a/drivers/debug/ftrace_ramoops.c b/drivers/debug/ftrace_ramoops.c index 2148457ba..d50d45170 100644 --- a/drivers/debug/ftrace_ramoops.c +++ b/drivers/debug/ftrace_ramoops.c @@ -41,6 +41,7 @@ static DEFINE_PER_CPU(int, en); static int ramoops_io_blacklist = IO_BLACKLIST_AMVECM; +#ifndef MODULE static int ramoops_io_blacklist_setup(char *buf) { if (!buf) @@ -54,6 +55,7 @@ static int ramoops_io_blacklist_setup(char *buf) return 1; } __setup("ramoops_io_blacklist=", ramoops_io_blacklist_setup); +#endif //MODULE static unsigned int check_reg[MAX_DETECT_REG]; static unsigned int check_mask[MAX_DETECT_REG]; @@ -143,6 +145,7 @@ static bool is_in_usb_isr(void) static int reg_check_panic; static bool reg_check_flag; +#ifndef MODULE static int reg_check_panic_setup(char *buf) { if (!buf) @@ -156,6 +159,7 @@ static int reg_check_panic_setup(char *buf) return 1; } __setup("reg_check_panic=", reg_check_panic_setup); +#endif //MODULE void reg_check_init(void) { @@ -235,6 +239,7 @@ void reg_check_func(unsigned long vaddr, unsigned int flag) rcu_read_unlock(); } +#ifndef MODULE static int check_reg_setup(char *ptr) { char *str_entry; @@ -283,6 +288,7 @@ static int check_mask_setup(char *ptr) } __setup("check_mask=", check_mask_setup); +#endif //MODULE #define REG_MAX_NUM 5 static struct resource gic_mem[REG_MAX_NUM]; diff --git a/drivers/debug/iotm_v1.c b/drivers/debug/iotm_v1.c index 74805b5c3..baedf9c0f 100644 --- a/drivers/debug/iotm_v1.c +++ b/drivers/debug/iotm_v1.c @@ -41,6 +41,7 @@ struct iotm_time { static struct iotm_time iotm_time; +#ifndef MODULE static int iotm_long_time_en_setup(char *buf) { if (!buf) @@ -54,6 +55,7 @@ static int iotm_long_time_en_setup(char *buf) return 1; } __setup("iotm_long_time_en=", iotm_long_time_en_setup); +#endif //MODULE static void sw_record_write_v1(u32 sw_type, u32 val1, u32 val2) { diff --git a/drivers/debug/kprobes.c b/drivers/debug/kprobes.c index 022483bd3..936813f23 100644 --- a/drivers/debug/kprobes.c +++ b/drivers/debug/kprobes.c @@ -88,6 +88,8 @@ static int ignore_check_tty_count = 20000; module_param(ignore_check_tty_count, int, 0644); static int check_tty_en; + +#ifndef MODULE static int check_tty_en_setup(char *buf) { if (!buf) @@ -103,6 +105,7 @@ static int check_tty_en_setup(char *buf) return 1; } __setup("check_tty_en=", check_tty_en_setup); +#endif //MODULE static int __nocfi __kprobes check_tty_count_pre_handler(struct kprobe *p, struct pt_regs *regs) { diff --git a/drivers/debug/lockup.c b/drivers/debug/lockup.c index 1a6132845..0d3928fb8 100644 --- a/drivers/debug/lockup.c +++ b/drivers/debug/lockup.c @@ -88,6 +88,7 @@ static int isr_check_en = 1; static int idle_check_en = 1; static int smc_check_en = 1; +#if IS_ENABLED(CONFIG_AMLOGIC_GKI_TOOL) static struct param_entry lockup_params[] = { PARAM_ULLONG(isr_long_thr), PARAM_ULONG(isr_ratio_thr), @@ -99,6 +100,7 @@ static struct param_entry lockup_params[] = { }; module_param_cb(debug_lockup, &key_value_param_ops, &lockup_params, 0644); +#endif #if (defined CONFIG_ARM64) || (defined CONFIG_AMLOGIC_ARMV8_AARCH32) #define FIQ_DEBUG_SMC_CMD 0x820000f1 @@ -107,6 +109,7 @@ module_param_cb(debug_lockup, &key_value_param_ops, &lockup_params, 0644); static int fiq_check_en = 1; +#ifndef MODULE static int fiq_check_en_setup(char *str) { if (!strcmp(str, "1")) @@ -118,9 +121,11 @@ static int fiq_check_en_setup(char *str) return 1; } __setup("fiq_check_en=", fiq_check_en_setup); +#endif //MODULE static int fiq_check_show_regs_en; +#ifndef MODULE static int fiq_check_show_regs_en_setup(char *str) { if (!strcmp(str, "1")) @@ -132,6 +137,7 @@ static int fiq_check_show_regs_en_setup(char *str) return 1; } __setup("fiq_check_show_regs_en=", fiq_check_show_regs_en_setup); +#endif //MODULE struct fiq_regs { u64 regs[31]; @@ -1120,6 +1126,7 @@ static void fiq_debug_addr_init(void) static int aml_panic_print; +#ifndef MODULE static int panic_print_setup(char *str) { aml_panic_print = 1; @@ -1127,6 +1134,7 @@ static int panic_print_setup(char *str) return 1; } __setup("panic_print=", panic_print_setup); +#endif static int debug_panic_notifier_func(struct notifier_block *self, unsigned long v, void *p) diff --git a/drivers/debug/sched.c b/drivers/debug/sched.c index 47cad6439..d9738408c 100644 --- a/drivers/debug/sched.c +++ b/drivers/debug/sched.c @@ -68,6 +68,7 @@ static int sched_pick_next_task_debug; static int sched_pick_next_task_wait_socre = 10; //1ms+ static int sched_pick_next_task_ignore_wait_prio = 120; +#if IS_ENABLED(CONFIG_AMLOGIC_GKI_TOOL) static struct param_entry sched_params[] = { PARAM_INT(sched_big_weight), PARAM_INT(sched_interactive_task_util), @@ -88,6 +89,7 @@ static struct param_entry sched_params[] = { }; module_param_cb(debug_sched, &key_value_param_ops, &sched_params, 0644); +#endif #ifdef CONFIG_SMP static inline bool should_honor_rt_sync(struct rq *rq, struct task_struct *p, diff --git a/drivers/drm/meson_crtc.c b/drivers/drm/meson_crtc.c index 4665a9c25..59a98f485 100644 --- a/drivers/drm/meson_crtc.c +++ b/drivers/drm/meson_crtc.c @@ -45,6 +45,7 @@ static int drm_get_dv_support_info(void) #endif } +#ifndef MODULE static int gamma_boot_ctl(char *str) { if (strncmp("0", str, 1) == 0) @@ -56,6 +57,7 @@ static int gamma_boot_ctl(char *str) } __setup("gamma=", gamma_boot_ctl); +#endif static void meson_crtc_destroy_state(struct drm_crtc *crtc, struct drm_crtc_state *state) diff --git a/drivers/drm/meson_drv.c b/drivers/drm/meson_drv.c index 0e6d8be4d..f9b26b67d 100644 --- a/drivers/drm/meson_drv.c +++ b/drivers/drm/meson_drv.c @@ -61,6 +61,7 @@ static int skip_logo; int recovery_mode; struct meson_drm_param am_drm_param; +#ifndef MODULE static int check_reboot_mode(char *str) { if (strncmp("qui", str, 3) == 0) @@ -79,6 +80,7 @@ static int check_reboot_mode(char *str) } __setup("reboot_mode=", check_reboot_mode); +#endif static const struct drm_mode_config_funcs meson_mode_config_funcs = { .atomic_check = drm_atomic_helper_check, diff --git a/drivers/drm/meson_logo.c b/drivers/drm/meson_logo.c index 1ebf356bb..b7b1c6133 100644 --- a/drivers/drm/meson_logo.c +++ b/drivers/drm/meson_logo.c @@ -72,6 +72,7 @@ static u32 drm_logo_bpp = 16; static u32 drm_logo_width = 1920; static u32 drm_logo_height = 1080; +#ifndef MODULE static int drm_logo_bpp_setup(char *str) { int ret; @@ -82,12 +83,14 @@ static int drm_logo_bpp_setup(char *str) return 1; } __setup("display_bpp=", drm_logo_bpp_setup); +#endif //MODULE static u32 drm_logo_get_display_bpp(void) { return drm_logo_bpp; } +#ifndef MODULE static int drm_logo_width_setup(char *str) { int ret; @@ -98,12 +101,14 @@ static int drm_logo_width_setup(char *str) return 1; } __setup("fb_width=", drm_logo_width_setup); +#endif //MODULE static u32 drm_logo_get_fb_width(void) { return drm_logo_width; } +#ifndef MODULE static int drm_logo_height_setup(char *str) { int ret; @@ -114,6 +119,7 @@ static int drm_logo_height_setup(char *str) return 1; } __setup("fb_height=", drm_logo_height_setup); +#endif //MODULE static u32 drm_logo_get_fb_height(void) { @@ -221,6 +227,7 @@ static inline int install_osd_reverse_info(struct osd_info_s *init_osd_info, return 0; } +#ifndef MODULE static int drm_logo_reverse_setup(char *str) { char *ptr = str; @@ -252,6 +259,7 @@ static int drm_logo_reverse_setup(char *str) return 1; } __setup("osd_reverse=", drm_logo_reverse_setup); +#endif void drm_logo_get_osd_reverse(u32 *index, u32 *reverse_type) { diff --git a/drivers/input/ir/meson_ir_main.c b/drivers/input/ir/meson_ir_main.c index a3ef7c726..656abcf3b 100644 --- a/drivers/input/ir/meson_ir_main.c +++ b/drivers/input/ir/meson_ir_main.c @@ -34,6 +34,7 @@ static atomic_t meson_ir_dev_no = ATOMIC_INIT(-1); static int disable_ir; +#ifndef MODULE static int get_irenv(char *str) { int ret; @@ -45,6 +46,7 @@ static int get_irenv(char *str) } __setup("disable_ir=", get_irenv); +#endif //MODULE int meson_ir_read_dev_num(void) { diff --git a/drivers/media/common/vpu/vpu_clk.c b/drivers/media/common/vpu/vpu_clk.c index 3c768df1f..59720d4f9 100644 --- a/drivers/media/common/vpu/vpu_clk.c +++ b/drivers/media/common/vpu/vpu_clk.c @@ -189,6 +189,7 @@ static unsigned int get_vpu_clk_mux_id(void) return mux_id; } +#ifndef MODULE static int get_vpu_overclock(char *str) { int ret; @@ -199,6 +200,7 @@ static int get_vpu_overclock(char *str) } __setup("vpu_overclock=", get_vpu_overclock); +#endif //MODULE unsigned int vpu_clk_get(void) { diff --git a/drivers/media/deinterlace/deinterlace.c b/drivers/media/deinterlace/deinterlace.c index 40e754b4a..11758471f 100644 --- a/drivers/media/deinterlace/deinterlace.c +++ b/drivers/media/deinterlace/deinterlace.c @@ -786,6 +786,7 @@ store_dbg(struct device *dev, return count; } +#ifndef MODULE static int di_read_canvas_reverse(char *str) { unsigned char *ptr = str; @@ -802,6 +803,7 @@ static int di_read_canvas_reverse(char *str) return 0; } __setup("video_reverse=", di_read_canvas_reverse); +#endif //MODULE static unsigned char *di_log_buf; static unsigned int di_log_wr_pos; diff --git a/drivers/media/di_multi/deinterlace.c b/drivers/media/di_multi/deinterlace.c index f215afe7c..9056d435e 100644 --- a/drivers/media/di_multi/deinterlace.c +++ b/drivers/media/di_multi/deinterlace.c @@ -12588,6 +12588,7 @@ int dim_seq_file_module_para_di(struct seq_file *seq) return 0; } +#ifndef MODULE static int di_axis_reverse(char *str) { char *ptr = str; @@ -12617,6 +12618,7 @@ static int di_axis_reverse(char *str) } __setup("video_reverse=", di_axis_reverse); +#endif //MODULE #ifdef MARK_HIS /*move to di_sys.c*/ //MODULE_DESCRIPTION("AMLOGIC DEINTERLACE driver"); diff --git a/drivers/media/enhancement/amdolby_vision/amdv.c b/drivers/media/enhancement/amdolby_vision/amdv.c index 35ba5592d..31b31fb05 100644 --- a/drivers/media/enhancement/amdolby_vision/amdv.c +++ b/drivers/media/enhancement/amdolby_vision/amdv.c @@ -20450,6 +20450,7 @@ static struct platform_driver aml_amdolby_vision_driver = { .remove = __exit_p(amdolby_vision_remove), }; +#ifndef MODULE static int get_amdv_uboot_on(char *str) { char uboot_amdv_on[DV_NAME_LEN_MAX] = {0}; @@ -20531,6 +20532,7 @@ static int recovery_mode_check(char *str) return 1; } __setup("recovery_part=", recovery_mode_check); +#endif //MODULE int __init amdolby_vision_init(void) { diff --git a/drivers/media/video_sink/video.c b/drivers/media/video_sink/video.c index 70f47183d..4deffa155 100644 --- a/drivers/media/video_sink/video.c +++ b/drivers/media/video_sink/video.c @@ -15042,6 +15042,7 @@ int screen_orientation(void) return ret; } +#ifndef MODULE static int vpp_axis_reverse(char *str) { char *ptr = str; @@ -15076,6 +15077,7 @@ static int vpp_axis_reverse(char *str) } __setup("video_reverse=", vpp_axis_reverse); +#endif //MODULE #endif struct vframe_s *get_cur_dispbuf(void) diff --git a/drivers/media/vin/tvin/vdin/vdin_drv.c b/drivers/media/vin/tvin/vdin/vdin_drv.c index 1ffc75d2d..c6f91a559 100644 --- a/drivers/media/vin/tvin/vdin/vdin_drv.c +++ b/drivers/media/vin/tvin/vdin/vdin_drv.c @@ -130,6 +130,7 @@ bool vf_log_be = true; unsigned int vf_list_dbg; unsigned int vf_move_print_cnt; +#if IS_ENABLED(CONFIG_AMLOGIC_GKI_TOOL) struct param_entry vdin_params[] = { PARAM_BOOL(vf_log_enable), PARAM_BOOL(vf_log_fe), @@ -139,6 +140,7 @@ struct param_entry vdin_params[] = { }; module_param_cb(debug_vdin, &key_value_param_ops, &vdin_params, 0644); +#endif /* module_param(vrr_input_switch_frames, int, 0664); *MODULE_PARM_DESC(vrr_input_switch_frames, @@ -177,6 +179,7 @@ static void vdin_backup_histgram(struct vframe_s *vf, struct vdin_dev_s *devp); char *vf_get_receiver_name(const char *provider_name); +#ifndef MODULE static int vdin_get_video_reverse(char *str) { unsigned char *ptr = str; @@ -185,6 +188,7 @@ static int vdin_get_video_reverse(char *str) return 0; } __setup("video_reverse=", vdin_get_video_reverse); +#endif //MODULE static const struct vframe_operations_s vdin_vf_ops = { .peek = vdin_vf_peek, diff --git a/drivers/media/vin/tvin/vdin/vdin_drv.h b/drivers/media/vin/tvin/vdin/vdin_drv.h index b97e696e7..13f258d15 100644 --- a/drivers/media/vin/tvin/vdin/vdin_drv.h +++ b/drivers/media/vin/tvin/vdin/vdin_drv.h @@ -1420,7 +1420,9 @@ extern bool vf_log_be; extern unsigned int vf_list_dbg; extern unsigned int vf_move_print_cnt; +#if IS_ENABLED(CONFIG_AMLOGIC_GKI_TOOL) extern struct param_entry vdin_params[]; +#endif struct vframe_provider_s *vf_get_provider_by_name(const char *provider_name); extern bool enable_reset; diff --git a/drivers/media/vout/eDPTX/dptx_vout.c b/drivers/media/vout/eDPTX/dptx_vout.c index 439b39057..07d91ffad 100644 --- a/drivers/media/vout/eDPTX/dptx_vout.c +++ b/drivers/media/vout/eDPTX/dptx_vout.c @@ -1088,6 +1088,7 @@ void __exit eDPTX_TX_exit(void) platform_driver_unregister(&eDP_platform_driver); } +#ifndef MODULE static int __dptx_bootargs_setup(char *str) { int ret = 0; @@ -1128,6 +1129,7 @@ static int __dptx_bootargs_setup(char *str) } __setup("eDPTX=", __dptx_bootargs_setup); +#endif //MODULE struct dptx_drv_s *aml_dptx_get_driver(u8 drv_idx) { diff --git a/drivers/media/vout/hdmi_tx_connector/hdmitx_boot_parameters.c b/drivers/media/vout/hdmi_tx_connector/hdmitx_boot_parameters.c index fb9a2be1e..44c45477b 100644 --- a/drivers/media/vout/hdmi_tx_connector/hdmitx_boot_parameters.c +++ b/drivers/media/vout/hdmi_tx_connector/hdmitx_boot_parameters.c @@ -28,6 +28,7 @@ struct hdmitx_boot_param *get_hdmitx_boot_params(void) return &tx_params; } +#ifndef MODULE /* besides characters defined in separator, '\"' are used as separator; * and any characters in '\"' will not act as separator */ @@ -296,4 +297,5 @@ static int hdmitx_boot_dsc_policy(char *str) return 1; } __setup("dsc_policy=", hdmitx_boot_dsc_policy); +#endif //MODULE diff --git a/drivers/media/vout/hdmi_tx_connector/hdmitx_log.c b/drivers/media/vout/hdmi_tx_connector/hdmitx_log.c index 0d6a41bb9..e69e5c309 100644 --- a/drivers/media/vout/hdmi_tx_connector/hdmitx_log.c +++ b/drivers/media/vout/hdmi_tx_connector/hdmitx_log.c @@ -98,6 +98,7 @@ void __hdmitx_dbg(enum hdmitx_debug_category category, const char *format, ...) va_end(args); } +#ifndef MODULE static int hdmitx_config_debug_level(char *str) { int err; @@ -119,3 +120,4 @@ static int hdmitx_config_debug_level(char *str) return 1; } __setup("hdmitx_debug_level=", hdmitx_config_debug_level); +#endif //MODULE diff --git a/drivers/media/vout/lcd/backlight/lcd_bl.c b/drivers/media/vout/lcd/backlight/lcd_bl.c index e2cc163ce..be5657880 100644 --- a/drivers/media/vout/lcd/backlight/lcd_bl.c +++ b/drivers/media/vout/lcd/backlight/lcd_bl.c @@ -3801,6 +3801,7 @@ void __exit aml_bl_exit(void) platform_driver_unregister(&aml_bl_driver); } +#ifndef MODULE static int aml_bl_level_setup(char *str) { int ret = 0; @@ -3846,6 +3847,7 @@ static int aml_bl2_level_setup(char *str) __setup("bl_level=", aml_bl_level_setup); __setup("bl1_level=", aml_bl1_level_setup); __setup("bl2_level=", aml_bl2_level_setup); +#endif //MODULE //MODULE_DESCRIPTION("AML Backlight Driver"); //MODULE_LICENSE("GPL"); diff --git a/drivers/media/vout/lcd/lcd_vout.c b/drivers/media/vout/lcd/lcd_vout.c index 92802c6ba..d51d14fa7 100644 --- a/drivers/media/vout/lcd/lcd_vout.c +++ b/drivers/media/vout/lcd/lcd_vout.c @@ -3120,6 +3120,7 @@ void __exit lcd_exit(void) platform_driver_unregister(&lcd_platform_driver); } +#ifndef MODULE static void lcd_boot_ctrl_dft_prepare(struct lcd_boot_ctrl_s *boot_ctrl) { switch (boot_ctrl->init_level) { @@ -3239,6 +3240,7 @@ __setup("lcd0=", lcd0_boot_setup); __setup("lcd1=", lcd1_boot_setup); __setup("lcd2=", lcd2_boot_setup); __setup("lcd_debug=", lcd_debug_ctrl_setup); +#endif //MODULE //MODULE_DESCRIPTION("Meson LCD Panel Driver"); //MODULE_LICENSE("GPL"); diff --git a/drivers/media/vout/vout_serve/dummy_venc.c b/drivers/media/vout/vout_serve/dummy_venc.c index cf9ca3ed9..1585c208c 100644 --- a/drivers/media/vout/vout_serve/dummy_venc.c +++ b/drivers/media/vout/vout_serve/dummy_venc.c @@ -133,6 +133,7 @@ static u32 dummyp_timing_flip; * ********************************************************** */ +#ifndef MODULE static int dummy_encp_timing_flip_setup(char *str) { int ret; @@ -155,6 +156,7 @@ static int dummy_projector_fps_ctl_setup(char *str) return 1; } __setup("projector_fps_ctl=", dummy_projector_fps_ctl_setup); +#endif //MODULE int get_dummyp_timing_flip(void) { diff --git a/drivers/media/vout/vout_serve/vout2_serve.c b/drivers/media/vout/vout_serve/vout2_serve.c index f52f34adc..ec1358bbc 100644 --- a/drivers/media/vout/vout_serve/vout2_serve.c +++ b/drivers/media/vout/vout_serve/vout2_serve.c @@ -1006,6 +1006,7 @@ __exit void vout2_exit_module(void) platform_driver_unregister(&vout2_driver); } +#ifndef MODULE static int str2lower(char *str) { while (*str != '\0') { @@ -1096,6 +1097,7 @@ static int get_connector1_type(char *str) } __setup("connector1_type=", get_connector1_type); +#endif //MODULE //MODULE_AUTHOR("Platform-BJ "); //MODULE_DESCRIPTION("VOUT2 Server Module"); diff --git a/drivers/media/vout/vout_serve/vout3_serve.c b/drivers/media/vout/vout_serve/vout3_serve.c index 9e63f017e..8e65da144 100644 --- a/drivers/media/vout/vout_serve/vout3_serve.c +++ b/drivers/media/vout/vout_serve/vout3_serve.c @@ -1007,6 +1007,7 @@ __exit void vout3_exit_module(void) platform_driver_unregister(&vout3_driver); } +#ifndef MODULE static int str2lower(char *str) { while (*str != '\0') { @@ -1097,6 +1098,7 @@ static int get_connector2_type(char *str) } __setup("connector2_type=", get_connector2_type); +#endif //MODULE //MODULE_AUTHOR("Platform-BJ "); //MODULE_DESCRIPTION("vout3 Server Module"); diff --git a/drivers/media/vout/vout_serve/vout_serve.c b/drivers/media/vout/vout_serve/vout_serve.c index 02be8010a..c57f68ddf 100644 --- a/drivers/media/vout/vout_serve/vout_serve.c +++ b/drivers/media/vout/vout_serve/vout_serve.c @@ -69,6 +69,7 @@ static bool enable_debugmode; int vout_debug_print; +#ifndef MODULE static int vout_print_enable(char *str) { if (strncmp("1", str, 1) == 0) @@ -79,6 +80,7 @@ static int vout_print_enable(char *str) return 1; } __setup("vout_print=", vout_print_enable); +#endif //MODULE /* ********************************************************** */ static irqreturn_t vout_vsync_irq_handler(int irq, void *data) @@ -1292,6 +1294,7 @@ __exit void vout_exit_module(void) platform_driver_unregister(&vout_driver); } +#ifndef MODULE static int str2lower(char *str) { while (*str != '\0') { @@ -1414,6 +1417,7 @@ static int get_connector_type_to_compat(char *str) } __setup("connector_type=", get_connector_type_to_compat); +#endif //MODULE /*TODO: drm to disable display/mode sysfs set.*/ void disable_vout_mode_set_sysfs(void) diff --git a/drivers/memory_debug/ddr_tool/ddr_bandwidth.c b/drivers/memory_debug/ddr_tool/ddr_bandwidth.c index 2cdde40d3..9e0a8c3e0 100644 --- a/drivers/memory_debug/ddr_tool/ddr_bandwidth.c +++ b/drivers/memory_debug/ddr_tool/ddr_bandwidth.c @@ -46,6 +46,7 @@ static struct hrtimer ddr_hrtimer_timer; struct ddr_bandwidth *aml_db; static int init_ots_level = -1; +#ifndef MODULE static int ots_level_setup(char *str) { int val; @@ -60,8 +61,10 @@ static int ots_level_setup(char *str) return 1; } __setup("ots_level=", ots_level_setup); +#endif //MODULE static int init_poll_cpu = 1; +#ifndef MODULE static int poll_cpu_setup(char *str) { int val; @@ -77,6 +80,7 @@ static int poll_cpu_setup(char *str) return 1; } __setup("db_poll_cpu=", poll_cpu_setup); +#endif //MODULE /* run time should be short */ static enum hrtimer_restart ddr_hrtimer_handler(struct hrtimer *timer) diff --git a/drivers/memory_debug/ddr_tool/dmc_monitor.c b/drivers/memory_debug/ddr_tool/dmc_monitor.c index fd11492bf..1b6559177 100644 --- a/drivers/memory_debug/ddr_tool/dmc_monitor.c +++ b/drivers/memory_debug/ddr_tool/dmc_monitor.c @@ -91,6 +91,7 @@ unsigned long get_recheck_ns(void) return init_thread_recheck_ns; } +#ifndef MODULE static int early_dmc_param(char *buf) { unsigned long s_addr, e_addr, mask, debug = 0; @@ -123,9 +124,11 @@ static int early_dmc_param(char *buf) return 1; } __setup("dmc_monitor=", early_dmc_param); +#endif //MODULE /* only used to dmc filter set on uboot cmdline */ static char dmc_filter_early_buf[1024]; +#ifndef MODULE static int early_dmc_filter(char *buf) { /* @@ -175,6 +178,7 @@ static int early_dmc_irq_thread(char *buf) return 1; } __setup("dmc_irq_thread=", early_dmc_irq_thread); +#endif //MODULE static int dmc_filter_remove(char *p) { diff --git a/drivers/memory_debug/ramdump/ram_dump.c b/drivers/memory_debug/ramdump/ram_dump.c index e347c0c13..baab266f0 100644 --- a/drivers/memory_debug/ramdump/ram_dump.c +++ b/drivers/memory_debug/ramdump/ram_dump.c @@ -91,6 +91,7 @@ struct ramdump { static struct ramdump *ram; char ramdump_info[256]; +#ifndef MODULE static void ramdump_parse_info(void) { #if IS_BUILTIN(CONFIG_AMLOGIC_MEMORY_DEBUG) @@ -141,6 +142,7 @@ static int early_ramdump_para(char *buf) } early_param("ramdump", early_ramdump_para); +#endif //MODULE #ifdef SAVE_DATA_BY_INIT_RC_SHELL #define DUMP_LOG_STEP (200 * 1024 * 1024ULL) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index 12e82c021..07326725e 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -4576,6 +4576,7 @@ static struct platform_driver meson_mmc_driver = { }, }; +#ifndef MODULE static int caps2_setup(char *p) { caps2_quirks = p; @@ -4583,6 +4584,7 @@ static int caps2_setup(char *p) } __setup("meson-gx-mmc.caps2_quirks=", caps2_setup); +#endif //MODULE module_platform_driver(meson_mmc_driver); diff --git a/drivers/pm/gx_pm.c b/drivers/pm/gx_pm.c index 0cc8ac754..755e568f2 100644 --- a/drivers/pm/gx_pm.c +++ b/drivers/pm/gx_pm.c @@ -82,6 +82,7 @@ void unregister_early_suspend(struct early_suspend *handler) } EXPORT_SYMBOL(unregister_early_suspend); +#ifndef MODULE static int suspend_get_pm_env(char *buf) { if (!buf) @@ -95,6 +96,7 @@ static int suspend_get_pm_env(char *buf) return 1; } __setup("initcall_debug=", suspend_get_pm_env); +#endif static inline void early_suspend(void) { @@ -307,6 +309,7 @@ static ssize_t suspend_debug_store(const struct class *class, } static CLASS_ATTR_RW(suspend_debug); +#ifndef MODULE static int suspend_get_debug_env(char *buf) { if (!buf) @@ -321,6 +324,7 @@ static int suspend_get_debug_env(char *buf) } __setup("suspend_debug=", suspend_get_debug_env); +#endif //MODULE static void lgcy_early_suspend(void) { diff --git a/drivers/pm/reboot.c b/drivers/pm/reboot.c index 37e898999..9eb39672c 100644 --- a/drivers/pm/reboot.c +++ b/drivers/pm/reboot.c @@ -69,6 +69,7 @@ static unsigned int scramble_reg; void __iomem *scramble_vaddr; __module_param(scramble_reg, uint, 0644); +#ifndef MODULE static int scramble_reg_setup(char *buf) { if (!buf) @@ -83,6 +84,7 @@ static int scramble_reg_setup(char *buf) return 1; } __setup("scramble_reg=", scramble_reg_setup); +#endif //MODULE /* * scramble_clear_preserve() will clear scramble_reg bit0, diff --git a/drivers/power/main.c b/drivers/power/main.c index 7143bbd44..62af13811 100644 --- a/drivers/power/main.c +++ b/drivers/power/main.c @@ -10,6 +10,7 @@ int bypass_power_off; +#ifndef MODULE static int bypass_power_off_setup(char *buf) { if (!buf) @@ -23,6 +24,7 @@ static int bypass_power_off_setup(char *buf) return 1; } __setup("bypass_power_off=", bypass_power_off_setup); +#endif //MODULE static int __init domain_main_init(void) { diff --git a/drivers/thermal/meson_tsensor.c b/drivers/thermal/meson_tsensor.c index 160663c34..99ed3af33 100644 --- a/drivers/thermal/meson_tsensor.c +++ b/drivers/thermal/meson_tsensor.c @@ -543,6 +543,7 @@ static void r1p1_tsensor_update_irqs(struct meson_tsensor_data *data) static int g_tsensor_debug_enable; +#ifndef MODULE static int get_tsensor_debug_enable(char *str) { if (kstrtoint(str, 0, &g_tsensor_debug_enable)) { @@ -553,6 +554,7 @@ static int get_tsensor_debug_enable(char *str) return 0; } __setup("tsensor_debug=", get_tsensor_debug_enable); +#endif //MODULE static int meson_get_temp(struct thermal_zone_device *p, int *temp) { diff --git a/drivers/usb/crgdrdphy/phy-aml-crg-drd-usb2.c b/drivers/usb/crgdrdphy/phy-aml-crg-drd-usb2.c index ee06b2b4e..650a8ba32 100644 --- a/drivers/usb/crgdrdphy/phy-aml-crg-drd-usb2.c +++ b/drivers/usb/crgdrdphy/phy-aml-crg-drd-usb2.c @@ -44,6 +44,7 @@ struct amlogic_usb_v2 *g_crg_drd_phy2[3]; char name_crg[32]; static bool aml_usb2_phy_960m; +#ifndef MODULE static int get_u2phy_speed(char *str) { int ret; @@ -56,6 +57,7 @@ static int get_u2phy_speed(char *str) } __setup("usb2t_mode=", get_u2phy_speed); +#endif //MODULE static inline bool aml_crg_drd_usb2_hsp(struct amlogic_usb_v2 *phy) { diff --git a/drivers/usb/phy_meson_usb/phy-meson-aml-usb2-com.c b/drivers/usb/phy_meson_usb/phy-meson-aml-usb2-com.c index d5a5a79e3..760b2781f 100644 --- a/drivers/usb/phy_meson_usb/phy-meson-aml-usb2-com.c +++ b/drivers/usb/phy_meson_usb/phy-meson-aml-usb2-com.c @@ -11,6 +11,7 @@ bool meson_u2phy_960m; +#ifndef MODULE static int meson_u2phy_get_speed(char *str) { int ret; @@ -23,6 +24,7 @@ static int meson_u2phy_get_speed(char *str) } __setup("usb2t_mode=", meson_u2phy_get_speed); +#endif //MODULE /* Reset usb controller. */ int meson_u2phy_usb_reset(struct amlogic_usb_v2 *phy) diff --git a/drivers/usb/usb_main.c b/drivers/usb/usb_main.c index 6690207f3..273ee1e2a 100644 --- a/drivers/usb/usb_main.c +++ b/drivers/usb/usb_main.c @@ -25,6 +25,7 @@ bool force_device_mode; module_param_named(otg_device, force_device_mode, bool, 0644); +#ifndef MODULE static char otg_mode_string[2] = "0"; static int force_otg_mode(char *s) @@ -38,6 +39,7 @@ static int force_otg_mode(char *s) return 1; } __setup("otg_device=", force_otg_mode); +#endif //MODULE int get_otg_mode(void) { diff --git a/drivers/watchdog/meson_gxbb_wdt.c b/drivers/watchdog/meson_gxbb_wdt.c index 71ca7f696..649af4d5a 100644 --- a/drivers/watchdog/meson_gxbb_wdt.c +++ b/drivers/watchdog/meson_gxbb_wdt.c @@ -77,6 +77,7 @@ module_param(wdt_debug, int, 0644); #ifdef CONFIG_AMLOGIC_MODIFY static unsigned int watchdog_enabled = 1; +#ifndef MODULE static int get_watchdog_enabled_env(char *str) { int ret; @@ -88,10 +89,12 @@ static int get_watchdog_enabled_env(char *str) return 1; } __setup("watchdog_enabled=", get_watchdog_enabled_env); +#endif static int stop_after_panic; module_param(stop_after_panic, int, 0644); MODULE_PARM_DESC(stop_after_panic, "Stop watchdog after panic (0=keep watching, 1=stop)"); +#ifndef MODULE static int get_stop_after_panic_env(char *str) { int ret; @@ -111,6 +114,7 @@ static int wdt_panic_print_setup(char *str) return 1; } __setup("panic_print=", wdt_panic_print_setup); +#endif //MODULE #endif static int meson_gxbb_wdt_start(struct watchdog_device *wdt_dev) diff --git a/drivers/wireless/bluetooth/bt_device.c b/drivers/wireless/bluetooth/bt_device.c index d2cdea471..9d462b88c 100644 --- a/drivers/wireless/bluetooth/bt_device.c +++ b/drivers/wireless/bluetooth/bt_device.c @@ -657,6 +657,7 @@ MODULE_PARM_DESC(btwake_evt, "btwake_evt"); /**************** bt mac *****************/ //static int __init mac_addr_set(char *line) +#ifndef MODULE static int mac_addr_set(char *line) { if (line) { @@ -670,4 +671,5 @@ static int mac_addr_set(char *line) } __setup("mac_bt=", mac_addr_set); +#endif //MODULE diff --git a/drivers/wireless/wifi/wifi_dt.c b/drivers/wireless/wifi/wifi_dt.c index 703377222..6be9be934 100644 --- a/drivers/wireless/wifi/wifi_dt.c +++ b/drivers/wireless/wifi/wifi_dt.c @@ -1047,6 +1047,7 @@ static struct platform_driver wifi_plat_driver = { .resume = wifi_resume, }; +#ifndef MODULE static int get_usb2t_mode(char *str) { int ret; @@ -1058,6 +1059,7 @@ static int get_usb2t_mode(char *str) } __setup("usb2t_mode=", get_usb2t_mode); +#endif //MODULE int __init wifi_dt_init(void) { diff --git a/include/linux/amlogic/gki_module.h b/include/linux/amlogic/gki_module.h index ab17219ac..e01716174 100644 --- a/include/linux/amlogic/gki_module.h +++ b/include/linux/amlogic/gki_module.h @@ -6,6 +6,7 @@ #ifndef __GKI_MODULE_AMLOGIC_H #define __GKI_MODULE_AMLOGIC_H +#ifdef CONFIG_AMLOGIC_GKI_TOOL #define GKI_MODULE_SETUP_MAGIC1 0x014589cd #define GKI_MODULE_SETUP_MAGIC2 0x2367abef @@ -130,4 +131,5 @@ struct param_entry { extern struct kernel_param_ops key_value_param_ops; int amlogic_class_debug_create_dir(const struct attribute_group *group, int debug_level); +#endif //CONFIG_AMLOGIC_GKI_TOOL #endif //__GKI_MODULE_AMLOGIC_H diff --git a/sound/soc/amlogic/auge/vad/vad_open.c b/sound/soc/amlogic/auge/vad/vad_open.c index 6da17ff24..d0883334e 100644 --- a/sound/soc/amlogic/auge/vad/vad_open.c +++ b/sound/soc/amlogic/auge/vad/vad_open.c @@ -1155,6 +1155,7 @@ static void deinit_work_func(struct work_struct *p_work) } static int vad_mode; +#ifndef MODULE static int get_vadmode(char *str) { if (strcmp("on", str) == 0) { @@ -1166,6 +1167,7 @@ static int get_vadmode(char *str) } early_param("ffv_freeze", get_vadmode); +#endif //MODULE static int vad_open_probe(struct platform_device *pdev) {