Merge branch 'for-armsoc' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git...
authorArnd Bergmann <arnd@arndb.de>
Thu, 15 Mar 2012 21:05:52 +0000 (21:05 +0000)
committerArnd Bergmann <arnd@arndb.de>
Thu, 15 Mar 2012 21:05:52 +0000 (21:05 +0000)
Conflicts:
arch/arm/mach-tegra/common.c
arch/arm/mach-ux500/devices-common.c

This resolves two conflicts and lets us merge the exynos5 branch
cleanly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1  2 
arch/arm/mach-omap2/pm24xx.c
arch/arm/mach-tegra/common.c
arch/arm/mach-ux500/devices-common.c

index 23de98d0384151b76274f67a99a10a005d4b3541,1f736222a629c50f46cbcace5da6e986db631489..a4eb5c280435701d571b25a2b5f95c2d7f2b6fec
@@@ -82,7 -82,13 +82,7 @@@ static int omap2_fclks_active(void
        f1 = omap2_cm_read_mod_reg(CORE_MOD, CM_FCLKEN1);
        f2 = omap2_cm_read_mod_reg(CORE_MOD, OMAP24XX_CM_FCLKEN2);
  
 -      /* Ignore UART clocks.  These are handled by UART core (serial.c) */
 -      f1 &= ~(OMAP24XX_EN_UART1_MASK | OMAP24XX_EN_UART2_MASK);
 -      f2 &= ~OMAP24XX_EN_UART3_MASK;
 -
 -      if (f1 | f2)
 -              return 1;
 -      return 0;
 +      return (f1 | f2) ? 1 : 0;
  }
  
  static void omap2_enter_full_retention(void)
