diff mbox series

[v2,2/5] dt-bindings: ti_sci_pm_domains: Add support for exclusive access

Message ID 20190223093232.29003-3-lokeshvutla@ti.com (mailing list archive)
State New, archived
Headers show
Series soc: ti: k3-am654: Allow for exclsive request of devices | expand

Commit Message

Lokesh Vutla Feb. 23, 2019, 9:32 a.m. UTC
TISCI protocol supports for enabling the device with exclusive
permissions. Certain remoteproc devices or some shared devices
across VM doesn't wants to request devices with this flag set.
So add support for getting this information from DT by increasing
the power-domain cells to 2.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Nishanth Menon March 6, 2019, 2:58 p.m. UTC | #1
On 15:02-20190223, Lokesh Vutla wrote:
> TISCI protocol supports for enabling the device with exclusive
> permissions. Certain remoteproc devices or some shared devices
> across VM doesn't wants to request devices with this flag set.
> So add support for getting this information from DT by increasing
> the power-domain cells to 2.
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> ---
>  Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
> index f7b00a7c0f68..5fdda7475023 100644
> --- a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
> +++ b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
> @@ -19,8 +19,11 @@ child of the pmmc node.
>  Required Properties:
>  --------------------
>  - compatible: should be "ti,sci-pm-domain"
> -- #power-domain-cells: Must be 1 so that an id can be provided in each
> -		       device node.
> +- #power-domain-cells: Can be one of the following:
> +			1: Containing the device id of each node
> +			2: First entry should be device id
> +			   Second entry should be 1 or 0. Use 1 for enabling
> +			   the device with exclusive permissions set else 0.

Rob, any thoughts?
Rob Herring March 12, 2019, 3:43 p.m. UTC | #2
On Sat, Feb 23, 2019 at 03:02:29PM +0530, Lokesh Vutla wrote:
> TISCI protocol supports for enabling the device with exclusive
> permissions. Certain remoteproc devices or some shared devices
> across VM doesn't wants to request devices with this flag set.

The wording here is weird. You want to add exclusive support, but you 
are talking about devices which don't want exclusive support.

> So add support for getting this information from DT by increasing
> the power-domain cells to 2.

Seems like this would be racy. Whomever wants exclusive access would 
have to be the first to request a device. Seems like whether devices are 
able to be shared or not would be known because generally h/w has to be 
designed for that.

> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> ---
>  Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
> index f7b00a7c0f68..5fdda7475023 100644
> --- a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
> +++ b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
> @@ -19,8 +19,11 @@ child of the pmmc node.
>  Required Properties:
>  --------------------
>  - compatible: should be "ti,sci-pm-domain"
> -- #power-domain-cells: Must be 1 so that an id can be provided in each
> -		       device node.
> +- #power-domain-cells: Can be one of the following:
> +			1: Containing the device id of each node
> +			2: First entry should be device id
> +			   Second entry should be 1 or 0. Use 1 for enabling
> +			   the device with exclusive permissions set else 0.
>  
>  Example (K2G):
>  -------------
> -- 
> 2.19.2
>
Nishanth Menon March 12, 2019, 11:03 p.m. UTC | #3
On 10:43-20190312, Rob Herring wrote:
> On Sat, Feb 23, 2019 at 03:02:29PM +0530, Lokesh Vutla wrote:
> > TISCI protocol supports for enabling the device with exclusive
> > permissions. Certain remoteproc devices or some shared devices
> > across VM doesn't wants to request devices with this flag set.
> 
> The wording here is weird. You want to add exclusive support, but you 
> are talking about devices which don't want exclusive support.
> 
> > So add support for getting this information from DT by increasing
> > the power-domain cells to 2.
> 
> Seems like this would be racy. Whomever wants exclusive access would 
> have to be the first to request a device. Seems like whether devices are 
> able to be shared or not would be known because generally h/w has to be 
> designed for that.

Rob,

I wonder if it is better to represent this as exclusive power domain or
shared power domain - because that is what the firmware in effect makes
OS think the hardware is? Two power domain nodes in dts, instead of
introducing property as part of cells?

Device may belong to a shared domain or an exclusive domain depending on
the SoC variations.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
index f7b00a7c0f68..5fdda7475023 100644
--- a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
+++ b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
@@ -19,8 +19,11 @@  child of the pmmc node.
 Required Properties:
 --------------------
 - compatible: should be "ti,sci-pm-domain"
-- #power-domain-cells: Must be 1 so that an id can be provided in each
-		       device node.
+- #power-domain-cells: Can be one of the following:
+			1: Containing the device id of each node
+			2: First entry should be device id
+			   Second entry should be 1 or 0. Use 1 for enabling
+			   the device with exclusive permissions set else 0.
 
 Example (K2G):
 -------------