aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-08-29 21:29:28 -0400
committerArnd Bergmann <arnd@arndb.de>2011-09-10 17:03:13 -0400
commit0af4316babb64c6703c113a89462ff7843767f24 (patch)
tree0e35e9edb39662572649ebcbe71c96017017ecf3 /drivers/usb
parentc6a389f123b9f68d605bb7e0f9b32ec1e3e14132 (diff)
at91: ohci-at91: always provide all the clocks
Remove the cpu_is_at91xxxx() macros in the ohci-at91 driver. SoCs at91sam9261 and at91sam9g10 expect one additional clock: hck0. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ohci-at91.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index 944291e10f97..e08cb10d1aca 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -35,8 +35,7 @@ extern int usb_disabled(void);
35 35
36static void at91_start_clock(void) 36static void at91_start_clock(void)
37{ 37{
38 if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) 38 clk_enable(hclk);
39 clk_enable(hclk);
40 clk_enable(iclk); 39 clk_enable(iclk);
41 clk_enable(fclk); 40 clk_enable(fclk);
42 clocked = 1; 41 clocked = 1;
@@ -46,8 +45,7 @@ static void at91_stop_clock(void)
46{ 45{
47 clk_disable(fclk); 46 clk_disable(fclk);
48 clk_disable(iclk); 47 clk_disable(iclk);
49 if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) 48 clk_disable(hclk);
50 clk_disable(hclk);
51 clocked = 0; 49 clocked = 0;
52} 50}
53 51
@@ -142,8 +140,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
142 140
143 iclk = clk_get(&pdev->dev, "ohci_clk"); 141 iclk = clk_get(&pdev->dev, "ohci_clk");
144 fclk = clk_get(&pdev->dev, "uhpck"); 142 fclk = clk_get(&pdev->dev, "uhpck");
145 if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) 143 hclk = clk_get(&pdev->dev, "hclk");
146 hclk = clk_get(&pdev->dev, "hck0");
147 144
148 at91_start_hc(pdev); 145 at91_start_hc(pdev);
149 ohci_hcd_init(hcd_to_ohci(hcd)); 146 ohci_hcd_init(hcd_to_ohci(hcd));
@@ -155,8 +152,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
155 /* Error handling */ 152 /* Error handling */
156 at91_stop_hc(pdev); 153 at91_stop_hc(pdev);
157 154
158 if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) 155 clk_put(hclk);
159 clk_put(hclk);
160 clk_put(fclk); 156 clk_put(fclk);
161 clk_put(iclk); 157 clk_put(iclk);
162 158
@@ -192,8 +188,7 @@ static void usb_hcd_at91_remove(struct usb_hcd *hcd,
192 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); 188 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
193 usb_put_hcd(hcd); 189 usb_put_hcd(hcd);
194 190
195 if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) 191 clk_put(hclk);
196 clk_put(hclk);
197 clk_put(fclk); 192 clk_put(fclk);
198 clk_put(iclk); 193 clk_put(iclk);
199 fclk = iclk = hclk = NULL; 194 fclk = iclk = hclk = NULL;