watchdog: imx: use clk_get to acquire the watchdog clock
authorFabio Estevam <fabio.estevam@freescale.com>
Tue, 7 Dec 2010 16:16:04 +0000 (14:16 -0200)
committerSascha Hauer <s.hauer@pengutronix.de>
Tue, 14 Dec 2010 08:54:19 +0000 (09:54 +0100)
Use clk_get to acquire the watchdog clock and also avoid hardcoding the clock name.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
arch/arm/mach-imx/clock-imx21.c
arch/arm/mach-imx/clock-imx25.c
arch/arm/mach-imx/clock-imx27.c
arch/arm/mach-mx3/clock-imx31.c
arch/arm/mach-mx3/clock-imx35.c
arch/arm/mach-mx5/clock-mx51-mx53.c
arch/arm/plat-mxc/system.c
drivers/watchdog/imx2_wdt.c

index cf15ea516a72c4e177d1d4d66374ea0a4ed8676f..c63a4f5ffcb6e550cb0b88b680d3d42798839e1d 100644 (file)
@@ -1185,7 +1185,7 @@ static struct clk_lookup lookups[] = {
        _REGISTER_CLOCK(NULL, "brom", brom_clk)
        _REGISTER_CLOCK(NULL, "emma", emma_clk[0])
        _REGISTER_CLOCK(NULL, "slcdc", slcdc_clk[0])
-       _REGISTER_CLOCK("imx-wdt.0", NULL, wdog_clk)
+       _REGISTER_CLOCK("imx2-wdt.0", NULL, wdog_clk)
        _REGISTER_CLOCK(NULL, "gpio", gpio_clk)
        _REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk)
        _REGISTER_CLOCK("mxc-keypad", NULL, kpp_clk)
index 9e4a5578c2fb9dc6a392aa07b5fb085dde900651..21ef34c501e5d7b870a6a17510a9f43557c9232c 100644 (file)
@@ -296,7 +296,7 @@ static struct clk_lookup lookups[] = {
        _REGISTER_CLOCK("fec.0", NULL, fec_clk)
        _REGISTER_CLOCK("imxdi_rtc.0", NULL, dryice_clk)
        _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk)
-       _REGISTER_CLOCK("imx-wdt.0", NULL, wdt_clk)
+       _REGISTER_CLOCK("imx2-wdt.0", NULL, wdt_clk)
        _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk)
        _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk)
        _REGISTER_CLOCK("sdhci-esdhc-imx.0", NULL, esdhc1_clk)
index 2202b88667b5350af6036cc4609fb22c750f108e..f32f3b8e8ba4f973571f178407de28981488b28b 100644 (file)
@@ -667,7 +667,7 @@ static struct clk_lookup lookups[] = {
        _REGISTER_CLOCK(NULL, "sahara2", sahara2_clk)
        _REGISTER_CLOCK(NULL, "ata", ata_clk)
        _REGISTER_CLOCK(NULL, "mstick", mstick_clk)
-       _REGISTER_CLOCK("imx-wdt.0", NULL, wdog_clk)
+       _REGISTER_CLOCK("imx2-wdt.0", NULL, wdog_clk)
        _REGISTER_CLOCK(NULL, "gpio", gpio_clk)
        _REGISTER_CLOCK("imx-i2c.0", NULL, i2c1_clk)
        _REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk)
index 7cf6d29f376b5c8153d9344e2c2f984bab150959..4193cf5a2637ea23d6e7ee030adc5f83a760170e 100644 (file)
@@ -530,7 +530,7 @@ static struct clk_lookup lookups[] = {
        _REGISTER_CLOCK("imx31-cspi.2", NULL, cspi3_clk)
        _REGISTER_CLOCK(NULL, "gpt", gpt_clk)
        _REGISTER_CLOCK(NULL, "pwm", pwm_clk)
-       _REGISTER_CLOCK("imx-wdt.0", NULL, wdog_clk)
+       _REGISTER_CLOCK("imx2-wdt.0", NULL, wdog_clk)
        _REGISTER_CLOCK(NULL, "rtc", rtc_clk)
        _REGISTER_CLOCK(NULL, "epit", epit1_clk)
        _REGISTER_CLOCK(NULL, "epit", epit2_clk)
index 61e4a318980a2bc9fe4fa25c7de02a08a7b89bb8..22259d95583753e60f44ed3405450ade0bbf242f 100644 (file)
@@ -495,7 +495,7 @@ static struct clk_lookup lookups[] = {
        _REGISTER_CLOCK("mxc-ehci.2", "usb", usbotg_clk)
        _REGISTER_CLOCK("fsl-usb2-udc", "usb", usbotg_clk)
        _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", usbahb_clk)
-       _REGISTER_CLOCK("imx-wdt.0", NULL, wdog_clk)
+       _REGISTER_CLOCK("imx2-wdt.0", NULL, wdog_clk)
        _REGISTER_CLOCK(NULL, "max", max_clk)
        _REGISTER_CLOCK(NULL, "audmux", audmux_clk)
        _REGISTER_CLOCK(NULL, "csi", csi_clk)
index b04d54daddb0a5ff61cd95c3fcee7d8212aa0cd0..ed26de68a996766f534580b25d1d38b0a591c04d 100644 (file)
@@ -1110,8 +1110,8 @@ static struct clk_lookup mx51_lookups[] = {
        _REGISTER_CLOCK("sdhci-esdhc-imx.1", NULL, esdhc2_clk)
        _REGISTER_CLOCK(NULL, "cpu_clk", cpu_clk)
        _REGISTER_CLOCK(NULL, "iim_clk", iim_clk)
-       _REGISTER_CLOCK("imx-wdt.0", NULL, dummy_clk)
-       _REGISTER_CLOCK("imx-wdt.1", NULL, dummy_clk)
+       _REGISTER_CLOCK("imx2-wdt.0", NULL, dummy_clk)
+       _REGISTER_CLOCK("imx2-wdt.1", NULL, dummy_clk)
 };
 
 static struct clk_lookup mx53_lookups[] = {
index c3972c583840ff851b817f07b134b2ed8bc6e6f6..3455fc0575a620d87c6790128a9b0e03a9b83517 100644 (file)
@@ -55,7 +55,7 @@ void arch_reset(char mode, const char *cmd)
        } else {
                struct clk *clk;
 
-               clk = clk_get_sys("imx-wdt.0", NULL);
+               clk = clk_get_sys("imx2-wdt.0", NULL);
                if (!IS_ERR(clk))
                        clk_enable(clk);
                wcr_enable = (1 << 2);
index 2ee7dac55a3c454fb010c662e8dc9d11a7199f7b..86f7cac1026c9c0de69ef0180398e71ecfcbe660 100644 (file)
@@ -270,7 +270,7 @@ static int __init imx2_wdt_probe(struct platform_device *pdev)
                return -ENOMEM;
        }
 
-       imx2_wdt.clk = clk_get_sys("imx-wdt.0", NULL);
+       imx2_wdt.clk = clk_get(&pdev->dev, NULL);
        if (IS_ERR(imx2_wdt.clk)) {
                dev_err(&pdev->dev, "can't get Watchdog clock\n");
                return PTR_ERR(imx2_wdt.clk);