]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'pxa-all' into devel
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Thu, 9 Oct 2008 20:33:02 +0000 (21:33 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 9 Oct 2008 20:33:02 +0000 (21:33 +0100)
Conflicts:

arch/arm/mach-pxa/Kconfig
arch/arm/mach-pxa/corgi.c
arch/arm/mach-pxa/include/mach/hardware.h
arch/arm/mach-pxa/spitz.c

28 files changed:
1  2 
MAINTAINERS
arch/arm/Kconfig
arch/arm/common/locomo.c
arch/arm/mach-at91/gpio.c
arch/arm/mach-ep93xx/core.c
arch/arm/mach-footbridge/isa-irq.c
arch/arm/mach-h720x/common.c
arch/arm/mach-imx/irq.c
arch/arm/mach-integrator/integrator_cp.c
arch/arm/mach-ixp2000/core.c
arch/arm/mach-ixp2000/ixdp2x00.c
arch/arm/mach-ixp2000/ixdp2x01.c
arch/arm/mach-netx/generic.c
arch/arm/mach-omap1/fpga.c
arch/arm/mach-orion5x/irq.c
arch/arm/mach-pxa/Kconfig
arch/arm/mach-pxa/corgi.c
arch/arm/mach-pxa/gpio.c
arch/arm/mach-pxa/include/mach/hardware.h
arch/arm/mach-pxa/spitz.c
arch/arm/mach-s3c2410/bast-irq.c
arch/arm/mach-s3c2412/irq.c
arch/arm/mach-s3c2440/irq.c
arch/arm/mach-s3c2443/irq.c
arch/arm/mach-versatile/core.c
arch/arm/plat-omap/gpio.c
arch/arm/plat-s3c24xx/irq.c
arch/arm/plat-s3c24xx/s3c244x-irq.c

diff --combined MAINTAINERS
index 0cc08809e5368fb26cf29dd275caf8f6842aff61,96b0137a575cedfd8cb7c854f002b24f809c26e3..4f7b64a824aea9c787bfdda9067229ed47f76816
@@@ -466,12 -466,6 +466,12 @@@ M:       kernel@wantstofly.or
  L:    linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
  S:    Maintained
  
 +ARM/AFEB9260 MACHINE SUPPORT
 +P:    Sergey Lapin
 +M:    slapin@ossfans.org
 +L:    linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
 +S:    Maintained
 +
  ARM/AJECO 1ARM MACHINE SUPPORT
  P:    Lennert Buytenhek
  M:    kernel@wantstofly.org
@@@ -497,7 -491,7 +497,7 @@@ M: kernel@wantstofly.or
  L:    linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
  S:    Maintained
  
- ARM/COMPULAB CM-X270/EM-X270 MACHINE SUPPORT
+ ARM/COMPULAB CM-X270/EM-X270 and CM-X300 MACHINE SUPPORT
  P:    Mike Rapoport
  M:    mike@compulab.co.il
  L:    linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
@@@ -629,6 -623,12 +629,12 @@@ M:       marek.vasut@gmail.co
  W:    http://hackndev.com
  S:    Maintained
  
+ ARM/PALMZ72 SUPPORT
+ P:     Sergey Lapin
+ M:     slapin@ossfans.org
+ W:     http://hackndev.com
+ S:     Maintained
  ARM/PLEB SUPPORT
  P:    Peter Chubb
  M:    pleb@gelato.unsw.edu.au
diff --combined arch/arm/Kconfig
index 744d07e696025929848de3815ba8d3e68423b86f,5e17953b673ff16dc55bfbf3892bf26ae6941e00..960d5a54aec3174052161ad4924b9cc0455e6202
@@@ -148,6 -148,7 +148,6 @@@ config ARCH_MAY_HAVE_PC_FD
  
  config ZONE_DMA
        bool
 -      default y
  
  config GENERIC_ISA_DMA
        bool
@@@ -177,11 -178,6 +177,11 @@@ config OPROFILE_MPCOR
  config OPROFILE_ARM11_CORE
        bool
  
 +config OPROFILE_ARMV7
 +      def_bool y
 +      depends on CPU_V7 && !SMP
 +      bool
 +
  endif
  
  config VECTORS_BASE
@@@ -249,7 -245,6 +249,7 @@@ config ARCH_CLPS750
        select TIMER_ACORN
        select ISA
        select NO_IOPORT
 +      select ARCH_SPARSEMEM_ENABLE
        help
          Support for the Cirrus Logic PS7500FE system-on-a-chip.
  
@@@ -311,7 -306,6 +311,7 @@@ config ARCH_IOP13X
        select PLAT_IOP
        select PCI
        select ARCH_SUPPORTS_MSI
 +      select VMSPLIT_1G
        help
          Support for Intel's IOP13XX (XScale) family of processors.
  
@@@ -356,7 -350,6 +356,7 @@@ config ARCH_IXP4X
        select GENERIC_GPIO
        select GENERIC_TIME
        select GENERIC_CLOCKEVENTS
 +      select ZONE_DMA if PCI
        help
          Support for Intel's IXP4XX (XScale) family of processors.
  
@@@ -471,7 -464,6 +471,7 @@@ config ARCH_RP
        select HAVE_PATA_PLATFORM
        select ISA_DMA_API
        select NO_IOPORT
 +      select ARCH_SPARSEMEM_ENABLE
        help
          On the Acorn Risc-PC, Linux can support the internal IDE disk and
          CD-ROM interface, serial and parallel port, and the floppy drive.
  config ARCH_SA1100
        bool "SA1100-based"
        select ISA
 -      select ARCH_DISCONTIGMEM_ENABLE
        select ARCH_SPARSEMEM_ENABLE
 -      select ARCH_SELECT_MEMORY_MODEL
        select ARCH_MTD_XIP
        select GENERIC_GPIO
        select GENERIC_TIME
@@@ -503,7 -497,6 +503,7 @@@ config ARCH_SHAR
        bool "Shark"
        select ISA
        select ISA_DMA
 +      select ZONE_DMA
        select PCI
        help
          Support for the StrongARM based Digital DNARD machine, also known
  
  config ARCH_LH7A40X
        bool "Sharp LH7A40X"
 +      select ARCH_DISCONTIGMEM_ENABLE if !LH7A40X_CONTIGMEM
 +      select ARCH_SPARSEMEM_ENABLE if !LH7A40X_CONTIGMEM
        help
          Say Y here for systems based on one of the Sharp LH7A40X
          System on a Chip processors.  These CPUs include an ARM922T
@@@ -525,7 -516,6 +525,7 @@@ config ARCH_DAVINC
        select GENERIC_CLOCKEVENTS
        select GENERIC_GPIO
        select HAVE_CLK
 +      select ZONE_DMA
        help
          Support for TI's DaVinci platform.
  
@@@ -744,29 -734,6 +744,29 @@@ config SM
  
          If you don't know what to do here, say N.
  
 +choice
 +      prompt "Memory split"
 +      default VMSPLIT_3G
 +      help
 +        Select the desired split between kernel and user memory.
 +
 +        If you are not absolutely sure what you are doing, leave this
 +        option alone!
 +
 +      config VMSPLIT_3G
 +              bool "3G/1G user/kernel split"
 +      config VMSPLIT_2G
 +              bool "2G/2G user/kernel split"
 +      config VMSPLIT_1G
 +              bool "1G/3G user/kernel split"
 +endchoice
 +
 +config PAGE_OFFSET
 +      hex
 +      default 0x40000000 if VMSPLIT_1G
 +      default 0x80000000 if VMSPLIT_2G
 +      default 0xC0000000
 +
  config NR_CPUS
        int "Maximum number of CPUs (2-32)"
        range 2 32
@@@ -848,18 -815,20 +848,18 @@@ config ARCH_FLATMEM_HAS_HOLE
        default y
        depends on FLATMEM
  
 +# Discontigmem is deprecated
  config ARCH_DISCONTIGMEM_ENABLE
        bool
 -      default (ARCH_LH7A40X && !LH7A40X_CONTIGMEM)
 -      help
 -        Say Y to support efficient handling of discontiguous physical memory,
 -        for architectures which are either NUMA (Non-Uniform Memory Access)
 -        or have huge holes in the physical address space for other reasons.
 -        See <file:Documentation/vm/numa> for more.
  
  config ARCH_SPARSEMEM_ENABLE
        bool
  
 +config ARCH_SPARSEMEM_DEFAULT
 +      def_bool ARCH_SPARSEMEM_ENABLE
 +
  config ARCH_SELECT_MEMORY_MODEL
 -      bool
 +      def_bool ARCH_DISCONTIGMEM_ENABLE && ARCH_SPARSEMEM_ENABLE
  
  config NODES_SHIFT
        int
@@@ -876,7 -845,7 +876,7 @@@ config LED
                   ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \
                   ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \
                   ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE || \
-                  ARCH_AT91 || MACH_TRIZEPS4 || ARCH_DAVINCI || \
+                  ARCH_AT91 || ARCH_DAVINCI || \
                   ARCH_KS8695 || MACH_RD88F5182
        help
          If you say Y here, the LEDs on your machine will be used
@@@ -1036,9 -1005,9 +1036,9 @@@ config ATAGS_PRO
  
  endmenu
  
 -if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_IMX || ARCH_PXA)
 +menu "CPU Power Management"
  
 -menu "CPU Frequency scaling"
 +if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_IMX || ARCH_PXA)
  
  source "drivers/cpufreq/Kconfig"
  
@@@ -1078,12 -1047,10 +1078,12 @@@ config CPU_FREQ_PX
        default y
        select CPU_FREQ_DEFAULT_GOV_USERSPACE
  
 -endmenu
 -
  endif
  
 +source "drivers/cpuidle/Kconfig"
 +
 +endmenu
 +
  menu "Floating point emulation"
  
  comment "At least one emulation must be selected"
@@@ -1235,8 -1202,6 +1235,8 @@@ source "drivers/power/Kconfig
  
  source "drivers/hwmon/Kconfig"
  
 +source "drivers/thermal/Kconfig"
 +
  source "drivers/watchdog/Kconfig"
  
  source "drivers/ssb/Kconfig"
@@@ -1257,10 -1222,6 +1257,10 @@@ source "drivers/usb/Kconfig
  
  source "drivers/mmc/Kconfig"
  
 +source "drivers/memstick/Kconfig"
 +
 +source "drivers/accessibility/Kconfig"
 +
  source "drivers/leds/Kconfig"
  
  source "drivers/rtc/Kconfig"
@@@ -1269,8 -1230,6 +1269,8 @@@ source "drivers/dma/Kconfig
  
  source "drivers/dca/Kconfig"
  
 +source "drivers/auxdisplay/Kconfig"
 +
  source "drivers/regulator/Kconfig"
  
  source "drivers/uio/Kconfig"
diff --combined arch/arm/common/locomo.c
index 534b23d95864d3c3e492b9f6074a5d5d9c570e62,8f473b7c34947c1587cb3486f53e99409a00d9ec..7c6b4b99a2df1c98027a6adaee4a87dbe6371554
@@@ -24,9 -24,9 +24,9 @@@
  #include <linux/platform_device.h>
  #include <linux/slab.h>
  #include <linux/spinlock.h>
 +#include <linux/io.h>
  
  #include <mach/hardware.h>
 -#include <asm/io.h>
  #include <asm/irq.h>
  #include <asm/mach/irq.h>
  
