From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] watchdog: imx: use clk_get to acquire the watchdog clock
Date: Tue, 14 Dec 2010 09:57:11 +0100 [thread overview]
Message-ID: <20101214085711.GV6017@pengutronix.de> (raw)
In-Reply-To: <1291738564-10374-1-git-send-email-fabio.estevam@freescale.com>
Hi Fabio,
On Tue, Dec 07, 2010 at 02:16:04PM -0200, Fabio Estevam wrote:
> Use clk_get to acquire the watchdog clock and also avoid hardcoding the clock name.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> Changes since v1:
> - adapted the watchdog name in arch/arm/plat-mxc/system.c
>
> arch/arm/mach-imx/clock-imx21.c | 2 +-
> arch/arm/mach-imx/clock-imx25.c | 2 +-
> arch/arm/mach-imx/clock-imx27.c | 2 +-
> arch/arm/mach-mx3/clock-imx31.c | 2 +-
> arch/arm/mach-mx3/clock-imx35.c | 2 +-
> arch/arm/plat-mxc/system.c | 2 +-
> drivers/watchdog/imx2_wdt.c | 2 +-
> 7 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm/mach-imx/clock-imx21.c b/arch/arm/mach-imx/clock-imx21.c
> index cf15ea5..c63a4f5 100644
> --- a/arch/arm/mach-imx/clock-imx21.c
> +++ b/arch/arm/mach-imx/clock-imx21.c
> @@ -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)
> diff --git a/arch/arm/mach-imx/clock-imx25.c b/arch/arm/mach-imx/clock-imx25.c
> index 9e4a557..2c98be8 100644
> --- a/arch/arm/mach-imx/clock-imx25.c
> +++ b/arch/arm/mach-imx/clock-imx25.c
> @@ -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, wdog_clk)
This breaks compilation on i.MX25. I updated the patch to fix this.
Sascha
> _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)
> diff --git a/arch/arm/mach-imx/clock-imx27.c b/arch/arm/mach-imx/clock-imx27.c
> index 2202b88..f32f3b8 100644
> --- a/arch/arm/mach-imx/clock-imx27.c
> +++ b/arch/arm/mach-imx/clock-imx27.c
> @@ -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)
> diff --git a/arch/arm/mach-mx3/clock-imx31.c b/arch/arm/mach-mx3/clock-imx31.c
> index 7cf6d29..4193cf5 100644
> --- a/arch/arm/mach-mx3/clock-imx31.c
> +++ b/arch/arm/mach-mx3/clock-imx31.c
> @@ -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)
> diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c
> index 61e4a31..22259d9 100644
> --- a/arch/arm/mach-mx3/clock-imx35.c
> +++ b/arch/arm/mach-mx3/clock-imx35.c
> @@ -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)
> diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c
> index c3972c5..3455fc0 100644
> --- a/arch/arm/plat-mxc/system.c
> +++ b/arch/arm/plat-mxc/system.c
> @@ -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);
> diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
> index 2ee7dac..86f7cac 100644
> --- a/drivers/watchdog/imx2_wdt.c
> +++ b/drivers/watchdog/imx2_wdt.c
> @@ -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);
> --
> 1.6.0.4
>
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2010-12-14 8:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-07 16:16 [PATCH v2] watchdog: imx: use clk_get to acquire the watchdog clock Fabio Estevam
2010-12-07 16:49 ` Sascha Hauer
2010-12-07 17:00 ` Wolfram Sang
2010-12-07 17:16 ` [PATCH v2] watchdog: imx: use clk_get to acquire the watchdogclock Fabio Estevam
2010-12-07 18:50 ` Sascha Hauer
2010-12-10 13:18 ` [PATCH v2] watchdog: imx: use clk_get to acquire the watchdog clock Wim Van Sebroeck
2010-12-13 11:46 ` Sascha Hauer
2010-12-10 13:52 ` Uwe Kleine-König
2010-12-14 8:57 ` Sascha Hauer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101214085711.GV6017@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).