Merge branches 'pinmux' and 'soc' into boards-base
authorSimon Horman <horms+renesas@verge.net.au>
Fri, 7 Jun 2013 05:26:22 +0000 (14:26 +0900)
committerSimon Horman <horms+renesas@verge.net.au>
Fri, 7 Jun 2013 05:26:22 +0000 (14:26 +0900)
Conflicts:
arch/arm/mach-shmobile/Kconfig
arch/arm/mach-shmobile/include/mach/r8a7778.h
arch/arm/mach-shmobile/setup-r8a7778.c

1  2 
arch/arm/mach-shmobile/Kconfig
arch/arm/mach-shmobile/include/mach/r8a7778.h
arch/arm/mach-shmobile/setup-r8a7778.c
arch/arm/mach-shmobile/setup-sh73a0.c

@@@ -36,8 -36,7 +36,8 @@@ config ARCH_R8A774
        select RENESAS_INTC_IRQPIN
  
  config ARCH_R8A7778
-       bool "R-Car M1 (R8A77780)"
+       bool "R-Car M1A (R8A77781)"
 +      select ARCH_WANT_OPTIONAL_GPIOLIB
        select CPU_V7
        select SH_CLK_CPG
        select ARM_GIC
@@@ -28,6 -29,6 +29,7 @@@ extern void r8a7778_init_irq(void)
  extern void r8a7778_init_irq_dt(void);
  extern void r8a7778_clock_init(void);
  extern void r8a7778_init_irq_extpin(int irlm);
 +extern void r8a7778_pinmux_init(void);
+ extern void r8a7778_sdhi_init(int id, struct sh_mobile_sdhi_info *info);
  
  #endif /* __ASM_R8A7778_H__ */
@@@ -95,50 -88,42 +89,88 @@@ static struct sh_timer_config sh_tmu1_p
                &sh_tmu##idx##_platform_data,           \
                sizeof(sh_tmu##idx##_platform_data))
  
+ /* Ether */
+ static struct resource ether_resources[] = {
+       DEFINE_RES_MEM(0xfde00000, 0x400),
+       DEFINE_RES_IRQ(gic_iid(0x89)),
+ };
+ void __init r8a7778_add_ether_device(struct sh_eth_plat_data *pdata)
+ {
+       platform_device_register_resndata(&platform_bus, "sh_eth", -1,
+                                         ether_resources,
+                                         ARRAY_SIZE(ether_resources),
+                                         pdata, sizeof(*pdata));
+ }
 +/* PFC/GPIO */
 +static struct resource pfc_resources[] = {
 +      DEFINE_RES_MEM(0xfffc0000, 0x118),
 +};
 +
 +#define R8A7778_GPIO(idx)                                             \
 +static struct resource r8a7778_gpio##idx##_resources[] = {            \
 +      DEFINE_RES_MEM(0xffc40000 + 0x1000 * (idx), 0x30),              \
 +      DEFINE_RES_IRQ(gic_iid(0x87)),                                  \
 +};                                                                    \
 +                                                                      \
 +static struct gpio_rcar_config r8a7778_gpio##idx##_platform_data = {  \
 +      .gpio_base      = 32 * (idx),                                   \
 +      .irq_base       = GPIO_IRQ_BASE(idx),                           \
 +      .number_of_pins = 32,                                           \
 +      .pctl_name      = "pfc-r8a7778",                                \
 +}
 +
 +R8A7778_GPIO(0);
 +R8A7778_GPIO(1);
 +R8A7778_GPIO(2);
 +R8A7778_GPIO(3);
 +R8A7778_GPIO(4);
 +
 +#define r8a7778_register_gpio(idx)                            \
 +      platform_device_register_resndata(                      \
 +              &platform_bus, "gpio_rcar", idx,                \
 +              r8a7778_gpio##idx##_resources,                  \
 +              ARRAY_SIZE(r8a7778_gpio##idx##_resources),      \
 +              &r8a7778_gpio##idx##_platform_data,             \
 +              sizeof(r8a7778_gpio##idx##_platform_data))
 +
 +void __init r8a7778_pinmux_init(void)
 +{
 +      platform_device_register_simple(
 +              "pfc-r8a7778", -1,
 +              pfc_resources,
 +              ARRAY_SIZE(pfc_resources));
 +
 +      r8a7778_register_gpio(0);
 +      r8a7778_register_gpio(1);
 +      r8a7778_register_gpio(2);
 +      r8a7778_register_gpio(3);
 +      r8a7778_register_gpio(4);
++};
++
+ /* SDHI */
+ static struct resource sdhi_resources[] = {
+       /* SDHI0 */
+       DEFINE_RES_MEM(0xFFE4C000, 0x100),
+       DEFINE_RES_IRQ(gic_iid(0x77)),
+       /* SDHI1 */
+       DEFINE_RES_MEM(0xFFE4D000, 0x100),
+       DEFINE_RES_IRQ(gic_iid(0x78)),
+       /* SDHI2 */
+       DEFINE_RES_MEM(0xFFE4F000, 0x100),
+       DEFINE_RES_IRQ(gic_iid(0x76)),
+ };
+ void __init r8a7778_sdhi_init(int id,
+                             struct sh_mobile_sdhi_info *info)
+ {
+       BUG_ON(id < 0 || id > 2);
+       platform_device_register_resndata(
+               &platform_bus, "sh_mobile_sdhi", id,
+               sdhi_resources + (2 * id), 2,
+               info, sizeof(*info));
  }
  
  void __init r8a7778_add_standard_devices(void)
Simple merge