18428e5adSDave Gerlach /* 28428e5adSDave Gerlach * TI AM33XX EMIF PM Assembly Offsets 38428e5adSDave Gerlach * 48428e5adSDave Gerlach * Copyright (C) 2016-2017 Texas Instruments Inc. 58428e5adSDave Gerlach * 68428e5adSDave Gerlach * This program is free software; you can redistribute it and/or 78428e5adSDave Gerlach * modify it under the terms of the GNU General Public License as 88428e5adSDave Gerlach * published by the Free Software Foundation version 2. 98428e5adSDave Gerlach * 108428e5adSDave Gerlach * This program is distributed "as is" WITHOUT ANY WARRANTY of any 118428e5adSDave Gerlach * kind, whether express or implied; without even the implied warranty 128428e5adSDave Gerlach * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 138428e5adSDave Gerlach * GNU General Public License for more details. 148428e5adSDave Gerlach */ 158428e5adSDave Gerlach #include <linux/ti-emif-sram.h> 168428e5adSDave Gerlach 178428e5adSDave Gerlach int main(void) 188428e5adSDave Gerlach { 198428e5adSDave Gerlach DEFINE(EMIF_SDCFG_VAL_OFFSET, 208428e5adSDave Gerlach offsetof(struct emif_regs_amx3, emif_sdcfg_val)); 218428e5adSDave Gerlach DEFINE(EMIF_TIMING1_VAL_OFFSET, 228428e5adSDave Gerlach offsetof(struct emif_regs_amx3, emif_timing1_val)); 238428e5adSDave Gerlach DEFINE(EMIF_TIMING2_VAL_OFFSET, 248428e5adSDave Gerlach offsetof(struct emif_regs_amx3, emif_timing2_val)); 258428e5adSDave Gerlach DEFINE(EMIF_TIMING3_VAL_OFFSET, 268428e5adSDave Gerlach offsetof(struct emif_regs_amx3, emif_timing3_val)); 278428e5adSDave Gerlach DEFINE(EMIF_REF_CTRL_VAL_OFFSET, 288428e5adSDave Gerlach offsetof(struct emif_regs_amx3, emif_ref_ctrl_val)); 298428e5adSDave Gerlach DEFINE(EMIF_ZQCFG_VAL_OFFSET, 308428e5adSDave Gerlach offsetof(struct emif_regs_amx3, emif_zqcfg_val)); 318428e5adSDave Gerlach DEFINE(EMIF_PMCR_VAL_OFFSET, 328428e5adSDave Gerlach offsetof(struct emif_regs_amx3, emif_pmcr_val)); 338428e5adSDave Gerlach DEFINE(EMIF_PMCR_SHDW_VAL_OFFSET, 348428e5adSDave Gerlach offsetof(struct emif_regs_amx3, emif_pmcr_shdw_val)); 358428e5adSDave Gerlach DEFINE(EMIF_RD_WR_LEVEL_RAMP_CTRL_OFFSET, 368428e5adSDave Gerlach offsetof(struct emif_regs_amx3, emif_rd_wr_level_ramp_ctrl)); 378428e5adSDave Gerlach DEFINE(EMIF_RD_WR_EXEC_THRESH_OFFSET, 388428e5adSDave Gerlach offsetof(struct emif_regs_amx3, emif_rd_wr_exec_thresh)); 398428e5adSDave Gerlach DEFINE(EMIF_COS_CONFIG_OFFSET, 408428e5adSDave Gerlach offsetof(struct emif_regs_amx3, emif_cos_config)); 418428e5adSDave Gerlach DEFINE(EMIF_PRIORITY_TO_COS_MAPPING_OFFSET, 428428e5adSDave Gerlach offsetof(struct emif_regs_amx3, emif_priority_to_cos_mapping)); 438428e5adSDave Gerlach DEFINE(EMIF_CONNECT_ID_SERV_1_MAP_OFFSET, 448428e5adSDave Gerlach offsetof(struct emif_regs_amx3, emif_connect_id_serv_1_map)); 458428e5adSDave Gerlach DEFINE(EMIF_CONNECT_ID_SERV_2_MAP_OFFSET, 468428e5adSDave Gerlach offsetof(struct emif_regs_amx3, emif_connect_id_serv_2_map)); 478428e5adSDave Gerlach DEFINE(EMIF_OCP_CONFIG_VAL_OFFSET, 488428e5adSDave Gerlach offsetof(struct emif_regs_amx3, emif_ocp_config_val)); 498428e5adSDave Gerlach DEFINE(EMIF_LPDDR2_NVM_TIM_OFFSET, 508428e5adSDave Gerlach offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim)); 518428e5adSDave Gerlach DEFINE(EMIF_LPDDR2_NVM_TIM_SHDW_OFFSET, 528428e5adSDave Gerlach offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim_shdw)); 538428e5adSDave Gerlach DEFINE(EMIF_DLL_CALIB_CTRL_VAL_OFFSET, 548428e5adSDave Gerlach offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val)); 558428e5adSDave Gerlach DEFINE(EMIF_DLL_CALIB_CTRL_VAL_SHDW_OFFSET, 568428e5adSDave Gerlach offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val_shdw)); 578428e5adSDave Gerlach DEFINE(EMIF_DDR_PHY_CTLR_1_OFFSET, 588428e5adSDave Gerlach offsetof(struct emif_regs_amx3, emif_ddr_phy_ctlr_1)); 598428e5adSDave Gerlach DEFINE(EMIF_EXT_PHY_CTRL_VALS_OFFSET, 608428e5adSDave Gerlach offsetof(struct emif_regs_amx3, emif_ext_phy_ctrl_vals)); 618428e5adSDave Gerlach DEFINE(EMIF_REGS_AMX3_SIZE, sizeof(struct emif_regs_amx3)); 628428e5adSDave Gerlach 638428e5adSDave Gerlach BLANK(); 648428e5adSDave Gerlach 658428e5adSDave Gerlach DEFINE(EMIF_PM_BASE_ADDR_VIRT_OFFSET, 668428e5adSDave Gerlach offsetof(struct ti_emif_pm_data, ti_emif_base_addr_virt)); 678428e5adSDave Gerlach DEFINE(EMIF_PM_BASE_ADDR_PHYS_OFFSET, 688428e5adSDave Gerlach offsetof(struct ti_emif_pm_data, ti_emif_base_addr_phys)); 698428e5adSDave Gerlach DEFINE(EMIF_PM_CONFIG_OFFSET, 708428e5adSDave Gerlach offsetof(struct ti_emif_pm_data, ti_emif_sram_config)); 718428e5adSDave Gerlach DEFINE(EMIF_PM_REGS_VIRT_OFFSET, 728428e5adSDave Gerlach offsetof(struct ti_emif_pm_data, regs_virt)); 738428e5adSDave Gerlach DEFINE(EMIF_PM_REGS_PHYS_OFFSET, 748428e5adSDave Gerlach offsetof(struct ti_emif_pm_data, regs_phys)); 758428e5adSDave Gerlach DEFINE(EMIF_PM_DATA_SIZE, sizeof(struct ti_emif_pm_data)); 768428e5adSDave Gerlach 778428e5adSDave Gerlach BLANK(); 788428e5adSDave Gerlach 798428e5adSDave Gerlach DEFINE(EMIF_PM_SAVE_CONTEXT_OFFSET, 808428e5adSDave Gerlach offsetof(struct ti_emif_pm_functions, save_context)); 818428e5adSDave Gerlach DEFINE(EMIF_PM_RESTORE_CONTEXT_OFFSET, 828428e5adSDave Gerlach offsetof(struct ti_emif_pm_functions, restore_context)); 838428e5adSDave Gerlach DEFINE(EMIF_PM_ENTER_SR_OFFSET, 848428e5adSDave Gerlach offsetof(struct ti_emif_pm_functions, enter_sr)); 858428e5adSDave Gerlach DEFINE(EMIF_PM_EXIT_SR_OFFSET, 868428e5adSDave Gerlach offsetof(struct ti_emif_pm_functions, exit_sr)); 878428e5adSDave Gerlach DEFINE(EMIF_PM_ABORT_SR_OFFSET, 888428e5adSDave Gerlach offsetof(struct ti_emif_pm_functions, abort_sr)); 898428e5adSDave Gerlach DEFINE(EMIF_PM_FUNCTIONS_SIZE, sizeof(struct ti_emif_pm_functions)); 908428e5adSDave Gerlach 918428e5adSDave Gerlach return 0; 928428e5adSDave Gerlach } 93