Merge tag 'renesas-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 9 Sep 2013 23:33:57 +0000 (16:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 9 Sep 2013 23:33:57 +0000 (16:33 -0700)
Pull ARM Renesas SoC cleanup, refactoring and more SMP support from Kevin Hilman:
 "Lots of cleanup and refactoring and some SMP additions for Renesas
  platforms.  Due to some inter-dependencies with other arm-soc
  branches, this Renesas stuff was separated out for sending after the
  other branches were merged.

  Highlights:
   - remove unused board support and cleanup of unused headers
   - refactoring of init and device registration
   - simplify IRQ initialization"

* tag 'renesas-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (68 commits)
  ARM: shmobile: Per-CPU SMP boot / sleep code for SCU SoCs
  ARM: shmobile: Introduce per-CPU SMP boot / sleep code
  ARM: shmobile: Use shared SCU CPU Hotplug code on r8a7779
  ARM: shmobile: Use shared SCU CPU Hotplug code on sh73a0
  ARM: shmobile: Add shared SCU CPU Hotplug code
  ARM: shmobile: Use shared SCU SMP boot code on emev2
  ARM: shmobile: Use shared SCU SMP boot code on r8a7779
  ARM: shmobile: Use shared SCU SMP boot code on sh73a0
  ARM: shmobile: Introduce shared SCU SMP boot code
  ARM: shmobile: sh73a0: Remove global GPIO_NR definition
  ARM: shmobile: kzm9d: remove nfsroot settings from bootargs
  ARM: shmobile: armadillo800eva: remove nfsroot settings from bootargs
  ARM: shmobile: r8a7779: move r8a7779_init_irq_xxx() to setup
  ARM: shmobile: r8a7740: move r8a7740_init_irq_of() to setup
  ARM: shmobile: bockw: add missing __initdata
  ARM: shmobile: r8a7790: add missing __initdata
  ARM: shmobile: r8a7779: add missing __initdata
  ARM: shmobile: Remove unused shmobile_init_time()
  ARM: shmobile: Use clocksource_of_init() on r8a7790
  ARM: shmobile: Use default ->init_time() on KZM9G DT ref
  ...

22 files changed:
1  2 
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
arch/arm/boot/dts/r8a7740.dtsi
arch/arm/boot/dts/r8a7779-marzen-reference.dts
arch/arm/boot/dts/r8a7779.dtsi
arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
arch/arm/boot/dts/sh73a0.dtsi
arch/arm/mach-shmobile/Kconfig
arch/arm/mach-shmobile/Makefile
arch/arm/mach-shmobile/board-ape6evm.c
arch/arm/mach-shmobile/board-armadillo800eva-reference.c
arch/arm/mach-shmobile/board-armadillo800eva.c
arch/arm/mach-shmobile/board-bockw.c
arch/arm/mach-shmobile/board-kzm9g-reference.c
arch/arm/mach-shmobile/board-marzen-reference.c
arch/arm/mach-shmobile/board-marzen.c
arch/arm/mach-shmobile/headsmp.S
arch/arm/mach-shmobile/include/mach/r8a7778.h
arch/arm/mach-shmobile/include/mach/r8a7779.h
arch/arm/mach-shmobile/setup-emev2.c
arch/arm/mach-shmobile/setup-r8a7778.c
arch/arm/mach-shmobile/setup-r8a7779.c

index 000cf7628e6e90f49357a25c42a73bf07cc97b67,07204ca96853a96a7b19b7fbde78a770ccf36b63..4e02f1b6c8a26a14f652a0feabf39b787821141e
@@@ -204,8 -195,8 +207,9 @@@ dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kz
        sh73a0-kzm9g.dtb \
        sh73a0-kzm9g-reference.dtb \
        r8a73a4-ape6evm.dtb \
+       r8a73a4-ape6evm-reference.dtb \
        sh7372-mackerel.dtb
 +dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d-reference.dtb
  dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_cyclone5.dtb \
        socfpga_vt.dtb
  dtb-$(CONFIG_ARCH_SPEAR13XX) += spear1310-evb.dtb \
index e18a195b55f3c7fb7220a9ccdc8dd60b415474ed,27f014f3f1aa049dca70af637cc6718a22b85be2..44d3d520e01ffd0cce0c48527889d2ddf8e4c230
                              0 73 0x4>;
        };
  
 +      pfc: pfc@e6050000 {
 +              compatible = "renesas,pfc-r8a7740";
 +              reg = <0xe6050000 0x8000>,
 +                    <0xe605800c 0x20>;
 +              gpio-controller;
 +              #gpio-cells = <2>;
 +      };
