diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/usb/host/ohci-at91.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/usb/host/ohci-at91.c')
-rw-r--r-- | drivers/usb/host/ohci-at91.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 7ccffcbe7b6f..944291e10f97 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c | |||
@@ -35,7 +35,7 @@ extern int usb_disabled(void); | |||
35 | 35 | ||
36 | static void at91_start_clock(void) | 36 | static void at91_start_clock(void) |
37 | { | 37 | { |
38 | if (cpu_is_at91sam9261()) | 38 | if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) |
39 | clk_enable(hclk); | 39 | clk_enable(hclk); |
40 | clk_enable(iclk); | 40 | clk_enable(iclk); |
41 | clk_enable(fclk); | 41 | clk_enable(fclk); |
@@ -46,7 +46,7 @@ static void at91_stop_clock(void) | |||
46 | { | 46 | { |
47 | clk_disable(fclk); | 47 | clk_disable(fclk); |
48 | clk_disable(iclk); | 48 | clk_disable(iclk); |
49 | if (cpu_is_at91sam9261()) | 49 | if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) |
50 | clk_disable(hclk); | 50 | clk_disable(hclk); |
51 | clocked = 0; | 51 | clocked = 0; |
52 | } | 52 | } |
@@ -142,7 +142,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver, | |||
142 | 142 | ||
143 | iclk = clk_get(&pdev->dev, "ohci_clk"); | 143 | iclk = clk_get(&pdev->dev, "ohci_clk"); |
144 | fclk = clk_get(&pdev->dev, "uhpck"); | 144 | fclk = clk_get(&pdev->dev, "uhpck"); |
145 | if (cpu_is_at91sam9261()) | 145 | if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) |
146 | hclk = clk_get(&pdev->dev, "hck0"); | 146 | hclk = clk_get(&pdev->dev, "hck0"); |
147 | 147 | ||
148 | at91_start_hc(pdev); | 148 | at91_start_hc(pdev); |
@@ -155,7 +155,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver, | |||
155 | /* Error handling */ | 155 | /* Error handling */ |
156 | at91_stop_hc(pdev); | 156 | at91_stop_hc(pdev); |
157 | 157 | ||
158 | if (cpu_is_at91sam9261()) | 158 | if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) |
159 | clk_put(hclk); | 159 | clk_put(hclk); |
160 | clk_put(fclk); | 160 | clk_put(fclk); |
161 | clk_put(iclk); | 161 | clk_put(iclk); |
@@ -192,7 +192,7 @@ static void usb_hcd_at91_remove(struct usb_hcd *hcd, | |||
192 | release_mem_region(hcd->rsrc_start, hcd->rsrc_len); | 192 | release_mem_region(hcd->rsrc_start, hcd->rsrc_len); |
193 | usb_put_hcd(hcd); | 193 | usb_put_hcd(hcd); |
194 | 194 | ||
195 | if (cpu_is_at91sam9261()) | 195 | if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) |
196 | clk_put(hclk); | 196 | clk_put(hclk); |
197 | clk_put(fclk); | 197 | clk_put(fclk); |
198 | clk_put(iclk); | 198 | clk_put(iclk); |
@@ -331,6 +331,8 @@ ohci_hcd_at91_drv_suspend(struct platform_device *pdev, pm_message_t mesg) | |||
331 | */ | 331 | */ |
332 | if (at91_suspend_entering_slow_clock()) { | 332 | if (at91_suspend_entering_slow_clock()) { |
333 | ohci_usb_reset (ohci); | 333 | ohci_usb_reset (ohci); |
334 | /* flush the writes */ | ||
335 | (void) ohci_readl (ohci, &ohci->regs->control); | ||
334 | at91_stop_clock(); | 336 | at91_stop_clock(); |
335 | } | 337 | } |
336 | 338 | ||