Skip to contentSkip to conversation

cpts fixes for v3.8-rc2

PATCH Superseded Richard Cochran 2 participants 5 messages Dec 22, 2012 – Dec 24, 2012

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover cpts fixes for v3.8-rc2

The new cpts driver has two small issues, but it otherwise seems to be working in -rc1.

Thanks,
Richard

Richard Cochran (2):
cpts: fix build error by removing useless code.
cpts: fix a run time warn_on.

 drivers/net/ethernet/ti/cpts.c |    2 +-
 drivers/net/ethernet/ti/cpts.h |    1 -
 2 files changed, 1 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.2.5
#1 lore raw

PATCH 1/2 cpts: fix build error by removing useless code.

The cpts driver tries to obtain the input clock frequency by calling the clock's internal 'recalc' method. Since <plat/clock.h> has been removed, this code can no longer compile.

However, the driver never makes use of the frequency value, so this patch fixes the issue by removing the offending code altogether.

---
 drivers/net/ethernet/ti/cpts.c |    1 -
 drivers/net/ethernet/ti/cpts.h |    1 -
 2 files changed, 0 insertions(+), 2 deletions(-)
drivers/net/ethernet/ti/cpts.c +0 -1
index 5e62c1a..5ab8fb4 100644
@@ -248,7 +248,6 @@ static void cpts_clk_init(struct cpts *cpts)
 		return;
 	}
 	clk_enable(cpts->refclk);
-	cpts->freq = cpts->refclk->recalc(cpts->refclk);
 }
 
 static void cpts_clk_release(struct cpts *cpts)
drivers/net/ethernet/ti/cpts.h +0 -1
index e1bba3a..fe993cd 100644
@@ -120,7 +120,6 @@ struct cpts {
 	struct delayed_work overflow_work;
 	int phc_index;
 	struct clk *refclk;
-	unsigned long freq;
 	struct list_head events;
 	struct list_head pool;
 	struct cpts_event pool_data[CPTS_MAX_EVENTS];
Signature · 1 line
1.7.2.5
#2 lore raw

PATCH 2/2 cpts: fix a run time warn_on.

In reply to Richard Cochran

This patch fixes a warning in clk_enable by calling clk_prepare first.

---
 drivers/net/ethernet/ti/cpts.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/ethernet/ti/cpts.c +1 -0
index 5ab8fb4..3e32a31 100644
@@ -247,6 +247,7 @@ static void cpts_clk_init(struct cpts *cpts)
 		cpts->refclk = NULL;
 		return;
 	}
+	clk_prepare(cpts->refclk);
 	clk_enable(cpts->refclk);
 }
 
Signature · 1 line
1.7.2.5
#3 lore raw

Re: [PATCH 2/2] cpts: fix a run time warn_on.

Hello.

Quoted 12 lines · Richard Cochran

This patch fixes a warning in clk_enable by calling clk_prepare first.

---
  drivers/net/ethernet/ti/cpts.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/ethernet/ti/cpts.c +0 -0
index 5ab8fb4..3e32a31 100644

drivers/net/ethernet/ti/cpts.c static void cpts_clk_init(struct cpts *cpts) · line 251

Quoted 5 lines
drivers/net/ethernet/ti/cpts.c +1 -0
@@ -247,6 +247,7 @@ static void cpts_clk_init(struct cpts *cpts)
  		cpts->refclk = NULL;
  		return;
  	}
+	clk_prepare(cpts->refclk);
  	clk_enable(cpts->refclk);

Maybe just call clk_prepare_enable() instead?

WBR, Sergei

#4 lore raw

Re: [PATCH 2/2] cpts: fix a run time warn_on.

Quoted 11 lines · Sergei Shtylyov

Hello.

Quoted 6 lines · Richard Cochran

This patch fixes a warning in clk_enable by calling clk_prepare first.

---
 drivers/net/ethernet/ti/cpts.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Quoted 12 lines

drivers/net/ethernet/ti/cpts.c static void cpts_clk_init(struct cpts *cpts) · line 251

Quoted 10 lines
drivers/net/ethernet/ti/cpts.c +1 -0
index 5ab8fb4..3e32a31 100644
@@ -247,6 +247,7 @@ static void cpts_clk_init(struct cpts *cpts)
 		cpts->refclk = NULL;
 		return;
 	}
+	clk_prepare(cpts->refclk);
 	clk_enable(cpts->refclk);

Maybe just call clk_prepare_enable() instead?

Okay, will fix in v2.

Thanks,
Richard