linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Minor ti-sysc cleanups
@ 2019-06-25 23:33 Suman Anna
  2019-06-25 23:33 ` [PATCH 1/5] MAINTAINERS: Add ti-sysc files under the OMAP2+ entry Suman Anna
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Suman Anna @ 2019-06-25 23:33 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Tero Kristo, Roger Quadros, linux-omap, linux-kernel, Suman Anna

Hi Tony,

The following series includes minor cleanup patches against the ti-sysc
code. Patches are based on top of all your 5.3 staged branches. Feel free
to pick them up for either 5.3 (if it is not too late) or 5.4 merge window. 

The first 4 patches are non-coding changes, and the last patch is a minor
fixup cleaning up the code flow on failure error paths in sysc_probe()
function. I have boot tested on the limited boards that I have - AM335x
BeagleBone Black, AM437x IDK, AM57xx GP EVM, OMAP4 PandaBoard and OMAP5
uEVM.

regards
Suman

Suman Anna (5):
  MAINTAINERS: Add ti-sysc files under the OMAP2+ entry
  dt-bindings: ti-sysc: Add SPDX license identifier
  bus: ti-sysc: Switch to SPDX license identifier
  bus: ti-sysc: Add missing kerneldoc comments
  bus: ti-sysc: Simplify cleanup upon failures in sysc_probe()

 MAINTAINERS                           |  2 ++
 drivers/bus/ti-sysc.c                 | 31 +++++++++++++--------------
 include/dt-bindings/bus/ti-sysc.h     |  1 +
 include/linux/platform_data/ti-sysc.h |  7 ++++--
 4 files changed, 23 insertions(+), 18 deletions(-)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/5] MAINTAINERS: Add ti-sysc files under the OMAP2+ entry
  2019-06-25 23:33 [PATCH 0/5] Minor ti-sysc cleanups Suman Anna
@ 2019-06-25 23:33 ` Suman Anna
  2019-06-25 23:33 ` [PATCH 2/5] dt-bindings: ti-sysc: Add SPDX license identifier Suman Anna
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Suman Anna @ 2019-06-25 23:33 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Tero Kristo, Roger Quadros, linux-omap, linux-kernel, Suman Anna

Add the ti-sysc source files under the OMAP2+ entry so that
the get_maintainer script also generates the linux-omap
list to be cc'd for all patches touching these files.

Signed-off-by: Suman Anna <s-anna@ti.com>
---
 MAINTAINERS | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index d0ed735994a5..d45c456bc051 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11526,6 +11526,7 @@ S:	Maintained
 F:	arch/arm/mach-omap2/
 F:	arch/arm/plat-omap/
 F:	arch/arm/configs/omap2plus_defconfig
+F:	drivers/bus/ti-sysc.c
 F:	drivers/i2c/busses/i2c-omap.c
 F:	drivers/irqchip/irq-omap-intc.c
 F:	drivers/mfd/*omap*.c
@@ -11546,6 +11547,7 @@ F:	drivers/regulator/tps65910-regulator.c
 F:	drivers/regulator/twl-regulator.c
 F:	drivers/regulator/twl6030-regulator.c
 F:	include/linux/platform_data/i2c-omap.h
+F:	include/linux/platform_data/ti-sysc.h
 
 ONION OMEGA2+ BOARD
 M:	Harvey Hunt <harveyhuntnexus@gmail.com>
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/5] dt-bindings: ti-sysc: Add SPDX license identifier
  2019-06-25 23:33 [PATCH 0/5] Minor ti-sysc cleanups Suman Anna
  2019-06-25 23:33 ` [PATCH 1/5] MAINTAINERS: Add ti-sysc files under the OMAP2+ entry Suman Anna
@ 2019-06-25 23:33 ` Suman Anna
  2019-06-25 23:33 ` [PATCH 3/5] bus: ti-sysc: Switch to " Suman Anna
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Suman Anna @ 2019-06-25 23:33 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Tero Kristo, Roger Quadros, linux-omap, linux-kernel, Suman Anna

