diff options
Diffstat (limited to 'arch/sh/include/asm/hwblk.h')
| -rw-r--r-- | arch/sh/include/asm/hwblk.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/sh/include/asm/hwblk.h b/arch/sh/include/asm/hwblk.h index 51a46f496639..c01d72cb6757 100644 --- a/arch/sh/include/asm/hwblk.h +++ b/arch/sh/include/asm/hwblk.h | |||
| @@ -4,6 +4,9 @@ | |||
| 4 | #include <asm/clock.h> | 4 | #include <asm/clock.h> |
| 5 | #include <asm/io.h> | 5 | #include <asm/io.h> |
| 6 | 6 | ||
| 7 | #define HWBLK_CNT_USAGE 0 | ||
| 8 | #define HWBLK_CNT_NR 1 | ||
| 9 | |||
| 7 | #define HWBLK_AREA_FLAG_PARENT (1 << 0) /* valid parent */ | 10 | #define HWBLK_AREA_FLAG_PARENT (1 << 0) /* valid parent */ |
| 8 | 11 | ||
| 9 | #define HWBLK_AREA(_flags, _parent) \ | 12 | #define HWBLK_AREA(_flags, _parent) \ |
| @@ -13,7 +16,7 @@ | |||
| 13 | } | 16 | } |
| 14 | 17 | ||
| 15 | struct hwblk_area { | 18 | struct hwblk_area { |
| 16 | unsigned long cnt; | 19 | int cnt[HWBLK_CNT_NR]; |
| 17 | unsigned char parent; | 20 | unsigned char parent; |
| 18 | unsigned char flags; | 21 | unsigned char flags; |
| 19 | }; | 22 | }; |
| @@ -29,7 +32,7 @@ struct hwblk { | |||
| 29 | void __iomem *mstp; | 32 | void __iomem *mstp; |
| 30 | unsigned char bit; | 33 | unsigned char bit; |
| 31 | unsigned char area; | 34 | unsigned char area; |
| 32 | unsigned long cnt; | 35 | int cnt[HWBLK_CNT_NR]; |
| 33 | }; | 36 | }; |
| 34 | 37 | ||
| 35 | struct hwblk_info { | 38 | struct hwblk_info { |
| @@ -46,6 +49,12 @@ int arch_hwblk_sleep_mode(void); | |||
| 46 | int hwblk_register(struct hwblk_info *info); | 49 | int hwblk_register(struct hwblk_info *info); |
| 47 | int hwblk_init(void); | 50 | int hwblk_init(void); |
| 48 | 51 | ||
| 52 | void hwblk_enable(struct hwblk_info *info, int hwblk); | ||
| 53 | void hwblk_disable(struct hwblk_info *info, int hwblk); | ||
| 54 | |||
| 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); | ||
| 57 | |||
| 49 | /* allow clocks to enable and disable hardware blocks */ | 58 | /* allow clocks to enable and disable hardware blocks */ |
| 50 | #define SH_HWBLK_CLK(_name, _id, _parent, _hwblk, _flags) \ | 59 | #define SH_HWBLK_CLK(_name, _id, _parent, _hwblk, _flags) \ |
| 51 | { \ | 60 | { \ |
