mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 08:08:09 +07:00
41d9d44d72
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>
32 lines
945 B
C
32 lines
945 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* TI AM33XX and AM43XX PM Assembly Offsets
|
|
*
|
|
* Copyright (C) 2017-2018 Texas Instruments Inc.
|
|
*/
|
|
|
|
#include <linux/kbuild.h>
|
|
#include <linux/platform_data/pm33xx.h>
|
|
|
|
int main(void)
|
|
{
|
|
DEFINE(AMX3_PM_WFI_FLAGS_OFFSET,
|
|
offsetof(struct am33xx_pm_sram_data, wfi_flags));
|
|
DEFINE(AMX3_PM_L2_AUX_CTRL_VAL_OFFSET,
|
|
offsetof(struct am33xx_pm_sram_data, l2_aux_ctrl_val));
|
|
DEFINE(AMX3_PM_L2_PREFETCH_CTRL_VAL_OFFSET,
|
|
offsetof(struct am33xx_pm_sram_data, l2_prefetch_ctrl_val));
|
|
DEFINE(AMX3_PM_SRAM_DATA_SIZE, sizeof(struct am33xx_pm_sram_data));
|
|
|
|
BLANK();
|
|
|
|
DEFINE(AMX3_PM_RO_SRAM_DATA_VIRT_OFFSET,
|
|
offsetof(struct am33xx_pm_ro_sram_data, amx3_pm_sram_data_virt));
|
|
DEFINE(AMX3_PM_RO_SRAM_DATA_PHYS_OFFSET,
|
|
offsetof(struct am33xx_pm_ro_sram_data, amx3_pm_sram_data_phys));
|
|
DEFINE(AMX3_PM_RO_SRAM_DATA_SIZE,
|
|
sizeof(struct am33xx_pm_ro_sram_data));
|
|
|
|
return 0;
|
|
}
|