Add the appropriate SPDX license identifier to the common
TI sysc bindings header file.

Signed-off-by: Suman Anna <s-anna@ti.com>
---
 include/dt-bindings/bus/ti-sysc.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/dt-bindings/bus/ti-sysc.h b/include/dt-bindings/bus/ti-sysc.h
index 7138384e2ef9..babd08a1d226 100644
--- a/include/dt-bindings/bus/ti-sysc.h
+++ b/include/dt-bindings/bus/ti-sysc.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* TI sysc interconnect target module defines */
 
 /* Generic sysc found on omap2 and later, also known as type1 */
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/5] bus: ti-sysc: Switch to SPDX license identifier
  2019-06-25 23:33 [PATCH 0/5] Minor ti-sysc cleanups Suman Anna
  2019-06-25 23:33 ` [PATCH 1/5] MAINTAINERS: Add ti-sysc files under the OMAP2+ entry Suman Anna
  2019-06-25 23:33 ` [PATCH 2/5] dt-bindings: ti-sysc: Add SPDX license identifier Suman Anna
@ 2019-06-25 23:33 ` Suman Anna
  2019-06-25 23:33 ` [PATCH 4/5] bus: ti-sysc: Add missing kerneldoc comments Suman Anna
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Suman Anna @ 2019-06-25 23:33 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Tero Kristo, Roger Quadros, linux-omap, linux-kernel, Suman Anna

Use the appropriate SPDX license identifier in the TI sysc
interconnect target driver source files and drop the previous
boilerplate license text. Also, add the the SPDX license
identifier in the associated ti-sysc header files.

Signed-off-by: Suman Anna <s-anna@ti.com>
---
 drivers/bus/ti-sysc.c                 | 10 +---------
 include/linux/platform_data/ti-sysc.h |  2 ++
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index e6deabd8305d..3030c9eadfb1 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -1,14 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ti-sysc.c - Texas Instruments sysc interconnect target driver
- *
- * 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.
- *
- * This program is distributed "as is" WITHOUT ANY WARRANTY of any
- * kind, whether express or implied; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
  */
 
 #include <linux/io.h>
diff --git a/include/linux/platform_data/ti-sysc.h b/include/linux/platform_data/ti-sysc.h
index 0c587d4fc718..7d009dc08a54 100644
--- a/include/linux/platform_data/ti-sysc.h
+++ b/include/linux/platform_data/ti-sysc.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
 #ifndef __TI_SYSC_DATA_H__
 #define __TI_SYSC_DATA_H__
 
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/5] bus: ti-sysc: Add missing kerneldoc comments
  2019-06-25 23:33 [PATCH 0/5] Minor ti-sysc cleanups Suman Anna
                   ` (2 preceding siblings ...)
  2019-06-25 23:33 ` [PATCH 3/5] bus: ti-sysc: Switch to " Suman Anna