++
+       tpu: pwm@e6600000 {
+               compatible = "renesas,tpu-r8a7740", "renesas,tpu";
+               reg = <0xe6600000 0x100>;
+               status = "disabled";
+               #pwm-cells = <3>;
+       };
  };
Simple merge
Simple merge
index e817fde6729a7ac55e07bf5e3f5b33f34c2fc043,fed06b06056dafa4f4c9f506918a56b4cb1dcbf2..1f94c310c4775f3a40e168e84845d4da6dbd40ab
@@@ -162,9 -122,22 +160,23 @@@ config MACH_BOCK
        depends on ARCH_R8A7778
        select ARCH_REQUIRE_GPIOLIB
        select RENESAS_INTC_IRQPIN
 +      select REGULATOR_FIXED_VOLTAGE if REGULATOR
        select USE_OF
  
+ config MACH_BOCKW_REFERENCE
+       bool "BOCK-W  - Reference Device Tree Implementation"
+       depends on ARCH_R8A7778
+       select ARCH_REQUIRE_GPIOLIB
+       select RENESAS_INTC_IRQPIN
+       select REGULATOR_FIXED_VOLTAGE if REGULATOR
+       select USE_OF
+       ---help---
+          Use reference implementation of BockW board support
+          which makes use of device tree at the expense
+          of not supporting a number of devices.
+          This is intended to aid developers
  config MACH_MARZEN
        bool "MARZEN board"
        depends on ARCH_R8A7779
index b150c4508237beac48a76e2ee37b60125cfae1d8,b95b500e3b5af9060fff74d3c39fcfa961031c47..2705bfa8c113161d0368e11e7f7158a294cb26a6
@@@ -2,33 -2,18 +2,33 @@@
  # Makefile for the linux kernel.
  #
  
 +ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/mach-shmobile/include
 +
  # Common objects
 -obj-y                         := timer.o console.o clock.o
 +obj-y                         := timer.o console.o
  
  # CPU objects
 -obj-$(CONFIG_ARCH_SH7372)     += setup-sh7372.o clock-sh7372.o intc-sh7372.o
 -obj-$(CONFIG_ARCH_SH73A0)     += setup-sh73a0.o clock-sh73a0.o intc-sh73a0.o
 -obj-$(CONFIG_ARCH_R8A73A4)    += setup-r8a73a4.o clock-r8a73a4.o
 -obj-$(CONFIG_ARCH_R8A7740)    += setup-r8a7740.o clock-r8a7740.o
 -obj-$(CONFIG_ARCH_R8A7778)    += setup-r8a7778.o clock-r8a7778.o
 -obj-$(CONFIG_ARCH_R8A7779)    += setup-r8a7779.o clock-r8a7779.o
 -obj-$(CONFIG_ARCH_R8A7790)    += setup-r8a7790.o clock-r8a7790.o
 -obj-$(CONFIG_ARCH_EMEV2)      += setup-emev2.o clock-emev2.o
 +obj-$(CONFIG_ARCH_SH7372)     += setup-sh7372.o intc-sh7372.o
 +obj-$(CONFIG_ARCH_SH73A0)     += setup-sh73a0.o intc-sh73a0.o
 +obj-$(CONFIG_ARCH_R8A73A4)    += setup-r8a73a4.o
- obj-$(CONFIG_ARCH_R8A7740)    += setup-r8a7740.o intc-r8a7740.o
++obj-$(CONFIG_ARCH_R8A7740)    += setup-r8a7740.o
 +obj-$(CONFIG_ARCH_R8A7778)    += setup-r8a7778.o
- obj-$(CONFIG_ARCH_R8A7779)    += setup-r8a7779.o intc-r8a7779.o
++obj-$(CONFIG_ARCH_R8A7779)    += setup-r8a7779.o
 +obj-$(CONFIG_ARCH_R8A7790)    += setup-r8a7790.o
 +obj-$(CONFIG_ARCH_EMEV2)      += setup-emev2.o
 +
 +# Clock objects
 +ifndef CONFIG_COMMON_CLK
 +obj-y                         += clock.o
 +obj-$(CONFIG_ARCH_SH7372)     += clock-sh7372.o
 +obj-$(CONFIG_ARCH_SH73A0)     += clock-sh73a0.o
 +obj-$(CONFIG_ARCH_R8A73A4)    += clock-r8a73a4.o
 +obj-$(CONFIG_ARCH_R8A7740)    += clock-r8a7740.o
 +obj-$(CONFIG_ARCH_R8A7778)    += clock-r8a7778.o
 +obj-$(CONFIG_ARCH_R8A7779)    += clock-r8a7779.o
 +obj-$(CONFIG_ARCH_R8A7790)    += clock-r8a7790.o
 +obj-$(CONFIG_ARCH_EMEV2)      += clock-emev2.o
 +endif
  
  # SMP objects
  smp-y                         := platsmp.o headsmp.o