@@@ -169,7 -169,6 +169,6 @@@ static struct locomo_dev_info locomo_de
  static void locomo_handler(unsigned int irq, struct irq_desc *desc)
  {
        int req, i;
-       struct irq_desc *d;
        void __iomem *mapbase = get_irq_chip_data(irq);
  
        /* Acknowledge the parent IRQ */
        if (req) {
                /* generate the next interrupt(s) */
                irq = LOCOMO_IRQ_START;
-               d = irq_desc + irq;
-               for (i = 0; i <= 3; i++, d++, irq++) {
+               for (i = 0; i <= 3; i++, irq++) {
                        if (req & (0x0100 << i)) {
-                               desc_handle_irq(irq, d);
+                               generic_handle_irq(irq);
                        }
  
                }
@@@ -222,12 -220,10 +220,10 @@@ static struct irq_chip locomo_chip = 
  
  static void locomo_key_handler(unsigned int irq, struct irq_desc *desc)
  {
-       struct irq_desc *d;
        void __iomem *mapbase = get_irq_chip_data(irq);
  
        if (locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC) & 0x0001) {
-               d = irq_desc + LOCOMO_IRQ_KEY_START;
-               desc_handle_irq(LOCOMO_IRQ_KEY_START, d);
+               generic_handle_irq(LOCOMO_IRQ_KEY_START);
        }
  }
  
@@@ -268,7 -264,6 +264,6 @@@ static struct irq_chip locomo_key_chip 
  static void locomo_gpio_handler(unsigned int irq, struct irq_desc *desc)
  {
        int req, i;
-       struct irq_desc *d;
        void __iomem *mapbase = get_irq_chip_data(irq);
  
        req =   locomo_readl(mapbase + LOCOMO_GIR) &
  
        if (req) {
                irq = LOCOMO_IRQ_GPIO_START;
-               d = irq_desc + LOCOMO_IRQ_GPIO_START;
-               for (i = 0; i <= 15; i++, irq++, d++) {
+               for (i = 0; i <= 15; i++, irq++) {
                        if (req & (0x0001 << i)) {
-                               desc_handle_irq(irq, d);
+                               generic_handle_irq(irq);
                        }
                }
        }
@@@ -361,12 -355,10 +355,10 @@@ static struct irq_chip locomo_gpio_chi
  
  static void locomo_lt_handler(unsigned int irq, struct irq_desc *desc)
  {
-       struct irq_desc *d;
        void __iomem *mapbase = get_irq_chip_data(irq);
  
        if (locomo_readl(mapbase + LOCOMO_LTINT) & 0x0001) {
-               d = irq_desc + LOCOMO_IRQ_LT_START;
-               desc_handle_irq(LOCOMO_IRQ_LT_START, d);
+               generic_handle_irq(LOCOMO_IRQ_LT_START);
        }
  }
  
@@@ -407,17 -399,15 +399,15 @@@ static struct irq_chip locomo_lt_chip 
  static void locomo_spi_handler(unsigned int irq, struct irq_desc *desc)
  {
        int req, i;
-       struct irq_desc *d;
        void __iomem *mapbase = get_irq_chip_data(irq);
  
        req = locomo_readl(mapbase + LOCOMO_SPI + LOCOMO_SPIIR) & 0x000F;
        if (req) {
                irq = LOCOMO_IRQ_SPI_START;
-               d = irq_desc + irq;
  
-               for (i = 0; i <= 3; i++, irq++, d++) {
+               for (i = 0; i <= 3; i++, irq++) {
                        if (req & (0x0001 << i)) {
-                               desc_handle_irq(irq, d);
+                               generic_handle_irq(irq);
                        }
                }
        }
index 93e0614f2afbf824e1ce0af6658883a9784786e8,94c2f96811f93caba812f0dae8a43232736651f8..7e5ebb5bdd17c8e43fb2f25ccf93e5e824e17c3e
@@@ -18,8 -18,8 +18,8 @@@
  #include <linux/kernel.h>
  #include <linux/list.h>
  #include <linux/module.h>
 +#include <linux/io.h>
  
 -#include <asm/io.h>
  #include <mach/hardware.h>
  #include <mach/at91_pio.h>
  #include <mach/gpio.h>
@@@ -404,7 -404,6 +404,6 @@@ static void gpio_irq_handler(unsigned i
                }
  
                pin = bank->chipbase;
-               gpio = &irq_desc[pin];
  
                while (isr) {
                        if (isr & 1) {
                                        gpio_irq_mask(pin);
                                }
                                else
-                                       desc_handle_irq(pin, gpio);
+                                       generic_handle_irq(pin);
                        }
                        pin++;
                        gpio++;
index 7e65d23e14b59d47c13ad1a4b12279766d436699,68ee82b49597bedf759cb9b35ba48c0bc682d723..de53f0be71b9bce70b34941eb51ba263f4cbc3ff
@@@ -32,7 -32,6 +32,7 @@@
  #include <linux/termios.h>
  #include <linux/amba/bus.h>
  #include <linux/amba/serial.h>
 +#include <linux/io.h>
  
  #include <asm/types.h>
  #include <asm/setup.h>
@@@ -42,6 -41,7 +42,6 @@@
  #include <asm/system.h>
  #include <asm/tlbflush.h>
  #include <asm/pgtable.h>
 -#include <asm/io.h>
  
  #include <asm/mach/map.h>
  #include <asm/mach/time.h>
@@@ -157,7 -157,7 +157,7 @@@ static unsigned char gpio_int_type2[3]
  static const u8 int_type1_register_offset[3]  = { 0x90, 0xac, 0x4c };
  static const u8 int_type2_register_offset[3]  = { 0x94, 0xb0, 0x50 };
  static const u8 eoi_register_offset[3]                = { 0x98, 0xb4, 0x54 };
 -static const u8 int_en_register_offset[3]     = { 0x9c, 0xb8, 0x5c };
 +static const u8 int_en_register_offset[3]     = { 0x9c, 0xb8, 0x58 };
  
  void ep93xx_gpio_update_int_params(unsigned port)
  {
@@@ -192,8 -192,7 +192,7 @@@ static void ep93xx_gpio_ab_irq_handler(
        for (i = 0; i < 8; i++) {
                if (status & (1 << i)) {
                        int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_A(0)) + i;
-                       desc = irq_desc + gpio_irq;
-                       desc_handle_irq(gpio_irq, desc);
+                       generic_handle_irq(gpio_irq);
                }
        }
  
                if (status & (1 << i)) {
                        int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_B(0)) + i;
                        desc = irq_desc + gpio_irq;
-                       desc_handle_irq(gpio_irq, desc);
+                       generic_handle_irq(gpio_irq);
                }
        }
  }
@@@ -217,7 -216,7 +216,7 @@@ static void ep93xx_gpio_f_irq_handler(u
        int port_f_idx = ((irq + 1) & 7) ^ 4; /* {19..22,47..50} -> {0..7} */
        int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_F(0)) + port_f_idx;
  
-       desc_handle_irq(gpio_irq, irq_desc + gpio_irq);
+       generic_handle_irq(gpio_irq);
  }
  
  static void ep93xx_gpio_irq_ack(unsigned int irq)
@@@ -461,41 -460,6 +460,41 @@@ static struct platform_device ep93xx_oh
        .resource       = ep93xx_ohci_resources,
  };
  
 +static struct ep93xx_eth_data ep93xx_eth_data;
 +
 +static struct resource ep93xx_eth_resource[] = {
 +      {
 +              .start  = EP93XX_ETHERNET_PHYS_BASE,
 +              .end    = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
 +              .flags  = IORESOURCE_MEM,
 +      }, {
 +              .start  = IRQ_EP93XX_ETHERNET,
 +              .end    = IRQ_EP93XX_ETHERNET,
 +              .flags  = IORESOURCE_IRQ,
 +      }
 +};
 +
 +static struct platform_device ep93xx_eth_device = {
 +      .name           = "ep93xx-eth",
 +      .id             = -1,
 +      .dev            = {
 +              .platform_data  = &ep93xx_eth_data,
 +      },
 +      .num_resources  = ARRAY_SIZE(ep93xx_eth_resource),
 +      .resource       = ep93xx_eth_resource,
 +};
 +
 +void __init ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr)
 +{
 +      if (copy_addr) {
 +              memcpy(data->dev_addr,
 +                      (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
 +      }
 +
 +      ep93xx_eth_data = *data;
 +      platform_device_register(&ep93xx_eth_device);
 +}
 +
  extern void ep93xx_gpio_init(void);
  
  void __init ep93xx_init_devices(void)
index 62bb38f1369d65ec65af61262f7b59fbcc3659b8,d5a29a0e7d9dd627b51ce542f7dc5cb1d61a1459..54fec9ae28b949b36a17c79de56f9b558f118ee6
  #include <linux/interrupt.h>
  #include <linux/list.h>
  #include <linux/init.h>
 +#include <linux/io.h>
  
  #include <asm/mach/irq.h>
  
  #include <mach/hardware.h>
  #include <asm/hardware/dec21285.h>
  #include <asm/irq.h>
 -#include <asm/io.h>
  #include <asm/mach-types.h>
  
  static void isa_mask_pic_lo_irq(unsigned int irq)
@@@ -94,8 -94,7 +94,7 @@@ isa_irq_handler(unsigned int irq, struc
                return;
        }
  
-       desc = irq_desc + isa_irq;
-       desc_handle_irq(isa_irq, desc);
+       generic_handle_irq(isa_irq);
  }
  
  static struct irqaction irq_cascade = {
index 3a410e3f1e5fe674a409c2ee16d9ee4d7f7c6371,c1fa44cff38de6656791253bf90a5149569019ae..7a26148282176a68003467efe52f3609997e0f6d
  #include <linux/mman.h>
  #include <linux/init.h>
  #include <linux/interrupt.h>
 +#include <linux/io.h>
  
  #include <asm/page.h>
  #include <asm/pgtable.h>
  #include <asm/dma.h>
 -#include <asm/io.h>
  #include <mach/hardware.h>
  #include <asm/irq.h>
  #include <asm/mach/irq.h>
@@@ -104,14 -104,12 +104,12 @@@ h720x_gpio_handler(unsigned int mask, u
                   struct irq_desc *desc)
  {
        IRQDBG("%s irq: %d\n", __func__, irq);
-       desc = irq_desc + irq;
        while (mask) {
                if (mask & 1) {
                        IRQDBG("handling irq %d\n", irq);
-                       desc_handle_irq(irq, desc);
+                       generic_handle_irq(irq);
                }
                irq++;
-               desc++;
                mask >>= 1;
        }
  }
diff --combined arch/arm/mach-imx/irq.c
index 2ce75625b4173a23e7fb30fc8c7cf5c3dfb29e1b,cbdd7d1dac92b1b3bd737317d588d0968097b17a..232e3b9f880db1cf78029078ea816e6bd95ba049
  #include <linux/init.h>
  #include <linux/list.h>
  #include <linux/timer.h>
 +#include <linux/io.h>
  
  #include <mach/hardware.h>
  #include <asm/irq.h>
 -#include <asm/io.h>
  
  #include <asm/mach/irq.h>
  
@@@ -182,14 -182,12 +182,12 @@@ static voi
  imx_gpio_handler(unsigned int mask, unsigned int irq,
                   struct irq_desc *desc)
  {
-       desc = irq_desc + irq;
        while (mask) {
                if (mask & 1) {
                        DEBUG_IRQ("handling irq %d\n", irq);
-                       desc_handle_irq(irq, desc);
+                       generic_handle_irq(irq);
                }
                irq++;
-               desc++;
                mask >>= 1;
        }
  }
index c0eaf0a6f4538d37c4329c5f77a98abc152f75ee,0c9a91d6ec83dbd863f901d3bb2a3d939063452f..88026ccd5ac9b9b81074b12b17f48e6629c8e5b9
@@@ -19,9 -19,9 +19,9 @@@
  #include <linux/amba/bus.h>
  #include <linux/amba/kmi.h>
  #include <linux/amba/clcd.h>
 +#include <linux/io.h>
  
  #include <mach/hardware.h>
 -#include <asm/io.h>
  #include <asm/irq.h>
  #include <asm/setup.h>
  #include <asm/mach-types.h>
@@@ -217,8 -217,7 +217,7 @@@ sic_handle_irq(unsigned int irq, struc
  
                irq += IRQ_SIC_START;
  
-               desc = irq_desc + irq;
-               desc_handle_irq(irq, desc);
+               generic_handle_irq(irq);
        } while (status);
  }
  
index 628063ca31e69c48dc89354cda592f27c6362af2,e193a34e417586cbabf63527a0a1b1fd807e15dc..babb22597163b5d2296983dccfc6bfba49a2ba77
@@@ -84,57 -84,64 +84,57 @@@ static struct map_desc ixp2000_io_desc[
                .virtual        = IXP2000_CAP_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_CAP_PHYS_BASE),
                .length         = IXP2000_CAP_SIZE,
 -              .type           = MT_DEVICE_IXP2000,
 +              .type           = MT_DEVICE,
        }, {
                .virtual        = IXP2000_INTCTL_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_INTCTL_PHYS_BASE),
                .length         = IXP2000_INTCTL_SIZE,
 -              .type           = MT_DEVICE_IXP2000,
 +              .type           = MT_DEVICE,
        }, {
                .virtual        = IXP2000_PCI_CREG_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_PCI_CREG_PHYS_BASE),
                .length         = IXP2000_PCI_CREG_SIZE,
 -              .type           = MT_DEVICE_IXP2000,
 +              .type           = MT_DEVICE,
        }, {
                .virtual        = IXP2000_PCI_CSR_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_PCI_CSR_PHYS_BASE),
                .length         = IXP2000_PCI_CSR_SIZE,
 -              .type           = MT_DEVICE_IXP2000,
 +              .type           = MT_DEVICE,
        }, {
                .virtual        = IXP2000_MSF_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_MSF_PHYS_BASE),
                .length         = IXP2000_MSF_SIZE,
 -              .type           = MT_DEVICE_IXP2000,
 +              .type           = MT_DEVICE,
        }, {
                .virtual        = IXP2000_SCRATCH_RING_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_SCRATCH_RING_PHYS_BASE),
                .length         = IXP2000_SCRATCH_RING_SIZE,
 -              .type           = MT_DEVICE_IXP2000,
 +              .type           = MT_DEVICE,
        }, {
                .virtual        = IXP2000_SRAM0_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_SRAM0_PHYS_BASE),
                .length         = IXP2000_SRAM0_SIZE,
 -              .type           = MT_DEVICE_IXP2000,
 +              .type           = MT_DEVICE,
        }, {
                .virtual        = IXP2000_PCI_IO_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_PCI_IO_PHYS_BASE),
                .length         = IXP2000_PCI_IO_SIZE,
 -              .type           = MT_DEVICE_IXP2000,
 +              .type           = MT_DEVICE,
        }, {
                .virtual        = IXP2000_PCI_CFG0_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_PCI_CFG0_PHYS_BASE),
                .length         = IXP2000_PCI_CFG0_SIZE,
 -              .type           = MT_DEVICE_IXP2000,
 +              .type           = MT_DEVICE,
        }, {
                .virtual        = IXP2000_PCI_CFG1_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_PCI_CFG1_PHYS_BASE),
                .length         = IXP2000_PCI_CFG1_SIZE,
 -              .type           = MT_DEVICE_IXP2000,
 +              .type           = MT_DEVICE,
        }
  };
  
  void __init ixp2000_map_io(void)
  {
 -      /*
 -       * On IXP2400 CPUs we need to use MT_DEVICE_IXP2000 so that
 -       * XCB=101 (to avoid triggering erratum #66), and given that
 -       * this mode speeds up I/O accesses and we have write buffer
 -       * flushes in the right places anyway, it doesn't hurt to use
 -       * XCB=101 for all IXP2000s.
 -       */
        iotable_init(ixp2000_io_desc, ARRAY_SIZE(ixp2000_io_desc));
  
        /* Set slowport to 8-bit mode.  */
@@@ -304,8 -311,7 +304,7 @@@ static void ixp2000_GPIO_irq_handler(un
                   
        for (i = 0; i <= 7; i++) {
                if (status & (1<<i)) {
-                       desc = irq_desc + i + IRQ_IXP2000_GPIO0;
-                       desc_handle_irq(i + IRQ_IXP2000_GPIO0, desc);
+                       generic_handle_irq(i + IRQ_IXP2000_GPIO0);
                }
        }
  }
@@@ -397,8 -403,7 +396,7 @@@ static void ixp2000_err_irq_handler(uns
  
        for(i = 31; i >= 0; i--) {
                if(status & (1 << i)) {
-                       desc = irq_desc + IRQ_IXP2000_DRAM0_MIN_ERR + i;
-                       desc_handle_irq(IRQ_IXP2000_DRAM0_MIN_ERR + i, desc);
+                       generic_handle_irq(IRQ_IXP2000_DRAM0_MIN_ERR + i);
                }
        }
  }
index 4debb9ff056c26726bd145ff57c831076e39dfa7,4c749d490241dbb1e32209974641621a2f00438a..b0653a87159a89b36b67da7674b8163e80439f0e
@@@ -25,8 -25,8 +25,8 @@@
  #include <linux/ioport.h>
  #include <linux/slab.h>
  #include <linux/delay.h>
 +#include <linux/io.h>
  
 -#include <asm/io.h>
  #include <asm/irq.h>
  #include <asm/pgtable.h>
  #include <asm/page.h>
@@@ -129,10 -129,8 +129,8 @@@ static void ixdp2x00_irq_handler(unsign
  
        for(i = 0; i < board_irq_count; i++) {
                if(ex_interrupt & (1 << i))  {
-                       struct irq_desc *cpld_desc;
                        int cpld_irq = IXP2000_BOARD_IRQ(0) + i;
-                       cpld_desc = irq_desc + cpld_irq;
-                       desc_handle_irq(cpld_irq, cpld_desc);
+                       generic_handle_irq(cpld_irq);
                }
        }
  
index c7042725dc80965df75a379ea2a82cfcdd72c428,b78c08d1f638d08fa7daa4af789182d057efde31..4a12327a09a3a5052caf71e3531ae1c4ba22fea6
@@@ -30,8 -30,8 +30,8 @@@
  #include <linux/serial_core.h>
  #include <linux/platform_device.h>
  #include <linux/serial_8250.h>
 +#include <linux/io.h>
  
 -#include <asm/io.h>
  #include <asm/irq.h>
  #include <asm/pgtable.h>
  #include <asm/page.h>
@@@ -79,10 -79,8 +79,8 @@@ static void ixdp2x01_irq_handler(unsign
  
        for (i = 0; i < IXP2000_BOARD_IRQS; i++) {
                if (ex_interrupt & (1 << i)) {
-                       struct irq_desc *cpld_desc;
                        int cpld_irq = IXP2000_BOARD_IRQ(0) + i;
-                       cpld_desc = irq_desc + cpld_irq;
-                       desc_handle_irq(cpld_irq, cpld_desc);
+                       generic_handle_irq(cpld_irq);
                }
        }
  
index e60c4061dc4061fff9f36ae3fb9d0033b4cf0eac,3830eca2438a9c1b0440759bec01f7253f5b933d..79df60c20e709cb82472589448b8554d20031e13
  #include <linux/kernel.h>
  #include <linux/module.h>
  #include <linux/platform_device.h>
 +#include <linux/io.h>
  #include <mach/hardware.h>
  #include <asm/mach/map.h>
  #include <asm/hardware/vic.h>
 -#include <asm/io.h>
  #include <mach/netx-regs.h>
  #include <asm/mach/irq.h>
  
@@@ -77,15 -77,12 +77,12 @@@ netx_hif_demux_handler(unsigned int irq
        stat = ((readl(NETX_DPMAS_INT_EN) &
                readl(NETX_DPMAS_INT_STAT)) >> 24) & 0x1f;
  
-       desc = irq_desc + NETX_IRQ_HIF_CHAINED(0);
        while (stat) {
                if (stat & 1) {
                        DEBUG_IRQ("handling irq %d\n", irq);
-                       desc_handle_irq(irq, desc);
+                       generic_handle_irq(irq);
                }
                irq++;
-               desc++;
                stat >>= 1;
        }
  }
index 0d9f48f780ad4a441d55ce169e09539616c6bf77,23f2c3aeb3842977ac90803c7f0b1206bfc5d262..04995381aa5c9965890b74704b628b6ee7d00da5
@@@ -21,9 -21,9 +21,9 @@@
  #include <linux/kernel.h>
  #include <linux/device.h>
  #include <linux/errno.h>
 +#include <linux/io.h>
  
  #include <mach/hardware.h>
 -#include <asm/io.h>
  #include <asm/irq.h>
  #include <asm/mach/irq.h>
  
@@@ -86,7 -86,6 +86,6 @@@ static void fpga_mask_ack_irq(unsigned 
  
  void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc)
  {
-       struct irq_desc *d;
        u32 stat;
        int fpga_irq;
  
@@@ -99,8 -98,7 +98,7 @@@
             (fpga_irq < OMAP_FPGA_IRQ_END) && stat;
             fpga_irq++, stat >>= 1) {
                if (stat & 1) {
-                       d = irq_desc + fpga_irq;
-                       desc_handle_irq(fpga_irq, d);
+                       generic_handle_irq(fpga_irq);
                }
        }
  }
index 02ceeb3c673727c246967f9d92e0c583862c4ee1,15f27aa7f53e1c22ed6bd0e7c5d47aa5a74b4b31..632a36f5cf1492473ae1409522457a83dc23981a
@@@ -13,8 -13,8 +13,8 @@@
  #include <linux/kernel.h>
  #include <linux/init.h>
  #include <linux/irq.h>
 +#include <linux/io.h>
  #include <asm/gpio.h>
 -#include <asm/io.h>
  #include <mach/orion5x.h>
  #include <plat/irq.h>
  #include "common.h"
@@@ -162,7 -162,7 +162,7 @@@ static void orion5x_gpio_irq_handler(un
                                polarity ^= 1 << pin;
                                writel(polarity, GPIO_IN_POL);
                        }
-                       desc_handle_irq(irq, desc);
+                       generic_handle_irq(irq);
                }
        }
  }