@ 2019-06-25 23:33 ` Suman Anna
  2019-06-25 23:33 ` [PATCH 5/5] bus: ti-sysc: Simplify cleanup upon failures in sysc_probe() Suman Anna
  2019-07-01  7:18 ` [PATCH 0/5] Minor ti-sysc cleanups Roger Quadros
  5 siblings, 0 replies; 10+ messages in thread
From: Suman Anna @ 2019-06-25 23:33 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Tero Kristo, Roger Quadros, linux-omap, linux-kernel, Suman Anna

A few fields in various structures is missing the corresponding
kerneldoc comments. Add them. Also, fixed the comment for sidlemodes.

Signed-off-by: Suman Anna <s-anna@ti.com>
---
 drivers/bus/ti-sysc.c                 | 7 +++++++
 include/linux/platform_data/ti-sysc.h | 5 +++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 3030c9eadfb1..ccdd1f0871f9 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -54,15 +54,22 @@ static const char * const clock_names[SYSC_MAX_CLOCKS] = {
  * @module_size: size of the interconnect target module
  * @module_va: virtual address of the interconnect target module
  * @offsets: register offsets from module base
+ * @mdata: ti-sysc to hwmod translation data for a module
  * @clocks: clocks used by the interconnect target module
  * @clock_roles: clock role names for the found clocks
  * @nr_clocks: number of clocks used by the interconnect target module
+ * @rsts: resets used by the interconnect target module
  * @legacy_mode: configured for legacy mode if set
  * @cap: interconnect target module capabilities
  * @cfg: interconnect target module configuration
+ * @cookie: data used by legacy platform callbacks
  * @name: name if available
  * @revision: interconnect target module revision
+ * @enabled: sysc runtime enabled status
  * @needs_resume: runtime resume needed on resume from suspend
+ * @child_needs_resume: runtime resume needed for child on resume from suspend
+ * @disable_on_idle: status flag used for disabling modules with resets
+ * @idle_work: work structure used to perform delayed idle on a module
  * @clk_enable_quirk: module specific clock enable quirk
  * @clk_disable_quirk: module specific clock disable quirk
  * @reset_done_quirk: module specific reset done quirk
diff --git a/include/linux/platform_data/ti-sysc.h b/include/linux/platform_data/ti-sysc.h
index 7d009dc08a54..1a0905435b32 100644
--- a/include/linux/platform_data/ti-sysc.h
+++ b/include/linux/platform_data/ti-sysc.h
@@ -72,7 +72,7 @@ struct sysc_regbits {
 
 /**
  * struct sysc_capabilities - capabilities for an interconnect target module
- *
+ * @type: sysc type identifier for the module
  * @sysc_mask: bitmask of supported SYSCONFIG register bits
  * @regbits: bitmask of SYSCONFIG register bits
  * @mod_quirks: bitmask of module specific quirks
@@ -87,8 +87,9 @@ struct sysc_capabilities {
 /**
  * struct sysc_config - configuration for an interconnect target module
  * @sysc_val: configured value for sysc register
+ * @syss_mask: configured mask value for SYSSTATUS register
  * @midlemodes: bitmask of supported master idle modes
- * @sidlemodes: bitmask of supported master idle modes
+ * @sidlemodes: bitmask of supported slave idle modes
  * @srst_udelay: optional delay needed after OCP soft reset
  * @quirks: bitmask of enabled quirks
  */
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/5] bus: ti-sysc: Simplify cleanup upon failures in sysc_probe()
  2019-06-25 23:33 [PATCH 0/5] Minor ti-sysc cleanups Suman Anna
                   ` (3 preceding siblings ...)
  2019-06-25 23:33 ` [PATCH 4/5] bus: ti-sysc: Add missing kerneldoc comments Suman Anna
@ 2019-06-25 23:33 ` Suman Anna
  2019-06-27 12:11   ` Tony Lindgren
  2019-07-01  7:18 ` [PATCH 0/5] Minor ti-sysc cleanups Roger Quadros
  5 siblings, 1 reply; 10+ messages in thread
From: Suman Anna @ 2019-06-25 23:33 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Tero Kristo, Roger Quadros, linux-omap, linux-kernel, Suman Anna

The clocks are not yet parsed and prepared until after a successful
sysc_get_clocks(), so there is no need to unprepare the clocks upon
any failure of any of the prior functions in sysc_probe(). The current
code path would have been a no-op because of the clock validity checks
within sysc_unprepare(), but let's just simplify the cleanup path by
returning the error directly.

While at this, also fix the cleanup path for a sysc_init_resets()
failure which is executed after the clocks are prepared.

Signed-off-by: Suman Anna <s-anna@ti.com>
---
 drivers/bus/ti-sysc.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index ccdd1f0871f9..a7e704e0840d 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -2384,27 +2384,27 @@ static int sysc_probe(struct platform_device *pdev)
 
 	error = sysc_init_dts_quirks(ddata);
 	if (error)
-		goto unprepare;
+		return error;
 
 	error = sysc_map_and_check_registers(ddata);
 	if (error)
-		goto unprepare;
+		return error;
 
 	error = sysc_init_sysc_mask(ddata);
 	if (error)
-		goto unprepare;
+		return error;
 
 	error = sysc_init_idlemodes(ddata);
 	if (error)
