From 52524ff0558b57e8b78d05d645456b0a77c787bf Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Sat, 13 Jan 2024 21:27:51 -0800 Subject: ARM: s5pv210: fix pm.c kernel-doc warning Use the correct function name in the kernel-doc comment to prevent a kernel-doc warning: arch/arm/mach-s5pv210/pm.c:61: warning: expecting prototype for s3c_pm_do_restore(). Prototype was for s3c_pm_do_restore_core() instead Signed-off-by: Randy Dunlap Cc: Link: https://lore.kernel.org/r/20240114052751.17242-1-rdunlap@infradead.org Fixes: 423c62bfb623 ("ARM: s5pv210: use private pm save/restore") Signed-off-by: Krzysztof Kozlowski --- arch/arm/mach-s5pv210/pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-s5pv210/pm.c b/arch/arm/mach-s5pv210/pm.c index d59c094cdea8..6fa70f787df4 100644 --- a/arch/arm/mach-s5pv210/pm.c +++ b/arch/arm/mach-s5pv210/pm.c @@ -47,7 +47,7 @@ static void s3c_pm_do_save(struct sleep_save *ptr, int count) } /** - * s3c_pm_do_restore() - restore register values from the save list. + * s3c_pm_do_restore_core() - restore register values from the save list. * @ptr: Pointer to an array of registers. * @count: Size of the ptr array. * -- cgit From 554add032d9d10cd4a31ceb2ba6cd50a102ba805 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Sat, 13 Jan 2024 21:17:30 -0800 Subject: ARM: zynq: slcr: fix function prototype kernel-doc warnings Use the same name in the function prototype description and the function to prevent kernel-doc warnings: slcr.c:158: warning: expecting prototype for zynq_slcr_cpu_state(). Prototype was for zynq_slcr_cpu_state_read() instead slcr.c:176: warning: expecting prototype for zynq_slcr_cpu_state(). Prototype was for zynq_slcr_cpu_state_write() instead Signed-off-by: Randy Dunlap Cc: Michal Simek Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: patches@armlinux.org.uk Link: https://lore.kernel.org/r/20240114051730.16796-1-rdunlap@infradead.org Signed-off-by: Michal Simek --- arch/arm/mach-zynq/slcr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-zynq/slcr.c b/arch/arm/mach-zynq/slcr.c index 9765b3f4c2fc..2636dec499ad 100644 --- a/arch/arm/mach-zynq/slcr.c +++ b/arch/arm/mach-zynq/slcr.c @@ -146,7 +146,7 @@ void zynq_slcr_cpu_stop(int cpu) } /** - * zynq_slcr_cpu_state - Read/write cpu state + * zynq_slcr_cpu_state_read - Read cpu state * @cpu: cpu number * * SLCR_REBOOT_STATUS save upper 2 bits (31/30 cpu states for cpu0 and cpu1) @@ -165,7 +165,7 @@ bool zynq_slcr_cpu_state_read(int cpu) } /** - * zynq_slcr_cpu_state - Read/write cpu state + * zynq_slcr_cpu_state_write - Write cpu state * @cpu: cpu number * @die: cpu state - true if cpu is going to die * -- cgit From a22f00c0167f459a19a4828d3c24943ae4694418 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Wed, 10 Jan 2024 12:10:35 +0100 Subject: ARM: zynq: Remove clk/zynq.h header slcr.c is not having any reference to clock that's why remove it. Link: https://lore.kernel.org/r/d7b129c8e3f867c2fda5fb0adbb1983103c5be5e.1704885029.git.michal.simek@amd.com Signed-off-by: Michal Simek --- arch/arm/mach-zynq/slcr.c | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-zynq/slcr.c b/arch/arm/mach-zynq/slcr.c index 2636dec499ad..6aae14b0736c 100644 --- a/arch/arm/mach-zynq/slcr.c +++ b/arch/arm/mach-zynq/slcr.c @@ -10,7 +10,6 @@ #include #include #include -#include #include "common.h" /* register offsets */ -- cgit From 884632ab0d093980228e4b63ed842f664d56d81a Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Tue, 16 Jan 2024 17:09:49 -0800 Subject: ARM: OMAP2+: am33xx-restart: fix function name in kernel-doc Use the correct name in kernel-doc notation to prevent a kernel-doc warning: am33xx-restart.c:20: warning: expecting prototype for am3xx_restart(). Prototype was for am33xx_restart() instead Signed-off-by: Randy Dunlap Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: patches@armlinux.org.uk Message-ID: <20240117011004.22669-2-rdunlap@infradead.org> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/am33xx-restart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/am33xx-restart.c b/arch/arm/mach-omap2/am33xx-restart.c index ef2f18a56b65..bf6419d33565 100644 --- a/arch/arm/mach-omap2/am33xx-restart.c +++ b/arch/arm/mach-omap2/am33xx-restart.c @@ -9,7 +9,7 @@ #include "prm.h" /** - * am3xx_restart - trigger a software restart of the SoC + * am33xx_restart - trigger a software restart of the SoC * @mode: the "reboot mode", see arch/arm/kernel/{setup,process}.c * @cmd: passed from the userspace program rebooting the system (if provided) * -- cgit From e849e1630d600b849d18c1ee41b0494e38304712 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Tue, 16 Jan 2024 17:09:50 -0800 Subject: ARM: OMAP2+: clockdomain: fix kernel-doc warnings Use the correct function name in a kernel-doc comment to prevent a kernel-doc warning. Use the correct function parameter name to prevent a kernel-doc warning. clockdomain.c:1003: warning: expecting prototype for clkdm_deny_idle(). Prototype was for clkdm_deny_idle_nolock() instead clockdomain.c:1125: warning: Excess function parameter 'clk' description in 'clkdm_clk_enable' Signed-off-by: Randy Dunlap Cc: Paul Walmsley Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: patches@armlinux.org.uk Message-ID: <20240117011004.22669-3-rdunlap@infradead.org> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/clockdomain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index d145e7ac709b..69dc5b839335 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c @@ -990,7 +990,7 @@ void clkdm_allow_idle(struct clockdomain *clkdm) } /** - * clkdm_deny_idle - disable hwsup idle transitions for clkdm + * clkdm_deny_idle_nolock - disable hwsup idle transitions for clkdm * @clkdm: struct clockdomain * * * Prevent the hardware from automatically switching the clockdomain @@ -1110,7 +1110,7 @@ void clkdm_del_autodeps(struct clockdomain *clkdm) /** * clkdm_clk_enable - add an enabled downstream clock to this clkdm * @clkdm: struct clockdomain * - * @clk: struct clk * of the enabled downstream clock + * @unused: struct clk * of the enabled downstream clock * * Increment the usecount of the clockdomain @clkdm and ensure that it * is awake before @clk is enabled. Intended to be called by -- cgit From e0174a22875c2edf0f1c6eac977e70e8e2d0b9e9 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Tue, 16 Jan 2024 17:09:51 -0800 Subject: ARM: OMAP2+: clock: fix a function name in kernel-doc Use the correct function name in a kernel-doc comment to prevent a kernel-doc warning: clkt2xxx_virt_prcm_set.c:173: warning: expecting prototype for omap2xxx_clkt_vps_check_bootloader_rate(). Prototype was for omap2xxx_clkt_vps_check_bootloader_rates() instead Signed-off-by: Randy Dunlap Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: patches@armlinux.org.uk Message-ID: <20240117011004.22669-4-rdunlap@infradead.org> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c index be4557d1fdac..011076a5952f 100644 --- a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c +++ b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c @@ -162,7 +162,7 @@ static int omap2_select_table_rate(struct clk_hw *hw, unsigned long rate, } /** - * omap2xxx_clkt_vps_check_bootloader_rate - determine which of the rate + * omap2xxx_clkt_vps_check_bootloader_rates - determine which of the rate * table sets matches the current CORE DPLL hardware rate * * Check the MPU rate set by bootloader. Sets the 'curr_prcm_set' -- cgit From a9abf1784312125ace36ee9eb4417b750ea5b450 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Tue, 16 Jan 2024 17:09:52 -0800 Subject: ARM: OMAP2+: cm33xx: use matching function name in kernel-doc Prevent a kernel-doc warning by using the correct function name in the kernel-doc comment: cm33xx.c:366: warning: expecting prototype for am33xx_restore_save_context(). Prototype was for am33xx_clkdm_restore_context() instead Signed-off-by: Randy Dunlap Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: patches@armlinux.org.uk Message-ID: <20240117011004.22669-5-rdunlap@infradead.org> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/cm33xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/cm33xx.c b/arch/arm/mach-omap2/cm33xx.c index c824d4e3db63..acdf72a541c0 100644 --- a/arch/arm/mach-omap2/cm33xx.c +++ b/arch/arm/mach-omap2/cm33xx.c @@ -357,7 +357,7 @@ static int am33xx_clkdm_save_context(struct clockdomain *clkdm) } /** - * am33xx_restore_save_context - Restore the clockdomain transition context + * am33xx_clkdm_restore_context - Restore the clockdomain transition context * @clkdm: The clockdomain pointer whose context needs to be restored * * Restore the clockdomain transition context. -- cgit From 64de5526f2ecdd1b8f909a682359cc54d52f27c7 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Tue, 16 Jan 2024 17:09:53 -0800 Subject: ARM: OMAP2+: CMINST: use matching function name in kernel-doc Prevent a kernel-doc warning by using the correct function name in a kernel-doc comment: cminst44xx.c:249: warning: expecting prototype for omap4_cminst_clkdm_force_sleep(). Prototype was for omap4_cminst_clkdm_force_wakeup() instead Signed-off-by: Randy Dunlap Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: patches@armlinux.org.uk Message-ID: <20240117011004.22669-6-rdunlap@infradead.org> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/cminst44xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/cminst44xx.c b/arch/arm/mach-omap2/cminst44xx.c index 46670521b278..49483a888046 100644 --- a/arch/arm/mach-omap2/cminst44xx.c +++ b/arch/arm/mach-omap2/cminst44xx.c @@ -237,7 +237,7 @@ static void omap4_cminst_clkdm_disable_hwsup(u8 part, u16 inst, u16 cdoffs) } /** - * omap4_cminst_clkdm_force_sleep - try to take a clockdomain out of idle + * omap4_cminst_clkdm_force_wakeup - try to take a clockdomain out of idle * @part: PRCM partition ID that the clockdomain registers exist in * @inst: CM instance register offset (*_INST macro) * @cdoffs: Clockdomain register offset (*_CDOFFS macro) -- cgit From 73c0ec8600b1a7f7d46d7ed93582ff5c9437d4f8 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Tue, 16 Jan 2024 17:09:54 -0800 Subject: ARM: OMAP2+: hwmod: remove misuse of kernel-doc kernel-doc does not support documenting data definitions, so change the "/**" comments to common "/*" comments to avoid kernel-doc warnings: omap_hwmod_common_data.c:37: error: Cannot parse struct or union! omap_hwmod_common_data.c:51: error: Cannot parse struct or union! omap_hwmod_common_data.c:60: error: Cannot parse struct or union! Signed-off-by: Randy Dunlap Cc: Paul Walmsley Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: patches@armlinux.org.uk Message-ID: <20240117011004.22669-7-rdunlap@infradead.org> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/omap_hwmod_common_data.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.c b/arch/arm/mach-omap2/omap_hwmod_common_data.c index 246f1e5da99f..439232233c39 100644 --- a/arch/arm/mach-omap2/omap_hwmod_common_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_common_data.c @@ -20,7 +20,7 @@ #include "omap_hwmod_common_data.h" -/** +/* * struct omap_hwmod_sysc_type1 - TYPE1 sysconfig scheme. * * To be used by hwmod structure to specify the sysconfig offsets @@ -36,7 +36,7 @@ struct sysc_regbits omap_hwmod_sysc_type1 = { .autoidle_shift = SYSC_TYPE1_AUTOIDLE_SHIFT, }; -/** +/* * struct omap_hwmod_sysc_type2 - TYPE2 sysconfig scheme. * * To be used by hwmod structure to specify the sysconfig offsets if the @@ -50,7 +50,7 @@ struct sysc_regbits omap_hwmod_sysc_type2 = { .dmadisable_shift = SYSC_TYPE2_DMADISABLE_SHIFT, }; -/** +/* * struct omap_hwmod_sysc_type3 - TYPE3 sysconfig scheme. * Used by some IPs on AM33xx */ -- cgit From 176a16fa4fd728b17e8065c4b28a49cc70b3b03d Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Tue, 16 Jan 2024 17:09:55 -0800 Subject: ARM: OMAP2+: hwmod: fix kernel-doc warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the correct function name in a kernel-doc comment. Use the correct function parameter names in kernel-doc comments. These changes prevent the following warnings: omap_hwmod.c:910: warning: expecting prototype for _init_opt_clk(). Prototype was for _init_opt_clks() instead omap_hwmod.c:2311: warning: Excess function parameter 'n' description in '_init' omap_hwmod.c:2510: warning: Excess function parameter 'n' description in '_setup' omap_hwmod.c:3387: warning: Excess function parameter 'clockdomain' description in 'omap_hwmod_allocate_module' Signed-off-by: Randy Dunlap Cc: Paul Walmsley Cc: "BenoƮt Cousson" Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: patches@armlinux.org.uk Message-ID: <20240117011004.22669-8-rdunlap@infradead.org> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/omap_hwmod.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index ba71928c0fcb..111677878d9c 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -900,7 +900,7 @@ static int _init_interface_clks(struct omap_hwmod *oh) } /** - * _init_opt_clk - get a struct clk * for the hwmod's optional clocks + * _init_opt_clks - get a struct clk * for the hwmod's optional clocks * @oh: struct omap_hwmod * * * Called from _init_clocks(). Populates the @oh omap_hwmod_opt_clk @@ -2297,7 +2297,7 @@ static void __init parse_module_flags(struct omap_hwmod *oh, /** * _init - initialize internal data for the hwmod @oh * @oh: struct omap_hwmod * - * @n: (unused) + * @data: (unused) * * Look up the clocks and the address space used by the MPU to access * registers belonging to the hwmod @oh. @oh must already be @@ -2493,7 +2493,7 @@ static void _setup_postsetup(struct omap_hwmod *oh) /** * _setup - prepare IP block hardware for use * @oh: struct omap_hwmod * - * @n: (unused, pass NULL) + * @data: (unused, pass NULL) * * Configure the IP block represented by @oh. This may include * enabling the IP block, resetting it, and placing it into a @@ -3367,8 +3367,9 @@ static int omap_hwmod_check_module(struct device *dev, * omap_hwmod_allocate_module - allocate new module * @dev: struct device * @oh: module + * @data: module data * @sysc_fields: sysc register bits - * @clockdomain: clockdomain + * @clkdm: clockdomain * @rev_offs: revision register offset * @sysc_offs: sysconfig register offset * @syss_offs: sysstatus register offset -- cgit From d33bb8ffc5c1b10d769eb38d0d9a70e57233ca15 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Tue, 16 Jan 2024 17:09:56 -0800 Subject: ARM: OMAP2+: pmic-cpcap: fix kernel-doc warnings Use the correct function names in kernel-doc comments. Use "Return[s]:" kernel-doc notation for function return values. These changes prevent the following warnings: pmic-cpcap.c:28: warning: expecting prototype for omap_cpcap_vsel_to_vdc(). Prototype was for omap_cpcap_vsel_to_uv() instead pmic-cpcap.c:92: warning: expecting prototype for omap_max8952_vsel_to_vdc(). Prototype was for omap_max8952_vsel_to_uv() instead pmic-cpcap.c:139: warning: expecting prototype for omap_fan5355_vsel_to_vdc(). Prototype was for omap_fan535503_vsel_to_uv() instead pmic-cpcap.c:154: warning: expecting prototype for omap_fan535508_vsel_to_vdc(). Prototype was for omap_fan535508_vsel_to_uv() instead pmic-cpcap.c:28: warning: No description found for return value of 'omap_cpcap_vsel_to_uv' pmic-cpcap.c:42: warning: No description found for return value of 'omap_cpcap_uv_to_vsel' pmic-cpcap.c:92: warning: No description found for return value of 'omap_max8952_vsel_to_uv' pmic-cpcap.c:106: warning: No description found for return value of 'omap_max8952_uv_to_vsel' pmic-cpcap.c:139: warning: No description found for return value of 'omap_fan535503_vsel_to_uv' pmic-cpcap.c:154: warning: No description found for return value of 'omap_fan535508_vsel_to_uv' pmic-cpcap.c:172: warning: No description found for return value of 'omap_fan535503_uv_to_vsel' pmic-cpcap.c:191: warning: No description found for return value of 'omap_fan535508_uv_to_vsel' Signed-off-by: Randy Dunlap Cc: Kevin Hilman Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: patches@armlinux.org.uk Message-ID: <20240117011004.22669-9-rdunlap@infradead.org> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/pmic-cpcap.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/pmic-cpcap.c b/arch/arm/mach-omap2/pmic-cpcap.c index 668dc84fd31e..4f31e61c0c90 100644 --- a/arch/arm/mach-omap2/pmic-cpcap.c +++ b/arch/arm/mach-omap2/pmic-cpcap.c @@ -18,10 +18,10 @@ #include "vc.h" /** - * omap_cpcap_vsel_to_vdc - convert CPCAP VSEL value to microvolts DC + * omap_cpcap_vsel_to_uv - convert CPCAP VSEL value to microvolts DC * @vsel: CPCAP VSEL value to convert * - * Returns the microvolts DC that the CPCAP PMIC should generate when + * Returns: the microvolts DC that the CPCAP PMIC should generate when * programmed with @vsel. */ static unsigned long omap_cpcap_vsel_to_uv(unsigned char vsel) @@ -35,7 +35,7 @@ static unsigned long omap_cpcap_vsel_to_uv(unsigned char vsel) * omap_cpcap_uv_to_vsel - convert microvolts DC to CPCAP VSEL value * @uv: microvolts DC to convert * - * Returns the VSEL value necessary for the CPCAP PMIC to + * Returns: the VSEL value necessary for the CPCAP PMIC to * generate an output voltage equal to or greater than @uv microvolts DC. */ static unsigned char omap_cpcap_uv_to_vsel(unsigned long uv) @@ -82,10 +82,10 @@ static struct omap_voltdm_pmic omap_cpcap_iva = { }; /** - * omap_max8952_vsel_to_vdc - convert MAX8952 VSEL value to microvolts DC + * omap_max8952_vsel_to_uv - convert MAX8952 VSEL value to microvolts DC * @vsel: MAX8952 VSEL value to convert * - * Returns the microvolts DC that the MAX8952 Regulator should generate when + * Returns: the microvolts DC that the MAX8952 Regulator should generate when * programmed with @vsel. */ static unsigned long omap_max8952_vsel_to_uv(unsigned char vsel) @@ -99,7 +99,7 @@ static unsigned long omap_max8952_vsel_to_uv(unsigned char vsel) * omap_max8952_uv_to_vsel - convert microvolts DC to MAX8952 VSEL value * @uv: microvolts DC to convert * - * Returns the VSEL value necessary for the MAX8952 Regulator to + * Returns: the VSEL value necessary for the MAX8952 Regulator to * generate an output voltage equal to or greater than @uv microvolts DC. */ static unsigned char omap_max8952_uv_to_vsel(unsigned long uv) @@ -129,10 +129,10 @@ static struct omap_voltdm_pmic omap443x_max8952_mpu = { }; /** - * omap_fan5355_vsel_to_vdc - convert FAN535503 VSEL value to microvolts DC + * omap_fan535503_vsel_to_uv - convert FAN535503 VSEL value to microvolts DC * @vsel: FAN535503 VSEL value to convert * - * Returns the microvolts DC that the FAN535503 Regulator should generate when + * Returns: the microvolts DC that the FAN535503 Regulator should generate when * programmed with @vsel. */ static unsigned long omap_fan535503_vsel_to_uv(unsigned char vsel) @@ -144,10 +144,10 @@ static unsigned long omap_fan535503_vsel_to_uv(unsigned char vsel) } /** - * omap_fan535508_vsel_to_vdc - convert FAN535508 VSEL value to microvolts DC + * omap_fan535508_vsel_to_uv - convert FAN535508 VSEL value to microvolts DC * @vsel: FAN535508 VSEL value to convert * - * Returns the microvolts DC that the FAN535508 Regulator should generate when + * Returns: the microvolts DC that the FAN535508 Regulator should generate when * programmed with @vsel. */ static unsigned long omap_fan535508_vsel_to_uv(unsigned char vsel) @@ -165,7 +165,7 @@ static unsigned long omap_fan535508_vsel_to_uv(unsigned char vsel) * omap_fan535503_uv_to_vsel - convert microvolts DC to FAN535503 VSEL value * @uv: microvolts DC to convert * - * Returns the VSEL value necessary for the MAX8952 Regulator to + * Returns: the VSEL value necessary for the MAX8952 Regulator to * generate an output voltage equal to or greater than @uv microvolts DC. */ static unsigned char omap_fan535503_uv_to_vsel(unsigned long uv) @@ -184,7 +184,7 @@ static unsigned char omap_fan535503_uv_to_vsel(unsigned long uv) * omap_fan535508_uv_to_vsel - convert microvolts DC to FAN535508 VSEL value * @uv: microvolts DC to convert * - * Returns the VSEL value necessary for the MAX8952 Regulator to + * Returns: the VSEL value necessary for the MAX8952 Regulator to * generate an output voltage equal to or greater than @uv microvolts DC. */ static unsigned char omap_fan535508_uv_to_vsel(unsigned long uv) -- cgit From 4e4afbb3ffa483af1ebb01464b07bde29ec04f59 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Tue, 16 Jan 2024 17:09:57 -0800 Subject: ARM: OMAP2+: prm44xx: fix a kernel-doc warning Use the correct function name in a kernel-doc comment to prevent a warning: prm44xx.c:421: warning: expecting prototype for omap44xx_prm_clear_context_lost_flags_old(). Prototype was for omap44xx_prm_clear_context_loss_flags_old() instead Signed-off-by: Randy Dunlap Cc: Paul Walmsley Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: patches@armlinux.org.uk Message-ID: <20240117011004.22669-10-rdunlap@infradead.org> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/prm44xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c index 25093c1e5b9a..6c555438dd48 100644 --- a/arch/arm/mach-omap2/prm44xx.c +++ b/arch/arm/mach-omap2/prm44xx.c @@ -407,7 +407,7 @@ static bool omap44xx_prm_was_any_context_lost_old(u8 part, s16 inst, u16 idx) } /** - * omap44xx_prm_clear_context_lost_flags_old - clear context loss flags + * omap44xx_prm_clear_context_loss_flags_old - clear context loss flags * @part: PRM partition ID (e.g., OMAP4430_PRM_PARTITION) * @inst: PRM instance offset (e.g., OMAP4430_PRM_MPU_INST) * @idx: CONTEXT register offset -- cgit From f9dbbac93244675d91bf36ff4efabe8f79e3b946 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Tue, 16 Jan 2024 17:09:58 -0800 Subject: ARM: OMAP2+: PRM: fix kernel-doc warnings Use the correct function name in a kernel-doc comment. Add function parameter descriptions in 2 places. These changes prevent the following warnings: prm_common.c:384: warning: expecting prototype for prm_clear_context_lost_flags_old(). Prototype was for prm_clear_context_loss_flags_old() instead prm_common.c:505: warning: Function parameter or struct member 'vp_id' not described in 'omap_prm_vp_check_txdone' prm_common.c:522: warning: Function parameter or struct member 'vp_id' not described in 'omap_prm_vp_clear_txdone' Signed-off-by: Randy Dunlap Cc: Paul Walmsley Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: patches@armlinux.org.uk Message-ID: <20240117011004.22669-11-rdunlap@infradead.org> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/prm_common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c index fd896f2295a1..3e1e5198bebf 100644 --- a/arch/arm/mach-omap2/prm_common.c +++ b/arch/arm/mach-omap2/prm_common.c @@ -370,7 +370,7 @@ bool prm_was_any_context_lost_old(u8 part, s16 inst, u16 idx) } /** - * prm_clear_context_lost_flags_old - clear context loss flags (old API) + * prm_clear_context_loss_flags_old - clear context loss flags (old API) * @part: PRM partition ID (e.g., OMAP4430_PRM_PARTITION) * @inst: PRM instance offset (e.g., OMAP4430_PRM_MPU_INST) * @idx: CONTEXT register offset @@ -497,6 +497,7 @@ int omap_prm_clear_mod_irqs(s16 module, u8 regs, u32 wkst_mask) /** * omap_prm_vp_check_txdone - check voltage processor TX done status + * @vp_id: unique VP instance ID * * Checks if voltage processor transmission has been completed. * Returns non-zero if a transmission has completed, 0 otherwise. @@ -514,6 +515,7 @@ u32 omap_prm_vp_check_txdone(u8 vp_id) /** * omap_prm_vp_clear_txdone - clears voltage processor TX done status + * @vp_id: unique VP instance ID * * Clears the status bit for completed voltage processor transmission * returned by prm_vp_check_txdone. -- cgit From 57adbcd0231237b73d418b3ef944f8904aa77525 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Tue, 16 Jan 2024 17:09:59 -0800 Subject: ARM: OMAP2+: fix a kernel-doc warning Use the correct function name in a kernel-doc comment to prevent a warning: powerdomain.c:1171: warning: expecting prototype for pwrdm_save_context(). Prototype was for pwrdm_restore_context() instead Signed-off-by: Randy Dunlap Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: patches@armlinux.org.uk Message-ID: <20240117011004.22669-12-rdunlap@infradead.org> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/powerdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 5e05dd1324e7..2441d96b7144 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c @@ -1162,7 +1162,7 @@ static int pwrdm_save_context(struct powerdomain *pwrdm, void *unused) } /** - * pwrdm_save_context - restore powerdomain registers + * pwrdm_restore_context - restore powerdomain registers * * Restore powerdomain control registers after a suspend or resume * event. -- cgit From 0e31a8cad726e592524f4ac51858244487657650 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Tue, 16 Jan 2024 17:10:00 -0800 Subject: ARM: OMAP2+: fix kernel-doc warnings Use the correct function name in a comment. Use the correct function parameter name in a comment. These changes prevent the following kernel-doc warnings: omap-secure.c:61: warning: expecting prototype for omap_sec_dispatcher(). Prototype was for omap_secure_dispatcher() instead omap-secure.c:191: warning: Excess function parameter 'clr_bits' description in 'rx51_secure_update_aux_cr' Signed-off-by: Randy Dunlap Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: patches@armlinux.org.uk Message-ID: <20240117011004.22669-13-rdunlap@infradead.org> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/omap-secure.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/omap-secure.c b/arch/arm/mach-omap2/omap-secure.c index 29c7350b06ab..c2e1aecd07cc 100644 --- a/arch/arm/mach-omap2/omap-secure.c +++ b/arch/arm/mach-omap2/omap-secure.c @@ -47,7 +47,7 @@ static void __init omap_optee_init_check(void) } /** - * omap_sec_dispatcher: Routine to dispatch low power secure + * omap_secure_dispatcher - Routine to dispatch low power secure * service routines * @idx: The HAL API index * @flag: The flag indicating criticality of operation @@ -183,7 +183,7 @@ static u32 rx51_secure_dispatcher(u32 idx, u32 process, u32 flag, u32 nargs, /** * rx51_secure_update_aux_cr: Routine to modify the contents of Auxiliary Control Register * @set_bits: bits to set in ACR - * @clr_bits: bits to clear in ACR + * @clear_bits: bits to clear in ACR * * Return the non-zero error value on failure. */ -- cgit From c6e33edb02292059a06ce8fdc4249a5db86a6114 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Tue, 16 Jan 2024 17:10:01 -0800 Subject: ARM: OMAP2+: fix kernel-doc warnings Use the correct function name in a comment. Add the return value documentation for one function. These changes prevent these warnings: wd_timer.c:76: warning: expecting prototype for omap2_wdtimer_reset(). Prototype was for omap2_wd_timer_reset() instead wd_timer.c:76: warning: No description found for return value of 'omap2_wd_timer_reset' Signed-off-by: Randy Dunlap Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: patches@armlinux.org.uk Message-ID: <20240117011004.22669-14-rdunlap@infradead.org> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/wd_timer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/wd_timer.c b/arch/arm/mach-omap2/wd_timer.c index d4ea56a5f75a..898e7e332981 100644 --- a/arch/arm/mach-omap2/wd_timer.c +++ b/arch/arm/mach-omap2/wd_timer.c @@ -57,7 +57,7 @@ int omap2_wd_timer_disable(struct omap_hwmod *oh) } /** - * omap2_wdtimer_reset - reset and disable the WDTIMER IP block + * omap2_wd_timer_reset - reset and disable the WDTIMER IP block * @oh: struct omap_hwmod * * * After the WDTIMER IP blocks are reset on OMAP2/3, we must also take @@ -71,6 +71,8 @@ int omap2_wd_timer_disable(struct omap_hwmod *oh) * during a normal merge window. omap_hwmod_softreset() should be * renamed to omap_hwmod_set_ocp_softreset(), and omap_hwmod_softreset() * should call the hwmod _ocp_softreset() code. + * + * Returns: %0 on success or -errno value on error. */ int omap2_wd_timer_reset(struct omap_hwmod *oh) { -- cgit From 0d04e84db74d94732821ec515365109d12a9491c Mon Sep 17 00:00:00 2001 From: Christophe JAILLET Date: Thu, 11 Jan 2024 21:31:55 +0100 Subject: ARM: imx: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Signed-off-by: Shawn Guo --- arch/arm/mach-imx/mmdc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c index 444a7eaa320c..25893d109190 100644 --- a/arch/arm/mach-imx/mmdc.c +++ b/arch/arm/mach-imx/mmdc.c @@ -452,7 +452,7 @@ static int mmdc_pmu_init(struct mmdc_pmu *pmu_mmdc, .active_events = 0, }; - pmu_mmdc->id = ida_simple_get(&mmdc_ida, 0, 0, GFP_KERNEL); + pmu_mmdc->id = ida_alloc(&mmdc_ida, GFP_KERNEL); return pmu_mmdc->id; } @@ -461,7 +461,7 @@ static void imx_mmdc_remove(struct platform_device *pdev) { struct mmdc_pmu *pmu_mmdc = platform_get_drvdata(pdev); - ida_simple_remove(&mmdc_ida, pmu_mmdc->id); + ida_free(&mmdc_ida, pmu_mmdc->id); cpuhp_state_remove_instance_nocalls(cpuhp_mmdc_state, &pmu_mmdc->node); perf_pmu_unregister(&pmu_mmdc->pmu); iounmap(pmu_mmdc->mmdc_base); @@ -529,7 +529,7 @@ pmu_register_err: cpuhp_state_remove_instance_nocalls(cpuhp_mmdc_state, &pmu_mmdc->node); hrtimer_cancel(&pmu_mmdc->hrtimer); pmu_release_id: - ida_simple_remove(&mmdc_ida, pmu_mmdc->id); + ida_free(&mmdc_ida, pmu_mmdc->id); pmu_free: kfree(pmu_mmdc); return ret; -- cgit From a3891621d4a0783ae178d6f2845517e3dd571dd4 Mon Sep 17 00:00:00 2001 From: "Ricardo B. Marliere" Date: Sun, 4 Feb 2024 11:46:21 -0300 Subject: ARM: s3c64xx: make bus_type const Since commit d492cc2573a0 ("driver core: device.h: make struct bus_type a const *"), the driver core can properly handle constant struct bus_type, move the s3c6410_subsys variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20240204-bus_cleanup-arm-v1-1-41d651dd8411@marliere.net Link: https://lore.kernel.org/r/20240211-bus_cleanup-arm-v2-1-3de9e8af7cbd@marliere.net Signed-off-by: Krzysztof Kozlowski --- arch/arm/mach-s3c/cpu.h | 2 +- arch/arm/mach-s3c/s3c6410.c | 2 +- arch/arm/mach-s3c/s3c64xx.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-s3c/cpu.h b/arch/arm/mach-s3c/cpu.h index d0adc9b40e25..a0187606b999 100644 --- a/arch/arm/mach-s3c/cpu.h +++ b/arch/arm/mach-s3c/cpu.h @@ -76,6 +76,6 @@ extern void s3c24xx_init_uartdevs(char *name, struct s3c24xx_uart_resources *res, struct s3c2410_uartcfg *cfg, int no); -extern struct bus_type s3c6410_subsys; +extern const struct bus_type s3c6410_subsys; #endif diff --git a/arch/arm/mach-s3c/s3c6410.c b/arch/arm/mach-s3c/s3c6410.c index e79f18d0ca81..a29276a4fde5 100644 --- a/arch/arm/mach-s3c/s3c6410.c +++ b/arch/arm/mach-s3c/s3c6410.c @@ -57,7 +57,7 @@ void __init s3c6410_init_irq(void) s3c64xx_init_irq(~0 & ~(1 << 7), ~0); } -struct bus_type s3c6410_subsys = { +const struct bus_type s3c6410_subsys = { .name = "s3c6410-core", .dev_name = "s3c6410-core", }; diff --git a/arch/arm/mach-s3c/s3c64xx.c b/arch/arm/mach-s3c/s3c64xx.c index 9f9717874d67..6c70ea7f2931 100644 --- a/arch/arm/mach-s3c/s3c64xx.c +++ b/arch/arm/mach-s3c/s3c64xx.c @@ -149,7 +149,7 @@ static struct map_desc s3c_iodesc[] __initdata = { }, }; -static struct bus_type s3c64xx_subsys = { +static const struct bus_type s3c64xx_subsys = { .name = "s3c64xx-core", .dev_name = "s3c64xx-core", }; -- cgit From bd69d2c7312a210129b3c840dd5a7c970a64e0c8 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sun, 4 Feb 2024 21:57:16 +0900 Subject: ARM: omap1: remove duplicated 'select ARCH_OMAP' Commit 980a637d11fe ("ARM: omap1: fix !ARCH_OMAP1_ANY link failures") added one more 'select ARCH_OMAP'. Signed-off-by: Masahiro Yamada Message-ID: <20240204125716.56756-1-masahiroy@kernel.org> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap1/Kconfig | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig index cbf703f0d850..a643b71e30a3 100644 --- a/arch/arm/mach-omap1/Kconfig +++ b/arch/arm/mach-omap1/Kconfig @@ -4,7 +4,6 @@ menuconfig ARCH_OMAP1 depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 depends on CPU_LITTLE_ENDIAN depends on ATAGS - select ARCH_OMAP select ARCH_HAS_HOLES_MEMORYMODEL select ARCH_OMAP select CLKSRC_MMIO -- cgit From 1afa7542be6ea0b10b81f7798c0566472d9fa53a Mon Sep 17 00:00:00 2001 From: Alexander Sverdlin Date: Wed, 21 Feb 2024 16:45:50 +0100 Subject: ARM: AM33xx: PRM: Remove redundand defines AM33XX_PRM_RSTCTRL_OFFSET is already defined in prm33xx.h and AM33XX_RST_GLOBAL_WARM_SW_MASK in prm-regbits-33xx.h. Signed-off-by: Alexander Sverdlin Message-ID: <20240221154614.3549951-1-alexander.sverdlin@siemens.com> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/prm33xx.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/prm33xx.c b/arch/arm/mach-omap2/prm33xx.c index 4b65a0f9cf7d..4a462310a4b0 100644 --- a/arch/arm/mach-omap2/prm33xx.c +++ b/arch/arm/mach-omap2/prm33xx.c @@ -15,10 +15,6 @@ #include "prm33xx.h" #include "prm-regbits-33xx.h" -#define AM33XX_PRM_RSTCTRL_OFFSET 0x0000 - -#define AM33XX_RST_GLOBAL_WARM_SW_MASK (1 << 0) - /* Read a register in a PRM instance */ static u32 am33xx_prm_read_reg(s16 inst, u16 idx) { -- cgit From 6521f6a195c70e16cab375ca1c4d23b6fd3d76b4 Mon Sep 17 00:00:00 2001 From: Alexander Sverdlin Date: Wed, 21 Feb 2024 16:45:51 +0100 Subject: ARM: AM33xx: PRM: Implement REBOOT_COLD Historically AM33xx performed warm software reset even though requested (and default) was REBOOT_COLD. Reflect the de-facto default mode in /sys/kernel/reboot/mode correctly and implement the real REBOOT_COLD (if configured explicitly). Tested-by: Matthias Michel Signed-off-by: Alexander Sverdlin Message-ID: <20240221154614.3549951-2-alexander.sverdlin@siemens.com> Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/am33xx-restart.c | 3 ++- arch/arm/mach-omap2/board-generic.c | 6 ++++++ arch/arm/mach-omap2/prm-regbits-33xx.h | 1 + arch/arm/mach-omap2/prm.h | 1 + arch/arm/mach-omap2/prm33xx.c | 18 ++++++++++++++---- arch/arm/mach-omap2/prm_common.c | 6 ++++++ 6 files changed, 30 insertions(+), 5 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/am33xx-restart.c b/arch/arm/mach-omap2/am33xx-restart.c index bf6419d33565..fcf3d557aa78 100644 --- a/arch/arm/mach-omap2/am33xx-restart.c +++ b/arch/arm/mach-omap2/am33xx-restart.c @@ -18,7 +18,8 @@ */ void am33xx_restart(enum reboot_mode mode, const char *cmd) { - /* TODO: Handle mode and cmd if necessary */ + /* TODO: Handle cmd if necessary */ + prm_reboot_mode = mode; omap_prm_reset_system(); } diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index fde6ccb3df6e..68e0baad2bbf 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c @@ -246,6 +246,12 @@ 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 diff --git a/arch/arm/mach-omap2/prm-regbits-33xx.h b/arch/arm/mach-omap2/prm-regbits-33xx.h index 3748c5266ae1..9b97f8c76cd1 100644 --- a/arch/arm/mach-omap2/prm-regbits-33xx.h +++ b/arch/arm/mach-omap2/prm-regbits-33xx.h @@ -15,6 +15,7 @@ #define AM33XX_GFX_MEM_STATEST_MASK (0x3 << 4) #define AM33XX_GLOBAL_WARM_SW_RST_MASK (1 << 1) #define AM33XX_RST_GLOBAL_WARM_SW_MASK (1 << 0) +#define AM33XX_RST_GLOBAL_COLD_SW_MASK (1 << 1) #define AM33XX_PRUSS_MEM_ONSTATE_MASK (0x3 << 5) #define AM33XX_PRUSS_MEM_RETSTATE_MASK (1 << 7) #define AM33XX_PRUSS_MEM_STATEST_MASK (0x3 << 23) diff --git a/arch/arm/mach-omap2/prm.h b/arch/arm/mach-omap2/prm.h index fc45a7ed09bb..fc53a27eed01 100644 --- a/arch/arm/mach-omap2/prm.h +++ b/arch/arm/mach-omap2/prm.h @@ -15,6 +15,7 @@ # ifndef __ASSEMBLER__ extern struct omap_domain_base prm_base; extern u16 prm_features; +extern enum reboot_mode prm_reboot_mode; int omap_prcm_init(void); int omap2_prcm_base_init(void); # endif diff --git a/arch/arm/mach-omap2/prm33xx.c b/arch/arm/mach-omap2/prm33xx.c index 4a462310a4b0..505d685d6792 100644 --- a/arch/arm/mach-omap2/prm33xx.c +++ b/arch/arm/mach-omap2/prm33xx.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "powerdomain.h" #include "prm33xx.h" @@ -318,10 +319,19 @@ static int am33xx_check_vcvp(void) * * Immediately reboots the device through warm reset. */ -static void am33xx_prm_global_warm_sw_reset(void) +static void am33xx_prm_global_sw_reset(void) { - am33xx_prm_rmw_reg_bits(AM33XX_RST_GLOBAL_WARM_SW_MASK, - AM33XX_RST_GLOBAL_WARM_SW_MASK, + /* + * Historically AM33xx performed warm reset for all requested reboot_mode. + * Keep this behaviour unchanged for all except newly added REBOOT_COLD. + */ + u32 mask = AM33XX_RST_GLOBAL_WARM_SW_MASK; + + if (prm_reboot_mode == REBOOT_COLD) + mask = AM33XX_RST_GLOBAL_COLD_SW_MASK; + + am33xx_prm_rmw_reg_bits(mask, + mask, AM33XX_PRM_DEVICE_MOD, AM33XX_PRM_RSTCTRL_OFFSET); @@ -382,7 +392,7 @@ static struct prm_ll_data am33xx_prm_ll_data = { .assert_hardreset = am33xx_prm_assert_hardreset, .deassert_hardreset = am33xx_prm_deassert_hardreset, .is_hardreset_asserted = am33xx_prm_is_hardreset_asserted, - .reset_system = am33xx_prm_global_warm_sw_reset, + .reset_system = am33xx_prm_global_sw_reset, }; int __init am33xx_prm_init(const struct omap_prcm_init_data *data) diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c index 3e1e5198bebf..ee4588acda50 100644 --- a/arch/arm/mach-omap2/prm_common.c +++ b/arch/arm/mach-omap2/prm_common.c @@ -66,6 +66,12 @@ struct omap_domain_base prm_base; u16 prm_features; +/* + * Platforms that implement different reboot modes can store the requested + * mode here. + */ +enum reboot_mode prm_reboot_mode; + /* * prm_ll_data: function pointers to SoC-specific implementations of * common PRM functions -- cgit