index e484f609feda8b1da86ffaeecf3f9243e822bcb8,f781873431f39b52bb83f1301ce32a13eae1bb3e..f27f6b3d6e6f61be1b350c883dcd09cc383501a8
@@@ -38,16 -38,23 +38,23 @@@ config ARCH_LUBBOC
        bool "Intel DBPXA250 Development Platform"
        select PXA25x
        select SA1111
+       select PXA_HAVE_BOARD_IRQS
  
  config MACH_LOGICPD_PXA270
        bool "LogicPD PXA270 Card Engine Development Platform"
        select PXA27x
        select HAVE_PWM
+       select PXA_HAVE_BOARD_IRQS
  
  config MACH_MAINSTONE
        bool "Intel HCDDBBVA0 Development Platform"
        select PXA27x
        select HAVE_PWM
+       select PXA_HAVE_BOARD_IRQS
+ config MACH_MP900C
+       bool "Nec Mobilepro 900/c"
+       select PXA25x
  
  config ARCH_PXA_IDP
        bool "Accelent Xscale IDP"
@@@ -114,10 -121,21 +121,21 @@@ config MACH_TOS
        bool "Enable Sharp SL-6000x (Tosa) Support"
        depends on PXA_SHARPSL
        select PXA25x
+       select PXA_HAVE_BOARD_IRQS
+ config ARCH_VIPER
+       bool "Arcom/Eurotech VIPER SBC"
+       select PXA25x
+       select ISA
+       select I2C_GPIO
+       select HAVE_PWM
+       select PXA_HAVE_BOARD_IRQS
+       select PXA_HAVE_ISA_IRQS
  
  config ARCH_PXA_ESERIES
        bool "PXA based Toshiba e-series PDAs"
        select PXA25x
+       select PXA_HAVE_BOARD_IRQS
  
  config MACH_E330
        bool "Toshiba e330"
@@@ -170,13 -188,41 +188,41 @@@ config MACH_E80
          Say Y here if you intend to run this kernel on a Toshiba
          e800 family PDA.
  
+ config TRIZEPS_PXA
+       bool "PXA based Keith und Koep Trizeps DIMM-Modules"
  config MACH_TRIZEPS4
        bool "Keith und Koep Trizeps4 DIMM-Module"
+       depends on TRIZEPS_PXA
+       select TRIZEPS_PCMCIA
        select PXA27x
  
- config MACH_TRIZEPS4_CONXS
+ config MACH_TRIZEPS4WL
+       bool "Keith und Koep Trizeps4-WL DIMM-Module"
+       depends on TRIZEPS_PXA
+       select TRIZEPS_PCMCIA
+       select PXA27x
+       select PXA_SSP
+ choice
+       prompt "Select base board for Trizeps module"
+       depends on TRIZEPS_PXA
+ config MACH_TRIZEPS_CONXS
        bool "ConXS Eval Board"
-       depends on MACH_TRIZEPS4
+ config MACH_TRIZEPS_UCONXS
+       bool "uConXS Eval Board"
+ config MACH_TRIZEPS_ANY
+       bool "another Board"
+ endchoice
+ config TRIZEPS_PCMCIA
+       bool
+       help
+         Enable PCMCIA support for Trizeps modules
  
  config MACH_EM_X270
        bool "CompuLab EM-x270 platform"
@@@ -189,6 -235,7 +235,7 @@@ config MACH_COLIBR
  config MACH_ZYLONITE
        bool "PXA3xx Development Platform (aka Zylonite)"
        select PXA3xx
+       select PXA_SSP
        select HAVE_PWM
  
  config MACH_LITTLETON
@@@ -207,21 -254,41 +254,42 @@@ config MACH_SAA
        select PXA930
  
  config MACH_ARMCORE
-       bool "CompuLab CM-X270 modules"
+       bool "CompuLab CM-X255/CM-X270 modules"
        select PXA27x
        select IWMMXT
 +      select ZONE_DMA if PCI
+       select PXA25x
+       select PXA_SSP
+ config MACH_CM_X300
+       bool "CompuLab CM-X300 modules"
+       select PXA3xx
+       select CPU_PXA300
  
  config MACH_MAGICIAN
        bool "Enable HTC Magician Support"
        select PXA27x
        select IWMMXT
+       select PXA_HAVE_BOARD_IRQS
+ config MACH_MIOA701
+       bool "Mitac Mio A701 Support"
+       select PXA27x
+       select IWMMXT
+       select LEDS_GPIO
+       select HAVE_PWM
+       select GPIO_SYSFS
+       help
+         Say Y here if you intend to run this kernel on a
+         MIO A701. Currently there is only basic support
+         for this PDA.
  
  config MACH_PCM027
        bool "Phytec phyCORE-PXA270 CPU module (PCM-027)"
        select PXA27x
        select IWMMXT
        select PXA_SSP
+       select PXA_HAVE_BOARD_IRQS
  
  config ARCH_PXA_PALM
        bool "PXA based Palm PDAs"
@@@ -237,6 -304,16 +305,16 @@@ config MACH_PALMT
          Say Y here if you intend to run this kernel on a Palm T|X
          handheld computer.
  
+ config MACH_PALMZ72
+       bool "Palm Zire 72"
+       default y
+       depends on ARCH_PXA_PALM
+       select PXA27x
+       select IWMMXT
+       help
+         Say Y here if you intend to run this kernel on Palm Zire 72
+         handheld computer.
  config MACH_PCM990_BASEBOARD
        bool "PHYTEC PCM-990 development board"
        select HAVE_PWM
@@@ -257,6 -334,9 +335,9 @@@ config PCM990_DISPLAY_NON
  
  endchoice
  
+ config MACH_AM200EPD
+       depends on MACH_GUMSTIX_F
+       bool "Enable AM200EPD board support"
  
  config PXA_EZX
        bool "Motorola EZX Platform"
@@@ -344,4 -424,10 +425,10 @@@ config TOSA_B
          This is a simple driver that is able to control
          the state of built in bluetooth chip on tosa.
  
+ config PXA_HAVE_BOARD_IRQS
+       bool
+ config PXA_HAVE_ISA_IRQS
+       bool
  endif
index 4cbf08bd546ba0f16a4a19bcba553e15a6603653,5c08c4e9cd22fd3b13761fb5b3f9ba73f4f15496..65558d6aa220d396e1e10c350ae5ebbc679f53bf
  #include <linux/interrupt.h>
  #include <linux/mmc/host.h>
  #include <linux/pm.h>
+ #include <linux/gpio.h>
  #include <linux/backlight.h>
 +#include <linux/io.h>
+ #include <linux/spi/spi.h>
+ #include <linux/spi/ads7846.h>
+ #include <linux/spi/corgi_lcd.h>
  #include <video/w100fb.h>
  
  #include <asm/setup.h>
@@@ -29,6 -32,7 +33,6 @@@
  #include <asm/mach-types.h>
  #include <mach/hardware.h>
  #include <asm/irq.h>
 -#include <asm/io.h>
  #include <asm/system.h>
  
  #include <asm/mach/arch.h>
  
  #include <mach/pxa-regs.h>
  #include <mach/pxa2xx-regs.h>
- #include <mach/pxa2xx-gpio.h>
+ #include <mach/mfp-pxa25x.h>
  #include <mach/i2c.h>
  #include <mach/irda.h>
  #include <mach/mmc.h>
  #include <mach/udc.h>
+ #include <mach/pxa2xx_spi.h>
  #include <mach/corgi.h>
  #include <mach/sharpsl.h>
  
  #include "devices.h"
  #include "sharpsl.h"
  
