mbox series

[0/5] Consolidate RPM interconnect and support to MSM8939

Message ID 20200930081645.3434-1-jun.nie@linaro.org
Headers show
Series Consolidate RPM interconnect and support to MSM8939 | expand

Message

Jun Nie Sept. 30, 2020, 8:16 a.m. UTC
This patch set split shared RPM based interconnect operation code and add
support to MSM8939 interconnect.

Jun Nie (5):
  interconnect: qcom: Consolidate interconnect RPM support
  interconnect: qcom: qcs404: use shared code
  dt-bindings: interconnect: single yaml file for RPM interconnect
    drivers
  dt-bindings: interconnect: Add Qualcomm MSM8939 DT bindings
  interconnect: qcom: Add MSM8939 interconnect provider driver

 .../bindings/interconnect/qcom,qcs404.yaml    |  77 ----
 .../{qcom,msm8916.yaml => qcom,rpm.yaml}      |  28 +-
 drivers/interconnect/qcom/Kconfig             |   9 +
 drivers/interconnect/qcom/Makefile            |   5 +-
 drivers/interconnect/qcom/icc-rpm.c           | 194 ++++++++++
 drivers/interconnect/qcom/icc-rpm.h           |  73 ++++
 drivers/interconnect/qcom/msm8916.c           | 241 +-----------
 drivers/interconnect/qcom/msm8939.c           | 355 ++++++++++++++++++
 drivers/interconnect/qcom/qcs404.c            | 242 +-----------
 .../dt-bindings/interconnect/qcom,msm8939.h   | 105 ++++++
 10 files changed, 776 insertions(+), 553 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/interconnect/qcom,qcs404.yaml
 rename Documentation/devicetree/bindings/interconnect/{qcom,msm8916.yaml => qcom,rpm.yaml} (72%)
 create mode 100644 drivers/interconnect/qcom/icc-rpm.c
 create mode 100644 drivers/interconnect/qcom/icc-rpm.h
 create mode 100644 drivers/interconnect/qcom/msm8939.c
 create mode 100644 include/dt-bindings/interconnect/qcom,msm8939.h

Comments

Vincent Knecht Oct. 3, 2020, 2:27 p.m. UTC | #1
Le mercredi 30 septembre 2020 à 16:16 +0800, Jun Nie a écrit :
> Add RPM based interconnect driver implements the set and aggregate
> functionalities that translates bandwidth requests into RPM messages.
> These modules provide a common set of functionalities for all
> Qualcomm RPM based interconnect providers and should help reduce code
> duplication when adding new providers.
> 
> Signed-off-by: Jun Nie <jun.nie@linaro.org>
> ---
>  drivers/interconnect/qcom/Makefile  |   3 +-
>  drivers/interconnect/qcom/icc-rpm.c | 194 ++++++++++++++++++++++
>  drivers/interconnect/qcom/icc-rpm.h |  73 +++++++++
>  drivers/interconnect/qcom/msm8916.c | 241 ++--------------------------
>  4 files changed, 279 insertions(+), 232 deletions(-)
>  create mode 100644 drivers/interconnect/qcom/icc-rpm.c
>  create mode 100644 drivers/interconnect/qcom/icc-rpm.h
> 
> diff --git a/drivers/interconnect/qcom/Makefile
> b/drivers/interconnect/qcom/Makefile
> index 1702ece67dc5..f5e803489de0 100644
> --- a/drivers/interconnect/qcom/Makefile
> +++ b/drivers/interconnect/qcom/Makefile
> @@ -9,7 +9,7 @@ icc-rpmh-obj				:= icc-rpmh.o
>  qnoc-sc7180-objs			:= sc7180.o
>  qnoc-sdm845-objs			:= sdm845.o
>  qnoc-sm8150-objs			:= sm8150.o
> -icc-smd-rpm-objs			:= smd-rpm.o
> +icc-smd-rpm-objs			:= smd-rpm.o icc-rpm.o
>  
>  obj-$(CONFIG_INTERCONNECT_QCOM_BCM_VOTER) += icc-bcm-voter.o
>  obj-$(CONFIG_INTERCONNECT_QCOM_MSM8916) += qnoc-msm8916.o
> @@ -21,3 +21,4 @@ obj-$(CONFIG_INTERCONNECT_QCOM_SC7180) += qnoc-sc7180.o
>  obj-$(CONFIG_INTERCONNECT_QCOM_SDM845) += qnoc-sdm845.o
>  obj-$(CONFIG_INTERCONNECT_QCOM_SM8150) += qnoc-sm8150.o
>  obj-$(CONFIG_INTERCONNECT_QCOM_SMD_RPM) += icc-smd-rpm.o
> +obj-$(CONFIG_INTERCONNECT_QCOM_SMD_RPM) += icc-smd-rpm.o

