From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sivaram Nair Subject: Re: [PATCH V2 01/10] Documentation: dt-bindings: mailbox: tegra: Add binding for HSP mailbox Date: Thu, 7 Jul 2016 11:13:56 -0700 Message-ID: <20160707181356.GA6864@kickseed.nvidia.com> References: <20160705090431.5852-1-josephl@nvidia.com> <20160705090431.5852-2-josephl@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: In-Reply-To: <20160705090431.5852-2-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> Content-Disposition: inline Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Joseph Lo Cc: Stephen Warren , Thierry Reding , Alexandre Courbot , linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Rob Herring , Mark Rutland , Peter De Schrijver , Matthew Longnecker , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jassi Brar , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Catalin Marinas , Will Deacon List-Id: linux-tegra@vger.kernel.org On Tue, Jul 05, 2016 at 05:04:22PM +0800, Joseph Lo wrote: > Add DT binding for the Hardware Synchronization Primitives (HSP). The > HSP is designed for the processors to share resources and communicate > together. It provides a set of hardware synchronization primitives for > interprocessor communication. So the interprocessor communication (IPC) > protocols can use hardware synchronization primitive, when operating > between two processors not in an SMP relationship. > > Signed-off-by: Joseph Lo > --- > Changes in V2: > - revise the compatible string, interrupt-names, interrupts, and #mbox-cells > properties > - remove "nvidia,hsp-function" property > - fix the header file name > - the binding supports the concept of multiple HSP sub-modules on one HSP HW > block now. > --- > .../bindings/mailbox/nvidia,tegra186-hsp.txt | 51 ++++++++++++++++++++++ > include/dt-bindings/mailbox/tegra186-hsp.h | 23 ++++++++++ > 2 files changed, 74 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt > create mode 100644 include/dt-bindings/mailbox/tegra186-hsp.h > > diff --git a/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt b/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt > new file mode 100644 > index 000000000000..10e53edbe1c7 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt > @@ -0,0 +1,51 @@ > +NVIDIA Tegra Hardware Synchronization Primitives (HSP) > + > +The HSP modules are used for the processors to share resources and communicate > +together. It provides a set of hardware synchronization primitives for > +interprocessor communication. So the interprocessor communication (IPC) > +protocols can use hardware synchronization primitives, when operating between > +two processors not in an SMP relationship. > + > +The features that HSP supported are shared mailboxes, shared semaphores, > +arbitrated semaphores and doorbells. > + > +Required properties: > +- name : Should be hsp > +- compatible > + Array of strings. > + one of: > + - "nvidia,tegra186-hsp" > +- reg : Offset and length of the register set for the device. > +- interrupt-names > + Array of strings. > + Contains a list of names for the interrupts described by the interrupt > + property. May contain the following entries, in any order: > + - "doorbell" > + Users of this binding MUST look up entries in the interrupt property > + by name, using this interrupt-names property to do so. > +- interrupts > + Array of interrupt specifiers. > + Must contain one entry per entry in the interrupt-names property, > + in a matching order. > +- #mbox-cells : Should be 1. > + > +The mbox specifier of the "mboxes" property in the client node should use > +the "HSP_MBOX_ID" macro which integrates the HSP type and master ID data. > +Those information can be found in the following file. > + > +- . > + > +Example: > + > +hsp_top0: hsp@3c00000 { > + compatible = "nvidia,tegra186-hsp"; > + reg = <0x0 0x03c00000 0x0 0xa0000>; > + interrupts = ; > + interrupt-names = "doorbell"; > + #mbox-cells = <1>; > +}; > + > +client { > + ... > + mboxes = <&hsp_top0 HSP_MBOX_ID(DB, HSP_DB_MASTER_XXX)>; > +}; > diff --git a/include/dt-bindings/mailbox/tegra186-hsp.h b/include/dt-bindings/mailbox/tegra186-hsp.h > new file mode 100644 > index 000000000000..365dbeb5d894 > --- /dev/null > +++ b/include/dt-bindings/mailbox/tegra186-hsp.h > @@ -0,0 +1,23 @@ > +/* > + * This header provides constants for binding nvidia,tegra186-hsp. > + * > + * The number with HSP_DB_MASTER prefix indicates the bit that is > + * associated with a master ID in the doorbell registers. > + */ > + > + > +#ifndef _DT_BINDINGS_MAILBOX_TEGRA186_HSP_H > +#define _DT_BINDINGS_MAILBOX_TEGRA186_HSP_H > + > +#define HSP_MBOX_TYPE_DB 0x0 > +#define HSP_MBOX_TYPE_SM 0x1 > +#define HSP_MBOX_TYPE_SS 0x2 > +#define HSP_MBOX_TYPE_AS 0x3 > + > +#define HSP_DB_MASTER_CCPLEX 17 > +#define HSP_DB_MASTER_BPMP 19 > + > +#define HSP_MBOX_ID(type, ID) \ > + (HSP_MBOX_TYPE_##type << 16 | ID) It will be nicer if you avoid the macro glue magic '##' for 'type'. I would also suggest to use braces around 'type' and 'ID'. > + > +#endif /* _DT_BINDINGS_MAILBOX_TEGRA186_HSP_H */ > -- > 2.9.0 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-tegra" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751386AbcGGSOG (ORCPT ); Thu, 7 Jul 2016 14:14:06 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:13488 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750720AbcGGSN6 (ORCPT ); Thu, 7 Jul 2016 14:13:58 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Thu, 07 Jul 2016 11:12:16 -0700 Date: Thu, 7 Jul 2016 11:13:56 -0700 From: Sivaram Nair To: Joseph Lo CC: Stephen Warren , Thierry Reding , Alexandre Courbot , , , Rob Herring , Mark Rutland , Peter De Schrijver , Matthew Longnecker , , Jassi Brar , , Catalin Marinas , Will Deacon Subject: Re: [PATCH V2 01/10] Documentation: dt-bindings: mailbox: tegra: Add binding for HSP mailbox Message-ID: <20160707181356.GA6864@kickseed.nvidia.com> References: <20160705090431.5852-1-josephl@nvidia.com> <20160705090431.5852-2-josephl@nvidia.com> MIME-Version: 1.0 In-Reply-To: <20160705090431.5852-2-josephl@nvidia.com> X-NVConfidentiality: public User-Agent: Mutt/1.5.21 (2010-09-15) Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 05, 2016 at 05:04:22PM +0800, Joseph Lo wrote: > Add DT binding for the Hardware Synchronization Primitives (HSP). The > HSP is designed for the processors to share resources and communicate > together. It provides a set of hardware synchronization primitives for > interprocessor communication. So the interprocessor communication (IPC) > protocols can use hardware synchronization primitive, when operating > between two processors not in an SMP relationship. > > Signed-off-by: Joseph Lo > --- > Changes in V2: > - revise the compatible string, interrupt-names, interrupts, and #mbox-cells > properties > - remove "nvidia,hsp-function" property > - fix the header file name > - the binding supports the concept of multiple HSP sub-modules on one HSP HW > block now. > --- > .../bindings/mailbox/nvidia,tegra186-hsp.txt | 51 ++++++++++++++++++++++ > include/dt-bindings/mailbox/tegra186-hsp.h | 23 ++++++++++ > 2 files changed, 74 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt > create mode 100644 include/dt-bindings/mailbox/tegra186-hsp.h > > diff --git a/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt b/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt > new file mode 100644 > index 000000000000..10e53edbe1c7 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt > @@ -0,0 +1,51 @@ > +NVIDIA Tegra Hardware Synchronization Primitives (HSP) > + > +The HSP modules are used for the processors to share resources and communicate > +together. It provides a set of hardware synchronization primitives for > +interprocessor communication. So the interprocessor communication (IPC) > +protocols can use hardware synchronization primitives, when operating between > +two processors not in an SMP relationship. > + > +The features that HSP supported are shared mailboxes, shared semaphores, > +arbitrated semaphores and doorbells. > + > +Required properties: > +- name : Should be hsp > +- compatible > + Array of strings. > + one of: > + - "nvidia,tegra186-hsp" > +- reg : Offset and length of the register set for the device. > +- interrupt-names > + Array of strings. > + Contains a list of names for the interrupts described by the interrupt > + property. May contain the following entries, in any order: > + - "doorbell" > + Users of this binding MUST look up entries in the interrupt property > + by name, using this interrupt-names property to do so. > +- interrupts > + Array of interrupt specifiers. > + Must contain one entry per entry in the interrupt-names property, > + in a matching order. > +- #mbox-cells : Should be 1. > + > +The mbox specifier of the "mboxes" property in the client node should use > +the "HSP_MBOX_ID" macro which integrates the HSP type and master ID data. > +Those information can be found in the following file. > + > +- . > + > +Example: > + > +hsp_top0: hsp@3c00000 { > + compatible = "nvidia,tegra186-hsp"; > + reg = <0x0 0x03c00000 0x0 0xa0000>; > + interrupts = ; > + interrupt-names = "doorbell"; > + #mbox-cells = <1>; > +}; > + > +client { > + ... > + mboxes = <&hsp_top0 HSP_MBOX_ID(DB, HSP_DB_MASTER_XXX)>; > +}; > diff --git a/include/dt-bindings/mailbox/tegra186-hsp.h b/include/dt-bindings/mailbox/tegra186-hsp.h > new file mode 100644 > index 000000000000..365dbeb5d894 > --- /dev/null > +++ b/include/dt-bindings/mailbox/tegra186-hsp.h > @@ -0,0 +1,23 @@ > +/* > + * This header provides constants for binding nvidia,tegra186-hsp. > + * > + * The number with HSP_DB_MASTER prefix indicates the bit that is > + * associated with a master ID in the doorbell registers. > + */ > + > + > +#ifndef _DT_BINDINGS_MAILBOX_TEGRA186_HSP_H > +#define _DT_BINDINGS_MAILBOX_TEGRA186_HSP_H > + > +#define HSP_MBOX_TYPE_DB 0x0 > +#define HSP_MBOX_TYPE_SM 0x1 > +#define HSP_MBOX_TYPE_SS 0x2 > +#define HSP_MBOX_TYPE_AS 0x3 > + > +#define HSP_DB_MASTER_CCPLEX 17 > +#define HSP_DB_MASTER_BPMP 19 > + > +#define HSP_MBOX_ID(type, ID) \ > + (HSP_MBOX_TYPE_##type << 16 | ID) It will be nicer if you avoid the macro glue magic '##' for 'type'. I would also suggest to use braces around 'type' and 'ID'. > + > +#endif /* _DT_BINDINGS_MAILBOX_TEGRA186_HSP_H */ > -- > 2.9.0 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-tegra" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: sivaramn@nvidia.com (Sivaram Nair) Date: Thu, 7 Jul 2016 11:13:56 -0700 Subject: [PATCH V2 01/10] Documentation: dt-bindings: mailbox: tegra: Add binding for HSP mailbox In-Reply-To: <20160705090431.5852-2-josephl@nvidia.com> References: <20160705090431.5852-1-josephl@nvidia.com> <20160705090431.5852-2-josephl@nvidia.com> Message-ID: <20160707181356.GA6864@kickseed.nvidia.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tue, Jul 05, 2016 at 05:04:22PM +0800, Joseph Lo wrote: > Add DT binding for the Hardware Synchronization Primitives (HSP). The > HSP is designed for the processors to share resources and communicate > together. It provides a set of hardware synchronization primitives for > interprocessor communication. So the interprocessor communication (IPC) > protocols can use hardware synchronization primitive, when operating > between two processors not in an SMP relationship. > > Signed-off-by: Joseph Lo > --- > Changes in V2: > - revise the compatible string, interrupt-names, interrupts, and #mbox-cells > properties > - remove "nvidia,hsp-function" property > - fix the header file name > - the binding supports the concept of multiple HSP sub-modules on one HSP HW > block now. > --- > .../bindings/mailbox/nvidia,tegra186-hsp.txt | 51 ++++++++++++++++++++++ > include/dt-bindings/mailbox/tegra186-hsp.h | 23 ++++++++++ > 2 files changed, 74 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt > create mode 100644 include/dt-bindings/mailbox/tegra186-hsp.h > > diff --git a/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt b/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt > new file mode 100644 > index 000000000000..10e53edbe1c7 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mailbox/nvidia,tegra186-hsp.txt > @@ -0,0 +1,51 @@ > +NVIDIA Tegra Hardware Synchronization Primitives (HSP) > + > +The HSP modules are used for the processors to share resources and communicate > +together. It provides a set of hardware synchronization primitives for > +interprocessor communication. So the interprocessor communication (IPC) > +protocols can use hardware synchronization primitives, when operating between > +two processors not in an SMP relationship. > + > +The features that HSP supported are shared mailboxes, shared semaphores, > +arbitrated semaphores and doorbells. > + > +Required properties: > +- name : Should be hsp > +- compatible > + Array of strings. > + one of: > + - "nvidia,tegra186-hsp" > +- reg : Offset and length of the register set for the device. > +- interrupt-names > + Array of strings. > + Contains a list of names for the interrupts described by the interrupt > + property. May contain the following entries, in any order: > + - "doorbell" > + Users of this binding MUST look up entries in the interrupt property > + by name, using this interrupt-names property to do so. > +- interrupts > + Array of interrupt specifiers. > + Must contain one entry per entry in the interrupt-names property, > + in a matching order. > +- #mbox-cells : Should be 1. > + > +The mbox specifier of the "mboxes" property in the client node should use > +the "HSP_MBOX_ID" macro which integrates the HSP type and master ID data. > +Those information can be found in the following file. > + > +- . > + > +Example: > + > +hsp_top0: hsp at 3c00000 { > + compatible = "nvidia,tegra186-hsp"; > + reg = <0x0 0x03c00000 0x0 0xa0000>; > + interrupts = ; > + interrupt-names = "doorbell"; > + #mbox-cells = <1>; > +}; > + > +client { > + ... > + mboxes = <&hsp_top0 HSP_MBOX_ID(DB, HSP_DB_MASTER_XXX)>; > +}; > diff --git a/include/dt-bindings/mailbox/tegra186-hsp.h b/include/dt-bindings/mailbox/tegra186-hsp.h > new file mode 100644 > index 000000000000..365dbeb5d894 > --- /dev/null > +++ b/include/dt-bindings/mailbox/tegra186-hsp.h > @@ -0,0 +1,23 @@ > +/* > + * This header provides constants for binding nvidia,tegra186-hsp. > + * > + * The number with HSP_DB_MASTER prefix indicates the bit that is > + * associated with a master ID in the doorbell registers. > + */ > + > + > +#ifndef _DT_BINDINGS_MAILBOX_TEGRA186_HSP_H > +#define _DT_BINDINGS_MAILBOX_TEGRA186_HSP_H > + > +#define HSP_MBOX_TYPE_DB 0x0 > +#define HSP_MBOX_TYPE_SM 0x1 > +#define HSP_MBOX_TYPE_SS 0x2 > +#define HSP_MBOX_TYPE_AS 0x3 > + > +#define HSP_DB_MASTER_CCPLEX 17 > +#define HSP_DB_MASTER_BPMP 19 > + > +#define HSP_MBOX_ID(type, ID) \ > + (HSP_MBOX_TYPE_##type << 16 | ID) It will be nicer if you avoid the macro glue magic '##' for 'type'. I would also suggest to use braces around 'type' and 'ID'. > + > +#endif /* _DT_BINDINGS_MAILBOX_TEGRA186_HSP_H */ > -- > 2.9.0 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-tegra" in > the body of a message to majordomo at vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html