Merge tag 'arm-drivers-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Apr 2020 22:05:35 +0000 (15:05 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Apr 2020 22:05:35 +0000 (15:05 -0700)
Pull ARM driver updates from Arnd Bergmann:
 "These are the usual updates for SoC specific device drivers and
  related subsystems that don't have their own top-level maintainers:

   - ARM SCMI/SCPI updates to allow pluggable transport layers

   - TEE subsystem cleanups

   - A new driver for the Amlogic secure power domain controller

   - Various driver updates for the NXP Layerscape DPAA2, NXP i.MX SCU
     and TI OMAP2+ sysc drivers.

   - Qualcomm SoC driver updates, including a new library module for
     "protection domain" notifications

   - Lots of smaller bugfixes and cleanups in other drivers"

* tag 'arm-drivers-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (70 commits)
  soc: fsl: qe: fix sparse warnings for ucc_slow.c
  soc: fsl: qe: ucc_slow: remove 0 assignment for kzalloc'ed structure
  soc: fsl: qe: fix sparse warnings for ucc_fast.c
  soc: fsl: qe: fix sparse warnings for qe_ic.c
  soc: fsl: qe: fix sparse warnings for ucc.c
  soc: fsl: qe: fix sparse warning for qe_common.c
  soc: fsl: qe: fix sparse warnings for qe.c
  soc: qcom: Fix QCOM_APR dependencies
  soc: qcom: pdr: Avoid uninitialized use of found in pdr_indication_cb
  soc: imx: drop COMPILE_TEST for IMX_SCU_SOC
  firmware: imx: add COMPILE_TEST for IMX_SCU driver
  soc: imx: gpc: fix power up sequencing
  soc: imx: increase build coverage for imx8m soc driver
  soc: qcom: apr: Add avs/audio tracking functionality
  dt-bindings: soc: qcom: apr: Add protection domain bindings
  soc: qcom: Introduce Protection Domain Restart helpers
  devicetree: bindings: firmware: add ipq806x to qcom_scm
  memory: tegra: Correct debugfs clk rate-range on Tegra124
  memory: tegra: Correct debugfs clk rate-range on Tegra30
  memory: tegra: Correct debugfs clk rate-range on Tegra20
  ...

1  2 
drivers/firmware/imx/scu-pd.c
drivers/gpu/drm/omapdrm/dss/dss.c
drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c
drivers/soc/renesas/Kconfig

