diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/platform_data/ti-sysc.h | 50 | ||||
| -rw-r--r-- | include/linux/power/smartreflex.h | 10 |
2 files changed, 59 insertions, 1 deletions
diff --git a/include/linux/platform_data/ti-sysc.h b/include/linux/platform_data/ti-sysc.h index 1be356330b96..80ce28d40832 100644 --- a/include/linux/platform_data/ti-sysc.h +++ b/include/linux/platform_data/ti-sysc.h | |||
| @@ -16,6 +16,10 @@ enum ti_sysc_module_type { | |||
| 16 | TI_SYSC_OMAP4_USB_HOST_FS, | 16 | TI_SYSC_OMAP4_USB_HOST_FS, |
| 17 | }; | 17 | }; |
| 18 | 18 | ||
| 19 | struct ti_sysc_cookie { | ||
| 20 | void *data; | ||
| 21 | }; | ||
| 22 | |||
| 19 | /** | 23 | /** |
| 20 | * struct sysc_regbits - TI OCP_SYSCONFIG register field offsets | 24 | * struct sysc_regbits - TI OCP_SYSCONFIG register field offsets |
| 21 | * @midle_shift: Offset of the midle bit | 25 | * @midle_shift: Offset of the midle bit |
| @@ -41,6 +45,7 @@ struct sysc_regbits { | |||
| 41 | s8 emufree_shift; | 45 | s8 emufree_shift; |
| 42 | }; | 46 | }; |
| 43 | 47 | ||
| 48 | #define SYSC_QUIRK_LEGACY_IDLE BIT(8) | ||
| 44 | #define SYSC_QUIRK_RESET_STATUS BIT(7) | 49 | #define SYSC_QUIRK_RESET_STATUS BIT(7) |
| 45 | #define SYSC_QUIRK_NO_IDLE_ON_INIT BIT(6) | 50 | #define SYSC_QUIRK_NO_IDLE_ON_INIT BIT(6) |
| 46 | #define SYSC_QUIRK_NO_RESET_ON_INIT BIT(5) | 51 | #define SYSC_QUIRK_NO_RESET_ON_INIT BIT(5) |
| @@ -83,4 +88,49 @@ struct sysc_config { | |||
| 83 | u32 quirks; | 88 | u32 quirks; |
| 84 | }; | 89 | }; |
| 85 | 90 | ||
| 91 | enum sysc_registers { | ||
| 92 | SYSC_REVISION, | ||
| 93 | SYSC_SYSCONFIG, | ||
| 94 | SYSC_SYSSTATUS, | ||
| 95 | SYSC_MAX_REGS, | ||
| 96 | }; | ||
| 97 | |||
| 98 | /** | ||
| 99 | * struct ti_sysc_module_data - ti-sysc to hwmod translation data for a module | ||
| 100 | * @name: legacy "ti,hwmods" module name | ||
| 101 | * @module_pa: physical address of the interconnect target module | ||
| 102 | * @module_size: size of the interconnect target module | ||
| 103 | * @offsets: array of register offsets as listed in enum sysc_registers | ||
| 104 | * @nr_offsets: number of registers | ||
| 105 | * @cap: interconnect target module capabilities | ||
| 106 | * @cfg: interconnect target module configuration | ||
| 107 | * | ||
| 108 | * This data is enough to allocate a new struct omap_hwmod_class_sysconfig | ||
| 109 | * based on device tree data parsed by ti-sysc driver. | ||
| 110 | */ | ||
| 111 | struct ti_sysc_module_data { | ||
| 112 | const char *name; | ||
| 113 | u64 module_pa; | ||
| 114 | u32 module_size; | ||
| 115 | int *offsets; | ||
| 116 | int nr_offsets; | ||
| 117 | const struct sysc_capabilities *cap; | ||
| 118 | struct sysc_config *cfg; | ||
| 119 | }; | ||
| 120 | |||
| 121 | struct device; | ||
| 122 | |||
| 123 | struct ti_sysc_platform_data { | ||
| 124 | struct of_dev_auxdata *auxdata; | ||
| 125 | int (*init_module)(struct device *dev, | ||
| 126 | const struct ti_sysc_module_data *data, | ||
| 127 | struct ti_sysc_cookie *cookie); | ||
| 128 | int (*enable_module)(struct device *dev, | ||
| 129 | const struct ti_sysc_cookie *cookie); | ||
| 130 | int (*idle_module)(struct device *dev, | ||
| 131 | const struct ti_sysc_cookie *cookie); | ||
| 132 | int (*shutdown_module)(struct device *dev, | ||
| 133 | const struct ti_sysc_cookie *cookie); | ||
| 134 | }; | ||
| 135 | |||
| 86 | #endif /* __TI_SYSC_DATA_H__ */ | 136 | #endif /* __TI_SYSC_DATA_H__ */ |
diff --git a/include/linux/power/smartreflex.h b/include/linux/power/smartreflex.h index d8b187c3925d..7b81dad712de 100644 --- a/include/linux/power/smartreflex.h +++ b/include/linux/power/smartreflex.h | |||
| @@ -143,6 +143,13 @@ | |||
| 143 | #define OMAP3430_SR_ERRWEIGHT 0x04 | 143 | #define OMAP3430_SR_ERRWEIGHT 0x04 |
| 144 | #define OMAP3430_SR_ERRMAXLIMIT 0x02 | 144 | #define OMAP3430_SR_ERRMAXLIMIT 0x02 |
| 145 | 145 | ||
| 146 | enum sr_instance { | ||
| 147 | OMAP_SR_MPU, /* shared with iva on omap3 */ | ||
| 148 | OMAP_SR_CORE, | ||
| 149 | OMAP_SR_IVA, | ||
| 150 | OMAP_SR_NR, | ||
| 151 | }; | ||
| 152 | |||
| 146 | struct omap_sr { | 153 | struct omap_sr { |
| 147 | char *name; | 154 | char *name; |
| 148 | struct list_head node; | 155 | struct list_head node; |
| @@ -207,7 +214,6 @@ struct omap_smartreflex_dev_attr { | |||
| 207 | const char *sensor_voltdm_name; | 214 | const char *sensor_voltdm_name; |
| 208 | }; | 215 | }; |
| 209 | 216 | ||
| 210 | #ifdef CONFIG_POWER_AVS_OMAP | ||
| 211 | /* | 217 | /* |
| 212 | * The smart reflex driver supports CLASS1 CLASS2 and CLASS3 SR. | 218 | * The smart reflex driver supports CLASS1 CLASS2 and CLASS3 SR. |
| 213 | * The smartreflex class driver should pass the class type. | 219 | * The smartreflex class driver should pass the class type. |
| @@ -290,6 +296,8 @@ struct omap_sr_data { | |||
| 290 | struct voltagedomain *voltdm; | 296 | struct voltagedomain *voltdm; |
| 291 | }; | 297 | }; |
| 292 | 298 | ||
| 299 | #ifdef CONFIG_POWER_AVS_OMAP | ||
| 300 | |||
| 293 | /* Smartreflex module enable/disable interface */ | 301 | /* Smartreflex module enable/disable interface */ |
| 294 | void omap_sr_enable(struct voltagedomain *voltdm); | 302 | void omap_sr_enable(struct voltagedomain *voltdm); |
| 295 | void omap_sr_disable(struct voltagedomain *voltdm); | 303 | void omap_sr_disable(struct voltagedomain *voltdm); |