index 35dd7f201a1637b7589f2a7f92cc6d9c349872d4,255e97e5be837545fd0d021662b76d71e8f60a31..6b9faf3908f72b2f23bd3a1a3b07887c6581bc9b
@@@ -217,21 -205,7 +235,17 @@@ static void __init bockw_init(void
        r8a7778_clock_init();
        r8a7778_init_irq_extpin(1);
        r8a7778_add_standard_devices();
-       r8a7778_add_usb_phy_device(&usb_phy_platform_data);
        r8a7778_add_ether_device(&ether_platform_data);
-       r8a7778_add_i2c_device(0);
-       r8a7778_add_hspi_device(0);
-       r8a7778_add_mmc_device(&sh_mmcif_plat);
 +      r8a7778_add_vin_device(0, &vin_platform_data);
 +      /* VIN1 has a pin conflict with Ether */
 +      if (!IS_ENABLED(CONFIG_SH_ETH))
 +              r8a7778_add_vin_device(1, &vin_platform_data);
 +      platform_device_register_data(&platform_bus, "soc-camera-pdrv", 0,
 +                                    &iclink0_ml86v7667,
 +                                    sizeof(iclink0_ml86v7667));
 +      platform_device_register_data(&platform_bus, "soc-camera-pdrv", 1,
 +                                    &iclink1_ml86v7667,
 +                                    sizeof(iclink1_ml86v7667));
  
        i2c_register_board_info(0, i2c0_devices,
                                ARRAY_SIZE(i2c0_devices));
index ca7fb2e63c604e5806778784f19b26aa4adaf155,3551b5480b47b38fe6ab1b729a2deb3d63d8dce0..3f5044fda4e30ec20610c677188f9647430f1bf0
@@@ -38,8 -38,6 +39,7 @@@
  #include <linux/mmc/host.h>
  #include <linux/mmc/sh_mobile_sdhi.h>
  #include <linux/mfd/tmio.h>
- #include <mach/hardware.h>
 +#include <media/soc_camera.h>
  #include <mach/r8a7779.h>
  #include <mach/common.h>
  #include <mach/irqs.h>
@@@ -212,8 -203,7 +231,9 @@@ static struct platform_device *marzen_d
        &thermal_device,
        &hspi_device,
        &leds_device,
+       &usb_phy,
 +      &camera0_device,
 +      &camera1_device,
  };
  
  static const struct pinctrl_map marzen_pinctrl_map[] = {
@@@ -274,9 -254,6 +294,8 @@@ static void __init marzen_init(void
        r8a7779_init_irq_extpin(1); /* IRQ1 as individual interrupt */
  
        r8a7779_add_standard_devices();
-       r8a7779_add_usb_phy_device(&usb_phy_platform_data);
 +      r8a7779_add_vin_device(1, &vin_platform_data);
 +      r8a7779_add_vin_device(3, &vin_platform_data);
        platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices));
  }
  
Simple merge
index 2866704e7afd8a7102d08d3ca51b4c8519b60719,41fd6da2757478b54fc89aac17915c000cb2a501..adfcf51b163dcd0503f51ec4961647534428daa5
  #ifndef __ASM_R8A7778_H__
  #define __ASM_R8A7778_H__
  
- #include <linux/mmc/sh_mmcif.h>
- #include <linux/mmc/sh_mobile_sdhi.h>
  #include <linux/sh_eth.h>
- #include <linux/platform_data/usb-rcar-phy.h>
 +#include <linux/platform_data/camera-rcar.h>
  
  extern void r8a7778_add_standard_devices(void);
  extern void r8a7778_add_standard_devices_dt(void);
  extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata);
- extern void r8a7778_add_usb_phy_device(struct rcar_phy_platform_data *pdata);
- extern void r8a7778_add_i2c_device(int id);
- extern void r8a7778_add_hspi_device(int id);
- extern void r8a7778_add_mmc_device(struct sh_mmcif_plat_data *info);
 +extern void r8a7778_add_vin_device(int id,
 +                                 struct rcar_vin_platform_data *pdata);
+ extern void r8a7778_add_dt_devices(void);
  
  extern void r8a7778_init_late(void);
  extern void r8a7778_init_delay(void);
