1 #ifndef __ASM_SH_HWBLK_H
2 #define __ASM_SH_HWBLK_H
7 #define HWBLK_CNT_USAGE 0
10 #define HWBLK_AREA_FLAG_PARENT (1 << 0) /* valid parent */
12 #define HWBLK_AREA(_flags, _parent) \
19 int cnt[HWBLK_CNT_NR];
24 #define HWBLK(_mstp, _bit, _area) \
26 .mstp = (void __iomem *)_mstp, \
35 int cnt[HWBLK_CNT_NR];
39 struct hwblk_area *areas;
45 /* Should be defined by processor-specific code */
46 int arch_hwblk_init(void);
47 int arch_hwblk_sleep_mode(void);
49 int hwblk_register(struct hwblk_info *info);
52 void hwblk_enable(struct hwblk_info *info, int hwblk);
53 void hwblk_disable(struct hwblk_info *info, int hwblk);
55 void hwblk_cnt_inc(struct hwblk_info *info, int hwblk, int cnt);
56 void hwblk_cnt_dec(struct hwblk_info *info, int hwblk, int cnt);
58 /* allow clocks to enable and disable hardware blocks */
59 #define SH_HWBLK_CLK(_name, _id, _parent, _hwblk, _flags) \
64 .arch_flags = _hwblk, \
68 int sh_hwblk_clk_register(struct clk *clks, int nr);
70 #endif /* __ASM_SH_HWBLK_H */