mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
SoC updates for omaps for v4.19 merge window
These changes are mostly PM related changes for am335x and am437x to support RTC only suspend mode. Some of the clock and driver related chances are still pending so it's not yet fully functional. Also included is a change for PM debug sysfs entry to use DEFINE_SHOW_ATTRIBUTE. -----BEGIN PGP SIGNATURE----- iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAltF9jwRHHRvbnlAYXRv bWlkZS5jb20ACgkQG9Q+yVyrpXND+A/+Is28Eudbo9KvOtNA6Pebk2uT2sIUcBB8 a+j71jHALGpMKk7XpgBwsCgA+Fn7MRtERS+9MFyganXl9Ug0i3T1h725sEAQo6ok 4dItC+BzCjOkbJuwGQB1KvmCKeouF7qjYG2Jgy54AljAHZtDW0tbgC9S6o0xvfJN p5zN4WMgomSoKFfoCkrzeQQblg5fUJU6BuK0zHBPVRNKSF2T1THZiUUrF1QWvmbM /L8/TRqpkngzZfj2dhv/Ja9WxR9MUzbeciwiiF+5j9Yu5+PcUO/OYN7P9i/nM9J3 G/kTyCALTagVqia84Q+llitkUwlbXkC83BSAgWFVXEIbDmDALhya2KtApePkTP5j n9NceSuuOmKEA/4uq2jR89sTbd3UC9zYNlEu2R0qcrpSo+4N3Q4Pp9LsrN52g8M/ bG0t53YC+vFM+GUhVTxKs2zH1amJRHlPvMqmSJQksY0o/QJFxTFOFdGh9nfhYetq ci3c8Ljv0MF2TuiGnG6FOOyax7pyap7oxOZfUuxwkCIhXgQs9UIcQy3e5s8if4F2 5brWdWuvqJPWWIyv9IF0yfT5IA44LJpO+UbZLmUHcPucH1gkJSai8GFJKXttfyQx Mw5sn/QUQoTHCd+NSocHirr0iPg2OqHNtHJlRdqrV2gx2hT9878gIwqnWUeXyUM4 3SzrsXUWtik= =Px9o -----END PGP SIGNATURE----- Merge tag 'omap-for-v4.19/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc SoC updates for omaps for v4.19 merge window These changes are mostly PM related changes for am335x and am437x to support RTC only suspend mode. Some of the clock and driver related chances are still pending so it's not yet fully functional. Also included is a change for PM debug sysfs entry to use DEFINE_SHOW_ATTRIBUTE. * tag 'omap-for-v4.19/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: sleep33/43xx: Add RTC-Mode support ARM: OMAP2+: sleep33/43xx: Make sleep actions configurable ARM: OMAP2+: reuse DEFINE_SHOW_ATTRIBUTE() macro ARM: hwmod: RTC: Don't assume lock/unlock will be called with irq enabled Signed-off-by: Olof Johansson <[email protected]>
This commit is contained in:
commit
edc07c0012
8 changed files with 229 additions and 49 deletions
|
|
@ -41,6 +41,8 @@ static struct am33xx_pm_sram_addr *pm_sram;
|
|||
static struct device *pm33xx_dev;
|
||||
static struct wkup_m3_ipc *m3_ipc;
|
||||
|
||||
static unsigned long suspend_wfi_flags;
|
||||
|
||||
static u32 sram_suspend_address(unsigned long addr)
|
||||
{
|
||||
return ((unsigned long)am33xx_do_wfi_sram +
|
||||
|
|
@ -53,7 +55,7 @@ static int am33xx_pm_suspend(suspend_state_t suspend_state)
|
|||
int i, ret = 0;
|
||||
|
||||
ret = pm_ops->soc_suspend((unsigned long)suspend_state,
|
||||
am33xx_do_wfi_sram);
|
||||
am33xx_do_wfi_sram, suspend_wfi_flags);
|
||||
|
||||
if (ret) {
|
||||
dev_err(pm33xx_dev, "PM: Kernel suspend failure\n");
|
||||
|
|
@ -227,6 +229,7 @@ static int am33xx_push_sram_idle(void)
|
|||
ro_sram_data.amx3_pm_sram_data_virt = ocmcram_location_data;
|
||||
ro_sram_data.amx3_pm_sram_data_phys =
|
||||
gen_pool_virt_to_phys(sram_pool_data, ocmcram_location_data);
|
||||
ro_sram_data.rtc_base_virt = pm_ops->get_rtc_base_addr();
|
||||
|
||||
/* Save physical address to calculate resume offset during pm init */
|
||||
am33xx_do_wfi_sram_phys = gen_pool_virt_to_phys(sram_pool,
|
||||
|
|
@ -310,6 +313,17 @@ static int am33xx_pm_probe(struct platform_device *pdev)
|
|||
suspend_set_ops(&am33xx_pm_ops);
|
||||
#endif /* CONFIG_SUSPEND */
|
||||
|
||||
/*
|
||||
* For a system suspend we must flush the caches, we want
|
||||
* the DDR in self-refresh, we want to save the context
|
||||
* of the EMIF, and we want the wkup_m3 to handle low-power
|
||||
* transition.
|
||||
*/
|
||||
suspend_wfi_flags |= WFI_FLAG_FLUSH_CACHE;
|
||||
suspend_wfi_flags |= WFI_FLAG_SELF_REFRESH;
|
||||
suspend_wfi_flags |= WFI_FLAG_SAVE_EMIF;
|
||||
suspend_wfi_flags |= WFI_FLAG_WAKE_M3;
|
||||
|
||||
ret = pm_ops->init();
|
||||
if (ret) {
|
||||
dev_err(dev, "Unable to call core pm init!\n");
|
||||
|
|
|
|||
Loading…
Reference in a new issue