aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r--include/linux/platform_data/ti-sysc.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/include/linux/platform_data/ti-sysc.h b/include/linux/platform_data/ti-sysc.h
index 1be356330b96..4176cb90e195 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
19struct 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
@@ -83,4 +87,49 @@ struct sysc_config {
83 u32 quirks; 87 u32 quirks;
84}; 88};
85 89
90enum sysc_registers {
91 SYSC_REVISION,
92 SYSC_SYSCONFIG,
93 SYSC_SYSSTATUS,
94 SYSC_MAX_REGS,
95};
96
97/**
98 * struct ti_sysc_module_data - ti-sysc to hwmod translation data for a module
99 * @name: legacy "ti,hwmods" module name
100 * @module_pa: physical address of the interconnect target module
101 * @module_size: size of the interconnect target module
102 * @offsets: array of register offsets as listed in enum sysc_registers
103 * @nr_offsets: number of registers
104 * @cap: interconnect target module capabilities
105 * @cfg: interconnect target module configuration
106 *
107 * This data is enough to allocate a new struct omap_hwmod_class_sysconfig
108 * based on device tree data parsed by ti-sysc driver.
109 */
110struct ti_sysc_module_data {
111 const char *name;
112 u64 module_pa;
113 u32 module_size;
114 int *offsets;
115 int nr_offsets;
116 const struct sysc_capabilities *cap;
117 struct sysc_config *cfg;
118};
119
120struct device;
121
122struct ti_sysc_platform_data {
123 struct of_dev_auxdata *auxdata;
124 int (*init_module)(struct device *dev,
125 const struct ti_sysc_module_data *data,
126 struct ti_sysc_cookie *cookie);
127 int (*enable_module)(struct device *dev,
128 const struct ti_sysc_cookie *cookie);
129 int (*idle_module)(struct device *dev,
130 const struct ti_sysc_cookie *cookie);
131 int (*shutdown_module)(struct device *dev,
132 const struct ti_sysc_cookie *cookie);
133};
134
86#endif /* __TI_SYSC_DATA_H__ */ 135#endif /* __TI_SYSC_DATA_H__ */