]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb: ehci-atmel: Remove unnecessary clock calling
authorWenyou Yang <wenyou.yang@atmel.com>
Tue, 27 Sep 2016 03:00:33 +0000 (11:00 +0800)
committerAndreas Bießmann <andreas@biessmann.org>
Fri, 28 Oct 2016 16:37:15 +0000 (18:37 +0200)
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>
drivers/usb/host/ehci-atmel.c

index 2b138c515355f97481cb362490b495665b7e4c24..a5c6d349747ff247139bca0278f4ad37de6c2e23 100644 (file)
@@ -56,9 +56,7 @@ struct ehci_atmel_priv {
 
 static int ehci_atmel_enable_clk(struct udevice *dev)
 {
-       struct udevice *dev_clk;
        struct clk clk;
-       int periph;
        int ret;
 
        ret = clk_get_by_index(dev, 0, &clk);
@@ -73,19 +71,6 @@ static int ehci_atmel_enable_clk(struct udevice *dev)
        if (ret)
                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);
        if (ret)
                return ret;