diff options
author | Olof Johansson <olof@lixom.net> | 2012-11-26 04:09:30 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-11-26 04:09:53 -0500 |
commit | 0dfeada90989833d0144b4df25d2b9ce3746624f (patch) | |
tree | 0773c2f81a94ca99b8b07b0d984754c81fdd16cc /drivers/usb/host | |
parent | d408c5dcc524dfc8e687c443719a3d6be86e2ea0 (diff) | |
parent | 2a18588c0ce336933be3c99c91e74e21db56a0fe (diff) |
Merge tag 'orion_dt_for_3.8' of git://git.infradead.org/users/jcooper/linux into next/dt
From Jason Cooper:
orion dt for v3.8
- ehci-orion dt binding
- gpio-poweroff
- use dt regulators
- move mpp to DT/pinctrl
Depends on:
- orion/boards
- merge conflicts
- keep all 'select's in Kconfig
- remove all #includes in board-*.c
- pinctrl/devel up to:
- 06763c7 pinctrl: mvebu: move to its own directory
* tag 'orion_dt_for_3.8' of git://git.infradead.org/users/jcooper/linux: (211 commits)
ARM: Kirkwood: remove kirkwood_ehci_init() from new boards
ARM: Kirkwood: Add support LED of OpenBlocks A6
ARM: Kirkwood: Convert to EHCI via DT for OpenBlocks A6
ARM: kirkwood: Add NAND partiton map for OpenBlocks A6
ARM: kirkwood: Add support second I2C bus and RTC on OpenBlocks A6
ARM: kirkwood: Add support DT of second I2C bus
ARM: kirkwood: Convert mplcec4 board to pinctrl
ARM: Kirkwood: Convert km_kirkwood to pinctrl
ARM: Kirkwood: support 98DX412x kirkwoods with pinctrl
ARM: Kirkwood: Convert IX2-200 to pinctrl.
ARM: Kirkwood: Convert lsxl boards to pinctrl.
ARM: Kirkwood: Convert ib62x0 to pinctrl.
ARM: Kirkwood: Convert GoFlex Net to pinctrl.
ARM: Kirkwood: Convert dreamplug to pinctrl.
ARM: Kirkwood: Convert dockstar to pinctrl.
ARM: Kirkwood: Convert dnskw to pinctrl
ARM: Kirkwood: Convert iConnect to pinctrl.
ARM: Kirkwood: Convert TS219 to pinctrl.
ARM: Kirkwood: Add DTSI files for pinctrl
ARM: Kirkwood: Make use of mvebu pincltl and gpio drivers
...
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/ehci-ls1x.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ehci-orion.c | 38 | ||||
-rw-r--r-- | drivers/usb/host/ohci-xls.c | 2 |
3 files changed, 37 insertions, 5 deletions
diff --git a/drivers/usb/host/ehci-ls1x.c b/drivers/usb/host/ehci-ls1x.c index ca759652626b..aa0f328922df 100644 --- a/drivers/usb/host/ehci-ls1x.c +++ b/drivers/usb/host/ehci-ls1x.c | |||
@@ -113,7 +113,7 @@ static int ehci_hcd_ls1x_probe(struct platform_device *pdev) | |||
113 | goto err_put_hcd; | 113 | goto err_put_hcd; |
114 | } | 114 | } |
115 | 115 | ||
116 | ret = usb_add_hcd(hcd, irq, IRQF_SHARED); | 116 | ret = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED); |
117 | if (ret) | 117 | if (ret) |
118 | goto err_put_hcd; | 118 | goto err_put_hcd; |
119 | 119 | ||
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c index 9c2717d66730..e7e8275028d3 100644 --- a/drivers/usb/host/ehci-orion.c +++ b/drivers/usb/host/ehci-orion.c | |||
@@ -14,6 +14,9 @@ | |||
14 | #include <linux/mbus.h> | 14 | #include <linux/mbus.h> |
15 | #include <linux/clk.h> | 15 | #include <linux/clk.h> |
16 | #include <linux/platform_data/usb-ehci-orion.h> | 16 | #include <linux/platform_data/usb-ehci-orion.h> |
17 | #include <linux/of.h> | ||
18 | #include <linux/of_device.h> | ||
19 | #include <linux/of_irq.h> | ||
17 | 20 | ||
18 | #define rdl(off) __raw_readl(hcd->regs + (off)) | 21 | #define rdl(off) __raw_readl(hcd->regs + (off)) |
19 | #define wrl(off, val) __raw_writel((val), hcd->regs + (off)) | 22 | #define wrl(off, val) __raw_writel((val), hcd->regs + (off)) |
@@ -181,6 +184,8 @@ ehci_orion_conf_mbus_windows(struct usb_hcd *hcd, | |||
181 | } | 184 | } |
182 | } | 185 | } |
183 | 186 | ||
187 | static u64 ehci_orion_dma_mask = DMA_BIT_MASK(32); | ||
188 | |||
184 | static int __devinit ehci_orion_drv_probe(struct platform_device *pdev) | 189 | static int __devinit ehci_orion_drv_probe(struct platform_device *pdev) |
185 | { | 190 | { |
186 | struct orion_ehci_data *pd = pdev->dev.platform_data; | 191 | struct orion_ehci_data *pd = pdev->dev.platform_data; |
@@ -191,13 +196,17 @@ static int __devinit ehci_orion_drv_probe(struct platform_device *pdev) | |||
191 | struct clk *clk; | 196 | struct clk *clk; |
192 | void __iomem *regs; | 197 | void __iomem *regs; |
193 | int irq, err; | 198 | int irq, err; |
199 | enum orion_ehci_phy_ver phy_version; | ||
194 | 200 | ||
195 | if (usb_disabled()) | 201 | if (usb_disabled()) |
196 | return -ENODEV; | 202 | return -ENODEV; |
197 | 203 | ||
198 | pr_debug("Initializing Orion-SoC USB Host Controller\n"); | 204 | pr_debug("Initializing Orion-SoC USB Host Controller\n"); |
199 | 205 | ||
200 | irq = platform_get_irq(pdev, 0); | 206 | if (pdev->dev.of_node) |
207 | irq = irq_of_parse_and_map(pdev->dev.of_node, 0); | ||
208 | else | ||
209 | irq = platform_get_irq(pdev, 0); | ||
201 | if (irq <= 0) { | 210 | if (irq <= 0) { |
202 | dev_err(&pdev->dev, | 211 | dev_err(&pdev->dev, |
203 | "Found HC with no IRQ. Check %s setup!\n", | 212 | "Found HC with no IRQ. Check %s setup!\n", |
@@ -215,6 +224,14 @@ static int __devinit ehci_orion_drv_probe(struct platform_device *pdev) | |||
215 | goto err1; | 224 | goto err1; |
216 | } | 225 | } |
217 | 226 | ||
227 | /* | ||
228 | * Right now device-tree probed devices don't get dma_mask | ||
229 | * set. Since shared usb code relies on it, set it here for | ||
230 | * now. Once we have dma capability bindings this can go away. | ||
231 | */ | ||
232 | if (!pdev->dev.dma_mask) | ||
233 | pdev->dev.dma_mask = &ehci_orion_dma_mask; | ||
234 | |||
218 | if (!request_mem_region(res->start, resource_size(res), | 235 | if (!request_mem_region(res->start, resource_size(res), |
219 | ehci_orion_hc_driver.description)) { | 236 | ehci_orion_hc_driver.description)) { |
220 | dev_dbg(&pdev->dev, "controller already in use\n"); | 237 | dev_dbg(&pdev->dev, "controller already in use\n"); |
@@ -262,7 +279,12 @@ static int __devinit ehci_orion_drv_probe(struct platform_device *pdev) | |||
262 | /* | 279 | /* |
263 | * setup Orion USB controller. | 280 | * setup Orion USB controller. |
264 | */ | 281 | */ |
265 | switch (pd->phy_version) { | 282 | if (pdev->dev.of_node) |
283 | phy_version = EHCI_PHY_NA; | ||
284 | else | ||
285 | phy_version = pd->phy_version; | ||
286 | |||
287 | switch (phy_version) { | ||
266 | case EHCI_PHY_NA: /* dont change USB phy settings */ | 288 | case EHCI_PHY_NA: /* dont change USB phy settings */ |
267 | break; | 289 | break; |
268 | case EHCI_PHY_ORION: | 290 | case EHCI_PHY_ORION: |
@@ -317,9 +339,19 @@ static int __exit ehci_orion_drv_remove(struct platform_device *pdev) | |||
317 | 339 | ||
318 | MODULE_ALIAS("platform:orion-ehci"); | 340 | MODULE_ALIAS("platform:orion-ehci"); |
319 | 341 | ||
342 | static const struct of_device_id ehci_orion_dt_ids[] __devinitdata = { | ||
343 | { .compatible = "marvell,orion-ehci", }, | ||
344 | {}, | ||
345 | }; | ||
346 | MODULE_DEVICE_TABLE(of, ehci_orion_dt_ids); | ||
347 | |||
320 | static struct platform_driver ehci_orion_driver = { | 348 | static struct platform_driver ehci_orion_driver = { |
321 | .probe = ehci_orion_drv_probe, | 349 | .probe = ehci_orion_drv_probe, |
322 | .remove = __exit_p(ehci_orion_drv_remove), | 350 | .remove = __exit_p(ehci_orion_drv_remove), |
323 | .shutdown = usb_hcd_platform_shutdown, | 351 | .shutdown = usb_hcd_platform_shutdown, |
324 | .driver.name = "orion-ehci", | 352 | .driver = { |
353 | .name = "orion-ehci", | ||
354 | .owner = THIS_MODULE, | ||
355 | .of_match_table = of_match_ptr(ehci_orion_dt_ids), | ||
356 | }, | ||
325 | }; | 357 | }; |
diff --git a/drivers/usb/host/ohci-xls.c b/drivers/usb/host/ohci-xls.c index 84201cd1a472..41e378f17c66 100644 --- a/drivers/usb/host/ohci-xls.c +++ b/drivers/usb/host/ohci-xls.c | |||
@@ -56,7 +56,7 @@ static int ohci_xls_probe_internal(const struct hc_driver *driver, | |||
56 | goto err3; | 56 | goto err3; |
57 | } | 57 | } |
58 | 58 | ||
59 | retval = usb_add_hcd(hcd, irq, IRQF_SHARED); | 59 | retval = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED); |
60 | if (retval != 0) | 60 | if (retval != 0) |
61 | goto err4; | 61 | goto err4; |
62 | return retval; | 62 | return retval; |