Driver changes for ti-sysc for v4.17
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. -----BEGIN PGP SIGNATURE----- iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAlqdehERHHRvbnlAYXRv bWlkZS5jb20ACgkQG9Q+yVyrpXMRihAA2jlmAf4dePwe0K5V1VlQINbAU/FV+tXN 1oasvGwNBxaJMqJeZAdBd/veuXgrsprIbmlMmF+zP/wQDYiMccr0+ZvzMsUKJ9aA mgzpW/pkpZEbi0ncci4UhQVOuZLja1xxtQ+ZGx82Vo7MXyU2jU9/Wzk67B4BZLws 1MGTsy5VZZh+wicq46eW9AspvFhKCMIw6Ylor3lfmm08H3V/cq9A8dHQeWX2jjsC hSw9RzglGMi58FQ8cqNkxbD38r1VZh74OOqzOOlcJ5CwLWzIJwanWfwDesVb4ZTL bdrn/Aps5b223LTAFN97vwUmyux/ja17YyCC5fU6C6wskgN+9jhPSslzFbFbU0kT 4chc5OYcdq5Lhm+vLCe2H5rB14KQxy6Ugb6aT+XAUOq0hw6tRSG17kqlXk/KtwrG cDzPJzPjG/PDb8hW0Bd7JcjLqadmh7w1180KtT+9IayQM50XxcwwAOPT0XdUEUeP aKIp5cRfOm/75KUIiNomhmoAd1pxX1G6y2qo49p3fbY0nJx09MgtQvWlbDrbhL8+ ACp2adGAlLqsW26E44cqNwMPPhyVcQXlVD9bc2D04nVhXapvRHtlrW4cRkkbQzfw dAiQHDaBn4geSBUqGayQaIvX1WWqeZ6nzpI0JlyHPMiQdkdDvtyUqhJuK2uaY39n vyRPw2H09ZM= =/hJY -----END PGP SIGNATURE----- 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:
commit
3bf5c70d06
10 changed files with 1087 additions and 57 deletions
|
|
@ -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__ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue