[PATCH 0/2] cpts fixes for v3.8-rc2
STALE4983d
Revision v1 of 2 in this series.
5 messages,
2 authors,
2012-12-24 · open the first message on its own page
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(-)
--
1.7.2.5
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.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
---
drivers/net/ethernet/ti/cpts.c | 1 -
drivers/net/ethernet/ti/cpts.h | 1 -
2 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
index 5e62c1a..5ab8fb4 100644
--- a/drivers/net/ethernet/ti/cpts.c
+++ b/drivers/net/ethernet/ti/cpts.c @@ -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 ) diff --git a/drivers/net/ethernet/ti/cpts.h b/drivers/net/ethernet/ti/cpts.h
index e1bba3a..fe993cd 100644
--- a/drivers/net/ethernet/ti/cpts.h
+++ b/drivers/net/ethernet/ti/cpts.h @@ -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 ]; --
1.7.2.5
This patch fixes a warning in clk_enable by calling clk_prepare first.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
---
drivers/net/ethernet/ti/cpts.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
index 5ab8fb4..3e32a31 100644
--- a/drivers/net/ethernet/ti/cpts.c
+++ b/drivers/net/ethernet/ti/cpts.c @@ -247,6 +247,7 @@ static void cpts_clk_init(struct cpts *cpts)
cpts -> refclk = NULL ;
return ;
}
+ clk_prepare ( cpts -> refclk );
clk_enable ( cpts -> refclk );
}
--
1.7.2.5
Hello.
On 22-12-2012 23:41, Richard Cochran wrote:
This patch fixes a warning in clk_enable by calling clk_prepare first. Signed-off-by: Richard Cochran <richardcochran@gmail.com>
---
drivers/net/ethernet/ti/cpts.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-) quoted hunk diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
index 5ab8fb4..3e32a31 100644
--- a/drivers/net/ethernet/ti/cpts.c
+++ b/drivers/net/ethernet/ti/cpts.c @@ -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
On Sun, Dec 23, 2012 at 06:07:22PM +0400, Sergei Shtylyov wrote: Hello.
On 22-12-2012 23:41, Richard Cochran wrote:
quoted This patch fixes a warning in clk_enable by calling clk_prepare first. quoted Signed-off-by: Richard Cochran <richardcochran@gmail.com>
---
drivers/net/ethernet/ti/cpts.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-) quoted diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
index 5ab8fb4..3e32a31 100644
--- a/drivers/net/ethernet/ti/cpts.c
+++ b/drivers/net/ethernet/ti/cpts.c @@ -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