Duplicate ?

Thanks for msm8939 work, please Cc: me on any related patch :-)
Rob Herring Oct. 6, 2020, 7:13 p.m. UTC | #2
On Wed, Sep 30, 2020 at 04:16:43PM +0800, Jun Nie wrote:
> MSM8916 and QCS404 bindings are almost identical, so combine them into one.
> This will make it easier to add interconnect bindings for more SoC with RPM.
> 
> Signed-off-by: Jun Nie <jun.nie@linaro.org>
> ---
>  .../bindings/interconnect/qcom,qcs404.yaml    | 77 -------------------
>  .../{qcom,msm8916.yaml => qcom,rpm.yaml}      | 24 +++---
>  2 files changed, 14 insertions(+), 87 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/interconnect/qcom,qcs404.yaml
>  rename Documentation/devicetree/bindings/interconnect/{qcom,msm8916.yaml => qcom,rpm.yaml} (76%)
> 
> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,qcs404.yaml b/Documentation/devicetree/bindings/interconnect/qcom,qcs404.yaml
> deleted file mode 100644
> index 3fbb8785fbc9..000000000000
> --- a/Documentation/devicetree/bindings/interconnect/qcom,qcs404.yaml
> +++ /dev/null
> @@ -1,77 +0,0 @@
> -# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> -%YAML 1.2
> ----
> -$id: http://devicetree.org/schemas/interconnect/qcom,qcs404.yaml#
> -$schema: http://devicetree.org/meta-schemas/core.yaml#
> -
> -title: Qualcomm QCS404 Network-On-Chip interconnect
> -
> -maintainers:
> -  - Georgi Djakov <georgi.djakov@linaro.org>
> -
> -description: |
> -  The Qualcomm QCS404 interconnect providers support adjusting the
> -  bandwidth requirements between the various NoC fabrics.
> -
> -properties:
> -  reg:
> -    maxItems: 1
> -
> -  compatible:
> -    enum:
> -      - qcom,qcs404-bimc
> -      - qcom,qcs404-pcnoc
> -      - qcom,qcs404-snoc
> -
> -  '#interconnect-cells':
> -    const: 1
> -
> -  clock-names:
> -    items:
> -      - const: bus
> -      - const: bus_a
> -
> -  clocks:
> -    items:
> -      - description: Bus Clock
> -      - description: Bus A Clock
> -
> -required:
> -  - compatible
> -  - reg
> -  - '#interconnect-cells'
> -  - clock-names
> -  - clocks
> -
> -additionalProperties: false
> -
> -examples:
> -  - |
> -      #include <dt-bindings/clock/qcom,rpmcc.h>
> -
> -      bimc: interconnect@400000 {
> -              reg = <0x00400000 0x80000>;
> -              compatible = "qcom,qcs404-bimc";
> -              #interconnect-cells = <1>;
> -              clock-names = "bus", "bus_a";
> -              clocks = <&rpmcc RPM_SMD_BIMC_CLK>,
> -                       <&rpmcc RPM_SMD_BIMC_A_CLK>;
> -      };
> -
> -      pnoc: interconnect@500000 {
> -             reg = <0x00500000 0x15080>;
> -             compatible = "qcom,qcs404-pcnoc";
> -             #interconnect-cells = <1>;
> -             clock-names = "bus", "bus_a";
> -             clocks = <&rpmcc RPM_SMD_PNOC_CLK>,
> -                      <&rpmcc RPM_SMD_PNOC_A_CLK>;
> -      };
> -
> -      snoc: interconnect@580000 {
> -            reg = <0x00580000 0x23080>;
> -            compatible = "qcom,qcs404-snoc";
> -            #interconnect-cells = <1>;
> -            clock-names = "bus", "bus_a";
> -            clocks = <&rpmcc RPM_SMD_SNOC_CLK>,
> -                     <&rpmcc RPM_SMD_SNOC_A_CLK>;
> -      };
> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,msm8916.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
> similarity index 76%
> rename from Documentation/devicetree/bindings/interconnect/qcom,msm8916.yaml
> rename to Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
> index e1009ae4e8f7..e9f856357822 100644
> --- a/Documentation/devicetree/bindings/interconnect/qcom,msm8916.yaml
> +++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml
> @@ -1,28 +1,32 @@
>  # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>  %YAML 1.2
>  ---
> -$id: http://devicetree.org/schemas/interconnect/qcom,msm8916.yaml#
> +$id: http://devicetree.org/schemas/interconnect/qcom,rpm.yaml#
>  $schema: http://devicetree.org/meta-schemas/core.yaml#
>  
> -title: Qualcomm MSM8916 Network-On-Chip interconnect
> +title: Qualcomm RPM Network-On-Chip Interconnect
>  
>  maintainers:
>    - Georgi Djakov <georgi.djakov@linaro.org>
>  
>  description: |
> -  The Qualcomm MSM8916 interconnect providers support adjusting the
> -  bandwidth requirements between the various NoC fabrics.
> +   RPM interconnect providers support system bandwidth requirements through
> +   RPM processor. The provider is able to communicate with the RPM through
> +   the RPM shared memory device.
>  
>  properties:
> -  compatible:
> -    enum:
> -      - qcom,msm8916-bimc
> -      - qcom,msm8916-pcnoc
> -      - qcom,msm8916-snoc
> -
>    reg:
>      maxItems: 1
>  
> +  compatible:
> +        enum:

Wrong indentation...

With that fixed,

Reviewed-by: Rob Herring <robh@kernel.org>

> +          - qcom,msm8916-bimc
> +          - qcom,msm8916-pcnoc
> +          - qcom,msm8916-snoc
> +          - qcom,qcs404-bimc
> +          - qcom,qcs404-pcnoc
> +          - qcom,qcs404-snoc
> +
>    '#interconnect-cells':
>      const: 1
>  
> -- 
> 2.17.1
>
Rob Herring Oct. 6, 2020, 7:14 p.m. UTC | #3
On Wed, Sep 30, 2020 at 04:16:43PM +0800, Jun Nie wrote:
> MSM8916 and QCS404 bindings are almost identical, so combine them into one.

> This will make it easier to add interconnect bindings for more SoC with RPM.

> 

> Signed-off-by: Jun Nie <jun.nie@linaro.org>

> ---

>  .../bindings/interconnect/qcom,qcs404.yaml    | 77 -------------------

>  .../{qcom,msm8916.yaml => qcom,rpm.yaml}      | 24 +++---

>  2 files changed, 14 insertions(+), 87 deletions(-)

>  delete mode 100644 Documentation/devicetree/bindings/interconnect/qcom,qcs404.yaml

>  rename Documentation/devicetree/bindings/interconnect/{qcom,msm8916.yaml => qcom,rpm.yaml} (76%)

> 

> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,qcs404.yaml b/Documentation/devicetree/bindings/interconnect/qcom,qcs404.yaml

> deleted file mode 100644

> index 3fbb8785fbc9..000000000000

> --- a/Documentation/devicetree/bindings/interconnect/qcom,qcs404.yaml

> +++ /dev/null

> @@ -1,77 +0,0 @@

> -# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

> -%YAML 1.2

> ----

> -$id: http://devicetree.org/schemas/interconnect/qcom,qcs404.yaml#

> -$schema: http://devicetree.org/meta-schemas/core.yaml#

> -

> -title: Qualcomm QCS404 Network-On-Chip interconnect

> -

> -maintainers:

> -  - Georgi Djakov <georgi.djakov@linaro.org>

> -

> -description: |

> -  The Qualcomm QCS404 interconnect providers support adjusting the

> -  bandwidth requirements between the various NoC fabrics.

> -

> -properties:

> -  reg:

> -    maxItems: 1

> -

> -  compatible:

> -    enum:

> -      - qcom,qcs404-bimc

> -      - qcom,qcs404-pcnoc

> -      - qcom,qcs404-snoc

> -

> -  '#interconnect-cells':

> -    const: 1

> -

> -  clock-names:

> -    items:

> -      - const: bus

> -      - const: bus_a

> -

> -  clocks:

> -    items:

> -      - description: Bus Clock

> -      - description: Bus A Clock

> -

> -required:

> -  - compatible

> -  - reg

> -  - '#interconnect-cells'

> -  - clock-names

> -  - clocks

> -

> -additionalProperties: false

> -

> -examples:

> -  - |

> -      #include <dt-bindings/clock/qcom,rpmcc.h>

> -

> -      bimc: interconnect@400000 {

> -              reg = <0x00400000 0x80000>;

> -              compatible = "qcom,qcs404-bimc";

> -              #interconnect-cells = <1>;

> -              clock-names = "bus", "bus_a";

> -              clocks = <&rpmcc RPM_SMD_BIMC_CLK>,

> -                       <&rpmcc RPM_SMD_BIMC_A_CLK>;

> -      };