+ static unsigned long corgi_pin_config[] __initdata = {
+       /* Static Memory I/O */
+       GPIO78_nCS_2,   /* w100fb */
+       GPIO80_nCS_4,   /* scoop */
+       /* SSP1 */
+       GPIO23_SSP1_SCLK,
+       GPIO25_SSP1_TXD,
+       GPIO26_SSP1_RXD,
+       GPIO24_GPIO,    /* CORGI_GPIO_ADS7846_CS - SFRM as chip select */
+       /* I2S */
+       GPIO28_I2S_BITCLK_OUT,
+       GPIO29_I2S_SDATA_IN,
+       GPIO30_I2S_SDATA_OUT,
+       GPIO31_I2S_SYNC,
+       GPIO32_I2S_SYSCLK,
+       /* Infra-Red */
+       GPIO47_FICP_TXD,
+       GPIO46_FICP_RXD,
+       /* FFUART */
+       GPIO40_FFUART_DTR,
+       GPIO41_FFUART_RTS,
+       GPIO39_FFUART_TXD,
+       GPIO37_FFUART_DSR,
+       GPIO34_FFUART_RXD,
+       GPIO35_FFUART_CTS,
+       /* PC Card */
+       GPIO48_nPOE,
+       GPIO49_nPWE,
+       GPIO50_nPIOR,
+       GPIO51_nPIOW,
+       GPIO52_nPCE_1,
+       GPIO53_nPCE_2,
+       GPIO54_nPSKTSEL,
+       GPIO55_nPREG,
+       GPIO56_nPWAIT,
+       GPIO57_nIOIS16,
+       /* MMC */
+       GPIO6_MMC_CLK,
+       GPIO8_MMC_CS0,
+       /* GPIO */
+       GPIO9_GPIO,     /* CORGI_GPIO_nSD_DETECT */
+       GPIO7_GPIO,     /* CORGI_GPIO_nSD_WP */
+       GPIO33_GPIO,    /* CORGI_GPIO_SD_PWR */
+       GPIO22_GPIO,    /* CORGI_GPIO_IR_ON */
+       GPIO44_GPIO,    /* CORGI_GPIO_HSYNC */
+       GPIO1_GPIO | WAKEUP_ON_EDGE_RISE,
+ };
  
  /*
   * Corgi SCOOP Device
@@@ -67,6 -127,7 +127,7 @@@ static struct resource corgi_scoop_reso
  static struct scoop_config corgi_scoop_setup = {
        .io_dir         = CORGI_SCOOP_IO_DIR,
        .io_out         = CORGI_SCOOP_IO_OUT,
+       .gpio_base      = CORGI_SCOOP_GPIO_BASE,
  };
  
  struct platform_device corgiscoop_device = {
        .resource       = corgi_scoop_resources,
  };
  
- static void corgi_pcmcia_init(void)
- {
-       /* Setup default state of GPIO outputs
-          before we enable them as outputs. */
-       GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) |
-               GPIO_bit(GPIO49_nPWE) | GPIO_bit(GPIO50_nPIOR) |
-               GPIO_bit(GPIO51_nPIOW) | GPIO_bit(GPIO52_nPCE_1) |
-               GPIO_bit(GPIO53_nPCE_2);
-       pxa_gpio_mode(GPIO48_nPOE_MD);
-       pxa_gpio_mode(GPIO49_nPWE_MD);
-       pxa_gpio_mode(GPIO50_nPIOR_MD);
-       pxa_gpio_mode(GPIO51_nPIOW_MD);
-       pxa_gpio_mode(GPIO55_nPREG_MD);
-       pxa_gpio_mode(GPIO56_nPWAIT_MD);
-       pxa_gpio_mode(GPIO57_nIOIS16_MD);
-       pxa_gpio_mode(GPIO52_nPCE_1_MD);
-       pxa_gpio_mode(GPIO53_nPCE_2_MD);
-       pxa_gpio_mode(GPIO54_pSKTSEL_MD);
- }
  static struct scoop_pcmcia_dev corgi_pcmcia_scoop[] = {
  {
        .dev        = &corgiscoop_device.dev,
  static struct scoop_pcmcia_config corgi_pcmcia_config = {
        .devs         = &corgi_pcmcia_scoop[0],
        .num_devs     = 1,
-       .pcmcia_init  = corgi_pcmcia_init,
  };
  
  EXPORT_SYMBOL(corgiscoop_device);
  
- /*
-  * Corgi SSP Device
-  *
-  * Set the parent as the scoop device because a lot of SSP devices
-  * also use scoop functions and this makes the power up/down order
-  * work correctly.
-  */
- struct platform_device corgissp_device = {
-       .name           = "corgi-ssp",
-       .dev            = {
-               .parent = &corgiscoop_device.dev,
-       },
-       .id             = -1,
- };
- struct corgissp_machinfo corgi_ssp_machinfo = {
-       .port           = 1,
-       .cs_lcdcon      = CORGI_GPIO_LCDCON_CS,
-       .cs_ads7846     = CORGI_GPIO_ADS7846_CS,
-       .cs_max1111     = CORGI_GPIO_MAX1111_CS,
-       .clk_lcdcon     = 76,
-       .clk_ads7846    = 2,
-       .clk_max1111    = 8,
- };
- /*
-  * LCD/Framebuffer
-  */
- static void w100_lcdtg_suspend(struct w100fb_par *par)
- {
-       corgi_lcdtg_suspend();
- }
- static void w100_lcdtg_init(struct w100fb_par *par)
- {
-       corgi_lcdtg_hw_init(par->xres);
- }
- static struct w100_tg_info corgi_lcdtg_info = {
-       .change  = w100_lcdtg_init,
-       .suspend = w100_lcdtg_suspend,
-       .resume  = w100_lcdtg_init,
- };
  static struct w100_mem_info corgi_fb_mem = {
        .ext_cntl          = 0x00040003,
        .sdram_mode_reg    = 0x00650021,
@@@ -242,7 -234,6 +234,6 @@@ static struct w100_mode corgi_fb_modes[
  };
  
  static struct w100fb_mach_info corgi_fb_info = {
-       .tg         = &corgi_lcdtg_info,
        .init_mode  = INIT_MODE_ROTATED,
        .mem        = &corgi_fb_mem,
        .regs       = &corgi_fb_regs,
@@@ -268,60 -259,10 +259,10 @@@ static struct platform_device corgifb_d
        .resource       = corgi_fb_resources,
        .dev            = {
                .platform_data = &corgi_fb_info,
-               .parent = &corgissp_device.dev,
        },
  
  };
  
- /*
-  * Corgi Backlight Device
-  */
- static void corgi_bl_kick_battery(void)
- {
-       void (*kick_batt)(void);
-       kick_batt = symbol_get(sharpsl_battery_kick);
-       if (kick_batt) {
-               kick_batt();
-               symbol_put(sharpsl_battery_kick);
-       }
- }
- static void corgi_bl_set_intensity(int intensity)
- {
-       if (intensity > 0x10)
-               intensity += 0x10;
-       /* Bits 0-4 are accessed via the SSP interface */
-       corgi_ssp_blduty_set(intensity & 0x1f);
-       /* Bit 5 is via SCOOP */
-       if (intensity & 0x0020)
-               set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_BACKLIGHT_CONT);
-       else
-               reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_BACKLIGHT_CONT);
- }
- static struct generic_bl_info corgi_bl_machinfo = {
-       .name = "corgi-bl",
-       .max_intensity = 0x2f,
-       .default_intensity = 0x1f,
-       .limit_mask = 0x0b,
-       .set_bl_intensity = corgi_bl_set_intensity,
-       .kick_battery = corgi_bl_kick_battery,
- };
- static struct platform_device corgibl_device = {
-       .name           = "generic-bl",
-       .dev            = {
-               .parent = &corgifb_device.dev,
-               .platform_data  = &corgi_bl_machinfo,
-       },
-       .id             = -1,
- };
  /*
   * Corgi Keyboard Device
   */
@@@ -330,75 -271,35 +271,35 @@@ static struct platform_device corgikbd_
        .id             = -1,
  };
  
  /*
   * Corgi LEDs
   */
