]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel
authorLinus Torvalds <torvalds@g5.osdl.org>
Mon, 31 Oct 2005 15:32:56 +0000 (07:32 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 31 Oct 2005 15:32:56 +0000 (07:32 -0800)
Manual #include fixups for clashes - there may be some unnecessary

37 files changed:
1  2 
arch/arm/common/scoop.c
arch/arm/mach-imx/generic.c
arch/arm/mach-integrator/integrator_ap.c
arch/arm/mach-pxa/corgi.c
arch/arm/mach-pxa/generic.c
arch/arm/mach-pxa/poodle.c
arch/arm/mach-pxa/spitz.c
arch/arm/mach-sa1100/generic.c
arch/arm/mach-sa1100/jornada720.c
arch/mips/au1000/common/platform.c
arch/ppc/platforms/chrp_pegasos_eth.c
arch/ppc/platforms/ev64360.c
arch/ppc/platforms/hdpu.c
arch/ppc/platforms/katana.c
arch/ppc/platforms/radstone_ppc7d.c
arch/ppc/syslib/mv64x60.c
arch/ppc/syslib/pq2_devices.c
drivers/base/platform.c
drivers/mmc/pxamci.c
drivers/mtd/maps/bast-flash.c
drivers/mtd/maps/ixp2000.c
drivers/mtd/maps/ixp4xx.c
drivers/mtd/maps/omap_nor.c
drivers/mtd/maps/plat-ram.c
drivers/mtd/maps/sa1100-flash.c
drivers/mtd/nand/s3c2410.c
drivers/net/irda/pxaficp_ir.c
drivers/net/irda/smsc-ircc2.c
drivers/net/mv643xx_eth.c
drivers/net/smc91x.c
drivers/pcmcia/au1000_generic.c
drivers/pcmcia/pxa2xx_sharpsl.c
drivers/pcmcia/sa1100_generic.c
drivers/serial/mpsc.c
drivers/usb/host/ohci-omap.c
drivers/usb/host/ohci-pxa27x.c
drivers/video/gbefb.c

diff --combined arch/arm/common/scoop.c
index 4af0cf5f3bfbc8d4f8fce84fc508f465c6ddf10a,68b06d16f2535ec9eab25264a3fe1d70dad5bea5..bb4eff61441307458f92a104b0fa655542e118b7
   *
   */
  
- #include <linux/slab.h>
 +#include <linux/device.h>
 +#include <linux/string.h>
+ #include <linux/platform_device.h>
  #include <asm/io.h>
  #include <asm/hardware/scoop.h>
  
index 837d7f0bda4c8f9b610064551414e66f1cf5a213,60e2361e98e80d76c8bfd02be2856a95dcb761d6..37613ad68366eda2615d384501dbcfc4dbb6ffa7
   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   *
   */
- #include <linux/device.h>
+ #include <linux/platform_device.h>
  #include <linux/init.h>
  #include <linux/kernel.h>
  #include <linux/module.h>
 +#include <linux/string.h>
 +
  #include <asm/arch/imxfb.h>
  #include <asm/hardware.h>
  #include <asm/arch/imx-regs.h>
index 764ceb49470a88975044d383cfe90e083fd77c70,1f9061ca7ef4821ab7efbad7549d54331d314f2d..4c0f7c65facf93f215e510d628b9c17d9cdbcb00
@@@ -21,7 -21,7 +21,7 @@@
  #include <linux/kernel.h>
  #include <linux/init.h>
  #include <linux/list.h>
- #include <linux/device.h>
+ #include <linux/platform_device.h>
  #include <linux/slab.h>
  #include <linux/string.h>
  #include <linux/sysdev.h>
@@@ -30,7 -30,6 +30,7 @@@
  #include <asm/io.h>
  #include <asm/irq.h>
  #include <asm/setup.h>
 +#include <asm/param.h>                /* HZ */
  #include <asm/mach-types.h>
  #include <asm/hardware/amba.h>
  #include <asm/hardware/amba_kmi.h>
index 656f73bbcb5a9d6c80fb130b95c1cf6e954764ce,247147f29b9352ba2338fbad99ec648cdc4f54d4..eb5f6d744a4a77778d290ba063b18cccd01973d5
@@@ -14,7 -14,7 +14,7 @@@
  
  #include <linux/kernel.h>
  #include <linux/init.h>
- #include <linux/device.h>
+ #include <linux/platform_device.h>
  #include <linux/major.h>
  #include <linux/fs.h>
  #include <linux/interrupt.h>
@@@ -33,7 -33,6 +33,7 @@@
  
  #include <asm/arch/pxa-regs.h>
  #include <asm/arch/irq.h>
 +#include <asm/arch/irda.h>
  #include <asm/arch/mmc.h>
  #include <asm/arch/udc.h>
  #include <asm/arch/corgi.h>
@@@ -225,22 -224,6 +225,22 @@@ static struct pxamci_platform_data corg
  };
  
  
 +/*
 + * Irda
 + */
 +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);
 +}
 +
 +static struct pxaficp_platform_data corgi_ficp_platform_data = {
 +      .transceiver_cap  = IR_SIRMODE | IR_OFF,
 +      .transceiver_mode = corgi_irda_transceiver_mode,
 +};
 +
  
  /*
   * USB Device Controller
@@@ -286,13 -269,10 +286,13 @@@ static void __init corgi_init(void
  
        corgi_ssp_set_machinfo(&corgi_ssp_machinfo);
  
 +      pxa_gpio_mode(CORGI_GPIO_IR_ON | GPIO_OUT);
        pxa_gpio_mode(CORGI_GPIO_USB_PULLUP | GPIO_OUT);
        pxa_gpio_mode(CORGI_GPIO_HSYNC | GPIO_IN);
 +
        pxa_set_udc_info(&udc_info);
        pxa_set_mci_info(&corgi_mci_platform_data);
 +      pxa_set_ficp_info(&corgi_ficp_platform_data);
  
        scoop_num = 1;
        scoop_devs = &corgi_pcmcia_scoop[0];
index 9c0289333301e9c5f0c0dc252c9990fbd20a8646,afd5063b0ebe7bafd383a4395542f4cebe3d462b..9b48a90aefce9d4a25910f513d190c1e7ae7d8c5
  #include <linux/kernel.h>
  #include <linux/init.h>
  #include <linux/delay.h>
- #include <linux/device.h>
+ #include <linux/platform_device.h>
  #include <linux/ioport.h>
  #include <linux/pm.h>
 +#include <linux/string.h>
  
  #include <asm/hardware.h>
  #include <asm/irq.h>
index 6d413f6701a77ebd8afdeba39ec4a09fd1118081,86326307ab9f7de132be93965f33cb62eeb9aa1f..ad6a13f95a62cfcae51bc94ffc2fd1f243f17be7
@@@ -16,7 -16,7 +16,7 @@@
   */
  #include <linux/kernel.h>
  #include <linux/init.h>
- #include <linux/device.h>
+ #include <linux/platform_device.h>
  #include <linux/fb.h>
  
  #include <asm/hardware.h>
@@@ -32,7 -32,6 +32,7 @@@
  #include <asm/arch/irq.h>
  #include <asm/arch/mmc.h>
  #include <asm/arch/udc.h>
 +#include <asm/arch/irda.h>
  #include <asm/arch/poodle.h>
  #include <asm/arch/pxafb.h>
  
@@@ -152,24 -151,6 +152,24 @@@ static struct pxamci_platform_data pood
  };
  
  
 +/*
 + * Irda
 + */
 +static void poodle_irda_transceiver_mode(struct device *dev, int mode)
 +{
 +      if (mode & IR_OFF) {
 +              GPSR(POODLE_GPIO_IR_ON) = GPIO_bit(POODLE_GPIO_IR_ON);
 +      } else {
 +              GPCR(POODLE_GPIO_IR_ON) = GPIO_bit(POODLE_GPIO_IR_ON);
 +      }
 +}
 +
 +static struct pxaficp_platform_data poodle_ficp_platform_data = {
 +      .transceiver_cap  = IR_SIRMODE | IR_OFF,
 +      .transceiver_mode = poodle_irda_transceiver_mode,
 +};
 +
 +
  /*
   * USB Device Controller
   */
@@@ -263,10 -244,8 +263,10 @@@ static void __init poodle_init(void
  
        set_pxa_fb_info(&poodle_fb_info);
        pxa_gpio_mode(POODLE_GPIO_USB_PULLUP | GPIO_OUT);
 +      pxa_gpio_mode(POODLE_GPIO_IR_ON | GPIO_OUT);
        pxa_set_udc_info(&udc_info);
        pxa_set_mci_info(&poodle_mci_platform_data);
 +      pxa_set_ficp_info(&poodle_ficp_platform_data);
  
        scoop_num = 1;
        scoop_devs = &poodle_pcmcia_scoop[0];
index b838842b6a2050438cc351698cbf63a54ae68778,4182ddf330dae68c1c38c6a98e7c484bfe56b329..6c6878cd2207db94f3b70343beef634fbb6491f2
@@@ -14,7 -14,7 +14,7 @@@
  
  #include <linux/kernel.h>
  #include <linux/init.h>
- #include <linux/device.h>
+ #include <linux/platform_device.h>
  #include <linux/delay.h>
  #include <linux/major.h>
  #include <linux/fs.h>
@@@ -34,7 -34,6 +34,7 @@@
  
  #include <asm/arch/pxa-regs.h>
  #include <asm/arch/irq.h>
 +#include <asm/arch/irda.h>
  #include <asm/arch/mmc.h>
  #include <asm/arch/udc.h>
  #include <asm/arch/pxafb.h>
@@@ -277,23 -276,6 +277,23 @@@ static struct pxamci_platform_data spit
  };
  
  
 +/*
 + * Irda
 + */
 +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);
 +}
 +
 +static struct pxaficp_platform_data spitz_ficp_platform_data = {
 +      .transceiver_cap  = IR_SIRMODE | IR_OFF,
 +      .transceiver_mode = spitz_irda_transceiver_mode,
 +};
 +
 +
  /*
   * Spitz PXA Framebuffer
   */