@@@ -61,7 -61,7 +61,7 @@@ struct imx_sc_msg_req_set_resource_powe
        struct imx_sc_rpc_msg hdr;
        u16 resource;
        u8 mode;
 -} __packed;
 +} __packed __aligned(4);
  
  #define IMX_SCU_PD_NAME_SIZE 20
  struct imx_sc_pm_domain {
@@@ -93,7 -93,7 +93,7 @@@ static const struct imx_sc_pd_range imx
        { "kpp", IMX_SC_R_KPP, 1, false, 0 },
        { "fspi", IMX_SC_R_FSPI_0, 2, true, 0 },
        { "mu_a", IMX_SC_R_MU_0A, 14, true, 0 },
-       { "mu_b", IMX_SC_R_MU_13B, 1, true, 13 },
+       { "mu_b", IMX_SC_R_MU_5B, 9, true, 5 },
  
        /* CONN SS */
        { "usb", IMX_SC_R_USB_0, 2, true, 0 },
        { "audio-pll0", IMX_SC_R_AUDIO_PLL_0, 1, false, 0 },
        { "audio-pll1", IMX_SC_R_AUDIO_PLL_1, 1, false, 0 },
        { "audio-clk-0", IMX_SC_R_AUDIO_CLK_0, 1, false, 0 },
+       { "audio-clk-1", IMX_SC_R_AUDIO_CLK_1, 1, false, 0 },
        { "dma0-ch", IMX_SC_R_DMA_0_CH0, 16, true, 0 },
        { "dma1-ch", IMX_SC_R_DMA_1_CH0, 16, true, 0 },
        { "dma2-ch", IMX_SC_R_DMA_2_CH0, 5, true, 0 },
        { "asrc1", IMX_SC_R_ASRC_1, 1, false, 0 },
        { "esai0", IMX_SC_R_ESAI_0, 1, false, 0 },
        { "spdif0", IMX_SC_R_SPDIF_0, 1, false, 0 },
+       { "spdif1", IMX_SC_R_SPDIF_1, 1, false, 0 },
        { "sai", IMX_SC_R_SAI_0, 3, true, 0 },
+       { "sai3", IMX_SC_R_SAI_3, 1, false, 0 },
+       { "sai4", IMX_SC_R_SAI_4, 1, false, 0 },
+       { "sai5", IMX_SC_R_SAI_5, 1, false, 0 },
+       { "sai6", IMX_SC_R_SAI_6, 1, false, 0 },
+       { "sai7", IMX_SC_R_SAI_7, 1, false, 0 },
        { "amix", IMX_SC_R_AMIX, 1, false, 0 },
        { "mqs0", IMX_SC_R_MQS_0, 1, false, 0 },
        { "dsp", IMX_SC_R_DSP, 1, false, 0 },
        /* DC SS */
        { "dc0", IMX_SC_R_DC_0, 1, false, 0 },
        { "dc0-pll", IMX_SC_R_DC_0_PLL_0, 2, true, 0 },
+       /* CM40 SS */
+       { "cm40_i2c", IMX_SC_R_M4_0_I2C, 1, 0 },
+       { "cm40_intmux", IMX_SC_R_M4_0_INTMUX, 1, 0 },
  };
  
  static const struct imx_sc_pd_soc imx8qxp_scu_pd = {
@@@ -1151,38 -1151,46 +1151,38 @@@ static const struct dss_features dra7xx
        .has_lcd_clk_src        =       true,
  };
  
 -static int dss_init_ports(struct dss_device *dss)
 +static void __dss_uninit_ports(struct dss_device *dss, unsigned int num_ports)
  {
        struct platform_device *pdev = dss->pdev;
        struct device_node *parent = pdev->dev.of_node;
        struct device_node *port;
        unsigned int i;
 -      int r;
  
 -      for (i = 0; i < dss->feat->num_ports; i++) {
 +      for (i = 0; i < num_ports; i++) {
                port = of_graph_get_port_by_id(parent, i);
                if (!port)
                        continue;
  
                switch (dss->feat->ports[i]) {
                case OMAP_DISPLAY_TYPE_DPI:
 -                      r = dpi_init_port(dss, pdev, port, dss->feat->model);
 -                      if (r)
 -                              return r;
 +                      dpi_uninit_port(port);
                        break;
 -
                case OMAP_DISPLAY_TYPE_SDI:
 -                      r = sdi_init_port(dss, pdev, port);
 -                      if (r)
 -                              return r;
 +                      sdi_uninit_port(port);
                        break;
 -
                default:
                        break;
                }
        }
 -
 -      return 0;
  }
  
 -static void dss_uninit_ports(struct dss_device *dss)
 +static int dss_init_ports(struct dss_device *dss)
  {
        struct platform_device *pdev = dss->pdev;
        struct device_node *parent = pdev->dev.of_node;
        struct device_node *port;
 -      int i;
 +      unsigned int i;
 +      int r;
  
        for (i = 0; i < dss->feat->num_ports; i++) {
                port = of_graph_get_port_by_id(parent, i);
  
                switch (dss->feat->ports[i]) {
                case OMAP_DISPLAY_TYPE_DPI:
 -                      dpi_uninit_port(port);
 +                      r = dpi_init_port(dss, pdev, port, dss->feat->model);
 +                      if (r)
 +                              goto error;
                        break;
 +
                case OMAP_DISPLAY_TYPE_SDI:
 -                      sdi_uninit_port(port);
 +                      r = sdi_init_port(dss, pdev, port);
 +                      if (r)
 +                              goto error;
                        break;
 +
                default:
                        break;
                }
        }
 +
 +      return 0;
 +
 +error:
 +      __dss_uninit_ports(dss, i);
 +      return r;
 +}
 +
 +static void dss_uninit_ports(struct dss_device *dss)
 +{
 +      __dss_uninit_ports(dss, dss->feat->num_ports);
  }
  
  static int dss_video_pll_probe(struct dss_device *dss)
@@@ -1348,9 -1339,15 +1348,15 @@@ static int dss_component_compare(struc
        return dev == child;
  }
  
+ struct dss_component_match_data {
+       struct device *dev;
+       struct component_match **match;
+ };
  static int dss_add_child_component(struct device *dev, void *data)
  {
-       struct component_match **match = data;
+       struct dss_component_match_data *cmatch = data;
+       struct component_match **match = cmatch->match;
  
        /*
         * HACK
        if (strstr(dev_name(dev), "rfbi"))
                return 0;
  
-       component_match_add(dev->parent, match, dss_component_compare, dev);
+       /*
+        * Handle possible interconnect target modules defined within the DSS.
+        * The DSS components can be children of an interconnect target module
+        * after the device tree has been updated for the module data.
+        * See also omapdss_boot_init() for compatible fixup.
+        */
+       if (strstr(dev_name(dev), "target-module"))
+               return device_for_each_child(dev, cmatch,
+                                            dss_add_child_component);
+       component_match_add(cmatch->dev, match, dss_component_compare, dev);
  
        return 0;
  }
@@@ -1404,6 -1411,7 +1420,7 @@@ static int dss_probe_hardware(struct ds
  static int dss_probe(struct platform_device *pdev)
  {
        const struct soc_device_attribute *soc;
+       struct dss_component_match_data cmatch;
        struct component_match *match = NULL;
        struct resource *dss_mem;
        struct dss_device *dss;
  
        omapdss_gather_components(&pdev->dev);
  
-       device_for_each_child(&pdev->dev, &match, dss_add_child_component);
+       cmatch.dev = &pdev->dev;
+       cmatch.match = &match;
+       device_for_each_child(&pdev->dev, &cmatch, dss_add_child_component);
  
        r = component_master_add_with_match(&pdev->dev, &dss_component_ops, match);
        if (r)
@@@ -1552,8 -1562,7 +1571,8 @@@ static void dss_shutdown(struct platfor
        DSSDBG("shutdown\n");
  
        for_each_dss_output(dssdev) {
 -              if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
 +              if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE &&
 +                  dssdev->ops && dssdev->ops->disable)
                        dssdev->ops->disable(dssdev);
        }
  }
@@@ -174,29 -174,43 +174,38 @@@ static const struct of_device_id omapds
  };
  
  static const struct of_device_id omapdss_of_fixups_whitelist[] __initconst = {
 -      { .compatible = "composite-video-connector" },
 -      { .compatible = "hdmi-connector" },
        { .compatible = "panel-dsi-cm" },
 -      { .compatible = "svideo-connector" },
 -      { .compatible = "ti,opa362" },
 -      { .compatible = "ti,tpd12s015" },
        {},
  };
  
+ static void __init omapdss_find_children(struct device_node *np)
+ {
+       struct device_node *child;
+       for_each_available_child_of_node(np, child) {
+               if (!of_find_property(child, "compatible", NULL))
+                       continue;
+               omapdss_walk_device(child, true);
+               if (of_device_is_compatible(child, "ti,sysc"))
+                       omapdss_find_children(child);
+       }
+ }
  static int __init omapdss_boot_init(void)
  {
-       struct device_node *dss, *child;
+       struct device_node *dss;
  
        INIT_LIST_HEAD(&dss_conv_list);
  
        dss = of_find_matching_node(NULL, omapdss_of_match);
  
        if (dss == NULL || !of_device_is_available(dss))
 -              return 0;
 +              goto put_node;
  
        omapdss_walk_device(dss, true);
-       for_each_available_child_of_node(dss, child) {
-               if (!of_find_property(child, "compatible", NULL))
-                       continue;
-               omapdss_walk_device(child, true);
-       }
+       omapdss_find_children(dss);
  
        while (!list_empty(&dss_conv_list)) {
                struct dss_conv_node *n;
                kfree(n);
        }
  
 +put_node:
 +      of_node_put(dss);
        return 0;
  }
  
@@@ -116,7 -116,6 +116,7 @@@ config ARCH_R8A777
        bool "R-Car H1 (R8A77790)"
        select ARCH_RCAR_GEN1
        select ARM_ERRATA_754322
 +      select ARM_GLOBAL_TIMER
        select HAVE_ARM_SCU if SMP
        select HAVE_ARM_TWD if SMP
        select SYSC_R8A7779
@@@ -164,7 -163,6 +164,7 @@@ config ARCH_SH73A
        bool "SH-Mobile AG5 (R8A73A00)"
        select ARCH_RMOBILE
        select ARM_ERRATA_754322
 +      select ARM_GLOBAL_TIMER
        select HAVE_ARM_SCU if SMP
        select HAVE_ARM_TWD if SMP
        select RENESAS_INTC_IRQPIN
@@@ -195,19 -193,19 +195,19 @@@ config ARCH_R8A774C
          This enables support for the Renesas RZ/G2E SoC.
  
  config ARCH_R8A77950
-       bool
+       bool "Renesas R-Car H3 ES1.x SoC Platform"
+       select ARCH_RCAR_GEN3
+       select SYSC_R8A7795
+       help
+         This enables support for the Renesas R-Car H3 SoC (revision 1.x).
  
  config ARCH_R8A77951
-       bool
- config ARCH_R8A7795
-       bool "Renesas R-Car H3 SoC Platform"
-       select ARCH_R8A77950
-       select ARCH_R8A77951
+       bool "Renesas R-Car H3 ES2.0+ SoC Platform"
        select ARCH_RCAR_GEN3
        select SYSC_R8A7795
        help
-         This enables support for the Renesas R-Car H3 SoC.
+         This enables support for the Renesas R-Car H3 SoC (revisions 2.0 and
+         later).
  
  config ARCH_R8A77960
        bool "Renesas R-Car M3-W SoC Platform"