-
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] integrator: convert to clkdev and lookup clocks by device name
People often point to the Integrator/Versatile/Realview implementations to justify using the consumer name as the sole selector for clocks. Eliminate this excuse by changing the Integrator implementation, so it provides a better example of how it should be done. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
- Loading branch information
Russell King
authored and
Russell King
committed
Nov 27, 2008
1 parent
cf30fb4
commit d72fbdf
Showing
7 changed files
with
91 additions
and
119 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,25 +0,0 @@ | ||
/* | ||
* linux/arch/arm/mach-integrator/clock.h | ||
* | ||
* Copyright (C) 2004 ARM Limited. | ||
* Written by Deep Blue Solutions Limited. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
struct module; | ||
struct icst525_params; | ||
|
||
struct clk { | ||
struct list_head node; | ||
unsigned long rate; | ||
struct module *owner; | ||
const char *name; | ||
const struct icst525_params *params; | ||
void *data; | ||
void (*setvco)(struct clk *, struct icst525_vco vco); | ||
}; | ||
|
||
int clk_register(struct clk *clk); | ||
void clk_unregister(struct clk *clk); | ||
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#ifndef __ASM_MACH_CLKDEV_H | ||
#define __ASM_MACH_CLKDEV_H | ||
|
||
#include <linux/module.h> | ||
#include <asm/hardware/icst525.h> | ||
|
||
struct clk { | ||
unsigned long rate; | ||
struct module *owner; | ||
const struct icst525_params *params; | ||
void *data; | ||
void (*setvco)(struct clk *, struct icst525_vco vco); | ||
}; | ||
|
||
static inline int __clk_get(struct clk *clk) | ||
{ | ||
return try_module_get(clk->owner); | ||
} | ||
|
||
static inline void __clk_put(struct clk *clk) | ||
{ | ||
module_put(clk->owner); | ||
} | ||
|
||
#endif |
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