> -

> -      pnoc: interconnect@500000 {

> -             reg = <0x00500000 0x15080>;

> -             compatible = "qcom,qcs404-pcnoc";

> -             #interconnect-cells = <1>;

> -             clock-names = "bus", "bus_a";

> -             clocks = <&rpmcc RPM_SMD_PNOC_CLK>,

> -                      <&rpmcc RPM_SMD_PNOC_A_CLK>;

> -      };

> -

> -      snoc: interconnect@580000 {

> -            reg = <0x00580000 0x23080>;

> -            compatible = "qcom,qcs404-snoc";

> -            #interconnect-cells = <1>;

> -            clock-names = "bus", "bus_a";

> -            clocks = <&rpmcc RPM_SMD_SNOC_CLK>,

> -                     <&rpmcc RPM_SMD_SNOC_A_CLK>;

> -      };

> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,msm8916.yaml b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml

> similarity index 76%

> rename from Documentation/devicetree/bindings/interconnect/qcom,msm8916.yaml

> rename to Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml

> index e1009ae4e8f7..e9f856357822 100644

> --- a/Documentation/devicetree/bindings/interconnect/qcom,msm8916.yaml

> +++ b/Documentation/devicetree/bindings/interconnect/qcom,rpm.yaml

> @@ -1,28 +1,32 @@

>  # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

>  %YAML 1.2

>  ---

> -$id: http://devicetree.org/schemas/interconnect/qcom,msm8916.yaml#

> +$id: http://devicetree.org/schemas/interconnect/qcom,rpm.yaml#

>  $schema: http://devicetree.org/meta-schemas/core.yaml#

>  

> -title: Qualcomm MSM8916 Network-On-Chip interconnect

> +title: Qualcomm RPM Network-On-Chip Interconnect

>  

>  maintainers:

>    - Georgi Djakov <georgi.djakov@linaro.org>

>  

>  description: |

> -  The Qualcomm MSM8916 interconnect providers support adjusting the

> -  bandwidth requirements between the various NoC fabrics.

> +   RPM interconnect providers support system bandwidth requirements through

> +   RPM processor. The provider is able to communicate with the RPM through

> +   the RPM shared memory device.


And here the indentation is wrong too.

>  

>  properties:

> -  compatible:

> -    enum:

> -      - qcom,msm8916-bimc

> -      - qcom,msm8916-pcnoc

> -      - qcom,msm8916-snoc

> -

>    reg:

>      maxItems: 1

>  

> +  compatible:

> +        enum:

> +          - qcom,msm8916-bimc

> +          - qcom,msm8916-pcnoc

> +          - qcom,msm8916-snoc

> +          - qcom,qcs404-bimc

> +          - qcom,qcs404-pcnoc

> +          - qcom,qcs404-snoc

> +

>    '#interconnect-cells':

>      const: 1

>  

> -- 

> 2.17.1

>
Jun Nie Oct. 7, 2020, 3:24 a.m. UTC | #4
> >  obj-$(CONFIG_INTERCONNECT_QCOM_SMD_RPM) += icc-smd-rpm.o

> > +obj-$(CONFIG_INTERCONNECT_QCOM_SMD_RPM) += icc-smd-rpm.o

>

> Duplicate ?

>

> Thanks for msm8939 work, please Cc: me on any related patch :-)

>

>

OK, will CC you on next version. This issue should be a typo in vim.
Thanks for reminder.

Regards,
Jun
Georgi Djakov Nov. 26, 2020, 12:20 p.m. UTC | #5
On 9/30/20 11:16, Jun Nie wrote:
> This patch set split shared RPM based interconnect operation code and add

> support to MSM8939 interconnect.

> 


Hi Jun,

Are you planning to refresh this patchset?

Thanks,
Georgi
Jun Nie Nov. 30, 2020, 1:40 a.m. UTC | #6
Georgi Djakov <georgi.djakov@linaro.org> 于2020年11月26日周四 下午8:20写道:
>
> On 9/30/20 11:16, Jun Nie wrote:
> > This patch set split shared RPM based interconnect operation code and add
> > support to MSM8939 interconnect.
> >
>
> Hi Jun,
>
> Are you planning to refresh this patchset?

Yes. Just come back from a long vocation. Thanks for reminder!

Jun

>
> Thanks,
> Georgi