- static struct platform_device corgiled_device = {
-       .name           = "corgi-led",
-       .id             = -1,
- };
- /*
-  * Corgi Touch Screen Device
-  */
- static unsigned long (*get_hsync_invperiod)(struct device *dev);
- static void inline sharpsl_wait_sync(int gpio)
- {
-       while((GPLR(gpio) & GPIO_bit(gpio)) == 0);
-       while((GPLR(gpio) & GPIO_bit(gpio)) != 0);
- }
- static unsigned long corgi_get_hsync_invperiod(void)
- {
-       if (!get_hsync_invperiod)
-               get_hsync_invperiod = symbol_get(w100fb_get_hsynclen);
-       if (!get_hsync_invperiod)
-               return 0;
-       return get_hsync_invperiod(&corgifb_device.dev);
- }
- static void corgi_put_hsync(void)
- {
-       if (get_hsync_invperiod)
-               symbol_put(w100fb_get_hsynclen);
-       get_hsync_invperiod = NULL;
- }
- static void corgi_wait_hsync(void)
- {
-       sharpsl_wait_sync(CORGI_GPIO_HSYNC);
- }
- static struct resource corgits_resources[] = {
-       [0] = {
-               .start          = CORGI_IRQ_GPIO_TP_INT,
-               .end            = CORGI_IRQ_GPIO_TP_INT,
-               .flags          = IORESOURCE_IRQ,
+ static struct gpio_led corgi_gpio_leds[] = {
+       {
+               .name                   = "corgi:amber:charge",
+               .default_trigger        = "sharpsl-charge",
+               .gpio                   = CORGI_GPIO_LED_ORANGE,
+       },
+       {
+               .name                   = "corgi:green:mail",
+               .default_trigger        = "nand-disk",
+               .gpio                   = CORGI_GPIO_LED_GREEN,
        },
  };
  
- static struct corgits_machinfo  corgi_ts_machinfo = {
-       .get_hsync_invperiod = corgi_get_hsync_invperiod,
-       .put_hsync           = corgi_put_hsync,
-       .wait_hsync          = corgi_wait_hsync,
+ static struct gpio_led_platform_data corgi_gpio_leds_info = {
+       .leds           = corgi_gpio_leds,
+       .num_leds       = ARRAY_SIZE(corgi_gpio_leds),
  };
  
- static struct platform_device corgits_device = {
-       .name           = "corgi-ts",
+ static struct platform_device corgiled_device = {
+       .name           = "leds-gpio",
+       .id             = -1,
        .dev            = {
-               .parent = &corgissp_device.dev,
-               .platform_data  = &corgi_ts_machinfo,
+               .platform_data = &corgi_gpio_leds_info,
        },
-       .id             = -1,
-       .num_resources  = ARRAY_SIZE(corgits_resources),
-       .resource       = corgits_resources,
  };
  
  /*
   * MMC/SD Device
   *
@@@ -411,20 -312,42 +312,42 @@@ static int corgi_mci_init(struct devic
  {
        int err;
  
-       /* setup GPIO for PXA25x MMC controller */
-       pxa_gpio_mode(GPIO6_MMCCLK_MD);
-       pxa_gpio_mode(GPIO8_MMCCS0_MD);
-       pxa_gpio_mode(CORGI_GPIO_nSD_DETECT | GPIO_IN);
-       pxa_gpio_mode(CORGI_GPIO_SD_PWR | GPIO_OUT);
+       err = gpio_request(CORGI_GPIO_nSD_DETECT, "nSD_DETECT");
+       if (err)
+               goto err_out;
  
-       corgi_mci_platform_data.detect_delay = msecs_to_jiffies(250);
+       err = gpio_request(CORGI_GPIO_nSD_WP, "nSD_WP");
+       if (err)
+               goto err_free_1;
  
-       err = request_irq(CORGI_IRQ_GPIO_nSD_DETECT, corgi_detect_int,
-                         IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
-                         "MMC card detect", data);
+       err = gpio_request(CORGI_GPIO_SD_PWR, "SD_PWR");
        if (err)
-               printk(KERN_ERR "corgi_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
+               goto err_free_2;
+       gpio_direction_input(CORGI_GPIO_nSD_DETECT);
+       gpio_direction_input(CORGI_GPIO_nSD_WP);
+       gpio_direction_output(CORGI_GPIO_SD_PWR, 0);
  
+       corgi_mci_platform_data.detect_delay = msecs_to_jiffies(250);
+       err = request_irq(CORGI_IRQ_GPIO_nSD_DETECT, corgi_detect_int,
+                               IRQF_DISABLED | IRQF_TRIGGER_RISING |
+                               IRQF_TRIGGER_FALLING,
+                               "MMC card detect", data);
+       if (err) {
+               pr_err("%s: MMC/SD: can't request MMC card detect IRQ\n",
+                               __func__);
+               goto err_free_3;
+       }
+       return 0;
+ err_free_3:
+       gpio_free(CORGI_GPIO_SD_PWR);
+ err_free_2:
+       gpio_free(CORGI_GPIO_nSD_WP);
+ err_free_1:
+       gpio_free(CORGI_GPIO_nSD_DETECT);
+ err_out:
        return err;
  }
  
@@@ -432,20 -355,20 +355,20 @@@ static void corgi_mci_setpower(struct d
  {
        struct pxamci_platform_data* p_d = dev->platform_data;
  
-       if (( 1 << vdd) & p_d->ocr_mask)
-               GPSR1 = GPIO_bit(CORGI_GPIO_SD_PWR);
-       else
-               GPCR1 = GPIO_bit(CORGI_GPIO_SD_PWR);
+       gpio_set_value(CORGI_GPIO_SD_PWR, ((1 << vdd) & p_d->ocr_mask));
  }
  
  static int corgi_mci_get_ro(struct device *dev)
  {
-       return GPLR(CORGI_GPIO_nSD_WP) & GPIO_bit(CORGI_GPIO_nSD_WP);
+       return gpio_get_value(CORGI_GPIO_nSD_WP);
  }
  
  static void corgi_mci_exit(struct device *dev, void *data)
  {
        free_irq(CORGI_IRQ_GPIO_nSD_DETECT, data);
+       gpio_free(CORGI_GPIO_SD_PWR);
+       gpio_free(CORGI_GPIO_nSD_WP);
+       gpio_free(CORGI_GPIO_nSD_DETECT);
  }
  
  static struct pxamci_platform_data corgi_mci_platform_data = {
   */
  static void corgi_irda_transceiver_mode(struct device *dev, int mode)
  {
-       if (mode & IR_OFF)
-               GPSR(CORGI_GPIO_IR_ON) = GPIO_bit(CORGI_GPIO_IR_ON);
-       else
-               GPCR(CORGI_GPIO_IR_ON) = GPIO_bit(CORGI_GPIO_IR_ON);
+       gpio_set_value(CORGI_GPIO_IR_ON, mode & IR_OFF);
        pxa2xx_transceiver_mode(dev, mode);
  }
  
+ static int corgi_irda_startup(struct device *dev)
+ {
+       int err;
+       err = gpio_request(CORGI_GPIO_IR_ON, "IR_ON");
+       if (err)
+               return err;
+       gpio_direction_output(CORGI_GPIO_IR_ON, 1);
+       return 0;
+ }
+ static void corgi_irda_shutdown(struct device *dev)
+ {
+       gpio_free(CORGI_GPIO_IR_ON);
+ }
  static struct pxaficp_platform_data corgi_ficp_platform_data = {
-       .transceiver_cap  = IR_SIRMODE | IR_OFF,
-       .transceiver_mode = corgi_irda_transceiver_mode,
+       .transceiver_cap        = IR_SIRMODE | IR_OFF,
+       .transceiver_mode       = corgi_irda_transceiver_mode,
+       .startup                = corgi_irda_startup,
+       .shutdown               = corgi_irda_shutdown,
  };
  
  
@@@ -483,14 -422,129 +422,129 @@@ static struct pxa2xx_udc_mach_info udc_
        .gpio_pullup            = CORGI_GPIO_USB_PULLUP,
  };
  
+ #if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MASTER)
+ static struct pxa2xx_spi_master corgi_spi_info = {
+       .num_chipselect = 3,
+ };
+ static struct ads7846_platform_data corgi_ads7846_info = {
+       .model                  = 7846,
+       .vref_delay_usecs       = 100,
+       .x_plate_ohms           = 419,
+       .y_plate_ohms           = 486,
+       .gpio_pendown           = CORGI_GPIO_TP_INT,
+ };
+ static void corgi_ads7846_cs(u32 command)
+ {
+       gpio_set_value(CORGI_GPIO_ADS7846_CS, !(command == PXA2XX_CS_ASSERT));
+ }
+ static struct pxa2xx_spi_chip corgi_ads7846_chip = {
+       .cs_control     = corgi_ads7846_cs,
+ };
+ static void corgi_bl_kick_battery(void)
+ {
+       void (*kick_batt)(void);
+       kick_batt = symbol_get(sharpsl_battery_kick);
+       if (kick_batt) {
+               kick_batt();
+               symbol_put(sharpsl_battery_kick);
+       }
+ }
+ static struct corgi_lcd_platform_data corgi_lcdcon_info = {
+       .init_mode              = CORGI_LCD_MODE_VGA,
+       .max_intensity          = 0x2f,
+       .default_intensity      = 0x1f,
+       .limit_mask             = 0x0b,
+       .gpio_backlight_cont    = CORGI_GPIO_BACKLIGHT_CONT,
+       .gpio_backlight_on      = -1,
+       .kick_battery           = corgi_bl_kick_battery,
+ };
+ static void corgi_lcdcon_cs(u32 command)
+ {
+       gpio_set_value(CORGI_GPIO_LCDCON_CS, !(command == PXA2XX_CS_ASSERT));
+ }
+ static struct pxa2xx_spi_chip corgi_lcdcon_chip = {
+       .cs_control     = corgi_lcdcon_cs,
+ };
+ static void corgi_max1111_cs(u32 command)
+ {
+       gpio_set_value(CORGI_GPIO_MAX1111_CS, !(command == PXA2XX_CS_ASSERT));
+ }
+ static struct pxa2xx_spi_chip corgi_max1111_chip = {
+       .cs_control     = corgi_max1111_cs,
+ };
+ static struct spi_board_info corgi_spi_devices[] = {
+       {
+               .modalias       = "ads7846",
+               .max_speed_hz   = 1200000,
+               .bus_num        = 1,
+               .chip_select    = 0,
+               .platform_data  = &corgi_ads7846_info,
+               .controller_data= &corgi_ads7846_chip,
+               .irq            = gpio_to_irq(CORGI_GPIO_TP_INT),
+       }, {
+               .modalias       = "corgi-lcd",
+               .max_speed_hz   = 50000,
+               .bus_num        = 1,
+               .chip_select    = 1,
+               .platform_data  = &corgi_lcdcon_info,
+               .controller_data= &corgi_lcdcon_chip,
+       }, {
+               .modalias       = "max1111",
+               .max_speed_hz   = 450000,
+               .bus_num        = 1,
+               .chip_select    = 2,
+               .controller_data= &corgi_max1111_chip,
+       },
+ };
+ static void __init corgi_init_spi(void)
+ {
+       int err;
+       err = gpio_request(CORGI_GPIO_ADS7846_CS, "ADS7846_CS");
+       if (err)
+               return;
+       err = gpio_request(CORGI_GPIO_LCDCON_CS, "LCDCON_CS");
+       if (err)
+               goto err_free_1;
+       err = gpio_request(CORGI_GPIO_MAX1111_CS, "MAX1111_CS");
+       if (err)
+               goto err_free_2;
+       gpio_direction_output(CORGI_GPIO_ADS7846_CS, 1);
+       gpio_direction_output(CORGI_GPIO_LCDCON_CS, 1);
+       gpio_direction_output(CORGI_GPIO_MAX1111_CS, 1);
+       pxa2xx_set_spi_info(1, &corgi_spi_info);
+       spi_register_board_info(ARRAY_AND_SIZE(corgi_spi_devices));
+       return;
+ err_free_2:
+       gpio_free(CORGI_GPIO_LCDCON_CS);
+ err_free_1:
+       gpio_free(CORGI_GPIO_ADS7846_CS);
+ }
+ #else
+ static inline void corgi_init_spi(void) {}
+ #endif
  
  static struct platform_device *devices[] __initdata = {
        &corgiscoop_device,
-       &corgissp_device,
        &corgifb_device,
        &corgikbd_device,
-       &corgibl_device,
-       &corgits_device,
        &corgiled_device,
  };
  
@@@ -498,7 -552,8 +552,8 @@@ static void corgi_poweroff(void
  {
        if (!machine_is_corgi())
                /* Green LED off tells the bootloader to halt */
-               reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_LED_GREEN);
+               gpio_set_value(CORGI_GPIO_LED_GREEN, 0);
        arm_machine_restart('h');
  }
  
@@@ -506,7 -561,8 +561,8 @@@ static void corgi_restart(char mode
  {
        if (!machine_is_corgi())
                /* Green LED on tells the bootloader to reboot */
-               set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_LED_GREEN);
+               gpio_set_value(CORGI_GPIO_LED_GREEN, 1);
        arm_machine_restart('h');
  }
  
@@@ -515,20 -571,12 +571,12 @@@ static void __init corgi_init(void
        pm_power_off = corgi_poweroff;
        arm_pm_restart = corgi_restart;
  
-       /* setup sleep mode values */
-       PWER  = 0x00000002;
-       PFER  = 0x00000000;
-       PRER  = 0x00000002;
-       PGSR0 = 0x0158C000;
-       PGSR1 = 0x00FF0080;
-       PGSR2 = 0x0001C004;
        /* Stop 3.6MHz and drive HIGH to PCMCIA and CS */
        PCFR |= PCFR_OPDE;
  
-       corgi_ssp_set_machinfo(&corgi_ssp_machinfo);
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(corgi_pin_config));
  
-       pxa_gpio_mode(CORGI_GPIO_IR_ON | GPIO_OUT);
-       pxa_gpio_mode(CORGI_GPIO_HSYNC | GPIO_IN);
+       corgi_init_spi();
  
        pxa_set_udc_info(&udc_info);
        pxa_set_mci_info(&corgi_mci_platform_data);
diff --combined arch/arm/mach-pxa/gpio.c
index 418d4dfd44ab88ff50ac206e90f11dcb96cc6ae5,e92bec510e5e0992d69597485ece54dd68857f71..14930cf8be7b58d27d523310c02a7e6fe65f3ed4
  #include <linux/module.h>
  #include <linux/irq.h>
  #include <linux/sysdev.h>
 +#include <linux/io.h>
  
  #include <asm/gpio.h>
  #include <mach/hardware.h>
 -#include <asm/io.h>
  #include <mach/pxa-regs.h>
  #include <mach/pxa2xx-gpio.h>
  
@@@ -275,7 -275,7 +275,7 @@@ static void pxa_gpio_demux_handler(unsi
                        loop = 1;
  
                        n = PXA_GPIO_IRQ_BASE + bit;
-                       desc_handle_irq(n, irq_desc + n);
+                       generic_handle_irq(n);
  
                        bit = find_next_bit(gedr, GEDR_BITS, bit + 1);
                }
index a1a0a2ffd642299bcbf1cb498aa721a72b16ebe9,9dc71114e2871dadc1b9c0dcb73ea1d996dc436f..a582a6d9b92b10c93d6ecae6d95128472b4ae9a3
  
  #ifndef __ASSEMBLY__
  
 +#include <asm/cputype.h>
 +
+ /*
+  *   CPU     Stepping     CPU_ID         JTAG_ID
+  *
+  *  PXA210    B0      0x69052922      0x2926C013
+  *  PXA210    B1      0x69052923      0x3926C013
+  *  PXA210    B2      0x69052924      0x4926C013
+  *  PXA210    C0      0x69052D25      0x5926C013
+  *
+  *  PXA250    A0      0x69052100      0x09264013
+  *  PXA250    A1      0x69052101      0x19264013
+  *  PXA250    B0      0x69052902      0x29264013
+  *  PXA250    B1      0x69052903      0x39264013
+  *  PXA250    B2      0x69052904      0x49264013
+  *  PXA250    C0      0x69052D05      0x59264013
+  *
+  *  PXA255    A0      0x69052D06      0x69264013
+  *
+  *  PXA26x    A0      0x69052903      0x39264013
+  *  PXA26x    B0      0x69052D05      0x59264013
+  *
+  *  PXA27x    A0      0x69054110      0x09265013
+  *  PXA27x    A1      0x69054111      0x19265013
+  *  PXA27x    B0      0x69054112      0x29265013
+  *  PXA27x    B1      0x69054113      0x39265013
+  *  PXA27x    C0      0x69054114      0x49265013
+  *  PXA27x    C5      0x69054117      0x79265013
+  *
+  *  PXA30x    A0      0x69056880      0x0E648013
+  *  PXA30x    A1      0x69056881      0x1E648013
+  *  PXA31x    A0      0x69056890      0x0E649013
+  *  PXA31x    A1      0x69056891      0x1E649013
+  *  PXA31x    A2      0x69056892      0x2E649013
+  *  PXA32x    B1      0x69056825      0x5E642013
+  *  PXA32x    B2      0x69056826      0x6E642013
+  *
+  *  PXA930    B0      0x69056835      0x5E643013
+  *  PXA930    B1      0x69056837      0x7E643013
+  *  PXA930    B2      0x69056838      0x8E643013
+  */
  #ifdef CONFIG_PXA25x
- #define __cpu_is_pxa21x(id)                           \
+ #define __cpu_is_pxa210(id)                           \
        ({                                              \
-               unsigned int _id = (id) >> 4 & 0xf3f;   \
-               _id == 0x212                          \
+               unsigned int _id = (id) & 0xf3f0;       \
+               _id == 0x2120;                          \
        })
  
- #define __cpu_is_pxa255(id)                             \
-       ({                                              \
-               unsigned int _id = (id) >> 4 & 0xfff;   \
-               _id == 0x2d0;                           \
-        })
+ #define __cpu_is_pxa250(id)                           \
+       ({                                              \
+               unsigned int _id = (id) & 0xf3ff;       \
+               _id <= 0x2105;                          \
+       })
+ #define __cpu_is_pxa255(id)                           \
+       ({                                              \
+               unsigned int _id = (id) & 0xffff;       \
+               _id == 0x2d06;                          \
+       })
  
  #define __cpu_is_pxa25x(id)                           \
        ({                                              \
-               unsigned int _id = (id) >> 4 & 0xfff;   \
-               _id == 0x2d0 || _id == 0x290;           \
+               unsigned int _id = (id) & 0xf300;       \
+               _id == 0x2100;                          \
        })
  #else
- #define __cpu_is_pxa21x(id)   (0)
+ #define __cpu_is_pxa210(id)   (0)
+ #define __cpu_is_pxa250(id)   (0)
  #define __cpu_is_pxa255(id)   (0)
  #define __cpu_is_pxa25x(id)   (0)
  #endif
  #define __cpu_is_pxa930(id)   (0)
  #endif
  
- #define cpu_is_pxa21x()                                       \
+ #define cpu_is_pxa210()                                       \
        ({                                              \
-               __cpu_is_pxa21x(read_cpuid_id());       \
+               __cpu_is_pxa210(read_cpuid_id());       \
+       })
+ #define cpu_is_pxa250()                                       \
+       ({                                              \
+               __cpu_is_pxa250(read_cpuid_id());       \
        })
  
  #define cpu_is_pxa255()                                 \
                __cpu_is_pxa25x(read_cpuid_id());       \
        })
  
+ extern int cpu_is_pxa26x(void);
  #define cpu_is_pxa27x()                                       \
        ({                                              \
                __cpu_is_pxa27x(read_cpuid_id());       \
index 7e181afcca3935cf19682923b2b2710e2b46f5bb,7ef346182371b88355b1a11fb0a2d436754e45fd..9b4f24c7c055de37a2eedf97c2289e60a015f5a3
  #include <linux/major.h>
  #include <linux/fs.h>
  #include <linux/interrupt.h>
+ #include <linux/gpio.h>
+ #include <linux/leds.h>
  #include <linux/mmc/host.h>
  #include <linux/pm.h>
  #include <linux/backlight.h>
 +#include <linux/io.h>
+ #include <linux/i2c.h>
+ #include <linux/i2c/pca953x.h>
+ #include <linux/spi/spi.h>
+ #include <linux/spi/ads7846.h>
+ #include <linux/spi/corgi_lcd.h>
  
  #include <asm/setup.h>
  #include <asm/memory.h>
  #include <asm/mach-types.h>
  #include <mach/hardware.h>
  #include <asm/irq.h>
 -#include <asm/io.h>
  #include <asm/system.h>
  
  #include <asm/mach/arch.h>
@@@ -37,7 -44,7 +44,7 @@@
  
  #include <mach/pxa-regs.h>
  #include <mach/pxa2xx-regs.h>
- #include <mach/pxa2xx-gpio.h>
+ #include <mach/mfp-pxa27x.h>
  #include <mach/pxa27x-udc.h>
  #include <mach/reset.h>
  #include <mach/i2c.h>
@@@ -46,7 -53,7 +53,7 @@@
  #include <mach/ohci.h>
  #include <mach/udc.h>
  #include <mach/pxafb.h>
- #include <mach/akita.h>
+ #include <mach/pxa2xx_spi.h>
  #include <mach/spitz.h>
  #include <mach/sharpsl.h>
  
  #include "devices.h"
  #include "sharpsl.h"
  
+ static unsigned long spitz_pin_config[] __initdata = {
+       /* Chip Selects */
+       GPIO78_nCS_2,   /* SCOOP #2 */
+       GPIO80_nCS_4,   /* SCOOP #1 */
+       /* LCD - 16bpp Active TFT */
+       GPIO58_LCD_LDD_0,
+       GPIO59_LCD_LDD_1,
+       GPIO60_LCD_LDD_2,
+       GPIO61_LCD_LDD_3,
+       GPIO62_LCD_LDD_4,
+       GPIO63_LCD_LDD_5,
+       GPIO64_LCD_LDD_6,
+       GPIO65_LCD_LDD_7,
+       GPIO66_LCD_LDD_8,
+       GPIO67_LCD_LDD_9,
+       GPIO68_LCD_LDD_10,
+       GPIO69_LCD_LDD_11,
+       GPIO70_LCD_LDD_12,
+       GPIO71_LCD_LDD_13,
+       GPIO72_LCD_LDD_14,
+       GPIO73_LCD_LDD_15,
+       GPIO74_LCD_FCLK,
+       GPIO75_LCD_LCLK,
+       GPIO76_LCD_PCLK,
+       /* PC Card */
+       GPIO48_nPOE,
+       GPIO49_nPWE,
+       GPIO50_nPIOR,
+       GPIO51_nPIOW,
+       GPIO85_nPCE_1,
+       GPIO54_nPCE_2,
+       GPIO79_PSKTSEL,
+       GPIO55_nPREG,
+       GPIO56_nPWAIT,
+       GPIO57_nIOIS16,
+       /* MMC */
+       GPIO32_MMC_CLK,
+       GPIO112_MMC_CMD,
+       GPIO92_MMC_DAT_0,
+       GPIO109_MMC_DAT_1,
+       GPIO110_MMC_DAT_2,
+       GPIO111_MMC_DAT_3,
+       /* GPIOs */
+       GPIO9_GPIO,     /* SPITZ_GPIO_nSD_DETECT */
+       GPIO81_GPIO,    /* SPITZ_GPIO_nSD_WP */
+       GPIO41_GPIO,    /* SPITZ_GPIO_USB_CONNECT */
+       GPIO37_GPIO,    /* SPITZ_GPIO_USB_HOST */
+       GPIO35_GPIO,    /* SPITZ_GPIO_USB_DEVICE */
+       GPIO22_GPIO,    /* SPITZ_GPIO_HSYNC */
+       GPIO94_GPIO,    /* SPITZ_GPIO_CF_CD */
+       GPIO105_GPIO,   /* SPITZ_GPIO_CF_IRQ */
+       GPIO106_GPIO,   /* SPITZ_GPIO_CF2_IRQ */
+       GPIO1_GPIO | WAKEUP_ON_EDGE_RISE,
+ };
  /*
   * Spitz SCOOP Device #1
   */
@@@ -69,10 -136,11 +136,11 @@@ static struct resource spitz_scoop_reso
  };
  
  static struct scoop_config spitz_scoop_setup = {
-       .io_dir         = SPITZ_SCP_IO_DIR,
+       .io_dir         = SPITZ_SCP_IO_DIR,
        .io_out         = SPITZ_SCP_IO_OUT,
-       .suspend_clr = SPITZ_SCP_SUS_CLR,
-       .suspend_set = SPITZ_SCP_SUS_SET,
+       .suspend_clr    = SPITZ_SCP_SUS_CLR,
+       .suspend_set    = SPITZ_SCP_SUS_SET,
+       .gpio_base      = SPITZ_SCP_GPIO_BASE,
  };
  
  struct platform_device spitzscoop_device = {
@@@ -97,10 -165,11 +165,11 @@@ static struct resource spitz_scoop2_res
  };
  
  static struct scoop_config spitz_scoop2_setup = {
-       .io_dir         = SPITZ_SCP2_IO_DIR,
+       .io_dir         = SPITZ_SCP2_IO_DIR,
        .io_out         = SPITZ_SCP2_IO_OUT,
-       .suspend_clr = SPITZ_SCP2_SUS_CLR,
-       .suspend_set = SPITZ_SCP2_SUS_SET,
+       .suspend_clr    = SPITZ_SCP2_SUS_CLR,
+       .suspend_set    = SPITZ_SCP2_SUS_SET,
+       .gpio_base      = SPITZ_SCP2_GPIO_BASE,
  };
  
  struct platform_device spitzscoop2_device = {
@@@ -122,7 -191,7 +191,7 @@@ static void spitz_card_pwr_ctrl(int dev
        unsigned short cpr = read_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR);
  
        if (new_cpr & 0x0007) {
-               set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_CF_POWER);
+               gpio_set_value(SPITZ_GPIO_CF_POWER, 1);
                if (!(cpr & 0x0002) && !(cpr & 0x0004))
                        mdelay(5);
                if (device == SPITZ_PWR_CF)
                if (!(cpr & 0x0002) && !(cpr & 0x0004)) {
                        write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, 0x0000);
                        mdelay(1);
-                       reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_CF_POWER);
+                       gpio_set_value(SPITZ_GPIO_CF_POWER, 0);
                } else {
                        write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, cpr | new_cpr);
                }
        }
  }
  
