aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2011-11-18 02:26:00 -0500
committerPaul Mundt <lethal@linux-sh.org>2011-11-18 02:26:00 -0500
commitcfc806a7ee38e68a9363584dd2b00421fda6dfed (patch)
tree0890cd92afc941d84c6b50a93802260a079b7648 /arch/sh/include
parentec20a81562772f43610490a48814f9edbebc3431 (diff)
sh: hwblk: Kill off remaining bits of hwblk API.
Now that everything has been migrated, kill off the remaining infrastructure bits. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include')
-rw-r--r--arch/sh/include/asm/hwblk.h74
1 files changed, 0 insertions, 74 deletions
diff --git a/arch/sh/include/asm/hwblk.h b/arch/sh/include/asm/hwblk.h
deleted file mode 100644
index 75d50d9bf0a..00000000000
--- a/arch/sh/include/asm/hwblk.h
+++ /dev/null
@@ -1,74 +0,0 @@
1#ifndef __ASM_SH_HWBLK_H
2#define __ASM_SH_HWBLK_H
3
4#include <asm/clock.h>
5#include <asm/io.h>
6
7#define HWBLK_CNT_USAGE 0
8#define HWBLK_CNT_IDLE 1
9#define HWBLK_CNT_DEVICES 2
10#define HWBLK_CNT_NR 3
11
12#define HWBLK_AREA_FLAG_PARENT (1 << 0) /* valid parent */
13
14#define HWBLK_AREA(_flags, _parent) \
15{ \
16 .flags = _flags, \
17 .parent = _parent, \
18}
19
20struct hwblk_area {
21 int cnt[HWBLK_CNT_NR];
22 unsigned char parent;
23 unsigned char flags;
24};
25
26#define HWBLK(_mstp, _bit, _area) \
27{ \
28 .mstp = (void __iomem *)_mstp, \
29 .bit = _bit, \
30 .area = _area, \
31}
32
33struct hwblk {
34 void __iomem *mstp;
35 unsigned char bit;
36 unsigned char area;
37 int cnt[HWBLK_CNT_NR];
38};
39
40struct hwblk_info {
41 struct hwblk_area *areas;
42 int nr_areas;
43 struct hwblk *hwblks;
44 int nr_hwblks;
45};
46
47#if !defined(CONFIG_CPU_SUBTYPE_SH7722) && \
48 !defined(CONFIG_CPU_SUBTYPE_SH7723) && \
49 !defined(CONFIG_CPU_SUBTYPE_SH7724)
50/* Should be defined by processor-specific code */
51int arch_hwblk_init(void);
52
53int hwblk_register(struct hwblk_info *info);
54int hwblk_init(void);
55
56void hwblk_enable(struct hwblk_info *info, int hwblk);
57void hwblk_disable(struct hwblk_info *info, int hwblk);
58
59void hwblk_cnt_inc(struct hwblk_info *info, int hwblk, int cnt);
60void hwblk_cnt_dec(struct hwblk_info *info, int hwblk, int cnt);
61
62/* allow clocks to enable and disable hardware blocks */
63#define SH_HWBLK_CLK(_hwblk, _parent, _flags) \
64[_hwblk] = { \
65 .parent = _parent, \
66 .arch_flags = _hwblk, \
67 .flags = _flags, \
68}
69
70int sh_hwblk_clk_register(struct clk *clks, int nr);
71#else
72#define hwblk_init() 0
73#endif
74#endif /* __ASM_SH_HWBLK_H */