]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'machtypes' into pxa-palm
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Wed, 9 Jul 2008 20:34:25 +0000 (21:34 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 9 Jul 2008 20:34:25 +0000 (21:34 +0100)
1  2 
arch/arm/mach-pxa/cm-x270.c
arch/arm/mach-pxa/em-x270.c
drivers/usb/gadget/pxa27x_udc.c
drivers/video/pxafb.c
include/asm-arm/arch-pxa/pxa2xx-gpio.h

index b3c3fd72d04561bc4cdf616ddd7a31532f1ff1da,f5851d1adc25890c800ed52be3dfe0cfed84dbbf..01b9964acec1f39bd448114c4ee65aadbde05167
@@@ -31,7 -31,6 +31,7 @@@
  #include <asm/arch/pxa-regs.h>
  #include <asm/arch/pxa2xx-regs.h>
  #include <asm/arch/pxa2xx-gpio.h>
 +#include <asm/arch/audio.h>
  #include <asm/arch/pxafb.h>
  #include <asm/arch/ohci.h>
  #include <asm/arch/mmc.h>
@@@ -60,7 -59,7 +60,7 @@@ static struct resource cmx270_dm9k_reso
        [2] = {
                .start = CMX270_ETHIRQ,
                .end   = CMX270_ETHIRQ,
-               .flags = IORESOURCE_IRQ,
+               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
        }
  };
  
