devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: George Cherian <george.cherian@ti.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-omap@vger.kernel.org, davem@davemloft.net,
	richardcochran@gmail.com, jeffrey.t.kirsher@intel.com,
	dborkman@redhat.com, ast@plumgrid.com, tklauser@distanz.ch,
	mpa@pengutronix.de, bhutchings@solarflare.com, zonque@gmail.com,
	balbi@ti.com, mugunthanvnm@ti.com, t-kristo@ti.com,
	mturquette@linaro.org, linux@arm.linux.org.uk,
	galak@codeaurora.org, ijc+devicetree@hellion.org.uk,
	mark.rutland@arm.com, pawel.moll@arm.com, robh+dt@kernel.org,
	tony@atomide.com, bcousson@baylibre.com
Subject: Re: [PATCH 1/6] drivers: net: cpts: Remove hardcoded clock name for CPTS
Date: Mon, 28 Apr 2014 09:31:15 -0500	[thread overview]
Message-ID: <20140428143115.GC30292@saruman.home> (raw)
In-Reply-To: <1398658225-25873-2-git-send-email-george.cherian@ti.com>

[-- Attachment #1: Type: text/plain, Size: 1270 bytes --]

On Mon, Apr 28, 2014 at 09:40:20AM +0530, George Cherian wrote:
> CPTS refclk name is hardcoded, which makes it fail in case of DRA7x
> Remove the hardcoded clock name for CPTS refclk and get the same from DT.
> 
> Signed-off-by: George Cherian <george.cherian@ti.com>
> ---
>  drivers/net/ethernet/ti/cpts.c | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
> index 2435139..0b6f6f7 100644
> --- a/drivers/net/ethernet/ti/cpts.c
> +++ b/drivers/net/ethernet/ti/cpts.c
> @@ -236,13 +236,11 @@ static void cpts_overflow_check(struct work_struct *work)
>  	schedule_delayed_work(&cpts->overflow_work, CPTS_OVERFLOW_PERIOD);
>  }
>  
> -#define CPTS_REF_CLOCK_NAME "cpsw_cpts_rft_clk"
> -
> -static void cpts_clk_init(struct cpts *cpts)
> +static void cpts_clk_init(struct device *dev, struct cpts *cpts)
>  {
> -	cpts->refclk = clk_get(NULL, CPTS_REF_CLOCK_NAME);
> +	cpts->refclk = devm_clk_get(dev, "cpts");
>  	if (IS_ERR(cpts->refclk)) {
> -		pr_err("Failed to clk_get %s\n", CPTS_REF_CLOCK_NAME);
> +		pr_err("Failed to get cpts refclk\n");

now you have a dev pointer as argument, how about converting this to
dev_err() ?

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2014-04-28 14:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-28  4:10 [PATCH 0/6] Add CPTS support for AM437x George Cherian
2014-04-28  4:10 ` [PATCH 1/6] drivers: net: cpts: Remove hardcoded clock name for CPTS George Cherian
     [not found]   ` <1398658225-25873-2-git-send-email-george.cherian-l0cyMroinI0@public.gmane.org>
2014-04-28  6:55     ` Richard Cochran
2014-04-28 14:31   ` Felipe Balbi [this message]
2014-04-28 14:45     ` George Cherian
2014-04-28  4:10 ` [PATCH 2/6] ARM: dts: am33xx: Add clock names for cpsw and cpts George Cherian
2014-04-28  4:10 ` [PATCH 3/6] drivers: net: cpsw: Enable CPTS for DRA7xx and AM4372 George Cherian
2014-04-28  4:10 ` [PATCH 4/6] drivers: net: cpsw: Enable Annexe F Time sync George Cherian
     [not found]   ` <1398658225-25873-5-git-send-email-george.cherian-l0cyMroinI0@public.gmane.org>
2014-04-28  7:55     ` Richard Cochran
2014-04-28 12:58       ` George Cherian
2014-04-28  4:10 ` [PATCH 5/6] ARM: AM43xx: clk: Change the cpts ref clock source to dpll_core_m5 clk George Cherian
2014-04-28  7:10   ` Richard Cochran
2014-04-28 12:55     ` George Cherian
2014-04-28 16:18       ` Richard Cochran
2014-04-29  4:28         ` George Cherian
     [not found] ` <1398658225-25873-1-git-send-email-george.cherian-l0cyMroinI0@public.gmane.org>
2014-04-28  4:10   ` [PATCH 6/6] ARM: dts: am4372: Add clock names for cpsw and cpts George Cherian

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=20140428143115.GC30292@saruman.home \
    --to=balbi@ti.com \
    --cc=ast@plumgrid.com \
    --cc=bcousson@baylibre.com \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=dborkman@redhat.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=george.cherian@ti.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=mpa@pengutronix.de \
    --cc=mturquette@linaro.org \
    --cc=mugunthanvnm@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=pawel.moll@arm.com \
    --cc=richardcochran@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=t-kristo@ti.com \
    --cc=tklauser@distanz.ch \
    --cc=tony@atomide.com \
    --cc=zonque@gmail.com \
    /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).