- static void spitz_pcmcia_init(void)
- {
-       /* Setup default state of GPIO outputs
-          before we enable them as outputs. */
-       GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) |
-               GPIO_bit(GPIO49_nPWE) | GPIO_bit(GPIO50_nPIOR) |
-               GPIO_bit(GPIO51_nPIOW) | GPIO_bit(GPIO54_nPCE_2);
-       GPSR(GPIO85_nPCE_1) = GPIO_bit(GPIO85_nPCE_1);
-       pxa_gpio_mode(GPIO48_nPOE_MD);
-       pxa_gpio_mode(GPIO49_nPWE_MD);
-       pxa_gpio_mode(GPIO50_nPIOR_MD);
-       pxa_gpio_mode(GPIO51_nPIOW_MD);
-       pxa_gpio_mode(GPIO55_nPREG_MD);
-       pxa_gpio_mode(GPIO56_nPWAIT_MD);
-       pxa_gpio_mode(GPIO57_nIOIS16_MD);
-       pxa_gpio_mode(GPIO85_nPCE_1_MD);
-       pxa_gpio_mode(GPIO54_nPCE_2_MD);
-       pxa_gpio_mode(GPIO104_pSKTSEL_MD);
- }
  static void spitz_pcmcia_pwr(struct device *scoop, unsigned short cpr, int nr)
  {
        /* Only need to override behaviour for slot 0 */
@@@ -191,165 -239,169 +239,169 @@@ static struct scoop_pcmcia_dev spitz_pc
  static struct scoop_pcmcia_config spitz_pcmcia_config = {
        .devs         = &spitz_pcmcia_scoop[0],
        .num_devs     = 2,
-       .pcmcia_init  = spitz_pcmcia_init,
        .power_ctrl   = spitz_pcmcia_pwr,
  };
  
  EXPORT_SYMBOL(spitzscoop_device);
  EXPORT_SYMBOL(spitzscoop2_device);
  
  /*
-  * Spitz SSP Device
-  *
-  * Set the parent as the scoop device because a lot of SSP devices
-  * also use scoop functions and this makes the power up/down order
-  * work correctly.
+  * Spitz Keyboard Device
   */
- struct platform_device spitzssp_device = {
-       .name           = "corgi-ssp",
-       .dev            = {
-               .parent = &spitzscoop_device.dev,
-       },
+ static struct platform_device spitzkbd_device = {
+       .name           = "spitz-keyboard",
        .id             = -1,
  };
  
- struct corgissp_machinfo spitz_ssp_machinfo = {
-       .port           = 2,
-       .cs_lcdcon      = SPITZ_GPIO_LCDCON_CS,
-       .cs_ads7846     = SPITZ_GPIO_ADS7846_CS,
-       .cs_max1111     = SPITZ_GPIO_MAX1111_CS,
-       .clk_lcdcon     = 520,
-       .clk_ads7846    = 14,
-       .clk_max1111    = 56,
- };
  
  /*
-  * Spitz Backlight Device
+  * Spitz LEDs
   */
- static void spitz_bl_kick_battery(void)
- {
-       void (*kick_batt)(void);
-       kick_batt = symbol_get(sharpsl_battery_kick);
-       if (kick_batt) {
-               kick_batt();
-               symbol_put(sharpsl_battery_kick);
-       }
- }
- static struct generic_bl_info spitz_bl_machinfo = {
-       .name = "corgi-bl",
-       .default_intensity = 0x1f,
-       .limit_mask = 0x0b,
-       .max_intensity = 0x2f,
-       .kick_battery = spitz_bl_kick_battery,
- };
- static struct platform_device spitzbl_device = {
-       .name           = "generic-bl",
-       .dev            = {
-               .platform_data  = &spitz_bl_machinfo,
+ static struct gpio_led spitz_gpio_leds[] = {
+       {
+               .name                   = "spitz:amber:charge",
+               .default_trigger        = "sharpsl-charge",
+               .gpio                   = SPITZ_GPIO_LED_ORANGE,
+       },
+       {
+               .name                   = "spitz:green:hddactivity",
+               .default_trigger        = "ide-disk",
+               .gpio                   = SPITZ_GPIO_LED_GREEN,
        },
-       .id             = -1,
  };
  
- /*
-  * Spitz Keyboard Device
-  */
- static struct platform_device spitzkbd_device = {
-       .name           = "spitz-keyboard",
-       .id             = -1,
+ static struct gpio_led_platform_data spitz_gpio_leds_info = {
+       .leds           = spitz_gpio_leds,
+       .num_leds       = ARRAY_SIZE(spitz_gpio_leds),
  };
  
- /*
-  * Spitz LEDs
-  */
  static struct platform_device spitzled_device = {
-       .name           = "spitz-led",
+       .name           = "leds-gpio",
        .id             = -1,
+       .dev            = {
+               .platform_data = &spitz_gpio_leds_info,
+       },
  };
  
- /*
-  * Spitz Touch Screen Device
-  */
+ #if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MODULE)
+ static struct pxa2xx_spi_master spitz_spi_info = {
+       .num_chipselect = 3,
+ };
  
- static unsigned long (*get_hsync_invperiod)(struct device *dev);
+ static struct ads7846_platform_data spitz_ads7846_info = {
+       .model                  = 7846,
+       .vref_delay_usecs       = 100,
+       .x_plate_ohms           = 419,
+       .y_plate_ohms           = 486,
+       .gpio_pendown           = SPITZ_GPIO_TP_INT,
+ };
  
- static void inline sharpsl_wait_sync(int gpio)
+ static void spitz_ads7846_cs(u32 command)
  {
-       while((GPLR(gpio) & GPIO_bit(gpio)) == 0);
-       while((GPLR(gpio) & GPIO_bit(gpio)) != 0);
+       gpio_set_value(SPITZ_GPIO_ADS7846_CS, !(command == PXA2XX_CS_ASSERT));
  }
  
- static struct device *spitz_pxafb_dev;
+ static struct pxa2xx_spi_chip spitz_ads7846_chip = {
+       .cs_control             = spitz_ads7846_cs,
+ };
  
- static int is_pxafb_device(struct device * dev, void * data)
+ static void spitz_bl_kick_battery(void)
  {
-       struct platform_device *pdev = container_of(dev, struct platform_device, dev);
-       return (strncmp(pdev->name, "pxa2xx-fb", 9) == 0);
- }
+       void (*kick_batt)(void);
  
- static unsigned long spitz_get_hsync_invperiod(void)
- {
- #ifdef CONFIG_FB_PXA
-       if (!spitz_pxafb_dev) {
-               spitz_pxafb_dev = bus_find_device(&platform_bus_type, NULL, NULL, is_pxafb_device);
-               if (!spitz_pxafb_dev)
-                       return 0;
+       kick_batt = symbol_get(sharpsl_battery_kick);
+       if (kick_batt) {
+               kick_batt();
+               symbol_put(sharpsl_battery_kick);
        }
-       if (!get_hsync_invperiod)
-               get_hsync_invperiod = symbol_get(pxafb_get_hsync_time);
-       if (!get_hsync_invperiod)
- #endif
-               return 0;
-       return get_hsync_invperiod(spitz_pxafb_dev);
  }
  
- static void spitz_put_hsync(void)
- {
-       put_device(spitz_pxafb_dev);
-       if (get_hsync_invperiod)
-               symbol_put(pxafb_get_hsync_time);
-       spitz_pxafb_dev = NULL;
-       get_hsync_invperiod = NULL;
- }
+ static struct corgi_lcd_platform_data spitz_lcdcon_info = {
+       .init_mode              = CORGI_LCD_MODE_VGA,
+       .max_intensity          = 0x2f,
+       .default_intensity      = 0x1f,
+       .limit_mask             = 0x0b,
+       .gpio_backlight_cont    = SPITZ_GPIO_BACKLIGHT_CONT,
+       .gpio_backlight_on      = SPITZ_GPIO_BACKLIGHT_ON,
+       .kick_battery           = spitz_bl_kick_battery,
+ };
  
- static void spitz_wait_hsync(void)
+ static void spitz_lcdcon_cs(u32 command)
  {
-       sharpsl_wait_sync(SPITZ_GPIO_HSYNC);
+       gpio_set_value(SPITZ_GPIO_LCDCON_CS, !(command == PXA2XX_CS_ASSERT));
  }
  
- static struct resource spitzts_resources[] = {
-       [0] = {
-               .start          = SPITZ_IRQ_GPIO_TP_INT,
-               .end            = SPITZ_IRQ_GPIO_TP_INT,
-               .flags          = IORESOURCE_IRQ,
-       },
+ static struct pxa2xx_spi_chip spitz_lcdcon_chip = {
+       .cs_control     = spitz_lcdcon_cs,
  };
  
- static struct corgits_machinfo  spitz_ts_machinfo = {
-       .get_hsync_invperiod = spitz_get_hsync_invperiod,
-       .put_hsync           = spitz_put_hsync,
-       .wait_hsync          = spitz_wait_hsync,
+ static void spitz_max1111_cs(u32 command)
+ {
+       gpio_set_value(SPITZ_GPIO_MAX1111_CS, !(command == PXA2XX_CS_ASSERT));
+ }
+ static struct pxa2xx_spi_chip spitz_max1111_chip = {
+       .cs_control     = spitz_max1111_cs,
  };
  
- static struct platform_device spitzts_device = {
-       .name           = "corgi-ts",
-       .dev            = {
-               .parent = &spitzssp_device.dev,
-               .platform_data  = &spitz_ts_machinfo,
+ static struct spi_board_info spitz_spi_devices[] = {
+       {
+               .modalias       = "ads7846",
+               .max_speed_hz   = 1200000,
+               .bus_num        = 2,
+               .chip_select    = 0,
+               .platform_data  = &spitz_ads7846_info,
+               .controller_data= &spitz_ads7846_chip,
+               .irq            = gpio_to_irq(SPITZ_GPIO_TP_INT),
+       }, {
+               .modalias       = "corgi-lcd",
+               .max_speed_hz   = 50000,
+               .bus_num        = 2,
+               .chip_select    = 1,
+               .platform_data  = &spitz_lcdcon_info,
+               .controller_data= &spitz_lcdcon_chip,
+       }, {
+               .modalias       = "max1111",
+               .max_speed_hz   = 450000,
+               .bus_num        = 2,
+               .chip_select    = 2,
+               .controller_data= &spitz_max1111_chip,
        },
-       .id             = -1,
-       .num_resources  = ARRAY_SIZE(spitzts_resources),
-       .resource       = spitzts_resources,
  };
  
+ static void __init spitz_init_spi(void)
+ {
+       int err;
+       err = gpio_request(SPITZ_GPIO_ADS7846_CS, "ADS7846_CS");
+       if (err)
+               return;
+       err = gpio_request(SPITZ_GPIO_LCDCON_CS, "LCDCON_CS");
+       if (err)
+               goto err_free_1;
+       err = gpio_request(SPITZ_GPIO_MAX1111_CS, "MAX1111_CS");
+       if (err)
+               goto err_free_2;
+       if (machine_is_akita()) {
+               spitz_lcdcon_info.gpio_backlight_cont = AKITA_GPIO_BACKLIGHT_CONT;
+               spitz_lcdcon_info.gpio_backlight_on = AKITA_GPIO_BACKLIGHT_ON;
+       }
+       pxa2xx_set_spi_info(2, &spitz_spi_info);
+       spi_register_board_info(ARRAY_AND_SIZE(spitz_spi_devices));
+       return;
+ err_free_2:
+       gpio_free(SPITZ_GPIO_LCDCON_CS);
+ err_free_1:
+       gpio_free(SPITZ_GPIO_ADS7846_CS);
+ }
+ #else
+ static inline void spitz_init_spi(void) {}
+ #endif
  
  /*
   * MMC/SD Device
@@@ -364,24 -416,35 +416,35 @@@ static int spitz_mci_init(struct devic
  {
        int err;
  
-       /* setup GPIO for PXA27x MMC controller */
-       pxa_gpio_mode(GPIO32_MMCCLK_MD);
-       pxa_gpio_mode(GPIO112_MMCCMD_MD);
-       pxa_gpio_mode(GPIO92_MMCDAT0_MD);
-       pxa_gpio_mode(GPIO109_MMCDAT1_MD);
-       pxa_gpio_mode(GPIO110_MMCDAT2_MD);
-       pxa_gpio_mode(GPIO111_MMCDAT3_MD);
-       pxa_gpio_mode(SPITZ_GPIO_nSD_DETECT | GPIO_IN);
-       pxa_gpio_mode(SPITZ_GPIO_nSD_WP | GPIO_IN);
+       err = gpio_request(SPITZ_GPIO_nSD_DETECT, "nSD_DETECT");
+       if (err)
+               goto err_out;
+       err = gpio_request(SPITZ_GPIO_nSD_WP, "nSD_WP");
+       if (err)
+               goto err_free_1;
+       gpio_direction_input(SPITZ_GPIO_nSD_DETECT);
+       gpio_direction_input(SPITZ_GPIO_nSD_WP);
  
        spitz_mci_platform_data.detect_delay = msecs_to_jiffies(250);
  
        err = request_irq(SPITZ_IRQ_GPIO_nSD_DETECT, spitz_detect_int,
-                         IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+                         IRQF_DISABLED | IRQF_TRIGGER_RISING |
+                         IRQF_TRIGGER_FALLING,
                          "MMC card detect", data);
-       if (err)
-               printk(KERN_ERR "spitz_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
+       if (err) {
+               pr_err("%s: MMC/SD: can't request MMC card detect IRQ\n",
+                               __func__);
+               goto err_free_2;
+       }
+       return 0;
  
+ err_free_2:
+       gpio_free(SPITZ_GPIO_nSD_WP);
+ err_free_1:
+       gpio_free(SPITZ_GPIO_nSD_DETECT);
+ err_out:
        return err;
  }
  
@@@ -397,12 -460,14 +460,14 @@@ static void spitz_mci_setpower(struct d
  
  static int spitz_mci_get_ro(struct device *dev)
  {
-       return GPLR(SPITZ_GPIO_nSD_WP) & GPIO_bit(SPITZ_GPIO_nSD_WP);
+       return gpio_get_value(SPITZ_GPIO_nSD_WP);
  }
  
  static void spitz_mci_exit(struct device *dev, void *data)
  {
        free_irq(SPITZ_IRQ_GPIO_nSD_DETECT, data);
+       gpio_free(SPITZ_GPIO_nSD_WP);
+       gpio_free(SPITZ_GPIO_nSD_DETECT);
  }
  
  static struct pxamci_platform_data spitz_mci_platform_data = {
   */
  static int spitz_ohci_init(struct device *dev)
  {
-       /* Only Port 2 is connected */
-       pxa_gpio_mode(SPITZ_GPIO_USB_CONNECT | GPIO_IN);
-       pxa_gpio_mode(SPITZ_GPIO_USB_HOST | GPIO_OUT);
-       pxa_gpio_mode(SPITZ_GPIO_USB_DEVICE | GPIO_IN);
-       /* Setup USB Port 2 Output Control Register */
-       UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE;
-       GPSR(SPITZ_GPIO_USB_HOST) = GPIO_bit(SPITZ_GPIO_USB_HOST);
+       int err;
  
-       UHCHR = (UHCHR) &
-               ~(UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSEP3 | UHCHR_SSE);
+       err = gpio_request(SPITZ_GPIO_USB_HOST, "USB_HOST");
+       if (err)
+               return err;
  
-       UHCRHDA |= UHCRHDA_NOCP;
+       /* Only Port 2 is connected
+        * Setup USB Port 2 Output Control Register
+        */
+       UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE;
  
-       return 0;
+       return gpio_direction_output(SPITZ_GPIO_USB_HOST, 1);
  }
  
  static struct pxaohci_platform_data spitz_ohci_platform_data = {
        .port_mode      = PMM_NPS_MODE,
        .init           = spitz_ohci_init,
+       .flags          = ENABLE_PORT_ALL | NO_OC_PROTECTION,
        .power_budget   = 150,
  };
  
  /*
   * Irda
   */
+ static int spitz_irda_startup(struct device *dev)
+ {
+       int rc;
+       rc = gpio_request(SPITZ_GPIO_IR_ON, "IrDA on");
+       if (rc)
+               goto err;
+       rc = gpio_direction_output(SPITZ_GPIO_IR_ON, 1);
+       if (rc)
+               goto err_dir;
+       return 0;
+ err_dir:
+       gpio_free(SPITZ_GPIO_IR_ON);
+ err:
+       return rc;
+ }
+ static void spitz_irda_shutdown(struct device *dev)
+ {
+       gpio_free(SPITZ_GPIO_IR_ON);
+ }
  static void spitz_irda_transceiver_mode(struct device *dev, int mode)
  {
-       if (mode & IR_OFF)
-               set_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON);
-       else
-               reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON);
+       gpio_set_value(SPITZ_GPIO_IR_ON, mode & IR_OFF);
        pxa2xx_transceiver_mode(dev, mode);
  }
  
  #ifdef CONFIG_MACH_AKITA
  static void akita_irda_transceiver_mode(struct device *dev, int mode)
  {
-       if (mode & IR_OFF)
-               akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON);
-       else
-               akita_reset_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON);
+       gpio_set_value(AKITA_GPIO_IR_ON, mode & IR_OFF);
        pxa2xx_transceiver_mode(dev, mode);
  }
  #endif
  
  static struct pxaficp_platform_data spitz_ficp_platform_data = {
-       .transceiver_cap  = IR_SIRMODE | IR_OFF,
-       .transceiver_mode = spitz_irda_transceiver_mode,
+       .transceiver_cap        = IR_SIRMODE | IR_OFF,
+       .transceiver_mode       = spitz_irda_transceiver_mode,
+       .startup                = spitz_irda_startup,
+       .shutdown               = spitz_irda_shutdown,
  };
  
  
   * Spitz PXA Framebuffer
   */
  
- static void spitz_lcd_power(int on, struct fb_var_screeninfo *var)
- {
-       if (on)
-               corgi_lcdtg_hw_init(var->xres);
-       else
-               corgi_lcdtg_suspend();
- }
  static struct pxafb_mode_info spitz_pxafb_modes[] = {
  {
        .pixclock       = 19231,
@@@ -517,18 -592,13 +592,13 @@@ static struct pxafb_mach_info spitz_pxa
        .modes          = &spitz_pxafb_modes[0],
        .num_modes      = 2,
        .fixed_modes    = 1,
-       .lccr0          = LCCR0_Color | LCCR0_Sngl | LCCR0_Act | LCCR0_LDDALT | LCCR0_OUC | LCCR0_CMDIM | LCCR0_RDSTM,
-       .lccr3          = LCCR3_PixRsEdg | LCCR3_OutEnH,
-       .pxafb_lcd_power = spitz_lcd_power,
+       .lcd_conn       = LCD_COLOR_TFT_16BPP | LCD_ALTERNATE_MAPPING,
  };
  
  
  static struct platform_device *devices[] __initdata = {
        &spitzscoop_device,
-       &spitzssp_device,
        &spitzkbd_device,
-       &spitzts_device,
-       &spitzbl_device,
        &spitzled_device,
  };
  
@@@ -554,57 -624,26 +624,26 @@@ static void __init common_init(void
  
        PMCR = 0x00;
  
-       /* setup sleep mode values */
-       PWER  = 0x00000002;
-       PFER  = 0x00000000;
-       PRER  = 0x00000002;
-       PGSR0 = 0x0158C000;
-       PGSR1 = 0x00FF0080;
-       PGSR2 = 0x0001C004;
        /* Stop 3.6MHz and drive HIGH to PCMCIA and CS */
        PCFR |= PCFR_OPDE;
  
-       corgi_ssp_set_machinfo(&spitz_ssp_machinfo);
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(spitz_pin_config));
  
-       pxa_gpio_mode(SPITZ_GPIO_HSYNC | GPIO_IN);
+       spitz_init_spi();
  
        platform_add_devices(devices, ARRAY_SIZE(devices));
        pxa_set_mci_info(&spitz_mci_platform_data);
        pxa_set_ohci_info(&spitz_ohci_platform_data);
        pxa_set_ficp_info(&spitz_ficp_platform_data);
-       set_pxa_fb_parent(&spitzssp_device.dev);
        set_pxa_fb_info(&spitz_pxafb_info);
        pxa_set_i2c_info(NULL);
  }
  
  #if defined(CONFIG_MACH_SPITZ) || defined(CONFIG_MACH_BORZOI)
- static void spitz_bl_set_intensity(int intensity)
- {
-       if (intensity > 0x10)
-               intensity += 0x10;
-       /* Bits 0-4 are accessed via the SSP interface */
-       corgi_ssp_blduty_set(intensity & 0x1f);
-       /* Bit 5 is via SCOOP */
-       if (intensity & 0x0020)
-               reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_BACKLIGHT_CONT);
-       else
-               set_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_BACKLIGHT_CONT);
-       if (intensity)
-               set_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_BACKLIGHT_ON);
-       else
-               reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_BACKLIGHT_ON);
- }
  static void __init spitz_init(void)
  {
        platform_scoop_config = &spitz_pcmcia_config;
  
-       spitz_bl_machinfo.set_bl_intensity = spitz_bl_set_intensity;
        common_init();
  
        platform_device_register(&spitzscoop2_device);
  /*
   * Akita IO Expander
   */
- struct platform_device akitaioexp_device = {
-       .name           = "akita-ioexp",
-       .id             = -1,
+ static struct pca953x_platform_data akita_ioexp = {
+       .gpio_base              = AKITA_IOEXP_GPIO_BASE,
  };
  
- EXPORT_SYMBOL_GPL(akitaioexp_device);
- static void akita_bl_set_intensity(int intensity)
- {
-       if (intensity > 0x10)
-               intensity += 0x10;
-       /* Bits 0-4 are accessed via the SSP interface */
-       corgi_ssp_blduty_set(intensity & 0x1f);
-       /* Bit 5 is via IO-Expander */
-       if (intensity & 0x0020)
-               akita_reset_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_BACKLIGHT_CONT);
-       else
-               akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_BACKLIGHT_CONT);
-       if (intensity)
-               akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_BACKLIGHT_ON);
-       else
-               akita_reset_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_BACKLIGHT_ON);
- }
+ static struct i2c_board_info akita_i2c_board_info[] = {
+       {
+               .type           = "max7310",
+               .addr           = 0x18,
+               .platform_data  = &akita_ioexp,
+       },
+ };
  
  static void __init akita_init(void)
  {
        /* We just pretend the second element of the array doesn't exist */
        spitz_pcmcia_config.num_devs = 1;
        platform_scoop_config = &spitz_pcmcia_config;
-       spitz_bl_machinfo.set_bl_intensity = akita_bl_set_intensity;
  
-       platform_device_register(&akitaioexp_device);
+       pxa_set_i2c_info(NULL);
+       i2c_register_board_info(0, ARRAY_AND_SIZE(akita_i2c_board_info));
  
-       spitzscoop_device.dev.parent = &akitaioexp_device.dev;
        common_init();
  }
  #endif
index 604224a2d9a6136eb295d9dd86aa13e8eca87fd9,44140bd99ed31a5c6af2aacc5a0e6d2ecd62f8f5..75738000272be89f69c3e4fd8b6c725a97e0644f
  #include <linux/module.h>
  #include <linux/ioport.h>
  #include <linux/sysdev.h>
 +#include <linux/io.h>
  
  #include <asm/mach-types.h>
  
  #include <mach/hardware.h>
  #include <asm/irq.h>
 -#include <asm/io.h>
  
  #include <asm/mach/irq.h>
  
@@@ -130,8 -130,7 +130,7 @@@ bast_irq_pc104_demux(unsigned int irq
                for (i = 0; stat != 0; i++, stat >>= 1) {
                        if (stat & 1) {
                                irqno = bast_pc104_irqs[i];
-                               desc = irq_desc + irqno;
-                               desc_handle_irq(irqno, desc);
+                               generic_handle_irq(irqno);
                        }
                }
        }
index 1686950fa557cdecee49802630be838a30fee4d4,72159d31966e9e0c0c1a005d21c97c65c7605815..41720f2c1fea8eb3d1ccb52ac181a4540c76061d
  #include <linux/interrupt.h>
  #include <linux/ioport.h>
  #include <linux/sysdev.h>
 +#include <linux/io.h>
  
  #include <mach/hardware.h>
  #include <asm/irq.h>
 -#include <asm/io.h>
  
  #include <asm/mach/irq.h>
  
@@@ -123,10 -123,10 +123,10 @@@ static void s3c2412_irq_demux_cfsdi(uns
        subsrc  &= ~submsk;
  
        if (subsrc & INTBIT(IRQ_S3C2412_SDI))
-               desc_handle_irq(IRQ_S3C2412_SDI, irq_desc + IRQ_S3C2412_SDI);
+               generic_handle_irq(IRQ_S3C2412_SDI);
  
        if (subsrc & INTBIT(IRQ_S3C2412_CF))
-               desc_handle_irq(IRQ_S3C2412_CF, irq_desc + IRQ_S3C2412_CF);
+               generic_handle_irq(IRQ_S3C2412_CF);
  }
  
  #define INTMSK_CFSDI  (1UL << (IRQ_S3C2412_CFSDI - IRQ_EINT0))
index 93fff75220cfa06287e11d39fd1df51a694916bd,ad68b4d88353ca274a4ad65051e95959699f81d4..33e3ede0a2b32d3623c31ec06390b29e51c5b99c
  #include <linux/interrupt.h>
  #include <linux/ioport.h>
  #include <linux/sysdev.h>
 +#include <linux/io.h>
  
  #include <mach/hardware.h>
  #include <asm/irq.h>
 -#include <asm/io.h>
  
  #include <asm/mach/irq.h>
  
@@@ -44,7 -44,6 +44,6 @@@ static void s3c_irq_demux_wdtac97(unsig
                                  struct irq_desc *desc)
  {
        unsigned int subsrc, submsk;
-       struct irq_desc *mydesc;
  
        /* read the current pending interrupts, and the mask
         * for what it is available */
  
        if (subsrc != 0) {
                if (subsrc & 1) {
-                       mydesc = irq_desc + IRQ_S3C2440_WDT;
-                       desc_handle_irq(IRQ_S3C2440_WDT, mydesc);
+                       generic_handle_irq(IRQ_S3C2440_WDT);
                }
                if (subsrc & 2) {
-                       mydesc = irq_desc + IRQ_S3C2440_AC97;
-                       desc_handle_irq(IRQ_S3C2440_AC97, mydesc);
+                       generic_handle_irq(IRQ_S3C2440_AC97);
                }
        }
  }
index bd89c8361b3c0abb6a0328941265daa8150c293e,1570d3a6e15fd106acbf277db8aade1fc06f2f3d..e44341d7dfef91189ad960cbcc8264357879eecd
  #include <linux/interrupt.h>
  #include <linux/ioport.h>
  #include <linux/sysdev.h>
 +#include <linux/io.h>
  
  #include <mach/hardware.h>
  #include <asm/irq.h>
 -#include <asm/io.h>
  
  #include <asm/mach/irq.h>
  
@@@ -44,7 -44,6 +44,6 @@@ static inline void s3c2443_irq_demux(un
  {
        unsigned int subsrc, submsk;
        unsigned int end;
-       struct irq_desc *mydesc;
  
        /* read the current pending interrupts, and the mask
         * for what it is available */
        subsrc  &= (1 << len)-1;
  
        end = len + irq;
-       mydesc = irq_desc + irq;
  
        for (; irq < end && subsrc; irq++) {
                if (subsrc & 1)
-                       desc_handle_irq(irq, mydesc);
+                       generic_handle_irq(irq);
  
-               mydesc++;
                subsrc >>= 1;
        }
  }
index 534f93282177034145f05c4f3549b1f894ab40cd,c3468bf2841e6a53305ab6dc4732a0b7ea595748..824121d52b8d1d20fe2365c615345022c757fc2b
  #include <linux/amba/clcd.h>
  #include <linux/clocksource.h>
  #include <linux/clockchips.h>
 +#include <linux/io.h>
  
  #include <asm/cnt32_to_63.h>
  #include <asm/system.h>
  #include <mach/hardware.h>
 -#include <asm/io.h>
  #include <asm/irq.h>
  #include <asm/leds.h>
  #include <asm/hardware/arm_timer.h>
@@@ -95,8 -95,7 +95,7 @@@ sic_handle_irq(unsigned int irq, struc
  
                irq += IRQ_SIC_START;
  
-               desc = irq_desc + irq;
-               desc_handle_irq(irq, desc);
+               generic_handle_irq(irq);
        } while (status);
  }
  
index 5764bce98cf37fd7bef2e3f0c5c7af9fe9f3b823,960040aa71f729f155f3f18e69bce5f67095e9f6..5935ae4e550b4f5514a211d897827f933e592295
@@@ -17,7 -17,6 +17,7 @@@
  #include <linux/sysdev.h>
  #include <linux/err.h>
  #include <linux/clk.h>
 +#include <linux/io.h>
  
  #include <mach/hardware.h>
  #include <asm/irq.h>
@@@ -25,6 -24,8 +25,6 @@@
  #include <mach/gpio.h>
  #include <asm/mach/irq.h>
  
 -#include <asm/io.h>
 -
  /*
   * OMAP1510 GPIO registers
   */
@@@ -1050,13 -1051,10 +1050,10 @@@ static void gpio_irq_handler(unsigned i
  
                gpio_irq = bank->virtual_irq_start;
                for (; isr != 0; isr >>= 1, gpio_irq++) {
-                       struct irq_desc *d;
                        if (!(isr & 1))
                                continue;
-                       d = irq_desc + gpio_irq;
  
-                       desc_handle_irq(gpio_irq, d);
+                       generic_handle_irq(gpio_irq);
                }
        }
        /* if bank has any level sensitive GPIO pin interrupt
index fa70d34eb4a5911713be517b1fe8cda6eed4e3a7,b6c84f4f7a12f136fea01ee76cba1f7fb5669806..590fc5a3ab06e8710b295a7cc5cdc80959654c98
  #include <linux/interrupt.h>
  #include <linux/ioport.h>
  #include <linux/sysdev.h>
 +#include <linux/io.h>
  
  #include <mach/hardware.h>
  #include <asm/irq.h>
 -#include <asm/io.h>
  
  #include <asm/mach/irq.h>
  
@@@ -468,7 -468,6 +468,6 @@@ static void s3c_irq_demux_adc(unsigned 
  {
        unsigned int subsrc, submsk;
        unsigned int offset = 9;
-       struct irq_desc *mydesc;
  
        /* read the current pending interrupts, and the mask
         * for what it is available */
  
        if (subsrc != 0) {
                if (subsrc & 1) {
-                       mydesc = irq_desc + IRQ_TC;
-                       desc_handle_irq(IRQ_TC, mydesc);
+                       generic_handle_irq(IRQ_TC);
                }
                if (subsrc & 2) {
-                       mydesc = irq_desc + IRQ_ADC;
-                       desc_handle_irq(IRQ_ADC, mydesc);
+                       generic_handle_irq(IRQ_ADC);
                }
        }
  }
@@@ -496,7 -493,6 +493,6 @@@ static void s3c_irq_demux_uart(unsigne
  {
        unsigned int subsrc, submsk;
        unsigned int offset = start - IRQ_S3CUART_RX0;
-       struct irq_desc *desc;
  
        /* read the current pending interrupts, and the mask
         * for what it is available */
        subsrc &= 7;
  
        if (subsrc != 0) {
-               desc = irq_desc + start;
                if (subsrc & 1)
-                       desc_handle_irq(start, desc);
-               desc++;
+                       generic_handle_irq(start);
  
                if (subsrc & 2)
-                       desc_handle_irq(start+1, desc);
-               desc++;
+                       generic_handle_irq(start+1);
  
                if (subsrc & 4)
-                       desc_handle_irq(start+2, desc);
+                       generic_handle_irq(start+2);
        }
  }
  
@@@ -572,7 -562,7 +562,7 @@@ s3c_irq_demux_extint8(unsigned int irq
                eintpnd &= ~(1<<irq);
  
                irq += (IRQ_EINT4 - 4);
-               desc_handle_irq(irq, irq_desc + irq);
+               generic_handle_irq(irq);
        }
  
  }
@@@ -595,7 -585,7 +585,7 @@@ s3c_irq_demux_extint4t7(unsigned int ir
  
                irq += (IRQ_EINT4 - 4);
  
-               desc_handle_irq(irq, irq_desc + irq);
+               generic_handle_irq(irq);
        }
  }
  
