usb: ehci-atmel: Remove unnecessary clock calling
Due to the peripheral clock driver improvement, remove the unnecessary clock calling. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
This commit is contained in:
parent
52f37333bc
commit
c6a0f7f135
@ -56,9 +56,7 @@ struct ehci_atmel_priv {
|
|||||||
|
|
||||||
static int ehci_atmel_enable_clk(struct udevice *dev)
|
static int ehci_atmel_enable_clk(struct udevice *dev)
|
||||||
{
|
{
|
||||||
struct udevice *dev_clk;
|
|
||||||
struct clk clk;
|
struct clk clk;
|
||||||
int periph;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = clk_get_by_index(dev, 0, &clk);
|
ret = clk_get_by_index(dev, 0, &clk);
|
||||||
@ -73,19 +71,6 @@ static int ehci_atmel_enable_clk(struct udevice *dev)
|
|||||||
if (ret)
|
if (ret)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
periph = fdtdec_get_uint(gd->fdt_blob, clk.dev->of_offset, "reg", -1);
|
|
||||||
if (periph < 0)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
dev_clk = dev_get_parent(clk.dev);
|
|
||||||
if (!dev_clk)
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
ret = clk_request(dev_clk, &clk);
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
clk.id = periph;
|
|
||||||
ret = clk_enable(&clk);
|
ret = clk_enable(&clk);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user