usb: uhci: Add clk support to uhci-platform
Quoted 24 lines · Sergei Shtylyov
Hello!
Quoted 9 lines · Benjamin Herrenschmidt
The Aspeed SoCs use uhci-platform. With the new dynamic clock control framework, the corresponding IP block clock must be properly enabled.
This is a simplified variant of what ehci-platform does, it looks for *one* clock attached to the device, and if it's there, enables it.
Signed-off-by Benjamin Herrenschmidt <[email protected]>[...]
Quoted 9 lines
drivers/usb/host/uhci-platform.c +1
-0@@ -119,6 +119,21 @@ static int uhci_hcd_platform_probe(struct platform_device *pdev) "Enabled Aspeed implementation workarounds\n"); } } +
Quoted 8 lines
drivers/usb/host/uhci-platform.c static int uhci_hcd_platform_probe(struct platform_device *pdev) · line 128
Quoted 6 lines
drivers/usb/host/uhci-platform.c +6
-0+/* Get and enable clock if any specified */ + uhci->clk =devm_clk_get (&pdev->dev,NULL ); +if (IS_ERR (uhci->clk)) { + ret =PTR_ERR (uhci->clk); + goto err_rmr; + }Indent with tabs as elsewhere, please.
Oops, there should have been, I suppose a copy/paste brought spaces from the original file ;-) I'll fix that.
Quoted 15 lines
Quoted 12 lines
drivers/usb/host/uhci-platform.c +8
-0+if (uhci->clk) { + ret =clk_prepare_enable (uhci->clk); +if (ret) { +dev_err (&pdev->dev,"Error couldn't enable clock (%d)\n" , ret); + goto err_rmr; + } + } + ret =usb_add_hcd (hcd, pdev->resource[1 ].start,IRQF_SHARED );if (ret) goto err_rmr;[...]
Quoted 1 line
MBR, Segei
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html