Merge tag 'omap-for-v4.17/ti-sysc-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc
Pull "Driver changes for ti-sysc for v4.17" from Tony Lindgren: This series of changes enables the use device tree based sysconfig data for ti-sysc driver. As we already have SmartReflex data configured, we use that as the first driver to enable. To do that in a way where SmartReflex is not probed twice, we need to prepare the SmartReflex driver before flipping dts data on for it in the last patch of the series. To avoid regressions, we are checking the passed dts data against existing platform data since we still have it available. Then after the dts files are converted, we can simply drop the related platform data at some point in the future. * tag 'omap-for-v4.17/ti-sysc-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Enable ti-sysc to use device tree data for smartreflex PM / AVS: SmartReflex: Prepare to use device tree based probing ARM: OMAP2+: Try to parse earlycon from parent too ARM: OMAP2+: Add checks for device tree based sysconfig data ARM: OMAP2+: Add functions to allocate module data from device tree bus: ti-sysc: Handle some devices in omap_device compatible way bus: ti-sysc: Add support for platform data callbacks bus: ti-sysc: Remove unnecessary debugging statements bus: ti-sysc: Improve handling for no-reset-on-init and no-idle-on-init bus: ti-sysc: Handle stdout-path for debug console bus: ti-sysc: Add suspend and resume handling bus: ti-sysc: Add fck clock alias for children with notifier_block ARM: OMAP2+: Prepare to pass auxdata for smartreflex
This commit is contained in:
@@ -16,6 +16,10 @@ enum ti_sysc_module_type {
|
||||
TI_SYSC_OMAP4_USB_HOST_FS,
|
||||
};
|
||||
|
||||
struct ti_sysc_cookie {
|
||||
void *data;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct sysc_regbits - TI OCP_SYSCONFIG register field offsets
|
||||
* @midle_shift: Offset of the midle bit
|
||||
@@ -41,6 +45,7 @@ struct sysc_regbits {
|
||||
s8 emufree_shift;
|
||||
};
|
||||
|
||||
#define SYSC_QUIRK_LEGACY_IDLE BIT(8)
|
||||
#define SYSC_QUIRK_RESET_STATUS BIT(7)
|
||||
#define SYSC_QUIRK_NO_IDLE_ON_INIT BIT(6)
|
||||
#define SYSC_QUIRK_NO_RESET_ON_INIT BIT(5)
|
||||
@@ -83,4 +88,49 @@ struct sysc_config {
|
||||
u32 quirks;
|
||||
};
|
||||
|
||||
enum sysc_registers {
|
||||
SYSC_REVISION,
|
||||
SYSC_SYSCONFIG,
|
||||
SYSC_SYSSTATUS,
|
||||
SYSC_MAX_REGS,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ti_sysc_module_data - ti-sysc to hwmod translation data for a module
|
||||
* @name: legacy "ti,hwmods" module name
|
||||
* @module_pa: physical address of the interconnect target module
|
||||
* @module_size: size of the interconnect target module
|
||||
* @offsets: array of register offsets as listed in enum sysc_registers
|
||||
* @nr_offsets: number of registers
|
||||
* @cap: interconnect target module capabilities
|
||||
* @cfg: interconnect target module configuration
|
||||
*
|
||||
* This data is enough to allocate a new struct omap_hwmod_class_sysconfig
|
||||
* based on device tree data parsed by ti-sysc driver.
|
||||
*/
|
||||
struct ti_sysc_module_data {
|
||||
const char *name;
|
||||
u64 module_pa;
|
||||
u32 module_size;
|
||||
int *offsets;
|
||||
int nr_offsets;
|
||||
const struct sysc_capabilities *cap;
|
||||
struct sysc_config *cfg;
|
||||
};
|
||||
|
||||
struct device;
|
||||
|
||||
struct ti_sysc_platform_data {
|
||||
struct of_dev_auxdata *auxdata;
|
||||
int (*init_module)(struct device *dev,
|
||||
const struct ti_sysc_module_data *data,
|
||||
struct ti_sysc_cookie *cookie);
|
||||
int (*enable_module)(struct device *dev,
|
||||
const struct ti_sysc_cookie *cookie);
|
||||
int (*idle_module)(struct device *dev,
|
||||
const struct ti_sysc_cookie *cookie);
|
||||
int (*shutdown_module)(struct device *dev,
|
||||
const struct ti_sysc_cookie *cookie);
|
||||
};
|
||||
|
||||
#endif /* __TI_SYSC_DATA_H__ */
|
||||
|
Reference in New Issue
Block a user