@@@ -82,6 -81,12 +82,6 @@@ static struct platform_device cmx270_de
        }
  };
  
 -/* audio device */
 -static struct platform_device cmx270_audio_device = {
 -      .name           = "pxa2xx-ac97",
 -      .id             = -1,
 -};
 -
  /* touchscreen controller */
  static struct platform_device cmx270_ts_device = {
        .name           = "ucb1400_ts",
@@@ -214,6 -219,7 +214,6 @@@ static struct platform_device cmx270_at
  /* platform devices */
  static struct platform_device *platform_devices[] __initdata = {
        &cmx270_device_dm9k,
 -      &cmx270_audio_device,
        &cmx270_rtc_device,
        &cmx270_2700G,
        &cmx270_led_device,
@@@ -588,7 -594,6 +588,7 @@@ static void __init cmx270_init(void
  
        /* register CM-X270 platform devices */
        platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
 +      pxa_set_ac97_info(NULL);
  
        /* set MCI and OHCI platform parameters */
        pxa_set_mci_info(&cmx270_mci_platform_data);
index e23865affc0c5c9fda581a74c3d3d05f4ed6f457,9c57700ee5c29a0e8eb26a8bddd630f3432c218c..1bf6807499284a3e298f8b12167267b8d7ce63f0
@@@ -24,8 -24,6 +24,8 @@@
  
  #include <asm/arch/pxa-regs.h>
  #include <asm/arch/pxa2xx-gpio.h>
 +#include <asm/arch/pxa27x-udc.h>
 +#include <asm/arch/audio.h>
  #include <asm/arch/pxafb.h>
  #include <asm/arch/ohci.h>
  #include <asm/arch/mmc.h>
@@@ -52,7 -50,7 +52,7 @@@ static struct resource em_x270_dm9k_res
        [2] = {
                .start = EM_X270_ETHIRQ,
                .end   = EM_X270_ETHIRQ,
-               .flags = IORESOURCE_IRQ,
+               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
        }
  };
  
@@@ -74,6 -72,12 +74,6 @@@ static struct platform_device em_x270_d
        }
  };
  
 -/* audio device */
 -static struct platform_device em_x270_audio = {
 -      .name           = "pxa2xx-ac97",
 -      .id             = -1,
 -};
 -
  /* WM9712 touchscreen controller. Hopefully the driver will make it to
   * the mainstream sometime */
  static struct platform_device em_x270_ts = {
@@@ -213,6 -217,7 +213,6 @@@ static struct platform_device em_x270_n
  /* platform devices */
  static struct platform_device *platform_devices[] __initdata = {
        &em_x270_dm9k,
 -      &em_x270_audio,
        &em_x270_ts,
        &em_x270_rtc,
        &em_x270_nand,
@@@ -320,7 -325,6 +320,7 @@@ static void __init em_x270_init(void
  
        /* register EM-X270 platform devices */
        platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
 +      pxa_set_ac97_info(NULL);
  
        /* set MCI and OHCI platform parameters */
        pxa_set_mci_info(&em_x270_mci_platform_data);
index 4771b1314d54df0b7e9360b3451c0eb7715c129d,e02bfd4df3a62cf0105927864663b13d952ca8be..9c0e82ec5c43b94fefbdc58cbfc0f88549cf01e1
@@@ -38,7 -38,7 +38,7 @@@
  #include <linux/usb.h>
  #include <linux/usb/ch9.h>
  #include <linux/usb/gadget.h>
 -
 +#include <asm/arch/pxa2xx-regs.h> /* FIXME: for PSSR */
  #include <asm/arch/udc.h>
  
  #include "pxa27x_udc.h"
@@@ -1526,7 -1526,8 +1526,8 @@@ static void udc_disable(struct pxa_udc 
  
        ep0_idle(udc);
        udc->gadget.speed = USB_SPEED_UNKNOWN;
-       udc->mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT);
+       if (udc->mach->udc_command)
+               udc->mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT);
  }
  
  /**
@@@ -2359,19 -2360,18 +2360,19 @@@ static int pxa_udc_resume(struct platfo
         * Software must configure the USB OTG pad, UDC, and UHC
         * to the state they were in before entering sleep mode.
         */
 -      PSSR |= PSSR_OTGPH;
 +      if (cpu_is_pxa27x())
 +              PSSR |= PSSR_OTGPH;
  
        return 0;
  }
  #endif
  
  /* work with hotplug and coldplug */
 -MODULE_ALIAS("platform:pxa2xx-udc");
 +MODULE_ALIAS("platform:pxa27x-udc");
  
  static struct platform_driver udc_driver = {
        .driver         = {
 -              .name   = "pxa2xx-udc",
 +              .name   = "pxa27x-udc",
                .owner  = THIS_MODULE,
        },
        .remove         = __exit_p(pxa_udc_remove),
diff --combined drivers/video/pxafb.c
index 3682bbd7e50e5c2dcbd13aec75664dae594fd1e8,7dcda187d9ba363e777f060c757b7c1c05bc7db4..736ee1d3206da184d6ee32f91a70ab288f4c6637
@@@ -573,8 -573,8 +573,8 @@@ static int setup_frame_dma(struct pxafb
                dma_desc->fdadr = fbi->dma_buff_phys + dma_desc_off;
                fbi->fdadr[dma] = fbi->dma_buff_phys + dma_desc_off;
        } else {
-               pal_desc = &fbi->dma_buff->pal_desc[dma];
-               pal_desc_off = offsetof(struct pxafb_dma_buff, dma_desc[pal]);
+               pal_desc = &fbi->dma_buff->pal_desc[pal];
+               pal_desc_off = offsetof(struct pxafb_dma_buff, pal_desc[pal]);
  
                pal_desc->fsadr = fbi->dma_buff_phys + pal * PALETTE_SIZE;
                pal_desc->fidr  = 0;
@@@ -1276,6 -1276,8 +1276,8 @@@ static int __init pxafb_map_video_memor
                fbi->dma_buff_phys = fbi->map_dma;
                fbi->palette_cpu = (u16 *) fbi->dma_buff->palette;
  
+               pr_debug("pxafb: palette_mem_size = 0x%08lx\n", fbi->palette_size*sizeof(u16));
  #ifdef CONFIG_FB_PXA_SMARTPANEL
                fbi->smart_cmds = (uint16_t *) fbi->dma_buff->cmd_buff;
                fbi->n_smart_cmds = 0;
@@@ -1351,7 -1353,6 +1353,6 @@@ static struct pxafb_info * __init pxafb
        struct pxafb_info *fbi;
        void *addr;
        struct pxafb_mach_info *inf = dev->platform_data;
-       struct pxafb_mode_info *mode = inf->modes;
  
        /* Alloc the pxafb_info and pseudo_palette in one step */
        fbi = kmalloc(sizeof(struct pxafb_info) + sizeof(u32) * 16, GFP_KERNEL);
@@@ -1777,49 -1778,11 +1778,49 @@@ failed
        return ret;
  }
  
 +static int __devexit pxafb_remove(struct platform_device *dev)
 +{
 +      struct pxafb_info *fbi = platform_get_drvdata(dev);
 +      struct resource *r;
 +      int irq;
 +      struct fb_info *info;
 +
 +      if (!fbi)
 +              return 0;
 +
 +      info = &fbi->fb;
 +
 +      unregister_framebuffer(info);
 +
 +      pxafb_disable_controller(fbi);
 +
 +      if (fbi->fb.cmap.len)
 +              fb_dealloc_cmap(&fbi->fb.cmap);
 +
 +      irq = platform_get_irq(dev, 0);
 +      free_irq(irq, fbi);
 +
 +      dma_free_writecombine(&dev->dev, fbi->map_size,
 +                                      fbi->map_cpu, fbi->map_dma);
 +
 +      iounmap(fbi->mmio_base);
 +
 +      r = platform_get_resource(dev, IORESOURCE_MEM, 0);
 +      release_mem_region(r->start, r->end - r->start + 1);
 +
 +      clk_put(fbi->clk);
 +      kfree(fbi);
 +
 +      return 0;
 +}
 +
  static struct platform_driver pxafb_driver = {
        .probe          = pxafb_probe,
 +      .remove         = pxafb_remove,
        .suspend        = pxafb_suspend,
        .resume         = pxafb_resume,
        .driver         = {
 +              .owner  = THIS_MODULE,
                .name   = "pxa2xx-fb",
        },
  };
@@@ -1832,13 -1795,7 +1833,13 @@@ static int __devinit pxafb_init(void
        return platform_driver_register(&pxafb_driver);
  }
  
 +static void __exit pxafb_exit(void)
 +{
 +      platform_driver_unregister(&pxafb_driver);
 +}
 +
  module_init(pxafb_init);
 +module_exit(pxafb_exit);
  
  MODULE_DESCRIPTION("loadable framebuffer driver for PXA");
  MODULE_LICENSE("GPL");
index a6e60f691617c708c265121f524258ff314728a0,b81cd63cb2eb91d216d2390efd22e04c0184c2bd..6ef1dd09970b47240ddc5c1ce0447a8e2088a699
@@@ -1,8 -1,6 +1,8 @@@
  #ifndef __ASM_ARCH_PXA2XX_GPIO_H
  #define __ASM_ARCH_PXA2XX_GPIO_H
  
 +#warning Please use mfp-pxa2[57]x.h instead of pxa2xx-gpio.h
 +
  /* GPIO alternate function assignments */
  
  #define GPIO1_RST             1       /* reset */
  #define GPIO93_CIF_DD_6               93      /* Camera data pin 6 */
  #define GPIO94_CIF_DD_5               94      /* Camera data pin 5 */
  #define GPIO95_CIF_DD_4               95      /* Camera data pin 4 */
+ #define GPIO96_FFRXD          96      /* FFUART recieve */
+ #define GPIO98_FFRTS          98      /* FFUART request to send */
  #define GPIO98_CIF_DD_0               98      /* Camera data pin 0 */
+ #define GPIO99_FFTXD          99      /* FFUART transmit data */
+ #define GPIO100_FFCTS         100     /* FFUART Clear to send */
  #define GPIO102_nPCE_1                102     /* PCMCIA (PXA27x) */
  #define GPIO103_CIF_DD_3      103     /* Camera data pin 3 */
  #define GPIO104_CIF_DD_2      104     /* Camera data pin 2 */
  #define GPIO85_nPCE_1_MD      (85 | GPIO_ALT_FN_1_OUT)
  #define GPIO85_CIF_LV_MD      (85 | GPIO_ALT_FN_3_IN)
  #define GPIO86_nPCE_1_MD      (86 | GPIO_ALT_FN_1_OUT)
+ #define GPIO88_USBH1_PWR_MD   (88 | GPIO_ALT_FN_1_IN)
+ #define GPIO89_USBH1_PEN_MD   (89 | GPIO_ALT_FN_2_OUT)
  #define GPIO90_CIF_DD_4_MD    (90 | GPIO_ALT_FN_3_IN)
  #define GPIO91_CIF_DD_5_MD    (91 | GPIO_ALT_FN_3_IN)
  #define GPIO92_MMCDAT0_MD     (92 | GPIO_ALT_FN_1_OUT)
  #define GPIO95_CIF_DD_4_MD    (95 | GPIO_ALT_FN_2_IN)
  #define GPIO95_KP_MKIN6_MD    (95 | GPIO_ALT_FN_3_IN)
  #define GPIO96_KP_DKIN3_MD    (96 | GPIO_ALT_FN_1_IN)
+ #define GPIO96_FFRXD_MD               (96 | GPIO_ALT_FN_3_IN)
  #define GPIO97_KP_MKIN3_MD    (97 | GPIO_ALT_FN_3_IN)
  #define GPIO98_CIF_DD_0_MD    (98 | GPIO_ALT_FN_2_IN)
+ #define GPIO98_FFRTS_MD               (98 | GPIO_ALT_FN_3_OUT)
+ #define GPIO99_FFTXD_MD               (99 | GPIO_ALT_FN_3_OUT)
  #define GPIO100_KP_MKIN0_MD   (100 | GPIO_ALT_FN_1_IN)
  #define GPIO101_KP_MKIN1_MD   (101 | GPIO_ALT_FN_1_IN)
  #define GPIO102_nPCE_1_MD     (102 | GPIO_ALT_FN_1_OUT)