index 13bc655e1b6e03ccc7ea5776dd8c9074e887694c,1e094fcb45a51dc08cba328823dbb82560db5ead..0601c5f3230bdd84700aa3b4b4e93568afb71422
  #include <linux/interrupt.h>
  #include <linux/ioport.h>
  #include <linux/sysdev.h>
 +#include <linux/io.h>
  
  #include <mach/hardware.h>
  #include <asm/irq.h>
 -#include <asm/io.h>
  
  #include <asm/mach/irq.h>
  
@@@ -44,7 -44,6 +44,6 @@@ static void s3c_irq_demux_cam(unsigned 
                              struct irq_desc *desc)
  {
        unsigned int subsrc, submsk;
-       struct irq_desc *mydesc;
  
        /* read the current pending interrupts, and the mask
         * for what it is available */
  
        if (subsrc != 0) {
                if (subsrc & 1) {
-                       mydesc = irq_desc + IRQ_S3C2440_CAM_C;
-                       desc_handle_irq(IRQ_S3C2440_CAM_C, mydesc);
+                       generic_handle_irq(IRQ_S3C2440_CAM_C);
                }
                if (subsrc & 2) {
-                       mydesc = irq_desc + IRQ_S3C2440_CAM_P;
-                       desc_handle_irq(IRQ_S3C2440_CAM_P, mydesc);
+                       generic_handle_irq(IRQ_S3C2440_CAM_P);
                }
        }
  }