Merge branch 'late/fixes' into fixes
authorOlof Johansson <olof@lixom.net>
Sun, 7 Oct 2012 14:22:32 +0000 (07:22 -0700)
committerOlof Johansson <olof@lixom.net>
Sun, 7 Oct 2012 14:22:32 +0000 (07:22 -0700)
This is a series from Arnd that fixes a number of compiler warnings
when building defconfigs on ARM.

* late/fixes:
  ARM: footbridge: nw_gpio_lock is raw_spin_lock
  ARM: mv78xx0: correct addr_map_cfg __initdata annotation
  ARM: footbridge: remove RTC_IRQ definition
  ARM: soc: dependency warnings for errata
  ARM: ks8695: __arch_virt_to_dma type handling
  ARM: rpc: check device_register return code in ecard_probe
  ARM: davinci: don't mark da850_register_cpufreq as __init
  ARM: iop13xx: fix iq81340sc_atux_map_irq prototype
  ARM: iop13xx: mark iop13xx_scan_bus as __devinit
  ARM: mv78xx0: mark mv78xx0_timer_init as __init_refok
  ARM: s3c24xx: fix multiple section mismatch warnings
  ARM: at91: unused variable in at91_pm_verify_clocks
  ARM: at91: skip at91_io_desc definition for NOMMU
  ARM: pxa: work around duplicate definition of GPIO24_SSP1_SFRM
  ARM: pxa: remove sharpsl_fatal_check function
  ARM: pxa: define palmte2_pxa_keys conditionally
  ARM: pxa: Wunused-result warning in viper board file
  ARM: shark: fix shark_pci_init return code

Fixed trivial conflicts in arch/arm/mach-at91/setup.c.

Signed-off-by: Olof Johansson <olof@lixom.net>
14 files changed:
1  2 
arch/arm/mach-at91/setup.c
arch/arm/mach-davinci/da850.c
arch/arm/mach-iop13xx/pci.c
arch/arm/mach-mv78xx0/addr-map.c
arch/arm/mach-mv78xx0/common.c
arch/arm/mach-pxa/cm-x2xx.c
arch/arm/mach-pxa/palmte2.c
arch/arm/mach-pxa/sharpsl_pm.c
arch/arm/mach-pxa/viper.c
arch/arm/mach-s3c24xx/simtec-usb.c
arch/arm/mach-shark/pci.c
arch/arm/mach-tegra/Kconfig
arch/arm/mach-ux500/Kconfig
drivers/char/nwflash.c

