-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARM: timer-sp: convert to use CLKSRC_OF init
This adds CLKSRC_OF based init for sp804 timer. The clock initialization is refactored to support retrieving the clock(s) from the DT. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
- Loading branch information
Rob Herring
committed
Apr 11, 2013
1 parent
d719569
commit 7a0eca7
Showing
3 changed files
with
102 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
struct clk; | ||
|
||
void __sp804_clocksource_and_sched_clock_init(void __iomem *, | ||
const char *, int); | ||
const char *, struct clk *, int); | ||
void __sp804_clockevents_init(void __iomem *, unsigned int, | ||
struct clk *, const char *); | ||
|
||
static inline void sp804_clocksource_init(void __iomem *base, const char *name) | ||
{ | ||
__sp804_clocksource_and_sched_clock_init(base, name, 0); | ||
__sp804_clocksource_and_sched_clock_init(base, name, NULL, 0); | ||
} | ||
|
||
static inline void sp804_clocksource_and_sched_clock_init(void __iomem *base, | ||
const char *name) | ||
{ | ||
__sp804_clocksource_and_sched_clock_init(base, name, 1); | ||
__sp804_clocksource_and_sched_clock_init(base, name, NULL, 1); | ||
} | ||
|
||
void sp804_clockevents_init(void __iomem *, unsigned int, const char *); | ||
static inline void sp804_clockevents_init(void __iomem *base, unsigned int irq, const char *name) | ||
{ | ||
__sp804_clockevents_init(base, irq, NULL, name); | ||
|
||
} |