index 6d2b6417fe2affd35f3e572453a24d10a8f09334,f08d6ecf5d1dad38f09704a5f05931bfc833adf6..11c740047e14cae3d8cef131e30961ee04e7bcd9
@@@ -4,8 -4,6 +4,7 @@@
  #include <linux/sh_clk.h>
  #include <linux/pm_domain.h>
  #include <linux/sh_eth.h>
- #include <linux/platform_data/usb-rcar-phy.h>
 +#include <linux/platform_data/camera-rcar.h>
  
  struct platform_device;
  
@@@ -35,9 -32,6 +33,8 @@@ extern void r8a7779_add_early_devices(v
  extern void r8a7779_add_standard_devices(void);
  extern void r8a7779_add_standard_devices_dt(void);
  extern void r8a7779_add_ether_device(struct sh_eth_plat_data *pdata);
- extern void r8a7779_add_usb_phy_device(struct rcar_phy_platform_data *pdata);
 +extern void r8a7779_add_vin_device(int idx,
 +                                 struct rcar_vin_platform_data *pdata);
  extern void r8a7779_init_late(void);
  extern void r8a7779_clock_init(void);
  extern void r8a7779_pinmux_init(void);
Simple merge
index 203becfc6e31b99064f838619402fb81ad617082,604cf36b5616a148c48b9952e0f5db9840aa4d47..6a2657ebd19775c4a9c79bae91f7aa0dac2bc812
@@@ -319,55 -281,7 +281,41 @@@ void __init r8a7778_register_hspi(int i
                hspi_resources + (2 * id), 2);
  }
  
- /* MMC */
- static struct resource mmc_resources[] __initdata = {
-       DEFINE_RES_MEM(0xffe4e000, 0x100),
-       DEFINE_RES_IRQ(gic_iid(0x5d)),
- };
- void __init r8a7778_add_mmc_device(struct sh_mmcif_plat_data *info)
- {
-       platform_device_register_resndata(
-               &platform_bus, "sh_mmcif", -1,
-               mmc_resources, ARRAY_SIZE(mmc_resources),
-               info, sizeof(*info));
- }
 +/* VIN */
 +#define R8A7778_VIN(idx)                                              \
 +static struct resource vin##idx##_resources[] __initdata = {          \
 +      DEFINE_RES_MEM(0xffc50000 + 0x1000 * (idx), 0x1000),            \
 +      DEFINE_RES_IRQ(gic_iid(0x5a)),                                  \
 +};                                                                    \
 +                                                                      \
 +static struct platform_device_info vin##idx##_info __initdata = {     \
 +      .parent         = &platform_bus,                                \
 +      .name           = "r8a7778-vin",                                \
 +      .id             = idx,                                          \
 +      .res            = vin##idx##_resources,                         \
 +      .num_res        = ARRAY_SIZE(vin##idx##_resources),             \
 +      .dma_mask       = DMA_BIT_MASK(32),                             \
 +}
 +
 +R8A7778_VIN(0);
 +R8A7778_VIN(1);
 +
 +static struct platform_device_info *vin_info_table[] __initdata = {
 +      &vin0_info,
 +      &vin1_info,
 +};
 +
 +void __init r8a7778_add_vin_device(int id, struct rcar_vin_platform_data *pdata)
 +{
 +      BUG_ON(id < 0 || id > 1);
 +
 +      vin_info_table[id]->data = pdata;
 +      vin_info_table[id]->size_data = sizeof(*pdata);
 +
 +      platform_device_register_full(vin_info_table[id]);
 +}
 +
- void __init r8a7778_add_standard_devices(void)
+ void __init r8a7778_add_dt_devices(void)
  {
        int i;
  
index 41bab625341e0318392c3bc778b662f2014a31ee,6a9933395434dde65fde5717a89f30d91dedcaf2..b5b2f787da2e3b015584b8ac0f855a409f3b29ab
@@@ -629,24 -648,6 +675,16 @@@ void __init r8a7779_add_ether_device(st
                                          pdata, sizeof(*pdata));
  }
  
- void __init r8a7779_add_usb_phy_device(struct rcar_phy_platform_data *pdata)
- {
-       platform_device_register_resndata(&platform_bus, "rcar_usb_phy", -1,
-                                         usb_phy_resources,
-                                         ARRAY_SIZE(usb_phy_resources),
-                                         pdata, sizeof(*pdata));
- }
 +void __init r8a7779_add_vin_device(int id, struct rcar_vin_platform_data *pdata)
 +{
 +      BUG_ON(id < 0 || id > 3);
 +
 +      vin_info_table[id]->data = pdata;
 +      vin_info_table[id]->size_data = sizeof(*pdata);
 +
 +      platform_device_register_full(vin_info_table[id]);
 +}
 +
  /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */
  void __init __weak r8a7779_register_twd(void) { }