@@@ -344,7 -326,6 +344,7 @@@ static void __init common_init(void
  
        platform_add_devices(devices, ARRAY_SIZE(devices));
        pxa_set_mci_info(&spitz_mci_platform_data);
 +      pxa_set_ficp_info(&spitz_ficp_platform_data);
        set_pxa_fb_parent(&spitzssp_device.dev);
        set_pxa_fb_info(&spitz_pxafb_info);
  }
index 83eba8b54816681f217807dd2ef0dccd76d10288,976380bde4172d5552b368ea1eb983b528f81fd7..2abdc419e9848a8056918d62cdb72a1841bdb806
  #include <linux/pm.h>
  #include <linux/cpufreq.h>
  #include <linux/ioport.h>
 +#include <linux/sched.h>      /* just for sched_clock() - funny that */
+ #include <linux/platform_device.h>
  
  #include <asm/div64.h>
  #include <asm/hardware.h>
  #include <asm/system.h>
  #include <asm/pgtable.h>
  #include <asm/mach/map.h>
 +#include <asm/mach/flash.h>
  #include <asm/irq.h>
  
  #include "generic.h"
@@@ -285,7 -284,6 +286,7 @@@ static struct platform_device sa11x0mtd
  void sa11x0_set_flash_data(struct flash_platform_data *flash,
                           struct resource *res, int nr)
  {
 +      flash->name = "sa1100";
        sa11x0mtd_device.dev.platform_data = flash;
        sa11x0mtd_device.resource = res;
        sa11x0mtd_device.num_resources = nr;
index 89af0c831e8fde6621856dec34c23dc0dfef774b,9fb65cffa5788b46ac662e9caf1f1787916b7260..2f671cc3cb99f793a1a186ccae7eeffebd699883
@@@ -6,10 -6,8 +6,10 @@@
  #include <linux/kernel.h>
  #include <linux/tty.h>
  #include <linux/delay.h>
- #include <linux/device.h>
+ #include <linux/platform_device.h>
  #include <linux/ioport.h>
 +#include <linux/mtd/mtd.h>
 +#include <linux/mtd/partitions.h>
  
  #include <asm/hardware.h>
  #include <asm/hardware/sa1111.h>
@@@ -18,7 -16,6 +18,7 @@@
  #include <asm/setup.h>
  
  #include <asm/mach/arch.h>
 +#include <asm/mach/flash.h>
  #include <asm/mach/map.h>
  #include <asm/mach/serial_sa1100.h>
  
@@@ -111,66 -108,6 +111,66 @@@ static void __init jornada720_map_io(vo
        sa1100_register_uart(1, 1);
  }
  
 +static struct mtd_partition jornada720_partitions[] = {
 +      {
 +              .name           = "JORNADA720 boot firmware",
 +              .size           = 0x00040000,
 +              .offset         = 0,
 +              .mask_flags     = MTD_WRITEABLE,  /* force read-only */
 +      }, {
 +              .name           = "JORNADA720 kernel",
 +              .size           = 0x000c0000,
 +              .offset         = 0x00040000,
 +      }, {
 +              .name           = "JORNADA720 params",
 +              .size           = 0x00040000,
 +              .offset         = 0x00100000,
 +      }, {
 +              .name           = "JORNADA720 initrd",
 +              .size           = 0x00100000,
 +              .offset         = 0x00140000,
 +      }, {
 +              .name           = "JORNADA720 root cramfs",
 +              .size           = 0x00300000,
 +              .offset         = 0x00240000,
 +      }, {
 +              .name           = "JORNADA720 usr cramfs",
 +              .size           = 0x00800000,
 +              .offset         = 0x00540000,
 +      }, {
 +              .name           = "JORNADA720 usr local",
 +              .size           = 0,  /* will expand to the end of the flash */
 +              .offset         = 0x00d00000,
 +      }
 +};
 +
 +static void jornada720_set_vpp(int vpp)
 +{
 +      if (vpp)
 +              PPSR |= 0x80;
 +      else
 +              PPSR &= ~0x80;
 +      PPDR |= 0x80;
 +}
 +
 +static struct flash_platform_data jornada720_flash_data = {
 +      .map_name       = "cfi_probe",
 +      .set_vpp        = jornada720_set_vpp,
 +      .parts          = jornada720_partitions,
 +      .nr_parts       = ARRAY_SIZE(jornada720_partitions),
 +};
 +
 +static struct resource jornada720_flash_resource = {
 +      .start          = SA1100_CS0_PHYS,
 +      .end            = SA1100_CS0_PHYS + SZ_32M - 1,
 +      .flags          = IORESOURCE_MEM,
 +};
 +
 +static void __init jornada720_mach_init(void)
 +{
 +      sa11x0_set_flash_data(&jornada720_flash_data, &jornada720_flash_resource, 1);
 +}
 +
  MACHINE_START(JORNADA720, "HP Jornada 720")
        /* Maintainer: Michael Gernoth <michael@gernoth.net> */
        .phys_ram       = 0xc0000000,
        .map_io         = jornada720_map_io,
        .init_irq       = sa1100_init_irq,
        .timer          = &sa1100_timer,
 +      .init_machine   = jornada720_mach_init,
  MACHINE_END
index 1f7b465c8038bab56d5d7d1346544eeb9cc6b733,3c778d0f58a6acd3fa73ff1820eead603bc38a3c..48d3f54f88f88e23bfb4a134cb9a2fd4c12416c8
@@@ -7,15 -7,13 +7,16 @@@
   * License version 2.  This program is licensed "as is" without any
   * warranty of any kind, whether express or implied.
   */
 +#include <linux/config.h>
 +#include <linux/device.h>
+ #include <linux/platform_device.h>
  #include <linux/kernel.h>
  #include <linux/init.h>
  #include <linux/resource.h>
  
 -#include <asm/mach-au1x00/au1000.h>
 +#include <asm/mach-au1x00/au1xxx.h>
  
 +/* OHCI (USB full speed host controller) */
  static struct resource au1xxx_usb_ohci_resources[] = {
        [0] = {
                .start          = USB_OHCI_BASE,
@@@ -43,252 -41,8 +44,252 @@@ static struct platform_device au1xxx_us
        .resource       = au1xxx_usb_ohci_resources,
  };
  
 +/*** AU1100 LCD controller ***/
 +
 +#ifdef CONFIG_FB_AU1100
 +static struct resource au1100_lcd_resources[] = {
 +      [0] = {
 +              .start          = LCD_PHYS_ADDR,
 +              .end            = LCD_PHYS_ADDR + 0x800 - 1,
 +              .flags          = IORESOURCE_MEM,
 +      },
 +      [1] = {
 +              .start          = AU1100_LCD_INT,
 +              .end            = AU1100_LCD_INT,
 +              .flags          = IORESOURCE_IRQ,
 +      }
 +};
 +
 +static u64 au1100_lcd_dmamask = ~(u32)0;
 +
 +static struct platform_device au1100_lcd_device = {
 +      .name           = "au1100-lcd",
 +      .id             = 0,
 +      .dev = {
 +              .dma_mask               = &au1100_lcd_dmamask,
 +              .coherent_dma_mask      = 0xffffffff,
 +      },
 +      .num_resources  = ARRAY_SIZE(au1100_lcd_resources),
 +      .resource       = au1100_lcd_resources,
 +};
 +#endif
 +
 +#ifdef CONFIG_SOC_AU1200
 +/* EHCI (USB high speed host controller) */
 +static struct resource au1xxx_usb_ehci_resources[] = {
 +      [0] = {
 +              .start          = USB_EHCI_BASE,
 +              .end            = USB_EHCI_BASE + USB_EHCI_LEN - 1,
 +              .flags          = IORESOURCE_MEM,
 +      },
 +      [1] = {
 +              .start          = AU1000_USB_HOST_INT,
 +              .end            = AU1000_USB_HOST_INT,
 +              .flags          = IORESOURCE_IRQ,
 +      },
 +};
 +
 +static u64 ehci_dmamask = ~(u32)0;
 +
 +static struct platform_device au1xxx_usb_ehci_device = {
 +      .name           = "au1xxx-ehci",
 +      .id             = 0,
 +      .dev = {
 +              .dma_mask               = &ehci_dmamask,
 +              .coherent_dma_mask      = 0xffffffff,
 +      },
 +      .num_resources  = ARRAY_SIZE(au1xxx_usb_ehci_resources),
 +      .resource       = au1xxx_usb_ehci_resources,
 +};
 +
 +/* Au1200 UDC (USB gadget controller) */
 +static struct resource au1xxx_usb_gdt_resources[] = {
 +      [0] = {
 +              .start          = USB_UDC_BASE,
 +              .end            = USB_UDC_BASE + USB_UDC_LEN - 1,
 +              .flags          = IORESOURCE_MEM,
 +      },
 +      [1] = {
 +              .start          = AU1200_USB_INT,
 +              .end            = AU1200_USB_INT,
 +              .flags          = IORESOURCE_IRQ,
 +      },
 +};
 +
 +static struct resource au1xxx_mmc_resources[] = {
 +      [0] = {
 +              .start          = SD0_PHYS_ADDR,
 +              .end            = SD0_PHYS_ADDR + 0x40,
 +              .flags          = IORESOURCE_MEM,
 +      },
 +      [1] = {
 +              .start          = SD1_PHYS_ADDR,
 +              .end            = SD1_PHYS_ADDR + 0x40,
 +              .flags          = IORESOURCE_MEM,
 +      },
 +      [2] = {
 +              .start          = AU1200_SD_INT,
 +              .end            = AU1200_SD_INT,
 +              .flags          = IORESOURCE_IRQ,
 +      }
 +};
 +
 +static u64 udc_dmamask = ~(u32)0;
 +
 +static struct platform_device au1xxx_usb_gdt_device = {
 +      .name           = "au1xxx-udc",
 +      .id             = 0,
 +      .dev = {
 +              .dma_mask               = &udc_dmamask,
 +              .coherent_dma_mask      = 0xffffffff,
 +      },
 +      .num_resources  = ARRAY_SIZE(au1xxx_usb_gdt_resources),
 +      .resource       = au1xxx_usb_gdt_resources,
 +};
 +
 +/* Au1200 UOC (USB OTG controller) */
 +static struct resource au1xxx_usb_otg_resources[] = {
 +      [0] = {
 +              .start          = USB_UOC_BASE,
 +              .end            = USB_UOC_BASE + USB_UOC_LEN - 1,
 +              .flags          = IORESOURCE_MEM,
 +      },
 +      [1] = {
 +              .start          = AU1200_USB_INT,
 +              .end            = AU1200_USB_INT,
 +              .flags          = IORESOURCE_IRQ,
 +      },
 +};
 +
 +static u64 uoc_dmamask = ~(u32)0;
 +
 +static struct platform_device au1xxx_usb_otg_device = {
 +      .name           = "au1xxx-uoc",
 +      .id             = 0,
 +      .dev = {
 +              .dma_mask               = &uoc_dmamask,
 +              .coherent_dma_mask      = 0xffffffff,
 +      },
 +      .num_resources  = ARRAY_SIZE(au1xxx_usb_otg_resources),
 +      .resource       = au1xxx_usb_otg_resources,
 +};
 +
 +static struct resource au1200_lcd_resources[] = {
 +      [0] = {
 +              .start          = LCD_PHYS_ADDR,
 +              .end            = LCD_PHYS_ADDR + 0x800 - 1,
 +              .flags          = IORESOURCE_MEM,
 +      },
 +      [1] = {
 +              .start          = AU1200_LCD_INT,
 +              .end            = AU1200_LCD_INT,
 +              .flags          = IORESOURCE_IRQ,
 +      }
 +};
 +
 +static struct resource au1200_ide0_resources[] = {
 +      [0] = {
 +              .start          = AU1XXX_ATA_PHYS_ADDR,
 +              .end            = AU1XXX_ATA_PHYS_ADDR + AU1XXX_ATA_PHYS_LEN,
 +              .flags          = IORESOURCE_MEM,
 +      },
 +      [1] = {
 +              .start          = AU1XXX_ATA_INT,
 +              .end            = AU1XXX_ATA_INT,
 +              .flags          = IORESOURCE_IRQ,
 +      }
 +};
 +
 +static u64 au1200_lcd_dmamask = ~(u32)0;
 +
 +static struct platform_device au1200_lcd_device = {
 +      .name           = "au1200-lcd",
 +      .id             = 0,
 +      .dev = {
 +              .dma_mask               = &au1200_lcd_dmamask,
 +              .coherent_dma_mask      = 0xffffffff,
 +      },
 +      .num_resources  = ARRAY_SIZE(au1200_lcd_resources),
 +      .resource       = au1200_lcd_resources,
 +};
 +
 +
 +static u64 ide0_dmamask = ~(u32)0;
 +
 +static struct platform_device au1200_ide0_device = {
 +      .name           = "au1200-ide",
 +      .id             = 0,
 +      .dev = {
 +              .dma_mask               = &ide0_dmamask,
 +              .coherent_dma_mask      = 0xffffffff,
 +      },
 +      .num_resources = ARRAY_SIZE(au1200_ide0_resources),
 +      .resource       = au1200_ide0_resources,
 +};
 +
 +static u64 au1xxx_mmc_dmamask =  ~(u32)0;
 +
 +static struct platform_device au1xxx_mmc_device = {
 +      .name = "au1xxx-mmc",
 +      .id = 0,
 +      .dev = {
 +              .dma_mask               = &au1xxx_mmc_dmamask,
 +              .coherent_dma_mask      = 0xffffffff,
 +      },
 +      .num_resources  = ARRAY_SIZE(au1xxx_mmc_resources),
 +      .resource       = au1xxx_mmc_resources,
 +};
 +#endif /* #ifdef CONFIG_SOC_AU1200 */
 +
 +static struct platform_device au1x00_pcmcia_device = {
 +      .name           = "au1x00-pcmcia",
 +      .id             = 0,
 +};
 +
 +#ifdef CONFIG_MIPS_DB1200
 +
 +static struct resource smc91x_resources[] = {
 +      [0] = {
 +              .name   = "smc91x-regs",
 +              .start  = AU1XXX_SMC91111_PHYS_ADDR,
 +              .end    = AU1XXX_SMC91111_PHYS_ADDR + 0xfffff,
 +              .flags  = IORESOURCE_MEM,
 +      },
 +      [1] = {
 +              .start  = AU1XXX_SMC91111_IRQ,
 +              .end    = AU1XXX_SMC91111_IRQ,
 +              .flags  = IORESOURCE_IRQ,
 +      },
 +};
 +
 +static struct platform_device smc91x_device = {
 +      .name           = "smc91x",
 +      .id             = -1,
 +      .num_resources  = ARRAY_SIZE(smc91x_resources),
 +      .resource       = smc91x_resources,
 +};
 +
 +#endif
 +
  static struct platform_device *au1xxx_platform_devices[] __initdata = {
        &au1xxx_usb_ohci_device,
 +      &au1x00_pcmcia_device,
 +#ifdef CONFIG_FB_AU1100
 +      &au1100_lcd_device,
 +#endif
 +#ifdef CONFIG_SOC_AU1200
 +#if 0 /* fixme */
 +      &au1xxx_usb_ehci_device,
 +#endif
 +      &au1xxx_usb_gdt_device,
 +      &au1xxx_usb_otg_device,
 +      &au1200_lcd_device,
 +      &au1200_ide0_device,
 +      &au1xxx_mmc_device,
 +#endif
 +#ifdef CONFIG_MIPS_DB1200
 +      &smc91x_device,
 +#endif
  };
  
  int au1xxx_platform_init(void)
index a9052305c35debfcaf0c036b0cad037f9e94ea02,d1af11c73ea16df07270a009dc2ff4642a26d702..108a6e265185b443985e86fe95dced1108e39260
  #include <linux/types.h>
  #include <linux/init.h>
  #include <linux/ioport.h>
- #include <linux/device.h>
+ #include <linux/platform_device.h>
  #include <linux/mv643xx.h>
  #include <linux/pci.h>
  
 -/* Pegasos 2 specific Marvell MV 64361 gigabit ethernet port setup */
 +#define PEGASOS2_MARVELL_REGBASE              (0xf1000000)
 +#define PEGASOS2_MARVELL_REGSIZE              (0x00004000)
 +#define PEGASOS2_SRAM_BASE                    (0xf2000000)
 +#define PEGASOS2_SRAM_SIZE                    (256*1024)
 +
 +#define PEGASOS2_SRAM_BASE_ETH0                       (PEGASOS2_SRAM_BASE)
 +#define PEGASOS2_SRAM_BASE_ETH1                       (PEGASOS2_SRAM_BASE_ETH0 + (PEGASOS2_SRAM_SIZE / 2) )
 +
 +
 +#define PEGASOS2_SRAM_RXRING_SIZE             (PEGASOS2_SRAM_SIZE/4)
 +#define PEGASOS2_SRAM_TXRING_SIZE             (PEGASOS2_SRAM_SIZE/4)
 +
 +#undef BE_VERBOSE
 +
  static struct resource mv643xx_eth_shared_resources[] = {
        [0] = {
                .name   = "ethernet shared base",
@@@ -57,16 -44,7 +57,16 @@@ static struct resource mv643xx_eth0_res
        },
  };
  
 -static struct mv643xx_eth_platform_data eth0_pd;
 +
 +static struct mv643xx_eth_platform_data eth0_pd = {
 +      .tx_sram_addr = PEGASOS2_SRAM_BASE_ETH0,
 +      .tx_sram_size = PEGASOS2_SRAM_TXRING_SIZE,
 +      .tx_queue_size = PEGASOS2_SRAM_TXRING_SIZE/16,
 +
 +      .rx_sram_addr = PEGASOS2_SRAM_BASE_ETH0 + PEGASOS2_SRAM_TXRING_SIZE,
 +      .rx_sram_size = PEGASOS2_SRAM_RXRING_SIZE,
 +      .rx_queue_size = PEGASOS2_SRAM_RXRING_SIZE/16,
 +};
  
  static struct platform_device eth0_device = {
        .name           = MV643XX_ETH_NAME,
@@@ -87,15 -65,7 +87,15 @@@ static struct resource mv643xx_eth1_res
        },
  };
  
 -static struct mv643xx_eth_platform_data eth1_pd;
 +static struct mv643xx_eth_platform_data eth1_pd = {
 +      .tx_sram_addr = PEGASOS2_SRAM_BASE_ETH1,
 +      .tx_sram_size = PEGASOS2_SRAM_TXRING_SIZE,
 +      .tx_queue_size = PEGASOS2_SRAM_TXRING_SIZE/16,
 +
 +      .rx_sram_addr = PEGASOS2_SRAM_BASE_ETH1 + PEGASOS2_SRAM_TXRING_SIZE,
 +      .rx_sram_size = PEGASOS2_SRAM_RXRING_SIZE,
 +      .rx_queue_size = PEGASOS2_SRAM_RXRING_SIZE/16,
 +};
  
  static struct platform_device eth1_device = {
        .name           = MV643XX_ETH_NAME,
@@@ -113,62 -83,9 +113,62 @@@ static struct platform_device *mv643xx_
        &eth1_device,
  };
  
 +/***********/
 +/***********/
 +#define MV_READ(offset,val)   { val = readl(mv643xx_reg_base + offset); }
 +#define MV_WRITE(offset,data) writel(data, mv643xx_reg_base + offset)
 +
 +static void __iomem *mv643xx_reg_base;
 +
 +static int Enable_SRAM(void)
 +{
 +      u32 ALong;
 +
 +      if (mv643xx_reg_base == NULL)
 +              mv643xx_reg_base = ioremap(PEGASOS2_MARVELL_REGBASE,
 +                                      PEGASOS2_MARVELL_REGSIZE);
 +
 +      if (mv643xx_reg_base == NULL)
 +              return -ENOMEM;
 +
 +#ifdef BE_VERBOSE
 +      printk("Pegasos II/Marvell MV64361: register remapped from %p to %p\n",
 +              (void *)PEGASOS2_MARVELL_REGBASE, (void *)mv643xx_reg_base);
 +#endif
 +
 +      MV_WRITE(MV64340_SRAM_CONFIG, 0);
  
 -int
 -mv643xx_eth_add_pds(void)
 +      MV_WRITE(MV64340_INTEGRATED_SRAM_BASE_ADDR, PEGASOS2_SRAM_BASE >> 16);
 +
 +      MV_READ(MV64340_BASE_ADDR_ENABLE, ALong);
 +      ALong &= ~(1 << 19);
 +      MV_WRITE(MV64340_BASE_ADDR_ENABLE, ALong);
 +
 +      ALong = 0x02;
 +      ALong |= PEGASOS2_SRAM_BASE & 0xffff0000;
 +      MV_WRITE(MV643XX_ETH_BAR_4, ALong);
 +
 +      MV_WRITE(MV643XX_ETH_SIZE_REG_4, (PEGASOS2_SRAM_SIZE-1) & 0xffff0000);
 +
 +      MV_READ(MV643XX_ETH_BASE_ADDR_ENABLE_REG, ALong);
 +      ALong &= ~(1 << 4);
 +      MV_WRITE(MV643XX_ETH_BASE_ADDR_ENABLE_REG, ALong);
 +
 +#ifdef BE_VERBOSE
 +      printk("Pegasos II/Marvell MV64361: register unmapped\n");
 +      printk("Pegasos II/Marvell MV64361: SRAM at %p, size=%x\n", (void*) PEGASOS2_SRAM_BASE, PEGASOS2_SRAM_SIZE);
 +#endif
 +
 +      iounmap(mv643xx_reg_base);
 +      mv643xx_reg_base = NULL;
 +
 +      return 1;
 +}
 +
 +
 +/***********/
 +/***********/
 +int mv643xx_eth_add_pds(void)
  {
        int ret = 0;
        static struct pci_device_id pci_marvell_mv64360[] = {
                { }
        };
  
 +#ifdef BE_VERBOSE
 +      printk("Pegasos II/Marvell MV64361: init\n");
 +#endif
 +
        if (pci_dev_present(pci_marvell_mv64360)) {
 -              ret = platform_add_devices(mv643xx_eth_pd_devs, ARRAY_SIZE(mv643xx_eth_pd_devs));
 +              ret = platform_add_devices(mv643xx_eth_pd_devs,
 +                              ARRAY_SIZE(mv643xx_eth_pd_devs));
 +
 +              if ( Enable_SRAM() < 0)
 +              {
 +                      eth0_pd.tx_sram_addr = 0;
 +                      eth0_pd.tx_sram_size = 0;
 +                      eth0_pd.rx_sram_addr = 0;
 +                      eth0_pd.rx_sram_size = 0;
 +
 +                      eth1_pd.tx_sram_addr = 0;
 +                      eth1_pd.tx_sram_size = 0;
 +                      eth1_pd.rx_sram_addr = 0;
 +                      eth1_pd.rx_sram_size = 0;
 +
 +#ifdef BE_VERBOSE
 +                      printk("Pegasos II/Marvell MV64361: Can't enable the "
 +                              "SRAM\n");
 +#endif
 +              }
        }
 +
 +#ifdef BE_VERBOSE
 +      printk("Pegasos II/Marvell MV64361: init is over\n");
 +#endif
 +
        return ret;
  }
 +
  device_initcall(mv643xx_eth_add_pds);
index 53388a1c334f7dbe77a8b93c4e2b1d8e9c5ea9e9,4e6cc64b3efde50087803a8d34129efb5003aa9a..b1324564456e80e28c220c113a4608022d9ace2e
@@@ -25,6 -25,7 +25,7 @@@
  #include <linux/bootmem.h>
  #include <linux/mtd/physmap.h>
  #include <linux/mv643xx.h>
+ #include <linux/platform_device.h>
  #ifdef CONFIG_BOOTIMG
  #include <linux/bootimg.h>
  #endif
@@@ -35,7 -36,6 +36,7 @@@
  #include <asm/bootinfo.h>
  #include <asm/ppcboot.h>
  #include <asm/mv64x60.h>
 +#include <asm/machdep.h>
  #include <platforms/ev64360.h>
  
  #define BOARD_VENDOR    "Marvell"
index b6a66d5e9d8357177d1701e33b9563ccbc646540,0f07e963de3c39bed141daf45e3df1ba0b70c123..50039a204c2495f739b9e4637ba553a0f3a5f9dd
@@@ -22,6 -22,7 +22,7 @@@
  #include <linux/irq.h>
  #include <linux/ide.h>
  #include <linux/seq_file.h>
+ #include <linux/platform_device.h>
  
  #include <linux/initrd.h>
  #include <linux/root_dev.h>
@@@ -609,6 -610,11 +610,6 @@@ static void parse_bootinfo(unsigned lon
  }
  
  #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
 -static int hdpu_ide_check_region(ide_ioreg_t from, unsigned int extent)
 -{
 -      return check_region(from, extent);
 -}
 -
  static void
  hdpu_ide_request_region(ide_ioreg_t from, unsigned int extent, const char *name)
  {
@@@ -748,7 -754,7 +749,7 @@@ static int smp_hdpu_probe(void
  }
  
  static void
 -smp_hdpu_message_pass(int target, int msg, unsigned long data, int wait)
 +smp_hdpu_message_pass(int target, int msg)
  {
        if (msg > 0x3) {
                printk("SMP %d: smp_message_pass: unknown msg %d\n",
@@@ -944,7 -950,7 +945,7 @@@ platform_init(unsigned long r3, unsigne
  #endif                                /* CONFIG_SERIAL_TEXT_DEBUG */
  
  #ifdef CONFIG_SMP
 -      ppc_md.smp_ops = &hdpu_smp_ops;
 +      smp_ops = &hdpu_smp_ops;
  #endif                                /* CONFIG_SMP */
  
  #if defined(CONFIG_SERIAL_MPSC) || defined(CONFIG_MV643XX_ETH)
index a301c5ac58ddf985244fa5fd8e8fe55f93a614c3,beb6171414569b6ef6586cf1e4a2c003124905b4..6e58e30ceed101b1aeace5055a19d4a00583b308
@@@ -29,6 -29,7 +29,7 @@@
  #include <linux/seq_file.h>
  #include <linux/mtd/physmap.h>
  #include <linux/mv643xx.h>
+ #include <linux/platform_device.h>
  #ifdef CONFIG_BOOTIMG
  #include <linux/bootimg.h>
  #endif
@@@ -42,7 -43,6 +43,7 @@@
  #include <asm/ppcboot.h>
  #include <asm/mv64x60.h>
  #include <platforms/katana.h>
 +#include <asm/machdep.h>
  
  static struct mv64x60_handle  bh;
  static katana_id_t            katana_id;
@@@ -521,7 -521,7 +522,7 @@@ katana_fixup_resources(struct pci_dev *
  {
        u16     v16;
  
 -      pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, L1_CACHE_LINE_SIZE>>2);
 +      pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, L1_CACHE_BYTES>>2);
  
        pci_read_config_word(dev, PCI_COMMAND, &v16);
        v16 |= PCI_COMMAND_INVALIDATE | PCI_COMMAND_FAST_BACK;
index 6f97911c330d4e5d02ff71f12ab2fd1262528b7f,7e65b7f1f62677371cd4012b9edeac65ebe2f105..708b8739ecdd97e1fd2d5eaed73f5e475bd6e8f6
@@@ -40,6 -40,7 +40,7 @@@
  #include <linux/serial_core.h>
  #include <linux/mv643xx.h>
  #include <linux/netdevice.h>
+ #include <linux/platform_device.h>
  
  #include <asm/system.h>
  #include <asm/pgtable.h>
@@@ -514,9 -515,13 +515,9 @@@ static void __init ppc7d_init_irq(void
        int irq;
  
        pr_debug("%s\n", __FUNCTION__);
 -      i8259_init(0);
 +      i8259_init(0, 0);
        mv64360_init_irq();
  
 -      /* IRQ 0..15 are handled by the cascaded 8259's of the Ali1535 */
 -      for (irq = 0; irq < 16; irq++) {
 -              irq_desc[irq].handler = &i8259_pic;
 -      }
        /* IRQs 5,6,9,10,11,14,15 are level sensitive */
        irq_desc[5].status |= IRQ_LEVEL;
        irq_desc[6].status |= IRQ_LEVEL;
@@@ -1179,18 -1184,18 +1180,18 @@@ static void __init ppc7d_setup_arch(voi
                ROOT_DEV = Root_HDA1;
  #endif
  
 -      if ((cur_cpu_spec[0]->cpu_features & CPU_FTR_SPEC7450) ||
 -          (cur_cpu_spec[0]->cpu_features & CPU_FTR_L3CR))
 +      if ((cur_cpu_spec->cpu_features & CPU_FTR_SPEC7450) ||
 +          (cur_cpu_spec->cpu_features & CPU_FTR_L3CR))
                /* 745x is different.  We only want to pass along enable. */
                _set_L2CR(L2CR_L2E);
 -      else if (cur_cpu_spec[0]->cpu_features & CPU_FTR_L2CR)
 +      else if (cur_cpu_spec->cpu_features & CPU_FTR_L2CR)
                /* All modules have 1MB of L2.  We also assume that an
                 * L2 divisor of 3 will work.
                 */
                _set_L2CR(L2CR_L2E | L2CR_L2SIZ_1MB | L2CR_L2CLK_DIV3
                          | L2CR_L2RAM_PIPE | L2CR_L2OH_1_0 | L2CR_L2DF);
  
 -      if (cur_cpu_spec[0]->cpu_features & CPU_FTR_L3CR)
 +      if (cur_cpu_spec->cpu_features & CPU_FTR_L3CR)
                /* No L3 cache */
                _set_L3CR(0);
  
@@@ -1420,7 -1425,6 +1421,7 @@@ void __init platform_init(unsigned lon
        ppc_md.setup_arch = ppc7d_setup_arch;
        ppc_md.init = ppc7d_init2;
        ppc_md.show_cpuinfo = ppc7d_show_cpuinfo;
 +      /* XXX this is broken... */
        ppc_md.irq_canonicalize = ppc7d_irq_canonicalize;
        ppc_md.init_IRQ = ppc7d_init_irq;
        ppc_md.get_irq = ppc7d_get_irq;
index a781c50d2f4caed443aa67d6433d41a8914f32fa,1227521c0da201632b6879352d36c87927a775ee..94ea346b7b4b8b7def5f003d5a4dfe8ce74623b4
@@@ -19,6 -19,7 +19,7 @@@
  #include <linux/string.h>
  #include <linux/spinlock.h>
  #include <linux/mv643xx.h>
+ #include <linux/platform_device.h>
  
  #include <asm/byteorder.h>
  #include <asm/io.h>
@@@ -1304,7 -1305,7 +1305,7 @@@ mv64x60_config_pci_params(struct pci_co
        early_write_config_word(hose, 0, devfn, PCI_COMMAND, u16_val);
  
        /* Set latency timer, cache line size, clear BIST */
 -      u16_val = (pi->latency_timer << 8) | (L1_CACHE_LINE_SIZE >> 2);
 +      u16_val = (pi->latency_timer << 8) | (L1_CACHE_BYTES >> 2);
        early_write_config_word(hose, 0, devfn, PCI_CACHE_LINE_SIZE, u16_val);
  
        mv64x60_pci_exclude_bridge = save_exclude;
index 6f88ba93412b0489e81f01d339b48c8ad4e7d577,61668aad86e28542c2964a817c16787201894e3b..e960fe9353256b82e611da8226988d679b2ba433
  
  #include <linux/init.h>
  #include <linux/module.h>
- #include <linux/device.h>
+ #include <linux/platform_device.h>
  #include <linux/ioport.h>
  #include <asm/cpm2.h>
  #include <asm/irq.h>
  #include <asm/ppc_sys.h>
 +#include <asm/machdep.h>
  
  struct platform_device ppc_sys_platform_devices[] = {
        [MPC82xx_CPM_FCC1] = {
diff --combined drivers/base/platform.c
index 08d9cc99c7de134613a92565c9be883ccb194861,95f2af322c8f5f33ebc4834134242e39f1431d59..d597c922af11969213d3ea8bbe310bc57089d277
   * information.
   */
  
- #include <linux/device.h>
+ #include <linux/platform_device.h>
  #include <linux/module.h>
  #include <linux/init.h>
  #include <linux/dma-mapping.h>
  #include <linux/bootmem.h>
  #include <linux/err.h>
 +#include <linux/slab.h>
  
  #include "base.h"
  
diff --combined drivers/mmc/pxamci.c
index d575e3a018bc109365d37153b4ecd305b6966789,4da4a98bd59035083802b76238720e7f8e80af78..f31e247b2cbeabf479c912ae896453db70278935
@@@ -20,7 -20,7 +20,7 @@@
  #include <linux/module.h>
  #include <linux/init.h>
  #include <linux/ioport.h>
- #include <linux/device.h>
+ #include <linux/platform_device.h>
  #include <linux/delay.h>
  #include <linux/interrupt.h>
  #include <linux/dma-mapping.h>
@@@ -29,6 -29,7 +29,6 @@@
  
  #include <asm/dma.h>
  #include <asm/io.h>
 -#include <asm/irq.h>
  #include <asm/scatterlist.h>
  #include <asm/sizes.h>
  
index 63104c73ca3c8bb7caadb6e3b038318fcffd06ec,5f248ebe68e05528cd22eef20fad2f237834cb31..bfe994e59265d57772da814b0b08eab199e2e793
@@@ -32,9 -32,8 +32,9 @@@
  #include <linux/kernel.h>
  #include <linux/string.h>
  #include <linux/ioport.h>
 +#include <linux/device.h>
 +#include <linux/slab.h>
 -
+ #include <linux/platform_device.h>
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/map.h>
  #include <linux/mtd/partitions.h>
index 1e5d6e1d05f318c1f0e45c866ed465a825fe6b6c,6815baee89d763ce98e341fe858e103b3778bf44..00b9f67580f1566550950327479fd59af1ca2a33
  #include <linux/init.h>
  #include <linux/kernel.h>
  #include <linux/string.h>
 +#include <linux/slab.h>
 +#include <linux/ioport.h>
 +#include <linux/device.h>
++#include <linux/platform_device.h>
 +
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/map.h>
  #include <linux/mtd/partitions.h>
 -#include <linux/ioport.h>
 -#include <linux/platform_device.h>
  
  #include <asm/io.h>
  #include <asm/hardware.h>
index da316e543237676e8fdf61a6a98923f06d27adca,06e1c7fffed3f2856c5c55482d9632577f50f740..733a9297a56263eda2c49bfe7db2545f86ed78d6
  #include <linux/init.h>
  #include <linux/kernel.h>
  #include <linux/string.h>
 +#include <linux/slab.h>
 +#include <linux/ioport.h>
 +#include <linux/device.h>
++#include <linux/platform_device.h>
 +
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/map.h>
  #include <linux/mtd/partitions.h>
 -#include <linux/ioport.h>
 -#include <linux/platform_device.h>
 +
  #include <asm/io.h>
  #include <asm/mach/flash.h>
  
index fa84566245a7093588a53df13f30774a4d323591,9c9f4116e50a0241937db7d91c9b3db96319e1a2..7f370bb794fefae45e192df190d657e7bcd13110
   * 675 Mass Ave, Cambridge, MA 02139, USA.
   */
  
- #include <linux/device.h>
+ #include <linux/platform_device.h>
  #include <linux/module.h>
  #include <linux/types.h>
  #include <linux/kernel.h>
  #include <linux/init.h>
  #include <linux/ioport.h>
 +#include <linux/slab.h>
 +
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/map.h>
  #include <linux/mtd/partitions.h>
index a0577ea00c3c974bb1121d5a11d9cac0765c82b4,e751e05fcc651f01517b99d51563d3a14371bdfd..104576b5be3480cf238f1f4c3ac0a6c9bbfeca8f
@@@ -29,8 -29,7 +29,9 @@@
  #include <linux/kernel.h>
  #include <linux/string.h>
  #include <linux/ioport.h>
 +#include <linux/device.h>
 +#include <linux/slab.h>
+ #include <linux/platform_device.h>
  
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/map.h>
index c81bec7b14d5565c97deed108be3155beec98fdd,66b4c2780adcf53ec13174a40084d7504f7c3cb7..c8d0da19d897e461a18efaace5076bfc12111d59
@@@ -13,7 -13,7 +13,7 @@@
  #include <linux/init.h>
  #include <linux/errno.h>
  #include <linux/slab.h>
- #include <linux/device.h>
+ #include <linux/platform_device.h>
  #include <linux/err.h>
  
  #include <linux/mtd/mtd.h>
@@@ -130,21 -130,20 +130,21 @@@ struct sa_subdev_info 
        char name[16];
        struct map_info map;
        struct mtd_info *mtd;
 -      struct flash_platform_data *data;
 +      struct flash_platform_data *plat;
  };
  
  struct sa_info {
        struct mtd_partition    *parts;
        struct mtd_info         *mtd;
        int                     num_subdev;
 +      unsigned int            nr_parts;
        struct sa_subdev_info   subdev[0];
  };
  
  static void sa1100_set_vpp(struct map_info *map, int on)
  {
        struct sa_subdev_info *subdev = container_of(map, struct sa_subdev_info, map);
 -      subdev->data->set_vpp(on);
 +      subdev->plat->set_vpp(on);
  }
  
  static void sa1100_destroy_subdev(struct sa_subdev_info *subdev)
@@@ -188,7 -187,7 +188,7 @@@ static int sa1100_probe_subdev(struct s
                goto out;
        }
  
 -      if (subdev->data->set_vpp)
 +      if (subdev->plat->set_vpp)
                subdev->map.set_vpp = sa1100_set_vpp;
  
        subdev->map.phys = phys;
         * Now let's probe for the actual flash.  Do it here since
         * specific machine settings might have been set above.
         */
 -      subdev->mtd = do_map_probe(subdev->data->map_name, &subdev->map);
 +      subdev->mtd = do_map_probe(subdev->plat->map_name, &subdev->map);
        if (subdev->mtd == NULL) {
                ret = -ENXIO;
                goto err;
        return ret;
  }
  
 -static void sa1100_destroy(struct sa_info *info)
 +static void sa1100_destroy(struct sa_info *info, struct flash_platform_data *plat)
  {
        int i;
  
        if (info->mtd) {
 -              del_mtd_partitions(info->mtd);
 -
 +              if (info->nr_parts == 0)
 +                      del_mtd_device(info->mtd);
 +#ifdef CONFIG_MTD_PARTITIONS
 +              else
 +                      del_mtd_partitions(info->mtd);
 +#endif
  #ifdef CONFIG_MTD_CONCAT
                if (info->mtd != info->subdev[0].mtd)
                        mtd_concat_destroy(info->mtd);
        for (i = info->num_subdev - 1; i >= 0; i--)
                sa1100_destroy_subdev(&info->subdev[i]);
        kfree(info);
 +
 +      if (plat->exit)
 +              plat->exit();
  }
  
  static struct sa_info *__init
 -sa1100_setup_mtd(struct platform_device *pdev, struct flash_platform_data *flash)
 +sa1100_setup_mtd(struct platform_device *pdev, struct flash_platform_data *plat)
  {
        struct sa_info *info;
        int nr, size, i, ret = 0;
  
        memset(info, 0, size);
  
 +      if (plat->init) {
 +              ret = plat->init();
 +              if (ret)
 +                      goto err;
 +      }
 +
        /*
         * Claim and then map the memory regions.
         */
                        break;
  
                subdev->map.name = subdev->name;
 -              sprintf(subdev->name, "sa1100-%d", i);
 -              subdev->data = flash;
 +              sprintf(subdev->name, "%s-%d", plat->name, i);
 +              subdev->plat = plat;
  
                ret = sa1100_probe_subdev(subdev, res);
                if (ret)
         * otherwise fail.  Either way, it'll be called "sa1100".
         */
        if (info->num_subdev == 1) {
 -              strcpy(info->subdev[0].name, "sa1100");
 +              strcpy(info->subdev[0].name, plat->name);
                info->mtd = info->subdev[0].mtd;
                ret = 0;
        } else if (info->num_subdev > 1) {
                        cdev[i] = info->subdev[i].mtd;
  
                info->mtd = mtd_concat_create(cdev, info->num_subdev,
 -                                            "sa1100");
 +                                            plat->name);
                if (info->mtd == NULL)
                        ret = -ENXIO;
  #else
                return info;
  
   err:
 -      sa1100_destroy(info);
 +      sa1100_destroy(info, plat);
   out:
        return ERR_PTR(ret);
  }
@@@ -360,16 -346,16 +360,16 @@@ static const char *part_probes[] = { "c
  static int __init sa1100_mtd_probe(struct device *dev)
  {
        struct platform_device *pdev = to_platform_device(dev);
 -      struct flash_platform_data *flash = pdev->dev.platform_data;
 +      struct flash_platform_data *plat = pdev->dev.platform_data;
        struct mtd_partition *parts;
        const char *part_type = NULL;
        struct sa_info *info;
        int err, nr_parts = 0;
  
 -      if (!flash)
 +      if (!plat)
                return -ENODEV;
  
 -      info = sa1100_setup_mtd(pdev, flash);
 +      info = sa1100_setup_mtd(pdev, plat);
        if (IS_ERR(info)) {
                err = PTR_ERR(info);
                goto out;
        } else
  #endif
        {
 -              parts = flash->parts;
 -              nr_parts = flash->nr_parts;
 +              parts = plat->parts;
 +              nr_parts = plat->nr_parts;
                part_type = "static";
        }
  
                add_mtd_partitions(info->mtd, parts, nr_parts);
        }
  
 +      info->nr_parts = nr_parts;
 +
        dev_set_drvdata(dev, info);
        err = 0;
  
  static int __exit sa1100_mtd_remove(struct device *dev)
  {
        struct sa_info *info = dev_get_drvdata(dev);
 +      struct flash_platform_data *plat = dev->platform_data;
 +
        dev_set_drvdata(dev, NULL);
 -      sa1100_destroy(info);
 +      sa1100_destroy(info, plat);
 +
        return 0;
  }
  
@@@ -440,17 -421,9 +440,17 @@@ static int sa1100_mtd_resume(struct dev
                info->mtd->resume(info->mtd);
        return 0;
  }
 +
 +static void sa1100_mtd_shutdown(struct device *dev)
 +{
 +      struct sa_info *info = dev_get_drvdata(dev);
 +      if (info && info->mtd->suspend(info->mtd) == 0)
 +              info->mtd->resume(info->mtd);
 +}
  #else
  #define sa1100_mtd_suspend NULL
  #define sa1100_mtd_resume  NULL
 +#define sa1100_mtd_shutdown NULL
  #endif
  
  static struct device_driver sa1100_mtd_driver = {
        .remove         = __exit_p(sa1100_mtd_remove),
        .suspend        = sa1100_mtd_suspend,
        .resume         = sa1100_mtd_resume,
 +      .shutdown       = sa1100_mtd_shutdown,
  };
  
  static int __init sa1100_mtd_init(void)
index b58ba236a9eb8a5ffd479da0b56d88a041acc860,bf2325df80c71d19e3a504e67dd42acb3fed9ffd..2df5e47d1f5ce2ec7c16a9ab6018d7e4be6c1eff
  #include <linux/kernel.h>
  #include <linux/string.h>
  #include <linux/ioport.h>
- #include <linux/device.h>
+ #include <linux/platform_device.h>
  #include <linux/delay.h>
  #include <linux/err.h>
 +#include <linux/slab.h>
  
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/nand.h>
index b886b07412a67c95f8e64b5203af7ad92722121e,9571145c20904ad72f2526ee082bae8c5dd2e043..e1aa9910503bf08bf844f8327f26a5419eb9b939
@@@ -22,6 -22,7 +22,7 @@@
  #include <linux/rtnetlink.h>
  #include <linux/interrupt.h>
  #include <linux/dma-mapping.h>
+ #include <linux/platform_device.h>
  #include <linux/pm.h>
  
  #include <net/irda/irda.h>
@@@ -704,12 -705,15 +705,12 @@@ static int pxa_irda_stop(struct net_dev
        return 0;
  }
  
 -static int pxa_irda_suspend(struct device *_dev, pm_message_t state, u32 level)
 +static int pxa_irda_suspend(struct device *_dev, pm_message_t state)
  {
        struct net_device *dev = dev_get_drvdata(_dev);
        struct pxa_irda *si;
  
 -      if (!dev || level != SUSPEND_DISABLE)
 -              return 0;
 -
 -      if (netif_running(dev)) {
 +      if (dev && netif_running(dev)) {
                si = netdev_priv(dev);
                netif_device_detach(dev);
                pxa_irda_shutdown(si);
        return 0;
  }
  
 -static int pxa_irda_resume(struct device *_dev, u32 level)
 +static int pxa_irda_resume(struct device *_dev)
  {
        struct net_device *dev = dev_get_drvdata(_dev);
        struct pxa_irda *si;
  
 -      if (!dev || level != RESUME_ENABLE)
 -              return 0;
 -
 -      if (netif_running(dev)) {
 +      if (dev && netif_running(dev)) {
                si = netdev_priv(dev);
                pxa_irda_startup(si);
                netif_device_attach(dev);
index 140b7cdb1f7e8186f43e896a75a0ecf09af9278a,424515d35932f61e4b59351194a5d147d77c96c6..a1d207f2fa68e0c26f54267539ab169dfd40bff0
@@@ -53,6 -53,7 +53,7 @@@
  #include <linux/rtnetlink.h>
  #include <linux/serial_reg.h>
  #include <linux/dma-mapping.h>
+ #include <linux/platform_device.h>
  
  #include <asm/io.h>
  #include <asm/dma.h>
@@@ -638,14 -639,21 +639,14 @@@ static void smsc_ircc_setup_qos(struct 
   */
  static void smsc_ircc_init_chip(struct smsc_ircc_cb *self)
  {
 -      int iobase, ir_mode, ctrl, fast;
 -
 -      IRDA_ASSERT(self != NULL, return;);
 -
 -      iobase = self->io.fir_base;
 -      ir_mode = IRCC_CFGA_IRDA_SIR_A;
 -      ctrl = 0;
 -      fast = 0;
 +      int iobase = self->io.fir_base;
  
        register_bank(iobase, 0);
        outb(IRCC_MASTER_RESET, iobase + IRCC_MASTER);
        outb(0x00, iobase + IRCC_MASTER);
  
        register_bank(iobase, 1);
 -      outb(((inb(iobase + IRCC_SCE_CFGA) & 0x87) | ir_mode),
 +      outb(((inb(iobase + IRCC_SCE_CFGA) & 0x87) | IRCC_CFGA_IRDA_SIR_A),
             iobase + IRCC_SCE_CFGA);
  
  #ifdef smsc_669 /* Uses pin 88/89 for Rx/Tx */
        outb(SMSC_IRCC2_FIFO_THRESHOLD, iobase + IRCC_FIFO_THRESHOLD);
  
        register_bank(iobase, 4);
 -      outb((inb(iobase + IRCC_CONTROL) & 0x30) | ctrl, iobase + IRCC_CONTROL);
 +      outb((inb(iobase + IRCC_CONTROL) & 0x30), iobase + IRCC_CONTROL);
  
        register_bank(iobase, 0);
 -      outb(fast, iobase + IRCC_LCR_A);
 +      outb(0, iobase + IRCC_LCR_A);
  
        smsc_ircc_set_sir_speed(self, SMSC_IRCC2_C_IRDA_FALLBACK_SPEED);
  
@@@ -1549,46 -1557,6 +1550,46 @@@ static int ircc_is_receiving(struct sms
  }
  #endif /* unused */
  
 +static int smsc_ircc_request_irq(struct smsc_ircc_cb *self)
 +{
 +      int error;
 +
 +      error = request_irq(self->io.irq, smsc_ircc_interrupt, 0,
 +                          self->netdev->name, self->netdev);
 +      if (error)
 +              IRDA_DEBUG(0, "%s(), unable to allocate irq=%d, err=%d\n",
 +                         __FUNCTION__, self->io.irq, error);
 +
 +      return error;
 +}
 +
 +static void smsc_ircc_start_interrupts(struct smsc_ircc_cb *self)
 +{
 +      unsigned long flags;
 +
 +      spin_lock_irqsave(&self->lock, flags);
 +
 +      self->io.speed = 0;
 +      smsc_ircc_change_speed(self, SMSC_IRCC2_C_IRDA_FALLBACK_SPEED);
 +
 +      spin_unlock_irqrestore(&self->lock, flags);
 +}
 +
 +static void smsc_ircc_stop_interrupts(struct smsc_ircc_cb *self)
 +{
 +      int iobase = self->io.fir_base;
 +      unsigned long flags;
 +
 +      spin_lock_irqsave(&self->lock, flags);
 +
 +      register_bank(iobase, 0);
 +      outb(0, iobase + IRCC_IER);
 +      outb(IRCC_MASTER_RESET, iobase + IRCC_MASTER);
 +      outb(0x00, iobase + IRCC_MASTER);
 +
 +      spin_unlock_irqrestore(&self->lock, flags);
 +}
 +
  
  /*
   * Function smsc_ircc_net_open (dev)
@@@ -1600,6 -1568,7 +1601,6 @@@ static int smsc_ircc_net_open(struct ne
  {
        struct smsc_ircc_cb *self;
        char hwname[16];
 -      unsigned long flags;
  
        IRDA_DEBUG(1, "%s\n", __FUNCTION__);
  
        self = netdev_priv(dev);
        IRDA_ASSERT(self != NULL, return 0;);
  
 +      if (self->io.suspended) {
 +              IRDA_DEBUG(0, "%s(), device is suspended\n", __FUNCTION__);
 +              return -EAGAIN;
 +      }
 +
        if (request_irq(self->io.irq, smsc_ircc_interrupt, 0, dev->name,
                        (void *) dev)) {
                IRDA_DEBUG(0, "%s(), unable to allocate irq=%d\n",
                return -EAGAIN;
        }
  
 -      spin_lock_irqsave(&self->lock, flags);
 -      /*smsc_ircc_sir_start(self);*/
 -      self->io.speed = 0;
 -      smsc_ircc_change_speed(self, SMSC_IRCC2_C_IRDA_FALLBACK_SPEED);
 -      spin_unlock_irqrestore(&self->lock, flags);
 +      smsc_ircc_start_interrupts(self);
  
        /* Give self a hardware name */
        /* It would be cool to offer the chip revision here - Jean II */
@@@ -1672,12 -1640,7 +1673,12 @@@ static int smsc_ircc_net_close(struct n
                irlap_close(self->irlap);
        self->irlap = NULL;
  
 -      free_irq(self->io.irq, dev);
 +      smsc_ircc_stop_interrupts(self);
 +
 +      /* if we are called from smsc_ircc_resume we don't have IRQ reserved */
 +      if (!self->io.suspended)
 +              free_irq(self->io.irq, dev);
 +
        disable_dma(self->io.dma);
        free_dma(self->io.dma);
  
@@@ -1688,18 -1651,11 +1689,18 @@@ static int smsc_ircc_suspend(struct dev
  {
        struct smsc_ircc_cb *self = dev_get_drvdata(dev);
  
 -      IRDA_MESSAGE("%s, Suspending\n", driver_name);
 -
        if (!self->io.suspended) {
 -              smsc_ircc_net_close(self->netdev);
 +              IRDA_DEBUG(1, "%s, Suspending\n", driver_name);
 +
 +              rtnl_lock();
 +              if (netif_running(self->netdev)) {
 +                      netif_device_detach(self->netdev);
 +                      smsc_ircc_stop_interrupts(self);
 +                      free_irq(self->io.irq, self->netdev);
 +                      disable_dma(self->io.dma);
 +              }
                self->io.suspended = 1;
 +              rtnl_unlock();
        }
  
        return 0;
@@@ -1710,25 -1666,11 +1711,25 @@@ static int smsc_ircc_resume(struct devi
        struct smsc_ircc_cb *self = dev_get_drvdata(dev);
  
        if (self->io.suspended) {
 -
 -              smsc_ircc_net_open(self->netdev);
 +              IRDA_DEBUG(1, "%s, Waking up\n", driver_name);
 +
 +              rtnl_lock();
 +              smsc_ircc_init_chip(self);
 +              if (netif_running(self->netdev)) {
 +                      if (smsc_ircc_request_irq(self)) {
 +                              /*
 +                               * Don't fail resume process, just kill this
 +                               * network interface
 +                               */
 +                              unregister_netdevice(self->netdev);
 +                      } else {
 +                              enable_dma(self->io.dma);
 +                              smsc_ircc_start_interrupts(self);
 +                              netif_device_attach(self->netdev);
 +                      }
 +              }
                self->io.suspended = 0;
 -
 -              IRDA_MESSAGE("%s, Waking up\n", driver_name);
 +              rtnl_unlock();
        }
        return 0;
  }
   */
  static int __exit smsc_ircc_close(struct smsc_ircc_cb *self)
  {
 -      int iobase;
 -      unsigned long flags;
 -
        IRDA_DEBUG(1, "%s\n", __FUNCTION__);
  
        IRDA_ASSERT(self != NULL, return -1;);
        /* Remove netdevice */
        unregister_netdev(self->netdev);
  
 -      /* Make sure the irq handler is not exectuting */
 -      spin_lock_irqsave(&self->lock, flags);
 -
 -      /* Stop interrupts */
 -      iobase = self->io.fir_base;
 -      register_bank(iobase, 0);
 -      outb(0, iobase + IRCC_IER);
 -      outb(IRCC_MASTER_RESET, iobase + IRCC_MASTER);
 -      outb(0x00, iobase + IRCC_MASTER);
 -#if 0
 -      /* Reset to SIR mode */
 -      register_bank(iobase, 1);
 -        outb(IRCC_CFGA_IRDA_SIR_A|IRCC_CFGA_TX_POLARITY, iobase + IRCC_SCE_CFGA);
 -        outb(IRCC_CFGB_IR, iobase + IRCC_SCE_CFGB);
 -#endif
 -      spin_unlock_irqrestore(&self->lock, flags);
 +      smsc_ircc_stop_interrupts(self);
  
        /* Release the PORTS that this driver is using */
        IRDA_DEBUG(0, "%s(), releasing 0x%03x\n",  __FUNCTION__,
index 8fbba21d975bc4ad7cbde8dcb9d1998acf3501a3,6fe948c10e7283e350010e7707ed3e777c85fecd..71f2c6705bc32ba018788e0283c76e71871af507
@@@ -39,6 -39,8 +39,8 @@@
  #include <linux/bitops.h>
  #include <linux/delay.h>
  #include <linux/ethtool.h>
+ #include <linux/platform_device.h>
  #include <asm/io.h>
  #include <asm/types.h>
  #include <asm/pgtable.h>
@@@ -1533,9 -1535,6 +1535,9 @@@ static int mv643xx_eth_probe(struct dev
        printk(KERN_NOTICE "%s: RX NAPI Enabled \n", dev->name);
  #endif
  
 +      if (mp->tx_sram_size > 0)
 +              printk(KERN_NOTICE "%s: Using SRAM\n", dev->name);
 +
        return 0;
  
  out:
diff --combined drivers/net/smc91x.c
index c573bb351d4c9bb11ce15876b7b58e98373cc933,901c960d342aefe69c04f27add8f6797fa94fad6..74d5f1a6fdea262919736ebd9c86f45cd05d0a6e
@@@ -77,7 -77,7 +77,7 @@@ static const char version[] 
  #include <linux/errno.h>
  #include <linux/ioport.h>
  #include <linux/crc32.h>
- #include <linux/device.h>
+ #include <linux/platform_device.h>
  #include <linux/spinlock.h>
  #include <linux/ethtool.h>
  #include <linux/mii.h>
@@@ -1983,10 -1983,6 +1983,10 @@@ static int __init smc_probe(struct net_
        if (lp->version >= (CHIP_91100 << 4))
                smc_phy_detect(dev);
  
 +      /* then shut everything down to save power */
 +      smc_shutdown(dev);
 +      smc_phy_powerdown(dev);
 +
        /* Set default parameters */
        lp->msg_enable = NETIF_MSG_LINK;
        lp->ctl_rfduplx = 0;
index ba48cef3a9dc87faeffa7ba3cc7d355176a6a577,f591839ab9cd471dbce4325aa332ecd4489d082e..87302c548c24d437fa0722a01d2d832c7a7bdf38
@@@ -42,7 -42,7 +42,7 @@@
  #include <linux/notifier.h>
  #include <linux/interrupt.h>
  #include <linux/spinlock.h>
- #include <linux/device.h>
+ #include <linux/platform_device.h>
  
  #include <asm/io.h>
  #include <asm/irq.h>
@@@ -490,7 -490,7 +490,7 @@@ int au1x00_drv_pcmcia_remove(struct dev
                flush_scheduled_work();
                skt->ops->hw_shutdown(skt);
                au1x00_pcmcia_config_skt(skt, &dead_socket);
 -              iounmap(skt->virt_io);
 +              iounmap(skt->virt_io + (u32)mips_io_port_base);
                skt->virt_io = NULL;
        }
  
@@@ -528,6 -528,10 +528,6 @@@ static struct device_driver au1x00_pcmc
        .resume         = pcmcia_socket_dev_resume,
  };
  
 -static struct platform_device au1x00_device = {
 -      .name = "au1x00-pcmcia",
 -      .id = 0,
 -};
  
  /* au1x00_pcmcia_init()
   *
@@@ -541,6 -545,7 +541,6 @@@ static int __init au1x00_pcmcia_init(vo
        int error = 0;
        if ((error = driver_register(&au1x00_pcmcia_driver)))
                return error;
 -      platform_device_register(&au1x00_device);
        return error;
  }
  
  static void __exit au1x00_pcmcia_exit(void)
  {
        driver_unregister(&au1x00_pcmcia_driver);
 -      platform_device_unregister(&au1x00_device);
  }
  
  module_init(au1x00_pcmcia_init);
index bd924336a49fe041333745766c3358a1ecc020d4,b54a8b8c0fca000b908c454bf90d47f230e3c8b7..fe5ea36e7de3878e63b7819cab7872c89d8acd49
  #include <linux/kernel.h>
  #include <linux/errno.h>
  #include <linux/interrupt.h>
- #include <linux/device.h>
+ #include <linux/platform_device.h>
  
 +#include <asm/mach-types.h>
  #include <asm/hardware.h>
  #include <asm/irq.h>
  #include <asm/hardware/scoop.h>
 -#include <asm/arch/pxa-regs.h>
 +#ifdef CONFIG_SA1100_COLLIE
 +#include <asm/arch-sa1100/collie.h>
 +#else
 +#include <asm/arch-pxa/pxa-regs.h>
 +#endif
  
  #include "soc_common.h"
  
@@@ -43,7 -38,6 +43,7 @@@ static int sharpsl_pcmcia_hw_init(struc
  {
        int ret;
  
 +#ifndef CONFIG_SA1100_COLLIE
        /*
         * Setup default state of GPIO outputs
         * before we enable them as outputs.
@@@ -66,7 -60,6 +66,7 @@@
        pxa_gpio_mode(GPIO55_nPREG_MD);
        pxa_gpio_mode(GPIO56_nPWAIT_MD);
        pxa_gpio_mode(GPIO57_nIOIS16_MD);
 +#endif
  
        /* Register interrupts */
        if (scoop_devs[skt->nr].cd_irq >= 0) {
@@@ -220,20 -213,12 +220,20 @@@ static void sharpsl_pcmcia_socket_init(
        write_scoop_reg(scoop_devs[skt->nr].dev, SCOOP_IMR, 0x00C0);
        write_scoop_reg(scoop_devs[skt->nr].dev, SCOOP_MCR, 0x0101);
        scoop_devs[skt->nr].keep_vs = NO_KEEP_VS;
 +
 +      if (machine_is_collie())
 +              /* We need to disable SS_OUTPUT_ENA here. */
 +              write_scoop_reg(scoop_devs[skt->nr].dev, SCOOP_CPR, read_scoop_reg(scoop_devs[skt->nr].dev, SCOOP_CPR) & ~0x0080);
  }
  
  static void sharpsl_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
  {
        /* CF_BUS_OFF */
        sharpsl_pcmcia_init_reset(&scoop_devs[skt->nr]);
 +
 +      if (machine_is_collie())
 +              /* We need to disable SS_OUTPUT_ENA here. */
 +              write_scoop_reg(scoop_devs[skt->nr].dev, SCOOP_CPR, read_scoop_reg(scoop_devs[skt->nr].dev, SCOOP_CPR) & ~0x0080);
  }
  
  static struct pcmcia_low_level sharpsl_pcmcia_ops = {
  
  static struct platform_device *sharpsl_pcmcia_device;
  
 +#ifdef CONFIG_SA1100_COLLIE
 +int __init pcmcia_collie_init(struct device *dev)
 +{
 +       int ret = -ENODEV;
 +
 +       if (machine_is_collie())
 +               ret = sa11xx_drv_pcmcia_probe(dev, &sharpsl_pcmcia_ops, 0, 1);
 +
 +       return ret;
 +}
 +
 +#else
 +
  static int __init sharpsl_pcmcia_init(void)
  {
        int ret;
@@@ -297,7 -269,6 +297,7 @@@ static void __exit sharpsl_pcmcia_exit(
  
  fs_initcall(sharpsl_pcmcia_init);
  module_exit(sharpsl_pcmcia_exit);
 +#endif
  
  MODULE_DESCRIPTION("Sharp SL Series PCMCIA Support");
  MODULE_LICENSE("GPL");
index acf60ffc8a124515dbe4cbd42355c647b8414ff0,122fb29b1e341415f5c31a9b2bef9cf99856a03f..6d441ec75c6a14bc1fa34e9b31cd866f1c6a8397
  #include <linux/module.h>
  #include <linux/init.h>
  #include <linux/config.h>
+ #include <linux/platform_device.h>
  
  #include <pcmcia/cs_types.h>
  #include <pcmcia/cs.h>
  #include <pcmcia/ss.h>
  
 +#include <asm/hardware/scoop.h>
 +
  #include "sa1100_generic.h"
  
 +int __init pcmcia_collie_init(struct device *dev);
 +
  static int (*sa11x0_pcmcia_hw_init[])(struct device *dev) = {
  #ifdef CONFIG_SA1100_ASSABET
        pcmcia_assabet_init,
@@@ -60,9 -57,6 +61,9 @@@
  #ifdef CONFIG_SA1100_SIMPAD
        pcmcia_simpad_init,
  #endif
 +#ifdef CONFIG_SA1100_COLLIE
 +       pcmcia_collie_init,
 +#endif
  };
  
  static int sa11x0_drv_pcmcia_probe(struct device *dev)
diff --combined drivers/serial/mpsc.c
index aec83f577ce6c5c8f7be871af58c9db811a2d0b8,f4c709bc464bbe244c4fc283d48491439bf85220..ba8838b234da7b89cfa2575a8689034b5b2cb3e9
@@@ -52,6 -52,8 +52,8 @@@
   * 4) AFAICT, hardware flow control isn't supported by the controller --MAG.
   */
  
+ #include <linux/platform_device.h>
  #include "mpsc.h"
  
  /*
@@@ -1100,8 -1102,6 +1102,8 @@@ mpsc_start_rx(struct mpsc_port_info *pi
  {
        pr_debug("mpsc_start_rx[%d]: Starting...\n", pi->port.line);
  
 +      /* Issue a Receive Abort to clear any receive errors */
 +      writel(MPSC_CHR_2_RA, pi->mpsc_base + MPSC_CHR_2);
        if (pi->rcv_data) {
                mpsc_enter_hunt(pi);
                mpsc_sdma_cmd(pi, SDMA_SDCM_ERD);
index 49815ec4b842374959f3aab35fa388d290196168,277bcb902d3b94ae86bed365250defb34dd9799a..e46cc540cf4d3153fb49d9b942dfdf5652dc4f76
@@@ -14,8 -14,7 +14,9 @@@
   * This file is licenced under the GPL.
   */
  
 +#include <linux/signal.h>     /* SA_INTERRUPT */
 +#include <linux/jiffies.h>
+ #include <linux/platform_device.h>
  
  #include <asm/hardware.h>
  #include <asm/io.h>
index f4a4aeda40b7e3f1876f20dfa7371adeaba70db7,5181999c56c9232bf449b4f37bf8276d33632612..59e20568e8f947381753f590fdebf8b5467267bb
   * This file is licenced under the GPL.
   */
  
 +#include <linux/device.h>
 +#include <linux/signal.h>
+ #include <linux/platform_device.h>
++
  #include <asm/mach-types.h>
  #include <asm/hardware.h>
  #include <asm/arch/pxa-regs.h>
diff --combined drivers/video/gbefb.c
index 485604cd446268661ee82aa2bfc6d44bad0d8ae9,fc0a1beef968ebe1675d607e3879163b6edb4c66..316bfe994811f54deadf88da8371b4da2bfbce8d
@@@ -11,7 -11,7 +11,7 @@@
  
  #include <linux/config.h>
  #include <linux/delay.h>
- #include <linux/device.h>
+ #include <linux/platform_device.h>
  #include <linux/dma-mapping.h>
  #include <linux/errno.h>
  #include <linux/fb.h>
@@@ -1126,7 -1126,7 +1126,7 @@@ static int __init gbefb_probe(struct de
        gbefb_setup(options);
  #endif
  
 -      if (!request_mem_region(GBE_BASE, sizeof(struct sgi_gbe), "GBE")) {
 +      if (!request_region(GBE_BASE, sizeof(struct sgi_gbe), "GBE")) {
                printk(KERN_ERR "gbefb: couldn't reserve mmio region\n");
                ret = -EBUSY;
                goto out_release_framebuffer;
        if (gbe_mem_phys) {
                /* memory was allocated at boot time */
                gbe_mem = ioremap_nocache(gbe_mem_phys, gbe_mem_size);
 +              if (!gbe_mem) {
 +                      printk(KERN_ERR "gbefb: couldn't map framebuffer\n");
 +                      ret = -ENOMEM;
 +                      goto out_tiles_free;
 +              }
 +
                gbe_dma_addr = 0;
        } else {
                /* try to allocate memory with the classical allocator
                 * this has high chance to fail on low memory machines */
                gbe_mem = dma_alloc_coherent(NULL, gbe_mem_size, &gbe_dma_addr,
                                             GFP_KERNEL);
 +              if (!gbe_mem) {
 +                      printk(KERN_ERR "gbefb: couldn't allocate framebuffer memory\n");
 +                      ret = -ENOMEM;
 +                      goto out_tiles_free;
 +              }
 +
                gbe_mem_phys = (unsigned long) gbe_dma_addr;
        }
  
        mtrr_add(gbe_mem_phys, gbe_mem_size, MTRR_TYPE_WRCOMB, 1);
  #endif
  
 -      if (!gbe_mem) {
 -              printk(KERN_ERR "gbefb: couldn't map framebuffer\n");
 -              ret = -ENXIO;
 -              goto out_tiles_free;
 -      }
 -
        /* map framebuffer memory into tiles table */
        for (i = 0; i < (gbe_mem_size >> TILE_SHIFT); i++)
                gbe_tiles.cpu[i] = (gbe_mem_phys >> TILE_SHIFT) + i;