diff options
| author | Dave Gerlach <d-gerlach@ti.com> | 2018-02-23 10:43:56 -0500 |
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2018-02-27 11:53:37 -0500 |
| commit | 41d9d44d725808f27b53f266733e6d17d83020ba (patch) | |
| tree | d01146c359a6f822aa3f1776c1e9faa74dc6f70e /include/linux/platform_data | |
| parent | 41d37e61372fdaf4d7e381580c0c3bf88972f7da (diff) | |
ARM: OMAP2+: pm33xx-core: Add platform code needed for PM
Most of the PM code needed for am335x and am437x can be moved into a
module under drivers but some core code must remain in mach-omap2 at the
moment. This includes some internal clockdomain APIs and low-level ARM
APIs which are also not exported for use by modules.
Implement a few functions that handle these low-level platform
operations can be passed to the pm33xx module through the use of
platform data.
In addition to this, to be able to share data structures between C and
the sleep33xx and sleep43xx assembly code, we can automatically generate
all of the C struct member offsets and sizes as macros by processing
pm-asm-offsets.c into assembly code and then extracting the relevant
data as is done for the generated platform asm-offsets.h files.
Finally, add amx3_common_pm_init to create a dummy platform_device for
pm33xx so that our soon to be introduced pm33xx module can probe on
am335x and am437x platforms to enable basic suspend to mem and standby
support.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'include/linux/platform_data')
| -rw-r--r-- | include/linux/platform_data/pm33xx.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/include/linux/platform_data/pm33xx.h b/include/linux/platform_data/pm33xx.h new file mode 100644 index 000000000000..f9bed2a0af9d --- /dev/null +++ b/include/linux/platform_data/pm33xx.h | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | /* | ||
| 3 | * TI pm33xx platform data | ||
| 4 | * | ||
| 5 | * Copyright (C) 2016-2018 Texas Instruments, Inc. | ||
| 6 | * Dave Gerlach <d-gerlach@ti.com> | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef _LINUX_PLATFORM_DATA_PM33XX_H | ||
| 10 | #define _LINUX_PLATFORM_DATA_PM33XX_H | ||
| 11 | |||
| 12 | #include <linux/kbuild.h> | ||
| 13 | #include <linux/types.h> | ||
| 14 | |||
| 15 | #ifndef __ASSEMBLER__ | ||
| 16 | struct am33xx_pm_sram_addr { | ||
| 17 | void (*do_wfi)(void); | ||
| 18 | unsigned long *do_wfi_sz; | ||
| 19 | unsigned long *resume_offset; | ||
| 20 | unsigned long *emif_sram_table; | ||
| 21 | unsigned long *ro_sram_data; | ||
| 22 | }; | ||
| 23 | |||
| 24 | struct am33xx_pm_platform_data { | ||
| 25 | int (*init)(void); | ||
| 26 | int (*soc_suspend)(unsigned int state, int (*fn)(unsigned long)); | ||
| 27 | struct am33xx_pm_sram_addr *(*get_sram_addrs)(void); | ||
| 28 | }; | ||
| 29 | |||
| 30 | struct am33xx_pm_sram_data { | ||
| 31 | u32 wfi_flags; | ||
| 32 | u32 l2_aux_ctrl_val; | ||
| 33 | u32 l2_prefetch_ctrl_val; | ||
| 34 | } __packed __aligned(8); | ||
| 35 | |||
| 36 | struct am33xx_pm_ro_sram_data { | ||
| 37 | u32 amx3_pm_sram_data_virt; | ||
| 38 | u32 amx3_pm_sram_data_phys; | ||
| 39 | } __packed __aligned(8); | ||
| 40 | |||
| 41 | #endif /* __ASSEMBLER__ */ | ||
| 42 | #endif /* _LINUX_PLATFORM_DATA_PM33XX_H */ | ||