-		goto unprepare;
+		return error;
 
 	error = sysc_init_syss_mask(ddata);
 	if (error)
-		goto unprepare;
+		return error;
 
 	error = sysc_init_pdata(ddata);
 	if (error)
-		goto unprepare;
+		return error;
 
 	sysc_init_early_quirks(ddata);
 
@@ -2414,7 +2414,7 @@ static int sysc_probe(struct platform_device *pdev)
 
 	error = sysc_init_resets(ddata);
 	if (error)
-		return error;
+		goto unprepare;
 
 	error = sysc_init_module(ddata);
 	if (error)
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 5/5] bus: ti-sysc: Simplify cleanup upon failures in sysc_probe()
  2019-06-25 23:33 ` [PATCH 5/5] bus: ti-sysc: Simplify cleanup upon failures in sysc_probe() Suman Anna
@ 2019-06-27 12:11   ` Tony Lindgren
  2019-06-27 15:24     ` Suman Anna
  0 siblings, 1 reply; 10+ messages in thread
From: Tony Lindgren @ 2019-06-27 12:11 UTC (permalink / raw)
  To: Suman Anna; +Cc: Tero Kristo, Roger Quadros, linux-omap, linux-kernel

Hi,

* Suman Anna <s-anna@ti.com> [190625 23:33]:
> The clocks are not yet parsed and prepared until after a successful
> sysc_get_clocks(), so there is no need to unprepare the clocks upon
> any failure of any of the prior functions in sysc_probe(). The current
> code path would have been a no-op because of the clock validity checks
> within sysc_unprepare(), but let's just simplify the cleanup path by
> returning the error directly.
> 
> While at this, also fix the cleanup path for a sysc_init_resets()
> failure which is executed after the clocks are prepared.

Sounds like this should get queued separately as a fix for v5.3-rc
cycle, probably got broken with the recent ti-sysc init order changes.

Regards,

Tony

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 5/5] bus: ti-sysc: Simplify cleanup upon failures in sysc_probe()
  2019-06-27 12:11   ` Tony Lindgren
@ 2019-06-27 15:24     ` Suman Anna
  2019-08-13 10:59       ` Tony Lindgren
  0 siblings, 1 reply; 10+ messages in thread
From: Suman Anna @ 2019-06-27 15:24 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Tero Kristo, Roger Quadros, linux-omap, linux-kernel

On 6/27/19 7:11 AM, Tony Lindgren wrote:
> Hi,
> 
> * Suman Anna <s-anna@ti.com> [190625 23:33]:
>> The clocks are not yet parsed and prepared until after a successful
>> sysc_get_clocks(), so there is no need to unprepare the clocks upon
>> any failure of any of the prior functions in sysc_probe(). The current
>> code path would have been a no-op because of the clock validity checks
>> within sysc_unprepare(), but let's just simplify the cleanup path by
>> returning the error directly.
>>
>> While at this, also fix the cleanup path for a sysc_init_resets()
>> failure which is executed after the clocks are prepared.
> 
> Sounds like this should get queued separately as a fix for v5.3-rc
> cycle, probably got broken with the recent ti-sysc init order changes.

Yeah, this patch does not depend on the previous 4 patches, so can be
picked up independently for v5.3-rc as well.

regards
Suman

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/5] Minor ti-sysc cleanups
  2019-06-25 23:33 [PATCH 0/5] Minor ti-sysc cleanups Suman Anna
                   ` (4 preceding siblings ...)
  2019-06-25 23:33 ` [PATCH 5/5] bus: ti-sysc: Simplify cleanup upon failures in sysc_probe() Suman Anna
