From b62173abe91fdcf4d471405e5439deb35428ffd5 Mon Sep 17 00:00:00 2001 From: Bharat Nihalani Date: Mon, 20 May 2024 05:53:49 +0000 Subject: [PATCH] tegra_bl_debug: Do not check for bl_debug_data 1. tegra_bl_debug_probe checks if either bl_prof_dataptr, bl_prof_ro_ptr or bl_debug_data are not passed by kernel command line parameter. Post this check, it retrieves bl_prof_dataptr and bl_prof_ro_ptr data from DT and does not retrieve anything for bl_debug_data. There is no need for checking bl_debug_data as it is not being queried from DT in the probe function. Hence, remove the check for bl_debug_data from probe. 2. Add prints in probe function to print bl_prof_dataptr and bl_prof_ro_ptr. Bug 4454722 Change-Id: Ib8e52407d2ff227cc9605704e467790a9b65a1db Signed-off-by: Bharat Nihalani Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3141122 GVS: buildbot_gerritrpt Reviewed-by: Deepak Nibade --- drivers/platform/tegra/tegra_bootloader_debug.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/platform/tegra/tegra_bootloader_debug.c b/drivers/platform/tegra/tegra_bootloader_debug.c index 7a2ae520..176cbb42 100644 --- a/drivers/platform/tegra/tegra_bootloader_debug.c +++ b/drivers/platform/tegra/tegra_bootloader_debug.c @@ -684,7 +684,7 @@ static int tegra_bl_parse_dt_property(struct device_node *np, pr_info("Base address of %s: 0x%llx\n", prop_name, *base); pr_info("Size of %s: 0x%llx\n", prop_name, *size); - return 0; // Return 0 for success + return 0; /* Return 0 for success */ } static int tegra_bl_debug_probe(struct platform_device *pdev) @@ -693,11 +693,10 @@ static int tegra_bl_debug_probe(struct platform_device *pdev) u64 base, size; int ret; - pr_info("%s\n", __func__); + pr_info("%s: bl_prof_dataptr=%s bl_prof_ro_ptr=%s\n", __func__, bl_prof_dataptr, bl_prof_ro_ptr); if (strncmp(bl_prof_dataptr, "0@0x0", 5) == 0 || - strncmp(bl_prof_ro_ptr, "0@0x0", 5) == 0 || - strncmp(bl_debug_data, "0@0x0", 5) == 0) { + strncmp(bl_prof_ro_ptr, "0@0x0", 5) == 0) { if (!np) { pr_err("Device tree node not found\n"); @@ -719,14 +718,14 @@ static int tegra_bl_debug_probe(struct platform_device *pdev) } - return 0; // Return 0 for success + return 0; /* Return 0 for success */ } static int tegra_bl_debug_remove(struct platform_device *pdev) { - // Device removal code goes here + /* Device removal code goes here */ pr_info("%s\n", __func__); - return 0; // Return 0 for success + return 0; /* Return 0 for success */ } static const struct of_device_id tegra_bl_debug_of_match[] = {