diff options
Diffstat (limited to 'include/linux/platform_data')
| -rw-r--r-- | include/linux/platform_data/ti-sysc.h | 50 |
1 files changed, 50 insertions, 0 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__ */ |