@@@ -73,7 -73,7 +73,7 @@@ void __init at91_init_sram(int bank, un
  {
        struct map_desc *desc = &sram_desc[bank];
  
 -      desc->virtual = AT91_IO_VIRT_BASE - length;
 +      desc->virtual = (unsigned long)AT91_IO_VIRT_BASE - length;
        if (bank > 0)
                desc->virtual -= sram_desc[bank - 1].length;
  
@@@ -87,8 -87,8 +87,8 @@@
        iotable_init(desc, 1);
  }
  
- static struct map_desc at91_io_desc __initdata = {
+ static struct map_desc at91_io_desc __initdata __maybe_unused = {
 -      .virtual        = AT91_VA_BASE_SYS,
 +      .virtual        = (unsigned long)AT91_VA_BASE_SYS,
        .pfn            = __phys_to_pfn(AT91_BASE_SYS),
        .length         = SZ_16K,
        .type           = MT_DEVICE,
@@@ -576,17 -576,17 +576,17 @@@ static const struct mux_config da850_pi
  #endif
  };
  
 -const short da850_i2c0_pins[] __initdata = {
 +const short da850_i2c0_pins[] __initconst = {
        DA850_I2C0_SDA, DA850_I2C0_SCL,
        -1
  };
  
 -const short da850_i2c1_pins[] __initdata = {
 +const short da850_i2c1_pins[] __initconst = {
        DA850_I2C1_SCL, DA850_I2C1_SDA,
        -1
  };
  
 -const short da850_lcdcntl_pins[] __initdata = {
 +const short da850_lcdcntl_pins[] __initconst = {
        DA850_LCD_D_0, DA850_LCD_D_1, DA850_LCD_D_2, DA850_LCD_D_3,
        DA850_LCD_D_4, DA850_LCD_D_5, DA850_LCD_D_6, DA850_LCD_D_7,
        DA850_LCD_D_8, DA850_LCD_D_9, DA850_LCD_D_10, DA850_LCD_D_11,
@@@ -939,7 -939,7 +939,7 @@@ static struct platform_device da850_cpu
  
  unsigned int da850_max_speed = 300000;
  
- int __init da850_register_cpufreq(char *async_clk)
+ int da850_register_cpufreq(char *async_clk)
  {
        int i;
  
@@@ -36,8 -36,8 +36,8 @@@ u32 iop13xx_atux_pmmr_offset; /* This o
  u32 iop13xx_atue_pmmr_offset; /* This offset can change based on strapping */
  static struct pci_bus *pci_bus_atux = 0;
  static struct pci_bus *pci_bus_atue = 0;
 -u32 iop13xx_atue_mem_base;
 -u32 iop13xx_atux_mem_base;
 +void __iomem *iop13xx_atue_mem_base;
 +void __iomem *iop13xx_atux_mem_base;
  size_t iop13xx_atue_mem_size;
  size_t iop13xx_atux_mem_size;
  
@@@ -88,7 -88,8 +88,7 @@@ void iop13xx_map_pci_memory(void
                                }
  
                                if (end) {
 -                                      iop13xx_atux_mem_base =
 -                                      (u32) __arm_ioremap_pfn(
 +                                      iop13xx_atux_mem_base = __arm_ioremap_pfn(
                                        __phys_to_pfn(IOP13XX_PCIX_LOWER_MEM_PA)
                                        , 0, iop13xx_atux_mem_size, MT_DEVICE);
                                        if (!iop13xx_atux_mem_base) {
@@@ -98,7 -99,7 +98,7 @@@
                                        }
                                } else
                                        iop13xx_atux_mem_size = 0;
 -                              PRINTK("%s: atu: %d bus_size: %d mem_base: %x\n",
 +                              PRINTK("%s: atu: %d bus_size: %d mem_base: %p\n",
                                __func__, atu, iop13xx_atux_mem_size,
                                iop13xx_atux_mem_base);
                                break;
                                }
  
                                if (end) {
 -                                      iop13xx_atue_mem_base =
 -                                      (u32) __arm_ioremap_pfn(
 +                                      iop13xx_atue_mem_base = __arm_ioremap_pfn(
                                        __phys_to_pfn(IOP13XX_PCIE_LOWER_MEM_PA)
                                        , 0, iop13xx_atue_mem_size, MT_DEVICE);
                                        if (!iop13xx_atue_mem_base) {
                                        }
                                } else
                                        iop13xx_atue_mem_size = 0;
 -                              PRINTK("%s: atu: %d bus_size: %d mem_base: %x\n",
 +                              PRINTK("%s: atu: %d bus_size: %d mem_base: %p\n",
                                __func__, atu, iop13xx_atue_mem_size,
                                iop13xx_atue_mem_base);
                                break;
                        }
  
 -                      printk("%s: Initialized (%uM @ resource/virtual: %08lx/%08x)\n",
 +                      printk("%s: Initialized (%uM @ resource/virtual: %08lx/%p)\n",
                        atu ? "ATUE" : "ATUX",
                        (atu ? iop13xx_atue_mem_size : iop13xx_atux_mem_size) /
                        SZ_1M,
@@@ -504,7 -506,7 +504,7 @@@ iop13xx_pci_abort(unsigned long addr, u
  
  /* Scan an IOP13XX PCI bus.  nr selects which ATU we use.
   */
- struct pci_bus *iop13xx_scan_bus(int nr, struct pci_sys_data *sys)
+ struct pci_bus * __devinit iop13xx_scan_bus(int nr, struct pci_sys_data *sys)
  {
        int which_atu;
        struct pci_bus *bus = NULL;
@@@ -968,6 -970,7 +968,6 @@@ void __init iop13xx_pci_init(void
        __raw_writel(__raw_readl(IOP13XX_XBG_BECSR) & 3, IOP13XX_XBG_BECSR);
  
        /* Setup the Min Address for PCI memory... */
 -      pcibios_min_io = 0;
        pcibios_min_mem = IOP13XX_PCIX_LOWER_MEM_BA;
  
        /* if Linux is given control of an ATU
@@@ -1000,7 -1003,7 +1000,7 @@@ int iop13xx_pci_setup(int nr, struct pc
        if (nr > 1)
                return 0;
  
 -      res = kcalloc(2, sizeof(struct resource), GFP_KERNEL);
 +      res = kzalloc(sizeof(struct resource), GFP_KERNEL);
        if (!res)
                panic("PCI: unable to alloc resources");
  
                                  << IOP13XX_ATUX_PCIXSR_FUNC_NUM;
                __raw_writel(pcixsr, IOP13XX_ATUX_PCIXSR);
  
 -              res[0].start = IOP13XX_PCIX_LOWER_IO_PA + IOP13XX_PCIX_IO_BUS_OFFSET;
 -              res[0].end   = IOP13XX_PCIX_UPPER_IO_PA;
 -              res[0].name  = "IQ81340 ATUX PCI I/O Space";
 -              res[0].flags = IORESOURCE_IO;
 +              pci_ioremap_io(0, IOP13XX_PCIX_LOWER_IO_PA);
  
 -              res[1].start = IOP13XX_PCIX_LOWER_MEM_RA;
 -              res[1].end   = IOP13XX_PCIX_UPPER_MEM_RA;
 -              res[1].name  = "IQ81340 ATUX PCI Memory Space";
 -              res[1].flags = IORESOURCE_MEM;
 +              res->start = IOP13XX_PCIX_LOWER_MEM_RA;
 +              res->end   = IOP13XX_PCIX_UPPER_MEM_RA;
 +              res->name  = "IQ81340 ATUX PCI Memory Space";
 +              res->flags = IORESOURCE_MEM;
                sys->mem_offset = IOP13XX_PCIX_MEM_OFFSET;
 -              sys->io_offset = IOP13XX_PCIX_LOWER_IO_PA;
                break;
        case IOP13XX_INIT_ATU_ATUE:
                /* Note: the function number field in the PCSR is ro */
  
                __raw_writel(pcsr, IOP13XX_ATUE_PCSR);
  
 -              res[0].start = IOP13XX_PCIE_LOWER_IO_PA + IOP13XX_PCIE_IO_BUS_OFFSET;
 -              res[0].end   = IOP13XX_PCIE_UPPER_IO_PA;
 -              res[0].name  = "IQ81340 ATUE PCI I/O Space";
 -              res[0].flags = IORESOURCE_IO;
 +              pci_ioremap_io(SZ_64K, IOP13XX_PCIE_LOWER_IO_PA);
  
 -              res[1].start = IOP13XX_PCIE_LOWER_MEM_RA;
 -              res[1].end   = IOP13XX_PCIE_UPPER_MEM_RA;
 -              res[1].name  = "IQ81340 ATUE PCI Memory Space";
 -              res[1].flags = IORESOURCE_MEM;
 +              res->start = IOP13XX_PCIE_LOWER_MEM_RA;
 +              res->end   = IOP13XX_PCIE_UPPER_MEM_RA;
 +              res->name  = "IQ81340 ATUE PCI Memory Space";
 +              res->flags = IORESOURCE_MEM;
                sys->mem_offset = IOP13XX_PCIE_MEM_OFFSET;
 -              sys->io_offset = IOP13XX_PCIE_LOWER_IO_PA;
                sys->map_irq = iop13xx_pcie_map_irq;
                break;
        default:
                return 0;
        }
  
 -      request_resource(&ioport_resource, &res[0]);
 -      request_resource(&iomem_resource, &res[1]);
 +      request_resource(&iomem_resource, res);
  
 -      pci_add_resource_offset(&sys->resources, &res[0], sys->io_offset);
 -      pci_add_resource_offset(&sys->resources, &res[1], sys->mem_offset);
 +      pci_add_resource_offset(&sys->resources, res, sys->mem_offset);
  
        return 1;
  }
@@@ -13,7 -13,6 +13,7 @@@
  #include <linux/mbus.h>
  #include <linux/io.h>
  #include <plat/addr-map.h>
 +#include <mach/mv78xx0.h>
  #include "common.h"
  
  /*
@@@ -48,13 -47,13 +48,13 @@@ static void __init __iomem *win_cfg_bas
         * so we don't need to take that into account here.
         */
  
 -      return (void __iomem *)((win < 8) ? WIN0_OFF(win) : WIN8_OFF(win));
 +      return (win < 8) ? WIN0_OFF(win) : WIN8_OFF(win);
  }
  
  /*
   * Description of the windows needed by the platform code
   */
- static struct __initdata orion_addr_map_cfg addr_map_cfg = {
+ static struct orion_addr_map_cfg addr_map_cfg __initdata = {
        .num_wins = 14,
        .remappable_wins = 8,
        .win_cfg_base = win_cfg_base,
@@@ -72,17 -71,17 +72,17 @@@ void __init mv78xx0_setup_cpu_mbus(void
         */
        if (mv78xx0_core_index() == 0)
                orion_setup_cpu_mbus_target(&addr_map_cfg,
 -                                          DDR_WINDOW_CPU0_BASE);
 +                                          (void __iomem *) DDR_WINDOW_CPU0_BASE);
        else
                orion_setup_cpu_mbus_target(&addr_map_cfg,
 -                                          DDR_WINDOW_CPU1_BASE);
 +                                          (void __iomem *) DDR_WINDOW_CPU1_BASE);
  }
  
  void __init mv78xx0_setup_pcie_io_win(int window, u32 base, u32 size,
                                      int maj, int min)
  {
        orion_setup_cpu_win(&addr_map_cfg, window, base, size,
 -                          TARGET_PCIE(maj), ATTR_PCIE_IO(min), -1);
 +                          TARGET_PCIE(maj), ATTR_PCIE_IO(min), 0);
  }
  
  void __init mv78xx0_setup_pcie_mem_win(int window, u32 base, u32 size,
@@@ -20,8 -20,8 +20,8 @@@
  #include <mach/mv78xx0.h>
  #include <mach/bridge-regs.h>
  #include <plat/cache-feroceon-l2.h>
 -#include <plat/ehci-orion.h>
 -#include <plat/orion_nand.h>
 +#include <linux/platform_data/usb-ehci-orion.h>
 +#include <linux/platform_data/mtd-orion_nand.h>
  #include <plat/time.h>
  #include <plat/common.h>
  #include <plat/addr-map.h>
@@@ -130,12 -130,17 +130,12 @@@ static int get_tclk(void
   ****************************************************************************/
  static struct map_desc mv78xx0_io_desc[] __initdata = {
        {
 -              .virtual        = MV78XX0_CORE_REGS_VIRT_BASE,
 +              .virtual        = (unsigned long) MV78XX0_CORE_REGS_VIRT_BASE,
                .pfn            = 0,
                .length         = MV78XX0_CORE_REGS_SIZE,
                .type           = MT_DEVICE,
        }, {
 -              .virtual        = MV78XX0_PCIE_IO_VIRT_BASE(0),
 -              .pfn            = __phys_to_pfn(MV78XX0_PCIE_IO_PHYS_BASE(0)),
 -              .length         = MV78XX0_PCIE_IO_SIZE * 8,
 -              .type           = MT_DEVICE,
 -      }, {
 -              .virtual        = MV78XX0_REGS_VIRT_BASE,
 +              .virtual        = (unsigned long) MV78XX0_REGS_VIRT_BASE,
                .pfn            = __phys_to_pfn(MV78XX0_REGS_PHYS_BASE),
                .length         = MV78XX0_REGS_SIZE,
                .type           = MT_DEVICE,
@@@ -336,7 -341,7 +336,7 @@@ void __init mv78xx0_init_early(void
        orion_time_set_base(TIMER_VIRT_BASE);
  }
  
- static void mv78xx0_timer_init(void)
+ static void __init_refok mv78xx0_timer_init(void)
  {
        orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR,
                        IRQ_MV78XX0_TIMER_1, get_tclk());
  #include <asm/mach/map.h>
  
  #include <mach/pxa25x.h>
+ #undef GPIO24_SSP1_SFRM
  #include <mach/pxa27x.h>
  #include <mach/audio.h>
 -#include <mach/pxafb.h>
 +#include <linux/platform_data/video-pxafb.h>
  #include <mach/smemc.h>
  
  #include <asm/hardware/it8152.h>
  #include <mach/pxa25x.h>
  #include <mach/audio.h>
  #include <mach/palmte2.h>
 -#include <mach/mmc.h>
 -#include <mach/pxafb.h>
 -#include <mach/irda.h>
 +#include <linux/platform_data/mmc-pxamci.h>
 +#include <linux/platform_data/video-pxafb.h>
 +#include <linux/platform_data/irda-pxaficp.h>
  #include <mach/udc.h>
 -#include <mach/palmasoc.h>
 +#include <linux/platform_data/asoc-palm27x.h>
  
  #include "generic.h"
  #include "devices.h"
@@@ -105,6 -105,7 +105,7 @@@ static struct pxamci_platform_data palm
        .gpio_power             = GPIO_NR_PALMTE2_SD_POWER,
  };
  
+ #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
  /******************************************************************************
   * GPIO keys
   ******************************************************************************/
@@@ -132,6 -133,7 +133,7 @@@ static struct platform_device palmte2_p
                .platform_data = &palmte2_pxa_keys_data,
        },
  };
+ #endif
  
  /******************************************************************************
   * Backlight
@@@ -55,7 -55,6 +55,6 @@@
  #ifdef CONFIG_PM
  static int sharpsl_off_charge_battery(void);
  static int sharpsl_check_battery_voltage(void);
- static int sharpsl_fatal_check(void);
  #endif
  static int sharpsl_check_battery_temp(void);
  static int sharpsl_ac_check(void);
@@@ -579,8 -578,8 +578,8 @@@ static int sharpsl_ac_check(void
  static int sharpsl_pm_suspend(struct platform_device *pdev, pm_message_t state)
  {
        sharpsl_pm.flags |= SHARPSL_SUSPENDED;
 -      flush_delayed_work_sync(&toggle_charger);
 -      flush_delayed_work_sync(&sharpsl_bat);
 +      flush_delayed_work(&toggle_charger);
 +      flush_delayed_work(&sharpsl_bat);
  
        if (sharpsl_pm.charge_mode == CHRG_ON)
                sharpsl_pm.flags |= SHARPSL_DO_OFFLINE_CHRG;
@@@ -686,53 -685,6 +685,6 @@@ static int corgi_pxa_pm_enter(suspend_s
        return 0;
  }
  
- /*
-  * Check for fatal battery errors
-  * Fatal returns -1
-  */
- static int sharpsl_fatal_check(void)
- {
-       int buff[5], temp, i, acin;
-       dev_dbg(sharpsl_pm.dev, "sharpsl_fatal_check entered\n");
-       /* Check AC-Adapter */
-       acin = sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN);
-       if (acin && (sharpsl_pm.charge_mode == CHRG_ON)) {
-               sharpsl_pm.machinfo->charge(0);
-               udelay(100);
-               sharpsl_pm.machinfo->discharge(1);      /* enable discharge */
-               mdelay(SHARPSL_WAIT_DISCHARGE_ON);
-       }
-       if (sharpsl_pm.machinfo->discharge1)
-               sharpsl_pm.machinfo->discharge1(1);
-       /* Check battery : check inserting battery ? */
-       for (i = 0; i < 5; i++) {
-               buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT);
-               mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_VOLT);
-       }
-       if (sharpsl_pm.machinfo->discharge1)
-               sharpsl_pm.machinfo->discharge1(0);
-       if (acin && (sharpsl_pm.charge_mode == CHRG_ON)) {
-               udelay(100);
-               sharpsl_pm.machinfo->charge(1);
-               sharpsl_pm.machinfo->discharge(0);
-       }
-       temp = get_select_val(buff);
-       dev_dbg(sharpsl_pm.dev, "sharpsl_fatal_check: acin: %d, discharge voltage: %d, no discharge: %ld\n", acin, temp, sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT));
-       if ((acin && (temp < sharpsl_pm.machinfo->fatal_acin_volt)) ||
-                       (!acin && (temp < sharpsl_pm.machinfo->fatal_noacin_volt)))
-               return -1;
-       return 0;
- }
  static int sharpsl_off_charge_error(void)
  {
        dev_err(sharpsl_pm.dev, "Offline Charger: Error occurred.\n");
@@@ -879,7 -831,7 +831,7 @@@ static const struct platform_suspend_op
  
  static int __devinit sharpsl_pm_probe(struct platform_device *pdev)
  {
 -      int ret;
 +      int ret, irq;
  
        if (!pdev->dev.platform_data)
                return -EINVAL;
        gpio_direction_input(sharpsl_pm.machinfo->gpio_batlock);
  
        /* Register interrupt handlers */
 -      if (request_irq(PXA_GPIO_TO_IRQ(sharpsl_pm.machinfo->gpio_acin), sharpsl_ac_isr, IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, "AC Input Detect", sharpsl_ac_isr)) {
 -              dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", PXA_GPIO_TO_IRQ(sharpsl_pm.machinfo->gpio_acin));
 +      irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_acin);
 +      if (request_irq(irq, sharpsl_ac_isr, IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, "AC Input Detect", sharpsl_ac_isr)) {
 +              dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", irq);
        }
  
 -      if (request_irq(PXA_GPIO_TO_IRQ(sharpsl_pm.machinfo->gpio_batlock), sharpsl_fatal_isr, IRQF_DISABLED | IRQF_TRIGGER_FALLING, "Battery Cover", sharpsl_fatal_isr)) {
 -              dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", PXA_GPIO_TO_IRQ(sharpsl_pm.machinfo->gpio_batlock));
 +      irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_batlock);
 +      if (request_irq(irq, sharpsl_fatal_isr, IRQF_DISABLED | IRQF_TRIGGER_FALLING, "Battery Cover", sharpsl_fatal_isr)) {
 +              dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", irq);
        }
  
        if (sharpsl_pm.machinfo->gpio_fatal) {
 -              if (request_irq(PXA_GPIO_TO_IRQ(sharpsl_pm.machinfo->gpio_fatal), sharpsl_fatal_isr, IRQF_DISABLED | IRQF_TRIGGER_FALLING, "Fatal Battery", sharpsl_fatal_isr)) {
 -                      dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", PXA_GPIO_TO_IRQ(sharpsl_pm.machinfo->gpio_fatal));
 +              irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_fatal);
 +              if (request_irq(irq, sharpsl_fatal_isr, IRQF_DISABLED | IRQF_TRIGGER_FALLING, "Fatal Battery", sharpsl_fatal_isr)) {
 +                      dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", irq);
                }
        }
  
        if (sharpsl_pm.machinfo->batfull_irq) {
                /* Register interrupt handler. */
 -              if (request_irq(PXA_GPIO_TO_IRQ(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr, IRQF_DISABLED | IRQF_TRIGGER_RISING, "CO", sharpsl_chrg_full_isr)) {
 -                      dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", PXA_GPIO_TO_IRQ(sharpsl_pm.machinfo->gpio_batfull));
 +              irq = gpio_to_irq(sharpsl_pm.machinfo->gpio_batfull);
 +              if (request_irq(irq, sharpsl_chrg_full_isr, IRQF_DISABLED | IRQF_TRIGGER_RISING, "CO", sharpsl_chrg_full_isr)) {
 +                      dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", irq);
                }
        }
  
@@@ -957,14 -905,14 +909,14 @@@ static int sharpsl_pm_remove(struct pla
  
        led_trigger_unregister_simple(sharpsl_charge_led_trigger);
  
 -      free_irq(PXA_GPIO_TO_IRQ(sharpsl_pm.machinfo->gpio_acin), sharpsl_ac_isr);
 -      free_irq(PXA_GPIO_TO_IRQ(sharpsl_pm.machinfo->gpio_batlock), sharpsl_fatal_isr);
 +      free_irq(gpio_to_irq(sharpsl_pm.machinfo->gpio_acin), sharpsl_ac_isr);
 +      free_irq(gpio_to_irq(sharpsl_pm.machinfo->gpio_batlock), sharpsl_fatal_isr);
  
        if (sharpsl_pm.machinfo->gpio_fatal)
 -              free_irq(PXA_GPIO_TO_IRQ(sharpsl_pm.machinfo->gpio_fatal), sharpsl_fatal_isr);
 +              free_irq(gpio_to_irq(sharpsl_pm.machinfo->gpio_fatal), sharpsl_fatal_isr);
  
        if (sharpsl_pm.machinfo->batfull_irq)
 -              free_irq(PXA_GPIO_TO_IRQ(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr);
 +              free_irq(gpio_to_irq(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr);
  
        gpio_free(sharpsl_pm.machinfo->gpio_batlock);
        gpio_free(sharpsl_pm.machinfo->gpio_batfull);
@@@ -48,9 -48,9 +48,9 @@@
  
  #include <mach/pxa25x.h>
  #include <mach/audio.h>
 -#include <mach/pxafb.h>
 +#include <linux/platform_data/video-pxafb.h>
  #include <mach/regs-uart.h>
 -#include <mach/arcom-pcmcia.h>
 +#include <linux/platform_data/pcmcia-pxa2xx_viper.h>
  #include <mach/viper.h>
  
  #include <asm/setup.h>
@@@ -768,8 -768,7 +768,7 @@@ static unsigned long viper_tpm
  
  static int __init viper_tpm_setup(char *str)
  {
-       strict_strtoul(str, 10, &viper_tpm);
-       return 1;
+       return strict_strtoul(str, 10, &viper_tpm) >= 0;
  }
  
  __setup("tpm=", viper_tpm_setup);
@@@ -34,7 -34,7 +34,7 @@@
  #include <mach/hardware.h>
  #include <asm/irq.h>
  
 -#include <plat/usb-control.h>
 +#include <linux/platform_data/usb-ohci-s3c2410.h>
  #include <plat/devs.h>
  
  #include "simtec.h"
@@@ -104,7 -104,7 +104,7 @@@ static struct s3c2410_hcd_info usb_simt
  };
  
  
- int usb_simtec_init(void)
+ int __init usb_simtec_init(void)
  {
        int ret;
  
@@@ -8,15 -8,12 +8,15 @@@
  #include <linux/kernel.h>
  #include <linux/pci.h>
  #include <linux/init.h>
 +#include <linux/io.h>
  #include <video/vga.h>
  
  #include <asm/irq.h>
  #include <asm/mach/pci.h>
  #include <asm/mach-types.h>
  
 +#define IO_START      0x40000000
 +
  static int __init shark_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
  {
        if (dev->bus->number == 0)
@@@ -41,14 -38,12 +41,14 @@@ static struct hw_pci shark_pci __initda
  static int __init shark_pci_init(void)
  {
        if (!machine_is_shark())
-               return;
+               return -ENODEV;
  
        pcibios_min_io = 0x6000;
        pcibios_min_mem = 0x50000000;
        vga_base = 0xe8000000;
  
 +      pci_ioremap_io(0, IO_START);
 +
        pci_common_init(&shark_pci);
  
        return 0;
@@@ -16,7 -16,7 +16,7 @@@ config ARCH_TEGRA_2x_SO
        select ARM_ERRATA_742230
        select ARM_ERRATA_751472
        select ARM_ERRATA_754327
-       select ARM_ERRATA_764369
+       select ARM_ERRATA_764369 if SMP
        select PL310_ERRATA_727915 if CACHE_L2X0
        select PL310_ERRATA_769419 if CACHE_L2X0
        select CPU_FREQ_TABLE if CPU_FREQ
@@@ -34,10 -34,11 +34,10 @@@ config ARCH_TEGRA_3x_SO
        select USB_ARCH_HAS_EHCI if USB_SUPPORT
        select USB_ULPI if USB
        select USB_ULPI_VIEWPORT if USB_SUPPORT
 -      select USE_OF
        select ARM_ERRATA_743622
        select ARM_ERRATA_751472
        select ARM_ERRATA_754322
-       select ARM_ERRATA_764369
+       select ARM_ERRATA_764369 if SMP
        select PL310_ERRATA_769419 if CACHE_L2X0
        select CPU_FREQ_TABLE if CPU_FREQ
        help
@@@ -57,6 -58,27 +57,6 @@@ config TEGRA_AH
          which controls AHB bus master arbitration and some
          perfomance parameters(priority, prefech size).
  
 -comment "Tegra board type"
 -
 -config MACH_HARMONY
 -       bool "Harmony board"
 -       depends on ARCH_TEGRA_2x_SOC
 -       help
 -         Support for nVidia Harmony development platform
 -
 -config MACH_PAZ00
 -       bool "Paz00 board"
 -       depends on ARCH_TEGRA_2x_SOC
 -       help
 -         Support for the Toshiba AC100/Dynabook AZ netbook
 -
 -config MACH_TRIMSLICE
 -       bool "TrimSlice board"
 -       depends on ARCH_TEGRA_2x_SOC
 -       select TEGRA_PCI
 -       help
 -         Support for CompuLab TrimSlice platform
 -
  choice
          prompt "Default low-level debug console UART"
          default TEGRA_DEBUG_UART_NONE
@@@ -108,6 -130,13 +108,6 @@@ config TEGRA_DEBUG_UART_AUTO_SCRATC
  
  endchoice
  
 -config TEGRA_SYSTEM_DMA
 -      bool "Enable system DMA driver for NVIDIA Tegra SoCs"
 -      default y
 -      help
 -        Adds system DMA functionality for NVIDIA Tegra SoCs, used by
 -        several Tegra device drivers
 -
  config TEGRA_EMC_SCALING_ENABLE
        bool "Enable scaling the memory frequency"
  
@@@ -5,13 -5,12 +5,13 @@@ config UX500_SOC_COMMO
        default y
        select ARM_GIC
        select HAS_MTU
-       select PL310_ERRATA_753970
+       select PL310_ERRATA_753970 if CACHE_PL310
        select ARM_ERRATA_754322
-       select ARM_ERRATA_764369
+       select ARM_ERRATA_764369 if SMP
        select CACHE_L2X0
        select PINCTRL
        select PINCTRL_NOMADIK
 +      select COMMON_CLK
  
  config UX500_SOC_DB8500
        bool
@@@ -29,7 -28,6 +29,7 @@@ config MACH_MOP50
        select I2C
        select I2C_NOMADIK
        select SOC_BUS
 +      select REGULATOR_FIXED_VOLTAGE
        help
          Include support for the MOP500 development platform.
  
diff --combined drivers/char/nwflash.c
@@@ -30,6 -30,7 +30,6 @@@
  
  #include <asm/hardware/dec21285.h>
  #include <asm/io.h>
 -#include <asm/leds.h>
  #include <asm/mach-types.h>
  #include <asm/uaccess.h>
  
@@@ -178,6 -179,9 +178,6 @@@ static ssize_t flash_write(struct file 
  
        written = 0;
  
 -      leds_event(led_claim);
 -      leds_event(led_green_on);
 -
        nBlock = (int) p >> 16; //block # of 64K bytes
  
        /*
                        printk(KERN_DEBUG "flash_write: written 0x%X bytes OK.\n", written);
        }
  
 -      /*
 -       * restore reg on exit
 -       */
 -      leds_event(led_release);
 -
        mutex_unlock(&nwflash_mutex);
  
        return written;
@@@ -324,6 -333,11 +324,6 @@@ static int erase_block(int nBlock
        unsigned long timeout;
        int temp, temp1;
  
 -      /*
 -       * orange LED == erase
 -       */
 -      leds_event(led_amber_on);
 -
        /*
         * reset footbridge to the correct offset 0 (...0..3)
         */
@@@ -432,6 -446,12 +432,6 @@@ static int write_block(unsigned long p
        unsigned long timeout;
        unsigned long timeout1;
  
 -      /*
 -       * red LED == write
 -       */
 -      leds_event(led_amber_off);
 -      leds_event(led_red_on);
 -
        pWritePtr = (unsigned char *) ((unsigned int) (FLASH_BASE + p));
  
        /*
                                        printk(KERN_DEBUG "write_block: Retrying write at 0x%X)n",
                                               pWritePtr - FLASH_BASE);
  
 -                              /*
 -                               * no LED == waiting
 -                               */
 -                              leds_event(led_amber_off);
                                /*
                                 * wait couple ms
                                 */
                                msleep(10);
 -                              /*
 -                               * red LED == write
 -                               */
 -                              leds_event(led_red_on);
  
                                goto WriteRetry;
                        } else {
                }
        }
  
 -      /*
 -       * green LED == read/verify
 -       */
 -      leds_event(led_amber_off);
 -      leds_event(led_green_on);
 -
        msleep(10);
  
        pWritePtr = (unsigned char *) ((unsigned int) (FLASH_BASE + p));
@@@ -583,9 -617,9 +583,9 @@@ static void kick_open(void
         * we want to write a bit pattern XXX1 to Xilinx to enable
         * the write gate, which will be open for about the next 2ms.
         */
-       spin_lock_irqsave(&nw_gpio_lock, flags);
+       raw_spin_lock_irqsave(&nw_gpio_lock, flags);
        nw_cpld_modify(CPLD_FLASH_WR_ENABLE, CPLD_FLASH_WR_ENABLE);
-       spin_unlock_irqrestore(&nw_gpio_lock, flags);
+       raw_spin_unlock_irqrestore(&nw_gpio_lock, flags);
  
        /*
         * let the ISA bus to catch on...