Merge tag 'renesas-soc-fixes-for-v3.19' of git://git.kernel.org/pub/scm/linux/kernel...
authorOlof Johansson <olof@lixom.net>
Tue, 13 Jan 2015 23:32:43 +0000 (15:32 -0800)
committerOlof Johansson <olof@lixom.net>
Sat, 17 Jan 2015 03:10:43 +0000 (19:10 -0800)
Merge "Renesas ARM Based SoC Fixes for v3.19" from Simon Horman:

Renesas ARM Based SoC Fixes for v3.19

This pull request is based on the last round of SoC updates for v3.19,
Fourth Round of Renesas ARM Based SoC Updates for v3.19, tagged as
renesas-soc3-for-v3.19, merged into your next/soc branch and included in
v3.19-rc1.

- ARM: shmobile: r8a7740: Instantiate GIC from C board code in legacy builds

  Set .control_parent for all irqpin instances for sh73a0 SoC when booting
  using legacy C.

- ARM: shmobile: r8a7740: Instantiate GIC from C board code in legacy builds

  This fixes a long standing problem which has been present since
  the sh73a0 SoC started using the INTC External IRQ pin driver.

  The patch that introduced the problem is 341eb5465f67437a ("ARM:
  shmobile: INTC External IRQ pin driver on sh73a0") which was included
  in v3.10.

* tag 'renesas-soc-fixes-for-v3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: sh73a0 legacy: Set .control_parent for all irqpin instances
  ARM: shmobile: r8a7740: Instantiate GIC from C board code in legacy builds

1  2 
arch/arm/mach-shmobile/setup-r8a7740.c
arch/arm/mach-shmobile/setup-sh73a0.c

   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   * GNU General Public License for more details.
 - *
 - * You should have received a copy of the GNU General Public License
 - * along with this program; if not, write to the Free Software
 - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   */
  #include <linux/delay.h>
  #include <linux/dma-mapping.h>
@@@ -743,12 -747,6 +743,12 @@@ static void r8a7740_i2c_workaround(stru
  void __init r8a7740_add_standard_devices(void)
  {
        static struct pm_domain_device domain_devices[] __initdata = {
 +              { "A4R",  &tmu0_device },
 +              { "A4R",  &i2c0_device },
 +              { "A4S",  &irqpin0_device },
 +              { "A4S",  &irqpin1_device },
 +              { "A4S",  &irqpin2_device },
 +              { "A4S",  &irqpin3_device },
                { "A3SP", &scif0_device },
                { "A3SP", &scif1_device },
                { "A3SP", &scif2_device },
                { "A3SP", &scif7_device },
                { "A3SP", &scif8_device },
                { "A3SP", &i2c1_device },
 +              { "A3SP", &ipmmu_device },
 +              { "A3SP", &dma0_device },
 +              { "A3SP", &dma1_device },
 +              { "A3SP", &dma2_device },
 +              { "A3SP", &usb_dma_device },
        };
  
        /* I2C work-around */
@@@ -800,7 -793,14 +800,14 @@@ void __init r8a7740_init_irq_of(void
        void __iomem *intc_msk_base = ioremap_nocache(0xe6900040, 0x10);
        void __iomem *pfc_inta_ctrl = ioremap_nocache(0xe605807c, 0x4);
  
+ #ifdef CONFIG_ARCH_SHMOBILE_LEGACY
+       void __iomem *gic_dist_base = ioremap_nocache(0xc2800000, 0x1000);
+       void __iomem *gic_cpu_base = ioremap_nocache(0xc2000000, 0x1000);
+       gic_init(0, 29, gic_dist_base, gic_cpu_base);
+ #else
        irqchip_init();
+ #endif
  
        /* route signals to GIC */
        iowrite32(0x0, pfc_inta_ctrl);
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   * GNU General Public License for more details.
 - *
 - * You should have received a copy of the GNU General Public License
 - * along with this program; if not, write to the Free Software
 - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   */
  #include <linux/kernel.h>
  #include <linux/init.h>
@@@ -22,7 -26,6 +22,7 @@@
  #include <linux/of_platform.h>
  #include <linux/delay.h>
  #include <linux/input.h>
 +#include <linux/i2c/i2c-sh_mobile.h>
  #include <linux/io.h>
  #include <linux/serial_sci.h>
  #include <linux/sh_dma.h>
@@@ -42,7 -45,7 +42,7 @@@
  #include "sh73a0.h"
  
  static struct map_desc sh73a0_io_desc[] __initdata = {
 -      /* create a 1:1 entity map for 0xe6xxxxxx
 +      /* create a 1:1 identity mapping for 0xe6xxxxxx
         * used by CPGA, INTC and PFC.
         */
        {
@@@ -190,18 -193,11 +190,18 @@@ static struct resource i2c4_resources[
        },
  };
  
 +static struct i2c_sh_mobile_platform_data i2c_platform_data = {
 +      .clks_per_count = 2,
 +};
 +
  static struct platform_device i2c0_device = {
        .name           = "i2c-sh_mobile",
        .id             = 0,
        .resource       = i2c0_resources,
        .num_resources  = ARRAY_SIZE(i2c0_resources),
 +      .dev            = {
 +              .platform_data  = &i2c_platform_data,
 +      },
  };
  
  static struct platform_device i2c1_device = {
        .id             = 1,
        .resource       = i2c1_resources,
        .num_resources  = ARRAY_SIZE(i2c1_resources),
 +      .dev            = {
 +              .platform_data  = &i2c_platform_data,
 +      },
  };
  
  static struct platform_device i2c2_device = {
        .id             = 2,
        .resource       = i2c2_resources,
        .num_resources  = ARRAY_SIZE(i2c2_resources),
 +      .dev            = {
 +              .platform_data  = &i2c_platform_data,
 +      },
  };
  
  static struct platform_device i2c3_device = {
        .id             = 3,
        .resource       = i2c3_resources,
        .num_resources  = ARRAY_SIZE(i2c3_resources),
 +      .dev            = {
 +              .platform_data  = &i2c_platform_data,
 +      },
  };
  
  static struct platform_device i2c4_device = {
        .id             = 4,
        .resource       = i2c4_resources,
        .num_resources  = ARRAY_SIZE(i2c4_resources),
 +      .dev            = {
 +              .platform_data  = &i2c_platform_data,
 +      },
  };
  
  static const struct sh_dmae_slave_config sh73a0_dmae_slaves[] = {
@@@ -595,6 -579,7 +595,7 @@@ static struct platform_device ipmmu_dev
  
  static struct renesas_intc_irqpin_config irqpin0_platform_data = {
        .irq_base = irq_pin(0), /* IRQ0 -> IRQ7 */
+       .control_parent = true,
  };
  
  static struct resource irqpin0_resources[] = {
@@@ -656,6 -641,7 +657,7 @@@ static struct platform_device irqpin1_d
  
  static struct renesas_intc_irqpin_config irqpin2_platform_data = {
        .irq_base = irq_pin(16), /* IRQ16 -> IRQ23 */
+       .control_parent = true,
  };
  
  static struct resource irqpin2_resources[] = {
@@@ -686,6 -672,7 +688,7 @@@ static struct platform_device irqpin2_d
  
  static struct renesas_intc_irqpin_config irqpin3_platform_data = {
        .irq_base = irq_pin(24), /* IRQ24 -> IRQ31 */
+       .control_parent = true,
  };
  
  static struct resource irqpin3_resources[] = {
@@@ -757,12 -744,17 +760,12 @@@ void __init sh73a0_add_standard_devices
                            ARRAY_SIZE(sh73a0_late_devices));
  }
  
 -void __init sh73a0_init_delay(void)
 -{
 -      shmobile_init_delay();
 -}
 -
  /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */
  void __init __weak sh73a0_register_twd(void) { }
  
  void __init sh73a0_earlytimer_init(void)
  {
 -      sh73a0_init_delay();
 +      shmobile_init_delay();
        sh73a0_clock_init();
        shmobile_earlytimer_init();
        sh73a0_register_twd();
@@@ -802,7 -794,7 +805,7 @@@ static const char *sh73a0_boards_compat
  DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)")
        .smp            = smp_ops(sh73a0_smp_ops),
        .map_io         = sh73a0_map_io,
 -      .init_early     = sh73a0_init_delay,
 +      .init_early     = shmobile_init_delay,
        .init_machine   = sh73a0_add_standard_devices_dt,
        .init_late      = shmobile_init_late,
        .restart        = sh73a0_restart,