]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge with /home/tmlind/src/kernel/linux-omap-2.6
authorTony Lindgren <tony@atomide.com>
Wed, 9 Nov 2005 20:55:39 +0000 (12:55 -0800)
committerTony Lindgren <tony@atomide.com>
Wed, 9 Nov 2005 20:55:39 +0000 (12:55 -0800)
1  2 
arch/arm/plat-omap/usb.c
drivers/usb/gadget/omap_udc.c

diff --combined arch/arm/plat-omap/usb.c
index e6b497f94861f5dbd4b4c2d1d442bb3f8a9dce68,517131112c266ebed8862f85dc2302d60c8ae5c8..00afc7a8c2ab036634392214358073235a4f4548
@@@ -26,7 -26,7 +26,7 @@@
  #include <linux/types.h>
  #include <linux/errno.h>
  #include <linux/init.h>
 -#include <linux/device.h>
 +#include <linux/platform_device.h>
  #include <linux/usb_otg.h>
  
  #include <asm/io.h>
@@@ -91,6 -91,8 +91,8 @@@ EXPORT_SYMBOL(otg_set_transceiver)
  
  /*-------------------------------------------------------------------------*/
  
+ #if defined(CONFIG_ARCH_OMAP_OTG) || defined(CONFIG_ARCH_OMAP15XX)
  static u32 __init omap_usb0_init(unsigned nwires, unsigned is_device)
  {
        u32     syscon1 = 0;
@@@ -271,6 -273,8 +273,8 @@@ static u32 __init omap_usb2_init(unsign
        return syscon1 << 24;
  }
  
+ #endif
  /*-------------------------------------------------------------------------*/
  
  #if   defined(CONFIG_USB_GADGET_OMAP) || \
index 8611a9d949d8cc4a8603aa53a87f1b6ca970ae3e,9e12923a5169f3dd44dd9f22b9f36c552ad3851a..3e372fd6dedf4cf603592cb78ee9b2243b10d563
@@@ -38,7 -38,7 +38,7 @@@
  #include <linux/proc_fs.h>
  #include <linux/mm.h>
  #include <linux/moduleparam.h>
 -#include <linux/device.h>
 +#include <linux/platform_device.h>
  #include <linux/usb_ch9.h>
  #include <linux/usb_gadget.h>
  #include <linux/usb_otg.h>
@@@ -269,7 -269,7 +269,7 @@@ static int omap_ep_disable(struct usb_e
  /*-------------------------------------------------------------------------*/
  
  static struct usb_request *
 -omap_alloc_request(struct usb_ep *ep, unsigned gfp_flags)
 +omap_alloc_request(struct usb_ep *ep, gfp_t gfp_flags)
  {
        struct omap_req *req;
  
@@@ -298,7 -298,7 +298,7 @@@ omap_alloc_buffer
        struct usb_ep   *_ep,
        unsigned        bytes,
        dma_addr_t      *dma,
 -      unsigned        gfp_flags
 +      gfp_t           gfp_flags
  )
  {
        void            *retval;
@@@ -544,9 -544,9 +544,9 @@@ static inline dma_addr_t dma_csac(unsig
        /* omap 3.2/3.3 erratum: sometimes 0 is returned if CSAC/CDAC is
         * read before the DMA controller finished disabling the channel.
         */
-       csac = omap_readw(OMAP_DMA_CSAC(lch));
+       csac = OMAP_DMA_CSAC_REG(lch);
        if (csac == 0)
-               csac = omap_readw(OMAP_DMA_CSAC(lch));
+               csac = OMAP_DMA_CSAC_REG(lch);
        return csac;
  }
  
@@@ -557,9 -557,9 +557,9 @@@ static inline dma_addr_t dma_cdac(unsig
        /* omap 3.2/3.3 erratum: sometimes 0 is returned if CSAC/CDAC is
         * read before the DMA controller finished disabling the channel.
         */
-       cdac = omap_readw(OMAP_DMA_CDAC(lch));
+       cdac = OMAP_DMA_CDAC_REG(lch);
        if (cdac == 0)
-               cdac = omap_readw(OMAP_DMA_CDAC(lch));
+               cdac = OMAP_DMA_CDAC_REG(lch);
        return cdac;
  }
  
@@@ -584,7 -584,7 +584,7 @@@ static u16 dma_src_len(struct omap_ep *
  }
  
  #define DMA_DEST_LAST(x) (cpu_is_omap15xx() \
-               ? omap_readw(OMAP_DMA_CSAC(x)) /* really: CPC */ \
+               ? OMAP_DMA_CSAC_REG(x) /* really: CPC */ \
                : dma_cdac(x))
  
  static u16 dma_dest_len(struct omap_ep *ep, dma_addr_t start)
@@@ -854,7 -854,7 +854,7 @@@ static void dma_channel_claim(struct om
  
                /* channel type P: hw synch (fifo) */
                if (!cpu_is_omap15xx())
-                       omap_writew(2, OMAP_DMA_LCH_CTRL(ep->lch));
+                       OMAP1_DMA_LCH_CTRL_REG(ep->lch) = 2;
        }
  
  just_restart:
@@@ -901,7 -901,7 +901,7 @@@ static void dma_channel_release(struct 
        else
                req = NULL;
  
-       active = ((1 << 7) & omap_readl(OMAP_DMA_CCR(ep->lch))) != 0;
+       active = ((1 << 7) & OMAP_DMA_CCR_REG(ep->lch)) != 0;
  
        DBG("%s release %s %cxdma%d %p\n", ep->ep.name,
                        active ? "active" : "idle",
  /*-------------------------------------------------------------------------*/
  
  static int
 -omap_ep_queue(struct usb_ep *_ep, struct usb_request *_req, unsigned gfp_flags)
 +omap_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
  {
        struct omap_ep  *ep = container_of(_ep, struct omap_ep, ep);
        struct omap_req *req = container_of(_req, struct omap_req, req);
@@@ -1794,12 -1794,8 +1794,12 @@@ static void devstate_irq(struct omap_ud
                                        udc->driver->suspend(&udc->gadget);
                                        spin_lock(&udc->lock);
                                }
 +                              if (udc->transceiver)
 +                                      otg_set_suspend(udc->transceiver, 1);
                        } else {
                                VDBG("resume\n");
 +                              if (udc->transceiver)
 +                                      otg_set_suspend(udc->transceiver, 0);
                                if (udc->gadget.speed == USB_SPEED_FULL
                                                && udc->driver->resume) {
                                        spin_unlock(&udc->lock);
@@@ -2921,10 -2917,12 +2921,10 @@@ static int __exit omap_udc_remove(struc
   * may involve talking to an external transceiver (e.g. isp1301).
   */
  
 -static int omap_udc_suspend(struct device *dev, pm_message_t message, u32 level)
 +static int omap_udc_suspend(struct device *dev, pm_message_t message)
  {
        u32     devstat;
  
 -      if (level != SUSPEND_POWER_DOWN)
 -              return 0;
        devstat = UDC_DEVSTAT_REG;
  
        /* we're requesting 48 MHz clock if the pullup is enabled
        return 0;
  }
  
 -static int omap_udc_resume(struct device *dev, u32 level)
 +static int omap_udc_resume(struct device *dev)
  {
 -      if (level != RESUME_POWER_ON)
 -              return 0;
 -
        DBG("resume + wakeup/SRP\n");
        omap_pullup(&udc->gadget, 1);
  
  
  static struct device_driver udc_driver = {
        .name           = (char *) driver_name,
 +      .owner          = THIS_MODULE,
        .bus            = &platform_bus_type,
        .probe          = omap_udc_probe,
        .remove         = __exit_p(omap_udc_remove),