diff options
| author | David Vrabel <david.vrabel@csr.com> | 2009-01-02 08:17:13 -0500 |
|---|---|---|
| committer | David Vrabel <david.vrabel@csr.com> | 2009-01-02 08:17:13 -0500 |
| commit | b21a207141d83a06abc5f492b80204602e02ca44 (patch) | |
| tree | f0152cde543008c72d7eb5c12c18095ad92785e6 /drivers/usb/host | |
| parent | 3af373021fa32f8f787bfbdcc1a9277a287bde4e (diff) | |
| parent | b58602a4bac012b5f4fc12fe6b46ab237b610d5d (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-upstream
Conflicts:
drivers/uwb/wlp/eda.c
Diffstat (limited to 'drivers/usb/host')
| -rw-r--r-- | drivers/usb/host/ehci-orion.c | 17 | ||||
| -rw-r--r-- | drivers/usb/host/ohci-omap.c | 8 | ||||
| -rw-r--r-- | drivers/usb/host/ohci-pxa27x.c | 2 | ||||
| -rw-r--r-- | drivers/usb/host/r8a66597-hcd.c | 34 | ||||
| -rw-r--r-- | drivers/usb/host/r8a66597.h | 8 |
5 files changed, 58 insertions, 11 deletions
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c index 5416cf969005..9d487908012e 100644 --- a/drivers/usb/host/ehci-orion.c +++ b/drivers/usb/host/ehci-orion.c | |||
| @@ -33,8 +33,9 @@ | |||
| 33 | /* | 33 | /* |
| 34 | * Implement Orion USB controller specification guidelines | 34 | * Implement Orion USB controller specification guidelines |
| 35 | */ | 35 | */ |
| 36 | static void orion_usb_setup(struct usb_hcd *hcd) | 36 | static void orion_usb_phy_v1_setup(struct usb_hcd *hcd) |
| 37 | { | 37 | { |
| 38 | /* The below GLs are according to the Orion Errata document */ | ||
| 38 | /* | 39 | /* |
| 39 | * Clear interrupt cause and mask | 40 | * Clear interrupt cause and mask |
| 40 | */ | 41 | */ |
| @@ -258,9 +259,19 @@ static int __init ehci_orion_drv_probe(struct platform_device *pdev) | |||
| 258 | ehci_orion_conf_mbus_windows(hcd, pd->dram); | 259 | ehci_orion_conf_mbus_windows(hcd, pd->dram); |
| 259 | 260 | ||
| 260 | /* | 261 | /* |
| 261 | * setup Orion USB controller | 262 | * setup Orion USB controller. |
| 262 | */ | 263 | */ |
| 263 | orion_usb_setup(hcd); | 264 | switch (pd->phy_version) { |
| 265 | case EHCI_PHY_NA: /* dont change USB phy settings */ | ||
| 266 | break; | ||
| 267 | case EHCI_PHY_ORION: | ||
| 268 | orion_usb_phy_v1_setup(hcd); | ||
| 269 | break; | ||
| 270 | case EHCI_PHY_DD: | ||
| 271 | case EHCI_PHY_KW: | ||
| 272 | default: | ||
| 273 | printk(KERN_WARNING "Orion ehci -USB phy version isn't supported.\n"); | ||
| 274 | } | ||
| 264 | 275 | ||
| 265 | err = usb_add_hcd(hcd, irq, IRQF_SHARED | IRQF_DISABLED); | 276 | err = usb_add_hcd(hcd, irq, IRQF_SHARED | IRQF_DISABLED); |
| 266 | if (err) | 277 | if (err) |
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index 91697bdb399f..4bbddb73abd9 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/jiffies.h> | 18 | #include <linux/jiffies.h> |
| 19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
| 20 | #include <linux/clk.h> | 20 | #include <linux/clk.h> |
| 21 | #include <linux/gpio.h> | ||
| 21 | 22 | ||
| 22 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
| 23 | #include <asm/io.h> | 24 | #include <asm/io.h> |
| @@ -25,7 +26,6 @@ | |||
| 25 | 26 | ||
| 26 | #include <mach/mux.h> | 27 | #include <mach/mux.h> |
| 27 | #include <mach/irqs.h> | 28 | #include <mach/irqs.h> |
| 28 | #include <mach/gpio.h> | ||
| 29 | #include <mach/fpga.h> | 29 | #include <mach/fpga.h> |
| 30 | #include <mach/usb.h> | 30 | #include <mach/usb.h> |
| 31 | 31 | ||
| @@ -254,8 +254,8 @@ static int ohci_omap_init(struct usb_hcd *hcd) | |||
| 254 | 254 | ||
| 255 | /* gpio9 for overcurrent detction */ | 255 | /* gpio9 for overcurrent detction */ |
| 256 | omap_cfg_reg(W8_1610_GPIO9); | 256 | omap_cfg_reg(W8_1610_GPIO9); |
| 257 | omap_request_gpio(9); | 257 | gpio_request(9, "OHCI overcurrent"); |
| 258 | omap_set_gpio_direction(9, 1 /* IN */); | 258 | gpio_direction_input(9); |
| 259 | 259 | ||
| 260 | /* for paranoia's sake: disable USB.PUEN */ | 260 | /* for paranoia's sake: disable USB.PUEN */ |
| 261 | omap_cfg_reg(W4_USB_HIGHZ); | 261 | omap_cfg_reg(W4_USB_HIGHZ); |
| @@ -407,7 +407,7 @@ usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev) | |||
| 407 | put_device(ohci->transceiver->dev); | 407 | put_device(ohci->transceiver->dev); |
| 408 | } | 408 | } |
| 409 | if (machine_is_omap_osk()) | 409 | if (machine_is_omap_osk()) |
| 410 | omap_free_gpio(9); | 410 | gpio_free(9); |
| 411 | iounmap(hcd->regs); | 411 | iounmap(hcd->regs); |
| 412 | release_mem_region(hcd->rsrc_start, hcd->rsrc_len); | 412 | release_mem_region(hcd->rsrc_start, hcd->rsrc_len); |
| 413 | usb_put_hcd(hcd); | 413 | usb_put_hcd(hcd); |
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index e294d430733b..e44dc2cbca24 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c | |||
| @@ -296,7 +296,7 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device | |||
| 296 | return -ENXIO; | 296 | return -ENXIO; |
| 297 | } | 297 | } |
| 298 | 298 | ||
| 299 | usb_clk = clk_get(&pdev->dev, "USBCLK"); | 299 | usb_clk = clk_get(&pdev->dev, NULL); |
| 300 | if (IS_ERR(usb_clk)) | 300 | if (IS_ERR(usb_clk)) |
| 301 | return PTR_ERR(usb_clk); | 301 | return PTR_ERR(usb_clk); |
| 302 | 302 | ||
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index 2376f24f3c83..c21f14e0666a 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c | |||
| @@ -114,6 +114,9 @@ static int r8a66597_clock_enable(struct r8a66597 *r8a66597) | |||
| 114 | int i = 0; | 114 | int i = 0; |
| 115 | 115 | ||
| 116 | #if defined(CONFIG_SUPERH_ON_CHIP_R8A66597) | 116 | #if defined(CONFIG_SUPERH_ON_CHIP_R8A66597) |
| 117 | #if defined(CONFIG_HAVE_CLK) | ||
| 118 | clk_enable(r8a66597->clk); | ||
| 119 | #endif | ||
| 117 | do { | 120 | do { |
| 118 | r8a66597_write(r8a66597, SCKE, SYSCFG0); | 121 | r8a66597_write(r8a66597, SCKE, SYSCFG0); |
| 119 | tmp = r8a66597_read(r8a66597, SYSCFG0); | 122 | tmp = r8a66597_read(r8a66597, SYSCFG0); |
| @@ -154,7 +157,11 @@ static void r8a66597_clock_disable(struct r8a66597 *r8a66597) | |||
| 154 | { | 157 | { |
| 155 | r8a66597_bclr(r8a66597, SCKE, SYSCFG0); | 158 | r8a66597_bclr(r8a66597, SCKE, SYSCFG0); |
| 156 | udelay(1); | 159 | udelay(1); |
| 157 | #if !defined(CONFIG_SUPERH_ON_CHIP_R8A66597) | 160 | #if defined(CONFIG_SUPERH_ON_CHIP_R8A66597) |
| 161 | #if defined(CONFIG_HAVE_CLK) | ||
| 162 | clk_disable(r8a66597->clk); | ||
| 163 | #endif | ||
| 164 | #else | ||
| 158 | r8a66597_bclr(r8a66597, PLLC, SYSCFG0); | 165 | r8a66597_bclr(r8a66597, PLLC, SYSCFG0); |
| 159 | r8a66597_bclr(r8a66597, XCKE, SYSCFG0); | 166 | r8a66597_bclr(r8a66597, XCKE, SYSCFG0); |
| 160 | r8a66597_bclr(r8a66597, USBE, SYSCFG0); | 167 | r8a66597_bclr(r8a66597, USBE, SYSCFG0); |
| @@ -2261,6 +2268,9 @@ static int __init_or_module r8a66597_remove(struct platform_device *pdev) | |||
| 2261 | del_timer_sync(&r8a66597->rh_timer); | 2268 | del_timer_sync(&r8a66597->rh_timer); |
| 2262 | usb_remove_hcd(hcd); | 2269 | usb_remove_hcd(hcd); |
| 2263 | iounmap((void *)r8a66597->reg); | 2270 | iounmap((void *)r8a66597->reg); |
| 2271 | #if defined(CONFIG_SUPERH_ON_CHIP_R8A66597) && defined(CONFIG_HAVE_CLK) | ||
| 2272 | clk_put(r8a66597->clk); | ||
| 2273 | #endif | ||
| 2264 | usb_put_hcd(hcd); | 2274 | usb_put_hcd(hcd); |
| 2265 | return 0; | 2275 | return 0; |
| 2266 | } | 2276 | } |
| @@ -2268,6 +2278,9 @@ static int __init_or_module r8a66597_remove(struct platform_device *pdev) | |||
| 2268 | #define resource_len(r) (((r)->end - (r)->start) + 1) | 2278 | #define resource_len(r) (((r)->end - (r)->start) + 1) |
| 2269 | static int __init r8a66597_probe(struct platform_device *pdev) | 2279 | static int __init r8a66597_probe(struct platform_device *pdev) |
| 2270 | { | 2280 | { |
| 2281 | #if defined(CONFIG_SUPERH_ON_CHIP_R8A66597) && defined(CONFIG_HAVE_CLK) | ||
| 2282 | char clk_name[8]; | ||
| 2283 | #endif | ||
| 2271 | struct resource *res = NULL, *ires; | 2284 | struct resource *res = NULL, *ires; |
| 2272 | int irq = -1; | 2285 | int irq = -1; |
| 2273 | void __iomem *reg = NULL; | 2286 | void __iomem *reg = NULL; |
| @@ -2320,6 +2333,16 @@ static int __init r8a66597_probe(struct platform_device *pdev) | |||
| 2320 | memset(r8a66597, 0, sizeof(struct r8a66597)); | 2333 | memset(r8a66597, 0, sizeof(struct r8a66597)); |
| 2321 | dev_set_drvdata(&pdev->dev, r8a66597); | 2334 | dev_set_drvdata(&pdev->dev, r8a66597); |
| 2322 | 2335 | ||
| 2336 | #if defined(CONFIG_SUPERH_ON_CHIP_R8A66597) && defined(CONFIG_HAVE_CLK) | ||
| 2337 | snprintf(clk_name, sizeof(clk_name), "usb%d", pdev->id); | ||
| 2338 | r8a66597->clk = clk_get(&pdev->dev, clk_name); | ||
| 2339 | if (IS_ERR(r8a66597->clk)) { | ||
| 2340 | dev_err(&pdev->dev, "cannot get clock \"%s\"\n", clk_name); | ||
| 2341 | ret = PTR_ERR(r8a66597->clk); | ||
| 2342 | goto clean_up2; | ||
| 2343 | } | ||
| 2344 | #endif | ||
| 2345 | |||
| 2323 | spin_lock_init(&r8a66597->lock); | 2346 | spin_lock_init(&r8a66597->lock); |
| 2324 | init_timer(&r8a66597->rh_timer); | 2347 | init_timer(&r8a66597->rh_timer); |
| 2325 | r8a66597->rh_timer.function = r8a66597_timer; | 2348 | r8a66597->rh_timer.function = r8a66597_timer; |
| @@ -2365,11 +2388,18 @@ static int __init r8a66597_probe(struct platform_device *pdev) | |||
| 2365 | ret = usb_add_hcd(hcd, irq, IRQF_DISABLED | irq_trigger); | 2388 | ret = usb_add_hcd(hcd, irq, IRQF_DISABLED | irq_trigger); |
| 2366 | if (ret != 0) { | 2389 | if (ret != 0) { |
| 2367 | dev_err(&pdev->dev, "Failed to add hcd\n"); | 2390 | dev_err(&pdev->dev, "Failed to add hcd\n"); |
| 2368 | goto clean_up; | 2391 | goto clean_up3; |
| 2369 | } | 2392 | } |
| 2370 | 2393 | ||
| 2371 | return 0; | 2394 | return 0; |
| 2372 | 2395 | ||
| 2396 | clean_up3: | ||
| 2397 | #if defined(CONFIG_SUPERH_ON_CHIP_R8A66597) && defined(CONFIG_HAVE_CLK) | ||
| 2398 | clk_put(r8a66597->clk); | ||
| 2399 | clean_up2: | ||
| 2400 | #endif | ||
| 2401 | usb_put_hcd(hcd); | ||
| 2402 | |||
| 2373 | clean_up: | 2403 | clean_up: |
| 2374 | if (reg) | 2404 | if (reg) |
| 2375 | iounmap(reg); | 2405 | iounmap(reg); |
diff --git a/drivers/usb/host/r8a66597.h b/drivers/usb/host/r8a66597.h index 84ee01417315..ecacde4d69b0 100644 --- a/drivers/usb/host/r8a66597.h +++ b/drivers/usb/host/r8a66597.h | |||
| @@ -26,6 +26,10 @@ | |||
| 26 | #ifndef __R8A66597_H__ | 26 | #ifndef __R8A66597_H__ |
| 27 | #define __R8A66597_H__ | 27 | #define __R8A66597_H__ |
| 28 | 28 | ||
| 29 | #if defined(CONFIG_SUPERH_ON_CHIP_R8A66597) && defined(CONFIG_HAVE_CLK) | ||
| 30 | #include <linux/clk.h> | ||
| 31 | #endif | ||
| 32 | |||
| 29 | #define SYSCFG0 0x00 | 33 | #define SYSCFG0 0x00 |
| 30 | #define SYSCFG1 0x02 | 34 | #define SYSCFG1 0x02 |
| 31 | #define SYSSTS0 0x04 | 35 | #define SYSSTS0 0x04 |
| @@ -481,7 +485,9 @@ struct r8a66597_root_hub { | |||
| 481 | struct r8a66597 { | 485 | struct r8a66597 { |
| 482 | spinlock_t lock; | 486 | spinlock_t lock; |
| 483 | unsigned long reg; | 487 | unsigned long reg; |
| 484 | 488 | #if defined(CONFIG_SUPERH_ON_CHIP_R8A66597) && defined(CONFIG_HAVE_CLK) | |
| 489 | struct clk *clk; | ||
| 490 | #endif | ||
| 485 | struct r8a66597_device device0; | 491 | struct r8a66597_device device0; |
| 486 | struct r8a66597_root_hub root_hub[R8A66597_MAX_ROOT_HUB]; | 492 | struct r8a66597_root_hub root_hub[R8A66597_MAX_ROOT_HUB]; |
| 487 | struct list_head pipe_queue[R8A66597_MAX_NUM_PIPE]; | 493 | struct list_head pipe_queue[R8A66597_MAX_NUM_PIPE]; |
