aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/pxa27x_udc.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2009-04-21 23:34:24 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-16 00:44:42 -0400
commitf6d529f936672d341fab14ffb0d8eebeee2d8cd3 (patch)
tree6226e0732f24411b4afc681f6bf2872e4f360340 /drivers/usb/gadget/pxa27x_udc.c
parent1eba67a60d6c95f7eae94930ec369f2837bb5b12 (diff)
USB: pxa27x_udc: introduce pxa27x_clear_otgph()
Follow pxa27x change in OTGPH handling, and use the newly defined pxa27x_clear_otgph(). Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Eric Miao <eric.miao@marvell.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'drivers/usb/gadget/pxa27x_udc.c')
-rw-r--r--drivers/usb/gadget/pxa27x_udc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c
index 8cc676ecbb23..ffe6e0afc2ee 100644
--- a/drivers/usb/gadget/pxa27x_udc.c
+++ b/drivers/usb/gadget/pxa27x_udc.c
@@ -38,7 +38,6 @@
38#include <linux/usb.h> 38#include <linux/usb.h>
39#include <linux/usb/ch9.h> 39#include <linux/usb/ch9.h>
40#include <linux/usb/gadget.h> 40#include <linux/usb/gadget.h>
41#include <mach/pxa2xx-regs.h> /* FIXME: for PSSR */
42#include <mach/udc.h> 41#include <mach/udc.h>
43 42
44#include "pxa27x_udc.h" 43#include "pxa27x_udc.h"
@@ -2479,6 +2478,12 @@ static void pxa_udc_shutdown(struct platform_device *_dev)
2479 udc_disable(udc); 2478 udc_disable(udc);
2480} 2479}
2481 2480
2481#ifdef CONFIG_CPU_PXA27x
2482extern void pxa27x_clear_otgph(void);
2483#else
2484#define pxa27x_clear_otgph() do {} while (0)
2485#endif
2486
2482#ifdef CONFIG_PM 2487#ifdef CONFIG_PM
2483/** 2488/**
2484 * pxa_udc_suspend - Suspend udc device 2489 * pxa_udc_suspend - Suspend udc device
@@ -2546,8 +2551,7 @@ static int pxa_udc_resume(struct platform_device *_dev)
2546 * Software must configure the USB OTG pad, UDC, and UHC 2551 * Software must configure the USB OTG pad, UDC, and UHC
2547 * to the state they were in before entering sleep mode. 2552 * to the state they were in before entering sleep mode.
2548 */ 2553 */
2549 if (cpu_is_pxa27x()) 2554 pxa27x_clear_otgph();
2550 PSSR |= PSSR_OTGPH;
2551 2555
2552 return 0; 2556 return 0;
2553} 2557}