Merge tag 'renesas-drivers-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel...
authorOlof Johansson <olof@lixom.net>
Mon, 19 Jun 2017 05:45:08 +0000 (22:45 -0700)
committerOlof Johansson <olof@lixom.net>
Mon, 19 Jun 2017 05:45:08 +0000 (22:45 -0700)
Renesas ARM Based SoC Drivers Updates for v4.13

* Rework Kconfig and Makefile logic

* tag 'renesas-drivers-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  soc: renesas: Rework Kconfig and Makefile logic

Signed-off-by: Olof Johansson <olof@lixom.net>
1  2 
drivers/soc/Kconfig
drivers/soc/Makefile
drivers/soc/renesas/rcar-sysc.c

diff --combined drivers/soc/Kconfig
@@@ -1,11 -1,10 +1,12 @@@
  menu "SOC (System On Chip) specific Drivers"
  
 +source "drivers/soc/atmel/Kconfig"
  source "drivers/soc/bcm/Kconfig"
  source "drivers/soc/fsl/Kconfig"
 +source "drivers/soc/imx/Kconfig"
  source "drivers/soc/mediatek/Kconfig"
  source "drivers/soc/qcom/Kconfig"
+ source "drivers/soc/renesas/Kconfig"
  source "drivers/soc/rockchip/Kconfig"
  source "drivers/soc/samsung/Kconfig"
  source "drivers/soc/sunxi/Kconfig"
diff --combined drivers/soc/Makefile
@@@ -2,15 -2,13 +2,15 @@@
  # Makefile for the Linux Kernel SOC specific device drivers.
  #
  
 +obj-$(CONFIG_ARCH_AT91)               += atmel/
  obj-y                         += bcm/
  obj-$(CONFIG_ARCH_DOVE)               += dove/
  obj-$(CONFIG_MACH_DOVE)               += dove/
  obj-y                         += fsl/
 +obj-$(CONFIG_ARCH_MXC)                += imx/
  obj-$(CONFIG_ARCH_MEDIATEK)   += mediatek/
  obj-$(CONFIG_ARCH_QCOM)               += qcom/
- obj-$(CONFIG_ARCH_RENESAS)    += renesas/
+ obj-y                         += renesas/
  obj-$(CONFIG_ARCH_ROCKCHIP)   += rockchip/
  obj-$(CONFIG_SOC_SAMSUNG)     += samsung/
  obj-$(CONFIG_ARCH_SUNXI)      += sunxi/
@@@ -2,7 -2,7 +2,7 @@@
   * R-Car SYSC Power management support
   *
   * Copyright (C) 2014  Magnus Damm
 - * Copyright (C) 2015-2016 Glider bvba
 + * Copyright (C) 2015-2017 Glider bvba
   *
   * This file is subject to the terms and conditions of the GNU General Public
   * License.  See the file "COPYING" in the main directory of this archive
@@@ -275,35 -275,33 +275,33 @@@ finalize
  }
  
  static const struct of_device_id rcar_sysc_matches[] = {
- #ifdef CONFIG_ARCH_R8A7743
+ #ifdef CONFIG_SYSC_R8A7743
        { .compatible = "renesas,r8a7743-sysc", .data = &r8a7743_sysc_info },
  #endif
- #ifdef CONFIG_ARCH_R8A7745
+ #ifdef CONFIG_SYSC_R8A7745
        { .compatible = "renesas,r8a7745-sysc", .data = &r8a7745_sysc_info },
  #endif
- #ifdef CONFIG_ARCH_R8A7779
+ #ifdef CONFIG_SYSC_R8A7779
        { .compatible = "renesas,r8a7779-sysc", .data = &r8a7779_sysc_info },
  #endif
- #ifdef CONFIG_ARCH_R8A7790
+ #ifdef CONFIG_SYSC_R8A7790
        { .compatible = "renesas,r8a7790-sysc", .data = &r8a7790_sysc_info },
  #endif
- #ifdef CONFIG_ARCH_R8A7791
+ #ifdef CONFIG_SYSC_R8A7791
        { .compatible = "renesas,r8a7791-sysc", .data = &r8a7791_sysc_info },
- #endif
- #ifdef CONFIG_ARCH_R8A7792
-       { .compatible = "renesas,r8a7792-sysc", .data = &r8a7792_sysc_info },
- #endif
- #ifdef CONFIG_ARCH_R8A7793
        /* R-Car M2-N is identical to R-Car M2-W w.r.t. power domains. */
        { .compatible = "renesas,r8a7793-sysc", .data = &r8a7791_sysc_info },
  #endif
- #ifdef CONFIG_ARCH_R8A7794
+ #ifdef CONFIG_SYSC_R8A7792
+       { .compatible = "renesas,r8a7792-sysc", .data = &r8a7792_sysc_info },
+ #endif
+ #ifdef CONFIG_SYSC_R8A7794
        { .compatible = "renesas,r8a7794-sysc", .data = &r8a7794_sysc_info },
  #endif
- #ifdef CONFIG_ARCH_R8A7795
+ #ifdef CONFIG_SYSC_R8A7795
        { .compatible = "renesas,r8a7795-sysc", .data = &r8a7795_sysc_info },
  #endif
- #ifdef CONFIG_ARCH_R8A7796
+ #ifdef CONFIG_SYSC_R8A7796
        { .compatible = "renesas,r8a7796-sysc", .data = &r8a7796_sysc_info },
  #endif
        { /* sentinel */ }
@@@ -334,12 -332,6 +332,12 @@@ static int __init rcar_sysc_pd_init(voi
  
        info = match->data;
  
 +      if (info->init) {
 +              error = info->init();
 +              if (error)
 +                      return error;
 +      }
 +
        has_cpg_mstp = of_find_compatible_node(NULL, NULL,
                                               "renesas,cpg-mstp-clocks");
  
                const struct rcar_sysc_area *area = &info->areas[i];
                struct rcar_sysc_pd *pd;
  
 +              if (!area->name) {
 +                      /* Skip NULLified area */
 +                      continue;
 +              }
 +
                pd = kzalloc(sizeof(*pd) + strlen(area->name) + 1, GFP_KERNEL);
                if (!pd) {
                        error = -ENOMEM;
@@@ -417,18 -404,6 +415,18 @@@ out_put
  }
  early_initcall(rcar_sysc_pd_init);
  
 +void __init rcar_sysc_nullify(struct rcar_sysc_area *areas,
 +                            unsigned int num_areas, u8 id)
 +{
 +      unsigned int i;
 +
 +      for (i = 0; i < num_areas; i++)
 +              if (areas[i].isr_bit == id) {
 +                      areas[i].name = NULL;
 +                      return;
 +              }
 +}
 +
  void __init rcar_sysc_init(phys_addr_t base, u32 syscier)
  {
        u32 syscimr;