@ 2019-07-01  7:18 ` Roger Quadros
  5 siblings, 0 replies; 10+ messages in thread
From: Roger Quadros @ 2019-07-01  7:18 UTC (permalink / raw)
  To: Suman Anna, Tony Lindgren; +Cc: Tero Kristo, linux-omap, linux-kernel

On 26/06/2019 02:33, Suman Anna wrote:
> Hi Tony,
> 
> The following series includes minor cleanup patches against the ti-sysc
> code. Patches are based on top of all your 5.3 staged branches. Feel free
> to pick them up for either 5.3 (if it is not too late) or 5.4 merge window. 
> 
> The first 4 patches are non-coding changes, and the last patch is a minor
> fixup cleaning up the code flow on failure error paths in sysc_probe()
> function. I have boot tested on the limited boards that I have - AM335x
> BeagleBone Black, AM437x IDK, AM57xx GP EVM, OMAP4 PandaBoard and OMAP5
> uEVM.
> 
> regards
> Suman
> 
> Suman Anna (5):
>   MAINTAINERS: Add ti-sysc files under the OMAP2+ entry
>   dt-bindings: ti-sysc: Add SPDX license identifier
>   bus: ti-sysc: Switch to SPDX license identifier
>   bus: ti-sysc: Add missing kerneldoc comments
>   bus: ti-sysc: Simplify cleanup upon failures in sysc_probe()

For all patches.

Acked-by: Roger Quadros <rogerq@ti.com>

> 
>  MAINTAINERS                           |  2 ++
>  drivers/bus/ti-sysc.c                 | 31 +++++++++++++--------------
>  include/dt-bindings/bus/ti-sysc.h     |  1 +
>  include/linux/platform_data/ti-sysc.h |  7 ++++--
>  4 files changed, 23 insertions(+), 18 deletions(-)
> 

-- 
cheers,
-roger

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 5/5] bus: ti-sysc: Simplify cleanup upon failures in sysc_probe()
  2019-06-27 15:24     ` Suman Anna
@ 2019-08-13 10:59       ` Tony Lindgren
  0 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2019-08-13 10:59 UTC (permalink / raw)
  To: Suman Anna; +Cc: Tero Kristo, Roger Quadros, linux-omap, linux-kernel

* Suman Anna <s-anna@ti.com> [190627 15:24]:
> On 6/27/19 7:11 AM, Tony Lindgren wrote:
> > Hi,
> > 
> > * Suman Anna <s-anna@ti.com> [190625 23:33]:
> >> The clocks are not yet parsed and prepared until after a successful
> >> sysc_get_clocks(), so there is no need to unprepare the clocks upon
> >> any failure of any of the prior functions in sysc_probe(). The current
> >> code path would have been a no-op because of the clock validity checks
> >> within sysc_unprepare(), but let's just simplify the cleanup path by
> >> returning the error directly.
> >>
> >> While at this, also fix the cleanup path for a sysc_init_resets()
> >> failure which is executed after the clocks are prepared.
> > 
> > Sounds like this should get queued separately as a fix for v5.3-rc
> > cycle, probably got broken with the recent ti-sysc init order changes.
> 
> Yeah, this patch does not depend on the previous 4 patches, so can be
> picked up independently for v5.3-rc as well.

OK applying the $subject patch into fixes, and the rest into
omap-for-v5.4/ti-sysc.

Regards,

Tony

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-08-13 10:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-25 23:33 [PATCH 0/5] Minor ti-sysc cleanups Suman Anna
2019-06-25 23:33 ` [PATCH 1/5] MAINTAINERS: Add ti-sysc files under the OMAP2+ entry Suman Anna
2019-06-25 23:33 ` [PATCH 2/5] dt-bindings: ti-sysc: Add SPDX license identifier Suman Anna
2019-06-25 23:33 ` [PATCH 3/5] bus: ti-sysc: Switch to " Suman Anna
2019-06-25 23:33 ` [PATCH 4/5] bus: ti-sysc: Add missing kerneldoc comments Suman Anna
2019-06-25 23:33 ` [PATCH 5/5] bus: ti-sysc: Simplify cleanup upon failures in sysc_probe() Suman Anna
2019-06-27 12:11   ` Tony Lindgren
2019-06-27 15:24     ` Suman Anna
2019-08-13 10:59       ` Tony Lindgren
2019-07-01  7:18 ` [PATCH 0/5] Minor ti-sysc cleanups Roger Quadros

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).