diff options
author | Hong Xu <hong.xu@atmel.com> | 2009-09-25 06:24:12 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-11 14:55:15 -0500 |
commit | 23f6d914c338626a7216c46ed35b653f4070accf (patch) | |
tree | fcb3e9249560427744f87d1fb11d75db66205a61 /drivers/usb/host/ohci-at91.c | |
parent | 0ad72524ef623f32f6899e656951bb5646caead1 (diff) |
USB: modifications for at91sam9g10
Modify both host and gadget USB drivers for at91sam9g10.
This add a clock management equivalent to at91sam9261 on usb drivers.
It also add the way of handling gadget pull-ups (like the at91sam9261).
Signed-off-by: Hong Xu <hong.xu@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'drivers/usb/host/ohci-at91.c')
-rw-r--r-- | drivers/usb/host/ohci-at91.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 7ccffcbe7b6f..68b83ab70719 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); |