Merge tag 'omap-cleanup-sparseirq-for-v3.7' into devel-dt
authorTony Lindgren <tony@atomide.com>
Sun, 16 Sep 2012 22:35:06 +0000 (15:35 -0700)
committerTony Lindgren <tony@atomide.com>
Sun, 16 Sep 2012 22:35:06 +0000 (15:35 -0700)
This branch contains changes needed to make omap2+
work properly with sparse IRQ. It also removes
dependencies to mach/hardware.h. These help moving
things towards ARM single zImage support.

This branch is based on a commit in tty-next
branch with omap-devel-gpmc-fixed-for-v3.7 and
cleanup-omap-tags-for-v3.7 merged in to keep things
compiling and sort out some merge conflicts.

Conflicts:
arch/arm/mach-omap2/omap4-common.c
drivers/gpio/gpio-twl4030.c

1  2 
arch/arm/mach-omap2/Kconfig
arch/arm/mach-omap2/omap4-common.c
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/timer.c
drivers/gpio/gpio-twl4030.c

Simple merge
Simple merge
Simple merge
index 31f9c936125fd186d5fc647a601c3017cc91c2d6,25cbe73b0cd7d06e97e0c8f578b91581337303be..e2084facca5926da73cd43c5e2e07725f70e79c2
  #include <linux/clocksource.h>
  #include <linux/clockchips.h>
  #include <linux/slab.h>
 +#include <linux/of.h>
  
  #include <asm/mach/time.h>
- #include <plat/dmtimer.h>
  #include <asm/smp_twd.h>
  #include <asm/sched_clock.h>
- #include "common.h"
  #include <plat/omap_hwmod.h>
  #include <plat/omap_device.h>
+ #include <plat/dmtimer.h>
  #include <plat/omap-pm.h>
  
+ #include "soc.h"
+ #include "common.h"
  #include "powerdomain.h"
  
  /* Parent clocks, eventually these will come from the clock framework */
index f923252da8390695ba4eae5228489f7e22067914,f030880bc9bb40bdf64574fcd14de5a62d2a9736..c5f8ca233e1f16ccf583fac884c0cbc1e2cb2117
@@@ -395,31 -396,6 +396,29 @@@ static int __devinit gpio_twl4030_debou
  
  static int gpio_twl4030_remove(struct platform_device *pdev);
  
-       omap_twl_info->gpio_base = -1;
 +static struct twl4030_gpio_platform_data *of_gpio_twl4030(struct device *dev)
 +{
 +      struct twl4030_gpio_platform_data *omap_twl_info;
 +
 +      omap_twl_info = devm_kzalloc(dev, sizeof(*omap_twl_info), GFP_KERNEL);
 +      if (!omap_twl_info)
 +              return NULL;
 +
 +      omap_twl_info->use_leds = of_property_read_bool(dev->of_node,
 +                      "ti,use-leds");
 +
 +      of_property_read_u32(dev->of_node, "ti,debounce",
 +                           &omap_twl_info->debounce);
 +      of_property_read_u32(dev->of_node, "ti,mmc-cd",
 +                           (u32 *)&omap_twl_info->mmc_cd);
 +      of_property_read_u32(dev->of_node, "ti,pullups",
 +                           &omap_twl_info->pullups);
 +      of_property_read_u32(dev->of_node, "ti,pulldowns",
 +                           &omap_twl_info->pulldowns);
 +
 +      return omap_twl_info;
 +}
 +
  static int __devinit gpio_twl4030_probe(struct platform_device *pdev)
  {
        struct twl4030_gpio_platform_data *pdata = pdev->dev.platform_data;
@@@ -451,39 -428,33 +451,37 @@@ no_irqs
        twl_gpiochip.ngpio = TWL4030_GPIO_MAX;
        twl_gpiochip.dev = &pdev->dev;
  
 -      if (pdata) {
 -              /*
 -               * NOTE:  boards may waste power if they don't set pullups
 -               * and pulldowns correctly ... default for non-ULPI pins is
 -               * pulldown, and some other pins may have external pullups
 -               * or pulldowns.  Careful!
 -               */
 -              ret = gpio_twl4030_pulls(pdata->pullups, pdata->pulldowns);
 -              if (ret)
 -                      dev_dbg(&pdev->dev, "pullups %.05x %.05x --> %d\n",
 -                                      pdata->pullups, pdata->pulldowns,
 -                                      ret);
 -
 -              ret = gpio_twl4030_debounce(pdata->debounce, pdata->mmc_cd);
 -              if (ret)
 -                      dev_dbg(&pdev->dev, "debounce %.03x %.01x --> %d\n",
 -                                      pdata->debounce, pdata->mmc_cd,
 -                                      ret);
 -
 -              /*
 -               * NOTE: we assume VIBRA_CTL.VIBRA_EN, in MODULE_AUDIO_VOICE,
 -               * is (still) clear if use_leds is set.
 -               */
 -              if (pdata->use_leds)
 -                      twl_gpiochip.ngpio += 2;
 +      if (node)
 +              pdata = of_gpio_twl4030(&pdev->dev);
 +
 +      if (pdata == NULL) {
 +              dev_err(&pdev->dev, "Platform data is missing\n");
 +              return -ENXIO;
        }
  
-       twl_gpiochip.base = pdata->gpio_base;
 +      /*
 +       * NOTE:  boards may waste power if they don't set pullups
 +       * and pulldowns correctly ... default for non-ULPI pins is
 +       * pulldown, and some other pins may have external pullups
 +       * or pulldowns.  Careful!
 +       */
 +      ret = gpio_twl4030_pulls(pdata->pullups, pdata->pulldowns);
 +      if (ret)
 +              dev_dbg(&pdev->dev, "pullups %.05x %.05x --> %d\n",
 +                      pdata->pullups, pdata->pulldowns, ret);
 +
 +      ret = gpio_twl4030_debounce(pdata->debounce, pdata->mmc_cd);
 +      if (ret)
 +              dev_dbg(&pdev->dev, "debounce %.03x %.01x --> %d\n",
 +                      pdata->debounce, pdata->mmc_cd, ret);
 +
 +      /*
 +       * NOTE: we assume VIBRA_CTL.VIBRA_EN, in MODULE_AUDIO_VOICE,
 +       * is (still) clear if use_leds is set.
 +       */
 +      if (pdata->use_leds)
 +              twl_gpiochip.ngpio += 2;
 +
        ret = gpiochip_add(&twl_gpiochip);
        if (ret < 0) {
                dev_err(&pdev->dev, "could not register gpiochip, %d\n", ret);