diff options
author | Colin Cross <ccross@android.com> | 2010-01-28 19:40:29 -0500 |
---|---|---|
committer | Erik Gilling <konkers@android.com> | 2010-08-05 17:51:42 -0400 |
commit | d861196163e30c07add471562b45dce38517c9b2 (patch) | |
tree | 33c3577854f2e600e0f4dc25620f4932a31d3138 /arch/arm/mach-tegra/include/mach | |
parent | 5ad36c5f0ece31552a195f2f9e29357a2747536e (diff) |
[ARM] tegra: Add clock support
v2: fixes from Russell King:
- include linux/io.h instead of asm/io.h
- fix whitespace in Kconfig
- Use spin_lock_init to initialize lock
- Return -ENOSYS instead of BUG for unimplemented clock ops
- Use proper return values in tegra2 clock ops
additional changes:
- Rename some clocks to match dev_ids
- add rate propagation
- add debugfs entries
- add support for clock listed in clk_lookup under multiple dev_ids
v3:
- Replace per-clock locking with global clock lock
- Autodetect clock state on init
- Let clock dividers pick next lower possible frequency
- Add support for clock init tables
- Minor bug fixes
- Fix checkpatch issues
Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'arch/arm/mach-tegra/include/mach')
-rw-r--r-- | arch/arm/mach-tegra/include/mach/clk.h | 26 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/clkdev.h | 32 |
2 files changed, 58 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/include/mach/clk.h b/arch/arm/mach-tegra/include/mach/clk.h new file mode 100644 index 000000000000..2896f25ebfb5 --- /dev/null +++ b/arch/arm/mach-tegra/include/mach/clk.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-tegra/include/mach/clk.h | ||
3 | * | ||
4 | * Copyright (C) 2010 Google, Inc. | ||
5 | * | ||
6 | * Author: | ||
7 | * Erik Gilling <konkers@google.com> | ||
8 | * | ||
9 | * This software is licensed under the terms of the GNU General Public | ||
10 | * License version 2, as published by the Free Software Foundation, and | ||
11 | * may be copied, distributed, and modified under those terms. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | */ | ||
19 | |||
20 | #ifndef __MACH_CLK_H | ||
21 | #define __MACH_CLK_H | ||
22 | |||
23 | void tegra_periph_reset_deassert(struct clk *c); | ||
24 | void tegra_periph_reset_assert(struct clk *c); | ||
25 | |||
26 | #endif | ||
diff --git a/arch/arm/mach-tegra/include/mach/clkdev.h b/arch/arm/mach-tegra/include/mach/clkdev.h new file mode 100644 index 000000000000..412f5c63e65a --- /dev/null +++ b/arch/arm/mach-tegra/include/mach/clkdev.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-tegra/include/mach/clkdev.h | ||
3 | * | ||
4 | * Copyright (C) 2010 Google, Inc. | ||
5 | * | ||
6 | * Author: | ||
7 | * Colin Cross <ccross@google.com> | ||
8 | * | ||
9 | * This software is licensed under the terms of the GNU General Public | ||
10 | * License version 2, as published by the Free Software Foundation, and | ||
11 | * may be copied, distributed, and modified under those terms. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | */ | ||
19 | |||
20 | #ifndef __MACH_CLKDEV_H | ||
21 | #define __MACH_CLKDEV_H | ||
22 | |||
23 | static inline int __clk_get(struct clk *clk) | ||
24 | { | ||
25 | return 1; | ||
26 | } | ||
27 | |||
28 | static inline void __clk_put(struct clk *clk) | ||
29 | { | ||
30 | } | ||
31 | |||
32 | #endif | ||