@@@ -226,7 -232,6 +226,6 @@@ static int omap2_can_sleep(void
  
  static void omap2_pm_idle(void)
  {
-       local_irq_disable();
        local_fiq_disable();
  
        if (!omap2_can_sleep()) {
  
  out:
        local_fiq_enable();
-       local_irq_enable();
  }
  
  #ifdef CONFIG_SUSPEND
@@@ -462,7 -466,7 +460,7 @@@ static int __init omap2_pm_init(void
        }
  
        suspend_set_ops(&omap_pm_ops);
-       pm_idle = omap2_pm_idle;
+       arm_pm_idle = omap2_pm_idle;
  
        return 0;
  }
index 09dc37fc4299b1d81b7d95880cdd1fa8f68cd6c2,2db20da1d585a98535046fe01e4911c80a108a17..68815ce3f666cc0d7868a5b5e339f765a4b9d8c4
  #include <asm/hardware/gic.h>
  
  #include <mach/iomap.h>
- #include <mach/system.h>
 +#include <mach/powergate.h>
  
  #include "board.h"
  #include "clock.h"
  #include "fuse.h"
 +#include "pmc.h"
 +
 +/*
 + * Storage for debug-macro.S's state.
 + *
 + * This must be in .data not .bss so that it gets initialized each time the
 + * kernel is loaded. The data is declared here rather than debug-macro.S so
 + * that multiple inclusions of debug-macro.S point at the same data.
 + */
 +#define TEGRA_DEBUG_UART_OFFSET (TEGRA_DEBUG_UART_BASE & 0xFFFF)
 +u32 tegra_uart_config[3] = {
 +      /* Debug UART initialization required */
 +      1,
 +      /* Debug UART physical address */
 +      (u32)(IO_APB_PHYS + TEGRA_DEBUG_UART_OFFSET),
 +      /* Debug UART virtual address */
 +      (u32)(IO_APB_VIRT + TEGRA_DEBUG_UART_OFFSET),
 +};
  
  #ifdef CONFIG_OF
  static const struct of_device_id tegra_dt_irq_match[] __initconst = {
@@@ -115,21 -95,17 +114,23 @@@ static void __init tegra_init_cache(u3
  #ifdef CONFIG_ARCH_TEGRA_2x_SOC
  void __init tegra20_init_early(void)
  {
+       disable_hlt();  /* idle WFI usage needs to be confirmed */
        tegra_init_fuse();
        tegra2_init_clocks();
        tegra_clk_init_from_table(tegra20_clk_init_table);
        tegra_init_cache(0x331, 0x441);
 +      tegra_pmc_init();
 +      tegra_powergate_init();
  }
  #endif
  #ifdef CONFIG_ARCH_TEGRA_3x_SOC
  void __init tegra30_init_early(void)
  {
 +      tegra_init_fuse();
 +      tegra30_init_clocks();
        tegra_init_cache(0x441, 0x551);
 +      tegra_pmc_init();
 +      tegra_powergate_init();
  }
  #endif
index c3bc094c27e53845751f71df4bc91ca21bf62fc8,898a64517b09ecc1386bd1e2e23d938cc4b6e72c..c5312a4b49f5487a229166de8c28acb3994d6c52
  #include "devices-common.h"
  
  struct amba_device *
 -dbx500_add_amba_device(const char *name, resource_size_t base,
 -                     int irq, void *pdata, unsigned int periphid)
 +dbx500_add_amba_device(struct device *parent, const char *name,
 +                     resource_size_t base, int irq, void *pdata,
 +                     unsigned int periphid)
  {
        struct amba_device *dev;
        int ret;
  
-       dev = kzalloc(sizeof *dev, GFP_KERNEL);
+       dev = amba_device_alloc(name, base, SZ_4K);
        if (!dev)
                return ERR_PTR(-ENOMEM);
  
-       dev->dev.init_name = name;
-       dev->res.start = base;
-       dev->res.end = base + SZ_4K - 1;
-       dev->res.flags = IORESOURCE_MEM;
        dev->dma_mask = DMA_BIT_MASK(32);
        dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
  
        dev->irq[0] = irq;
-       dev->irq[1] = NO_IRQ;
  
        dev->periphid = periphid;
  
        dev->dev.platform_data = pdata;
  
-       ret = amba_device_register(dev, &iomem_resource);
 +      dev->dev.parent = parent;
 +
+       ret = amba_device_add(dev, &iomem_resource);
        if (ret) {
-               kfree(dev);
+               amba_device_put(dev);
                return ERR_PTR(ret);
        }
  
  }
  
  static struct platform_device *
 -dbx500_add_platform_device(const char *name, int id, void *pdata,
 -                         struct resource *res, int resnum)
 -{
 -      struct platform_device *dev;
 -      int ret;
 -
 -      dev = platform_device_alloc(name, id);
 -      if (!dev)
 -              return ERR_PTR(-ENOMEM);
 -
 -      dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
 -      dev->dev.dma_mask = &dev->dev.coherent_dma_mask;
 -
 -      ret = platform_device_add_resources(dev, res, resnum);
 -      if (ret)
 -              goto out_free;
 -
 -      dev->dev.platform_data = pdata;
 -
 -      ret = platform_device_add(dev);
 -      if (ret)
 -              goto out_free;
 -
 -      return dev;
 -
 -out_free:
 -      platform_device_put(dev);
 -      return ERR_PTR(ret);
 -}
 -
 -struct platform_device *
 -dbx500_add_platform_device_4k1irq(const char *name, int id,
 -                                resource_size_t base,
 -                                int irq, void *pdata)
 -{
 -      struct resource resources[] = {
 -              [0] = {
 -                      .start  = base,
 -                      .end    = base + SZ_4K - 1,
 -                      .flags  = IORESOURCE_MEM,
 -              },
 -              [1] = {
 -                      .start  = irq,
 -                      .end    = irq,
 -                      .flags  = IORESOURCE_IRQ,
 -              }
 -      };
 -
 -      return dbx500_add_platform_device(name, id, pdata, resources,
 -                                        ARRAY_SIZE(resources));
 -}
 -
 -static struct platform_device *
 -dbx500_add_gpio(int id, resource_size_t addr, int irq,
 +dbx500_add_gpio(struct device *parent, int id, resource_size_t addr, int irq,
                struct nmk_gpio_platform_data *pdata)
  {
        struct resource resources[] = {
                }
        };
  
 -      return platform_device_register_resndata(NULL, "gpio", id,
 -                              resources, ARRAY_SIZE(resources),
 -                              pdata, sizeof(*pdata));
 +      return platform_device_register_resndata(
 +              parent,
 +              "gpio",
 +              id,
 +              resources,
 +              ARRAY_SIZE(resources),
 +              pdata,
 +              sizeof(*pdata));
  }
  
 -void dbx500_add_gpios(resource_size_t *base, int num, int irq,
 -                    struct nmk_gpio_platform_data *pdata)
 +void dbx500_add_gpios(struct device *parent, resource_size_t *base, int num,
 +                    int irq, struct nmk_gpio_platform_data *pdata)
  {
        int first = 0;
        int i;
                pdata->first_irq = NOMADIK_GPIO_TO_IRQ(first);
                pdata->num_gpio = 32;
  
 -              dbx500_add_gpio(i, base[i], irq, pdata);
 +              dbx500_add_gpio(parent, i, base[i], irq, pdata);
        }
  }