Linux Media Controller development
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Javier Martin <javier.martin@vista-silicon.com>
Cc: linux-media@vger.kernel.org, fabio.estevam@freescale.com,
	laurent.pinchart@ideasonboard.com, g.liakhovetski@gmx.de,
	mchehab@infradead.org, kernel@pengutronix.de
Subject: Re: media: i.MX27: Fix emma-prp clocks in mx2_camera.c
Date: Fri, 6 Jul 2012 08:43:32 +0200	[thread overview]
Message-ID: <20120706064332.GA30009@pengutronix.de> (raw)
In-Reply-To: <1341556309-2934-1-git-send-email-javier.martin@vista-silicon.com>

Hi Javier,

On Fri, Jul 06, 2012 at 08:31:49AM +0200, Javier Martin wrote:
> This driver wasn't converted to the new clock changes
> (clk_prepare_enable/clk_disable_unprepare). Also naming
> of emma-prp related clocks for the i.MX27 was not correct.

Thanks for fixing this. Sorry for breaking this in the first place.

> @@ -1668,12 +1658,26 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev)
>  		goto exit;
>  	}
>  
> -	pcdev->clk_csi = clk_get(&pdev->dev, NULL);
> +	pcdev->clk_csi = devm_clk_get(&pdev->dev, NULL);
>  	if (IS_ERR(pcdev->clk_csi)) {
>  		dev_err(&pdev->dev, "Could not get csi clock\n");
>  		err = PTR_ERR(pcdev->clk_csi);
>  		goto exit_kfree;
>  	}
> +	pcdev->clk_emma_ipg = devm_clk_get(&pdev->dev, "ipg");
> +	if (IS_ERR(pcdev->clk_emma_ipg)) {
> +		err = PTR_ERR(pcdev->clk_emma_ipg);
> +		goto exit_kfree;
> +	}
> +	pcdev->clk_emma_ahb = devm_clk_get(&pdev->dev, "ahb");
> +	if (IS_ERR(pcdev->clk_emma_ahb)) {
> +		err = PTR_ERR(pcdev->clk_emma_ahb);
> +		goto exit_kfree;
> +	}

So we have three clocks involved here, a csi ahb clock and two emma
clocks. Can we rename the clocks to:

	clk_register_clkdev(clk[csi_ahb_gate], "ahb", "mx2-camera.0");
	clk_register_clkdev(clk[emma_ahb_gate], "emma-ahb", "mx2-camera.0");
	clk_register_clkdev(clk[emma_ipg_gate], "emma-ipg", "mx2-camera.0");

The rationale is that the csi_ahb_gate really is a ahb clock related to
the csi whereas the emma clocks are normally for the emma device, but
the csi driver happens to use parts of the emma.

Sascha


-- 
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 |

  reply	other threads:[~2012-07-06  6:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-06  6:31 media: i.MX27: Fix emma-prp clocks in mx2_camera.c Javier Martin
2012-07-06  6:43 ` Sascha Hauer [this message]
2012-07-06  6:47   ` javier Martin

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=20120706064332.GA30009@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=fabio.estevam@freescale.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=javier.martin@vista-silicon.com \
    --cc=kernel@pengutronix.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@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