]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] 3547/1: PXA-OHCI: Allow platforms to specify a power budget
authorRichard Purdie <rpurdie@rpsys.net>
Thu, 8 Jun 2006 21:44:07 +0000 (22:44 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 8 Jun 2006 21:44:07 +0000 (22:44 +0100)
Patch from Richard Purdie

Add a power budget variable to the PXA OHCI platform data and add a
default value for the spitz platform(s) which prevents known failures
with certain USB devices.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-pxa/spitz.c
drivers/usb/host/ohci-pxa27x.c
include/asm-arm/arch-pxa/ohci.h

index 19b372df544a094a086c05cc3e438c9fb7a606b6..44bcb8097c7ada753a985170a4e2e3a44df2be9c 100644 (file)
@@ -371,6 +371,7 @@ static int spitz_ohci_init(struct device *dev)
 static struct pxaohci_platform_data spitz_ohci_platform_data = {
        .port_mode      = PMM_NPS_MODE,
        .init           = spitz_ohci_init,
+       .power_budget   = 150,
 };
 
 
index acde8868da21f959cf36a9ea28df3901434ade18..fafe7c1265b31f9e719dadc9a7fbb3bebefbc89d 100644 (file)
@@ -185,6 +185,9 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device
        /* Select Power Management Mode */
        pxa27x_ohci_select_pmm(inf->port_mode);
 
+       if (inf->power_budget)
+               hcd->power_budget = inf->power_budget;
+
        ohci_hcd_init(hcd_to_ohci(hcd));
 
        retval = usb_add_hcd(hcd, pdev->resource[1].start, SA_INTERRUPT);
index 7da89569061eb025163eff9745437971c6459743..e848a47128cdd42b3a9bed8b48b3fc316ff1d2d4 100644 (file)
@@ -11,6 +11,8 @@ struct pxaohci_platform_data {
 #define PMM_NPS_MODE           1
 #define PMM_GLOBAL_MODE        2
 #define PMM_PERPORT_MODE       3
+
+       int power_budget;
 };
 
 extern void pxa_set_ohci_info(struct pxaohci_platform_data *info);