ARM: davinci: fix clock lookup for mdio device
authorLad, Prabhakar <prabhakar.csengg@gmail.com>
Thu, 15 Aug 2013 06:01:33 +0000 (11:31 +0530)
committerSekhar Nori <nsekhar@ti.com>
Wed, 21 Aug 2013 19:09:01 +0000 (00:39 +0530)
This patch removes the clock alias for mdio device and adds a entry
in clock lookup table, this entry can now be used by both DT and
non-DT case.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arch/arm/mach-davinci/da830.c
arch/arm/mach-davinci/da850.c
arch/arm/mach-davinci/devices-da8xx.c
arch/arm/mach-davinci/dm365.c
arch/arm/mach-davinci/dm644x.c
arch/arm/mach-davinci/dm646x.c

index 111613bc62b75c7e9a182dfb6378dffa1f3d01d5..d6c746e35ad9fe196e947994de330fefda3e1962 100644 (file)
@@ -417,6 +417,7 @@ static struct clk_lookup da830_clks[] = {
        CLK(NULL,               "aintc",        &aintc_clk),
        CLK(NULL,               "secu_mgr",     &secu_mgr_clk),
        CLK("davinci_emac.1",   NULL,           &emac_clk),
+       CLK("davinci_mdio.0",   "fck",          &emac_clk),
        CLK(NULL,               "gpio",         &gpio_clk),
        CLK("i2c_davinci.2",    NULL,           &i2c1_clk),
        CLK(NULL,               "usb11",        &usb11_clk),
index 5ef37f9d5984ba4968b05856d724719a6f5043d0..f56e5fbfa2fd20ebd0a8fd18adaee48463e632b2 100644 (file)
@@ -461,6 +461,7 @@ static struct clk_lookup da850_clks[] = {
        CLK(NULL,               "arm",          &arm_clk),
        CLK(NULL,               "rmii",         &rmii_clk),
        CLK("davinci_emac.1",   NULL,           &emac_clk),
+       CLK("davinci_mdio.0",   "fck",          &emac_clk),
        CLK("davinci-mcasp.0",  NULL,           &mcasp_clk),
        CLK("da8xx_lcdc.0",     "fck",          &lcdc_clk),
        CLK("da830-mmc.0",      NULL,           &mmcsd0_clk),
index a478d179dae32495758de7c95134df00b70fa08e..2e473fefd71ebc2049d490f554da0f8a70d2578b 100644 (file)
@@ -481,12 +481,8 @@ int __init da8xx_register_emac(void)
        ret = platform_device_register(&da8xx_mdio_device);
        if (ret < 0)
                return ret;
-       ret = platform_device_register(&da8xx_emac_device);
-       if (ret < 0)
-               return ret;
-       ret = clk_add_alias(NULL, dev_name(&da8xx_mdio_device.dev),
-                           NULL, &da8xx_emac_device.dev);
-       return ret;
+
+       return platform_device_register(&da8xx_emac_device);
 }
 
 static struct resource da830_mcasp1_resources[] = {
index 3a039bcf53375860835ef2ab6e2c3e668c9da145..278080de9078faef2c69615c3ef2d454b2f49706 100644 (file)
@@ -477,6 +477,7 @@ static struct clk_lookup dm365_clks[] = {
        CLK(NULL, "timer3", &timer3_clk),
        CLK(NULL, "usb", &usb_clk),
        CLK("davinci_emac.1", NULL, &emac_clk),
+       CLK("davinci_mdio.0", "fck", &emac_clk),
        CLK("davinci_voicecodec", NULL, &voicecodec_clk),
        CLK("davinci-mcbsp", NULL, &asp0_clk),
        CLK(NULL, "rto", &rto_clk),
@@ -1422,8 +1423,6 @@ static int __init dm365_init_devices(void)
 
        platform_device_register(&dm365_mdio_device);
        platform_device_register(&dm365_emac_device);
-       clk_add_alias(NULL, dev_name(&dm365_mdio_device.dev),
-                     NULL, &dm365_emac_device.dev);
 
        return 0;
 }
index 23de0dea98843fbc28ffa1a866d4d74eb9174da9..4f74682293d6f162125ac176c54721e2260bf9d8 100644 (file)
@@ -307,6 +307,7 @@ static struct clk_lookup dm644x_clks[] = {
        CLK("serial8250.1", NULL, &uart1_clk),
        CLK("serial8250.2", NULL, &uart2_clk),
        CLK("davinci_emac.1", NULL, &emac_clk),
+       CLK("davinci_mdio.0", "fck", &emac_clk),
        CLK("i2c_davinci.1", NULL, &i2c_clk),
        CLK("palm_bk3710", NULL, &ide_clk),
        CLK("davinci-mcbsp", NULL, &asp_clk),
@@ -950,8 +951,6 @@ static int __init dm644x_init_devices(void)
 
        platform_device_register(&dm644x_mdio_device);
        platform_device_register(&dm644x_emac_device);
-       clk_add_alias(NULL, dev_name(&dm644x_mdio_device.dev),
-                     NULL, &dm644x_emac_device.dev);
 
        return 0;
 }
index 4b258042dff9e1e91c01bb7c60859d5906e66e49..68f8d1f1aca1620d864307a28f449de956e287e6 100644 (file)
@@ -351,6 +351,7 @@ static struct clk_lookup dm646x_clks[] = {
        CLK("davinci-mcasp.1", NULL, &mcasp1_clk),
        CLK(NULL, "aemif", &aemif_clk),
        CLK("davinci_emac.1", NULL, &emac_clk),
+       CLK("davinci_mdio.0", "fck", &emac_clk),
        CLK(NULL, "pwm0", &pwm0_clk),
        CLK(NULL, "pwm1", &pwm1_clk),
        CLK(NULL, "timer0", &timer0_clk),
@@ -940,8 +941,6 @@ static int __init dm646x_init_devices(void)
 
        platform_device_register(&dm646x_mdio_device);
        platform_device_register(&dm646x_emac_device);
-       clk_add_alias(NULL, dev_name(&dm646x_mdio_device.dev),
-                     NULL, &dm646x_emac_device.dev);
 
        return 0;
 }