All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: omap2: Fix build when using split object directories
@ 2018-04-11 21:15 ` Dave Gerlach
  0 siblings, 0 replies; 19+ messages in thread
From: Dave Gerlach @ 2018-04-11 21:15 UTC (permalink / raw)
  To: linux-kernel, Tony Lindgren, Russell King - ARM Linux, Santosh Shilimkar
  Cc: linux-arm-kernel, linux-omap, linux-kbuild, Anders Roxell,
	Dave Gerlach, Masahiro Yamada, Michal Marek

The sleep33xx and sleep43xx files should not depend on a header file
generated in drivers/memory. Remove this dependency and instead allow
both drivers/memory and arch/arm/mach-omap2 to generate all macros
needed in headers local to their own paths.

This fixes an issue where the build fail will when using O= to set a
split object directory and arch/arm/mach-omap2 is built before
drivers/memory with the following error:

.../drivers/memory/emif-asm-offsets.c:1:0: fatal error: can't open drivers/memory/emif-asm-offsets.s for writing: No such file or directory
compilation terminated.

Fixes: 41d9d44d7258 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for PM")
Acked-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
---
 arch/arm/mach-omap2/Makefile         |  6 +--
 arch/arm/mach-omap2/pm-asm-offsets.c |  3 ++
 arch/arm/mach-omap2/sleep33xx.S      |  1 -
 arch/arm/mach-omap2/sleep43xx.S      |  1 -
 drivers/memory/emif-asm-offsets.c    | 72 +---------------------------------
 include/linux/ti-emif-sram.h         | 75 ++++++++++++++++++++++++++++++++++++
 6 files changed, 80 insertions(+), 78 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 4603c30fef73..0d9ce58bc464 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -243,8 +243,4 @@ arch/arm/mach-omap2/pm-asm-offsets.s: arch/arm/mach-omap2/pm-asm-offsets.c
 include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORCE
 	$(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
 
-# For rule to generate ti-emif-asm-offsets.h dependency
-include drivers/memory/Makefile.asm-offsets
-
-arch/arm/mach-omap2/sleep33xx.o: include/generated/ti-pm-asm-offsets.h include/generated/ti-emif-asm-offsets.h
-arch/arm/mach-omap2/sleep43xx.o: include/generated/ti-pm-asm-offsets.h include/generated/ti-emif-asm-offsets.h
+$(obj)/sleep33xx.o $(obj)/sleep43xx.o: include/generated/ti-pm-asm-offsets.h
diff --git a/arch/arm/mach-omap2/pm-asm-offsets.c b/arch/arm/mach-omap2/pm-asm-offsets.c
index 6d4392da7c11..b9846b19e5e2 100644
--- a/arch/arm/mach-omap2/pm-asm-offsets.c
+++ b/arch/arm/mach-omap2/pm-asm-offsets.c
@@ -7,9 +7,12 @@
 
 #include <linux/kbuild.h>
 #include <linux/platform_data/pm33xx.h>
+#include <linux/ti-emif-sram.h>
 
 int main(void)
 {
+	ti_emif_asm_offsets();
+
 	DEFINE(AMX3_PM_WFI_FLAGS_OFFSET,
 	       offsetof(struct am33xx_pm_sram_data, wfi_flags));
 	DEFINE(AMX3_PM_L2_AUX_CTRL_VAL_OFFSET,
diff --git a/arch/arm/mach-omap2/sleep33xx.S b/arch/arm/mach-omap2/sleep33xx.S
index 218d79930b04..322b3bb868b4 100644
--- a/arch/arm/mach-omap2/sleep33xx.S
+++ b/arch/arm/mach-omap2/sleep33xx.S
@@ -6,7 +6,6 @@
  *	Dave Gerlach, Vaibhav Bedia
  */
 
-#include <generated/ti-emif-asm-offsets.h>
 #include <generated/ti-pm-asm-offsets.h>
 #include <linux/linkage.h>
 #include <linux/ti-emif-sram.h>
diff --git a/arch/arm/mach-omap2/sleep43xx.S b/arch/arm/mach-omap2/sleep43xx.S
index b24be624e8b9..8903814a6677 100644
--- a/arch/arm/mach-omap2/sleep43xx.S
+++ b/arch/arm/mach-omap2/sleep43xx.S
@@ -6,7 +6,6 @@
  *	Dave Gerlach, Vaibhav Bedia
  */
 
-#include <generated/ti-emif-asm-offsets.h>
 #include <generated/ti-pm-asm-offsets.h>
 #include <linux/linkage.h>
 #include <linux/ti-emif-sram.h>
diff --git a/drivers/memory/emif-asm-offsets.c b/drivers/memory/emif-asm-offsets.c
index 71a89d5d3efd..db8043019ec6 100644
--- a/drivers/memory/emif-asm-offsets.c
+++ b/drivers/memory/emif-asm-offsets.c
@@ -16,77 +16,7 @@
 
 int main(void)
 {
-	DEFINE(EMIF_SDCFG_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_sdcfg_val));
-	DEFINE(EMIF_TIMING1_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_timing1_val));
-	DEFINE(EMIF_TIMING2_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_timing2_val));
-	DEFINE(EMIF_TIMING3_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_timing3_val));
-	DEFINE(EMIF_REF_CTRL_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_ref_ctrl_val));
-	DEFINE(EMIF_ZQCFG_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_zqcfg_val));
-	DEFINE(EMIF_PMCR_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_pmcr_val));
-	DEFINE(EMIF_PMCR_SHDW_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_pmcr_shdw_val));
-	DEFINE(EMIF_RD_WR_LEVEL_RAMP_CTRL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_rd_wr_level_ramp_ctrl));
-	DEFINE(EMIF_RD_WR_EXEC_THRESH_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_rd_wr_exec_thresh));
-	DEFINE(EMIF_COS_CONFIG_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_cos_config));
-	DEFINE(EMIF_PRIORITY_TO_COS_MAPPING_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_priority_to_cos_mapping));
-	DEFINE(EMIF_CONNECT_ID_SERV_1_MAP_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_1_map));
-	DEFINE(EMIF_CONNECT_ID_SERV_2_MAP_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_2_map));
-	DEFINE(EMIF_OCP_CONFIG_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_ocp_config_val));
-	DEFINE(EMIF_LPDDR2_NVM_TIM_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim));
-	DEFINE(EMIF_LPDDR2_NVM_TIM_SHDW_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim_shdw));
-	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val));
-	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_SHDW_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val_shdw));
-	DEFINE(EMIF_DDR_PHY_CTLR_1_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_ddr_phy_ctlr_1));
-	DEFINE(EMIF_EXT_PHY_CTRL_VALS_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_ext_phy_ctrl_vals));
-	DEFINE(EMIF_REGS_AMX3_SIZE, sizeof(struct emif_regs_amx3));
-
-	BLANK();
-
-	DEFINE(EMIF_PM_BASE_ADDR_VIRT_OFFSET,
-	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_virt));
-	DEFINE(EMIF_PM_BASE_ADDR_PHYS_OFFSET,
-	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_phys));
-	DEFINE(EMIF_PM_CONFIG_OFFSET,
-	       offsetof(struct ti_emif_pm_data, ti_emif_sram_config));
-	DEFINE(EMIF_PM_REGS_VIRT_OFFSET,
-	       offsetof(struct ti_emif_pm_data, regs_virt));
-	DEFINE(EMIF_PM_REGS_PHYS_OFFSET,
-	       offsetof(struct ti_emif_pm_data, regs_phys));
-	DEFINE(EMIF_PM_DATA_SIZE, sizeof(struct ti_emif_pm_data));
-
-	BLANK();
-
-	DEFINE(EMIF_PM_SAVE_CONTEXT_OFFSET,
-	       offsetof(struct ti_emif_pm_functions, save_context));
-	DEFINE(EMIF_PM_RESTORE_CONTEXT_OFFSET,
-	       offsetof(struct ti_emif_pm_functions, restore_context));
-	DEFINE(EMIF_PM_ENTER_SR_OFFSET,
-	       offsetof(struct ti_emif_pm_functions, enter_sr));
-	DEFINE(EMIF_PM_EXIT_SR_OFFSET,
-	       offsetof(struct ti_emif_pm_functions, exit_sr));
-	DEFINE(EMIF_PM_ABORT_SR_OFFSET,
-	       offsetof(struct ti_emif_pm_functions, abort_sr));
-	DEFINE(EMIF_PM_FUNCTIONS_SIZE, sizeof(struct ti_emif_pm_functions));
+	ti_emif_asm_offsets();
 
 	return 0;
 }
diff --git a/include/linux/ti-emif-sram.h b/include/linux/ti-emif-sram.h
index 45bc6b376492..53604b087f2c 100644
--- a/include/linux/ti-emif-sram.h
+++ b/include/linux/ti-emif-sram.h
@@ -60,6 +60,81 @@ struct ti_emif_pm_functions {
 	u32 abort_sr;
 } __packed __aligned(8);
 
+static inline void ti_emif_asm_offsets(void)
+{
+	DEFINE(EMIF_SDCFG_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_sdcfg_val));
+	DEFINE(EMIF_TIMING1_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_timing1_val));
+	DEFINE(EMIF_TIMING2_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_timing2_val));
+	DEFINE(EMIF_TIMING3_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_timing3_val));
+	DEFINE(EMIF_REF_CTRL_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_ref_ctrl_val));
+	DEFINE(EMIF_ZQCFG_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_zqcfg_val));
+	DEFINE(EMIF_PMCR_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_pmcr_val));
+	DEFINE(EMIF_PMCR_SHDW_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_pmcr_shdw_val));
+	DEFINE(EMIF_RD_WR_LEVEL_RAMP_CTRL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_rd_wr_level_ramp_ctrl));
+	DEFINE(EMIF_RD_WR_EXEC_THRESH_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_rd_wr_exec_thresh));
+	DEFINE(EMIF_COS_CONFIG_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_cos_config));
+	DEFINE(EMIF_PRIORITY_TO_COS_MAPPING_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_priority_to_cos_mapping));
+	DEFINE(EMIF_CONNECT_ID_SERV_1_MAP_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_1_map));
+	DEFINE(EMIF_CONNECT_ID_SERV_2_MAP_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_2_map));
+	DEFINE(EMIF_OCP_CONFIG_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_ocp_config_val));
+	DEFINE(EMIF_LPDDR2_NVM_TIM_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim));
+	DEFINE(EMIF_LPDDR2_NVM_TIM_SHDW_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim_shdw));
+	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val));
+	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_SHDW_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val_shdw));
+	DEFINE(EMIF_DDR_PHY_CTLR_1_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_ddr_phy_ctlr_1));
+	DEFINE(EMIF_EXT_PHY_CTRL_VALS_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_ext_phy_ctrl_vals));
+	DEFINE(EMIF_REGS_AMX3_SIZE, sizeof(struct emif_regs_amx3));
+
+	BLANK();
+
+	DEFINE(EMIF_PM_BASE_ADDR_VIRT_OFFSET,
+	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_virt));
+	DEFINE(EMIF_PM_BASE_ADDR_PHYS_OFFSET,
+	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_phys));
+	DEFINE(EMIF_PM_CONFIG_OFFSET,
+	       offsetof(struct ti_emif_pm_data, ti_emif_sram_config));
+	DEFINE(EMIF_PM_REGS_VIRT_OFFSET,
+	       offsetof(struct ti_emif_pm_data, regs_virt));
+	DEFINE(EMIF_PM_REGS_PHYS_OFFSET,
+	       offsetof(struct ti_emif_pm_data, regs_phys));
+	DEFINE(EMIF_PM_DATA_SIZE, sizeof(struct ti_emif_pm_data));
+
+	BLANK();
+
+	DEFINE(EMIF_PM_SAVE_CONTEXT_OFFSET,
+	       offsetof(struct ti_emif_pm_functions, save_context));
+	DEFINE(EMIF_PM_RESTORE_CONTEXT_OFFSET,
+	       offsetof(struct ti_emif_pm_functions, restore_context));
+	DEFINE(EMIF_PM_ENTER_SR_OFFSET,
+	       offsetof(struct ti_emif_pm_functions, enter_sr));
+	DEFINE(EMIF_PM_EXIT_SR_OFFSET,
+	       offsetof(struct ti_emif_pm_functions, exit_sr));
+	DEFINE(EMIF_PM_ABORT_SR_OFFSET,
+	       offsetof(struct ti_emif_pm_functions, abort_sr));
+	DEFINE(EMIF_PM_FUNCTIONS_SIZE, sizeof(struct ti_emif_pm_functions));
+}
+
 struct gen_pool;
 
 int ti_emif_copy_pm_function_table(struct gen_pool *sram_pool, void *dst);
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH] ARM: omap2: Fix build when using split object directories
@ 2018-04-11 21:15 ` Dave Gerlach
  0 siblings, 0 replies; 19+ messages in thread
From: Dave Gerlach @ 2018-04-11 21:15 UTC (permalink / raw)
  To: linux-kernel, Tony Lindgren, Russell King - ARM Linux, Santosh Shilimkar
  Cc: linux-arm-kernel, linux-omap, linux-kbuild, Anders Roxell,
	Dave Gerlach, Masahiro Yamada, Michal Marek

The sleep33xx and sleep43xx files should not depend on a header file
generated in drivers/memory. Remove this dependency and instead allow
both drivers/memory and arch/arm/mach-omap2 to generate all macros
needed in headers local to their own paths.

This fixes an issue where the build fail will when using O= to set a
split object directory and arch/arm/mach-omap2 is built before
drivers/memory with the following error:

.../drivers/memory/emif-asm-offsets.c:1:0: fatal error: can't open drivers/memory/emif-asm-offsets.s for writing: No such file or directory
compilation terminated.

Fixes: 41d9d44d7258 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for PM")
Acked-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
---
 arch/arm/mach-omap2/Makefile         |  6 +--
 arch/arm/mach-omap2/pm-asm-offsets.c |  3 ++
 arch/arm/mach-omap2/sleep33xx.S      |  1 -
 arch/arm/mach-omap2/sleep43xx.S      |  1 -
 drivers/memory/emif-asm-offsets.c    | 72 +---------------------------------
 include/linux/ti-emif-sram.h         | 75 ++++++++++++++++++++++++++++++++++++
 6 files changed, 80 insertions(+), 78 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 4603c30fef73..0d9ce58bc464 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -243,8 +243,4 @@ arch/arm/mach-omap2/pm-asm-offsets.s: arch/arm/mach-omap2/pm-asm-offsets.c
 include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORCE
 	$(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
 
-# For rule to generate ti-emif-asm-offsets.h dependency
-include drivers/memory/Makefile.asm-offsets
-
-arch/arm/mach-omap2/sleep33xx.o: include/generated/ti-pm-asm-offsets.h include/generated/ti-emif-asm-offsets.h
-arch/arm/mach-omap2/sleep43xx.o: include/generated/ti-pm-asm-offsets.h include/generated/ti-emif-asm-offsets.h
+$(obj)/sleep33xx.o $(obj)/sleep43xx.o: include/generated/ti-pm-asm-offsets.h
diff --git a/arch/arm/mach-omap2/pm-asm-offsets.c b/arch/arm/mach-omap2/pm-asm-offsets.c
index 6d4392da7c11..b9846b19e5e2 100644
--- a/arch/arm/mach-omap2/pm-asm-offsets.c
+++ b/arch/arm/mach-omap2/pm-asm-offsets.c
@@ -7,9 +7,12 @@
 
 #include <linux/kbuild.h>
 #include <linux/platform_data/pm33xx.h>
+#include <linux/ti-emif-sram.h>
 
 int main(void)
 {
+	ti_emif_asm_offsets();
+
 	DEFINE(AMX3_PM_WFI_FLAGS_OFFSET,
 	       offsetof(struct am33xx_pm_sram_data, wfi_flags));
 	DEFINE(AMX3_PM_L2_AUX_CTRL_VAL_OFFSET,
diff --git a/arch/arm/mach-omap2/sleep33xx.S b/arch/arm/mach-omap2/sleep33xx.S
index 218d79930b04..322b3bb868b4 100644
--- a/arch/arm/mach-omap2/sleep33xx.S
+++ b/arch/arm/mach-omap2/sleep33xx.S
@@ -6,7 +6,6 @@
  *	Dave Gerlach, Vaibhav Bedia
  */
 
-#include <generated/ti-emif-asm-offsets.h>
 #include <generated/ti-pm-asm-offsets.h>
 #include <linux/linkage.h>
 #include <linux/ti-emif-sram.h>
diff --git a/arch/arm/mach-omap2/sleep43xx.S b/arch/arm/mach-omap2/sleep43xx.S
index b24be624e8b9..8903814a6677 100644
--- a/arch/arm/mach-omap2/sleep43xx.S
+++ b/arch/arm/mach-omap2/sleep43xx.S
@@ -6,7 +6,6 @@
  *	Dave Gerlach, Vaibhav Bedia
  */
 
-#include <generated/ti-emif-asm-offsets.h>
 #include <generated/ti-pm-asm-offsets.h>
 #include <linux/linkage.h>
 #include <linux/ti-emif-sram.h>
diff --git a/drivers/memory/emif-asm-offsets.c b/drivers/memory/emif-asm-offsets.c
index 71a89d5d3efd..db8043019ec6 100644
--- a/drivers/memory/emif-asm-offsets.c
+++ b/drivers/memory/emif-asm-offsets.c
@@ -16,77 +16,7 @@
 
 int main(void)
 {
-	DEFINE(EMIF_SDCFG_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_sdcfg_val));
-	DEFINE(EMIF_TIMING1_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_timing1_val));
-	DEFINE(EMIF_TIMING2_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_timing2_val));
-	DEFINE(EMIF_TIMING3_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_timing3_val));
-	DEFINE(EMIF_REF_CTRL_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_ref_ctrl_val));
-	DEFINE(EMIF_ZQCFG_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_zqcfg_val));
-	DEFINE(EMIF_PMCR_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_pmcr_val));
-	DEFINE(EMIF_PMCR_SHDW_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_pmcr_shdw_val));
-	DEFINE(EMIF_RD_WR_LEVEL_RAMP_CTRL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_rd_wr_level_ramp_ctrl));
-	DEFINE(EMIF_RD_WR_EXEC_THRESH_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_rd_wr_exec_thresh));
-	DEFINE(EMIF_COS_CONFIG_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_cos_config));
-	DEFINE(EMIF_PRIORITY_TO_COS_MAPPING_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_priority_to_cos_mapping));
-	DEFINE(EMIF_CONNECT_ID_SERV_1_MAP_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_1_map));
-	DEFINE(EMIF_CONNECT_ID_SERV_2_MAP_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_2_map));
-	DEFINE(EMIF_OCP_CONFIG_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_ocp_config_val));
-	DEFINE(EMIF_LPDDR2_NVM_TIM_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim));
-	DEFINE(EMIF_LPDDR2_NVM_TIM_SHDW_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim_shdw));
-	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val));
-	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_SHDW_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val_shdw));
-	DEFINE(EMIF_DDR_PHY_CTLR_1_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_ddr_phy_ctlr_1));
-	DEFINE(EMIF_EXT_PHY_CTRL_VALS_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_ext_phy_ctrl_vals));
-	DEFINE(EMIF_REGS_AMX3_SIZE, sizeof(struct emif_regs_amx3));
-
-	BLANK();
-
-	DEFINE(EMIF_PM_BASE_ADDR_VIRT_OFFSET,
-	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_virt));
-	DEFINE(EMIF_PM_BASE_ADDR_PHYS_OFFSET,
-	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_phys));
-	DEFINE(EMIF_PM_CONFIG_OFFSET,
-	       offsetof(struct ti_emif_pm_data, ti_emif_sram_config));
-	DEFINE(EMIF_PM_REGS_VIRT_OFFSET,
-	       offsetof(struct ti_emif_pm_data, regs_virt));
-	DEFINE(EMIF_PM_REGS_PHYS_OFFSET,
-	       offsetof(struct ti_emif_pm_data, regs_phys));
-	DEFINE(EMIF_PM_DATA_SIZE, sizeof(struct ti_emif_pm_data));
-
-	BLANK();
-
-	DEFINE(EMIF_PM_SAVE_CONTEXT_OFFSET,
-	       offsetof(struct ti_emif_pm_functions, save_context));
-	DEFINE(EMIF_PM_RESTORE_CONTEXT_OFFSET,
-	       offsetof(struct ti_emif_pm_functions, restore_context));
-	DEFINE(EMIF_PM_ENTER_SR_OFFSET,
-	       offsetof(struct ti_emif_pm_functions, enter_sr));
-	DEFINE(EMIF_PM_EXIT_SR_OFFSET,
-	       offsetof(struct ti_emif_pm_functions, exit_sr));
-	DEFINE(EMIF_PM_ABORT_SR_OFFSET,
-	       offsetof(struct ti_emif_pm_functions, abort_sr));
-	DEFINE(EMIF_PM_FUNCTIONS_SIZE, sizeof(struct ti_emif_pm_functions));
+	ti_emif_asm_offsets();
 
 	return 0;
 }
diff --git a/include/linux/ti-emif-sram.h b/include/linux/ti-emif-sram.h
index 45bc6b376492..53604b087f2c 100644
--- a/include/linux/ti-emif-sram.h
+++ b/include/linux/ti-emif-sram.h
@@ -60,6 +60,81 @@ struct ti_emif_pm_functions {
 	u32 abort_sr;
 } __packed __aligned(8);
 
+static inline void ti_emif_asm_offsets(void)
+{
+	DEFINE(EMIF_SDCFG_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_sdcfg_val));
+	DEFINE(EMIF_TIMING1_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_timing1_val));
+	DEFINE(EMIF_TIMING2_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_timing2_val));
+	DEFINE(EMIF_TIMING3_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_timing3_val));
+	DEFINE(EMIF_REF_CTRL_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_ref_ctrl_val));
+	DEFINE(EMIF_ZQCFG_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_zqcfg_val));
+	DEFINE(EMIF_PMCR_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_pmcr_val));
+	DEFINE(EMIF_PMCR_SHDW_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_pmcr_shdw_val));
+	DEFINE(EMIF_RD_WR_LEVEL_RAMP_CTRL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_rd_wr_level_ramp_ctrl));
+	DEFINE(EMIF_RD_WR_EXEC_THRESH_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_rd_wr_exec_thresh));
+	DEFINE(EMIF_COS_CONFIG_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_cos_config));
+	DEFINE(EMIF_PRIORITY_TO_COS_MAPPING_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_priority_to_cos_mapping));
+	DEFINE(EMIF_CONNECT_ID_SERV_1_MAP_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_1_map));
+	DEFINE(EMIF_CONNECT_ID_SERV_2_MAP_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_2_map));
+	DEFINE(EMIF_OCP_CONFIG_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_ocp_config_val));
+	DEFINE(EMIF_LPDDR2_NVM_TIM_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim));
+	DEFINE(EMIF_LPDDR2_NVM_TIM_SHDW_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim_shdw));
+	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val));
+	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_SHDW_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val_shdw));
+	DEFINE(EMIF_DDR_PHY_CTLR_1_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_ddr_phy_ctlr_1));
+	DEFINE(EMIF_EXT_PHY_CTRL_VALS_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_ext_phy_ctrl_vals));
+	DEFINE(EMIF_REGS_AMX3_SIZE, sizeof(struct emif_regs_amx3));
+
+	BLANK();
+
+	DEFINE(EMIF_PM_BASE_ADDR_VIRT_OFFSET,
+	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_virt));
+	DEFINE(EMIF_PM_BASE_ADDR_PHYS_OFFSET,
+	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_phys));
+	DEFINE(EMIF_PM_CONFIG_OFFSET,
+	       offsetof(struct ti_emif_pm_data, ti_emif_sram_config));
+	DEFINE(EMIF_PM_REGS_VIRT_OFFSET,
+	       offsetof(struct ti_emif_pm_data, regs_virt));
+	DEFINE(EMIF_PM_REGS_PHYS_OFFSET,
+	       offsetof(struct ti_emif_pm_data, regs_phys));
+	DEFINE(EMIF_PM_DATA_SIZE, sizeof(struct ti_emif_pm_data));
+
+	BLANK();
+
+	DEFINE(EMIF_PM_SAVE_CONTEXT_OFFSET,
+	       offsetof(struct ti_emif_pm_functions, save_context));
+	DEFINE(EMIF_PM_RESTORE_CONTEXT_OFFSET,
+	       offsetof(struct ti_emif_pm_functions, restore_context));
+	DEFINE(EMIF_PM_ENTER_SR_OFFSET,
+	       offsetof(struct ti_emif_pm_functions, enter_sr));
+	DEFINE(EMIF_PM_EXIT_SR_OFFSET,
+	       offsetof(struct ti_emif_pm_functions, exit_sr));
+	DEFINE(EMIF_PM_ABORT_SR_OFFSET,
+	       offsetof(struct ti_emif_pm_functions, abort_sr));
+	DEFINE(EMIF_PM_FUNCTIONS_SIZE, sizeof(struct ti_emif_pm_functions));
+}
+
 struct gen_pool;
 
 int ti_emif_copy_pm_function_table(struct gen_pool *sram_pool, void *dst);
-- 
2.16.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH] ARM: omap2: Fix build when using split object directories
@ 2018-04-11 21:15 ` Dave Gerlach
  0 siblings, 0 replies; 19+ messages in thread
From: Dave Gerlach @ 2018-04-11 21:15 UTC (permalink / raw)
  To: linux-kernel, Tony Lindgren, Russell King - ARM Linux, Santosh Shilimkar
  Cc: Michal Marek, Anders Roxell, Dave Gerlach, linux-kbuild,
	Masahiro Yamada, linux-omap, linux-arm-kernel

The sleep33xx and sleep43xx files should not depend on a header file
generated in drivers/memory. Remove this dependency and instead allow
both drivers/memory and arch/arm/mach-omap2 to generate all macros
needed in headers local to their own paths.

This fixes an issue where the build fail will when using O= to set a
split object directory and arch/arm/mach-omap2 is built before
drivers/memory with the following error:

.../drivers/memory/emif-asm-offsets.c:1:0: fatal error: can't open drivers/memory/emif-asm-offsets.s for writing: No such file or directory
compilation terminated.

Fixes: 41d9d44d7258 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for PM")
Acked-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
---
 arch/arm/mach-omap2/Makefile         |  6 +--
 arch/arm/mach-omap2/pm-asm-offsets.c |  3 ++
 arch/arm/mach-omap2/sleep33xx.S      |  1 -
 arch/arm/mach-omap2/sleep43xx.S      |  1 -
 drivers/memory/emif-asm-offsets.c    | 72 +---------------------------------
 include/linux/ti-emif-sram.h         | 75 ++++++++++++++++++++++++++++++++++++
 6 files changed, 80 insertions(+), 78 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 4603c30fef73..0d9ce58bc464 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -243,8 +243,4 @@ arch/arm/mach-omap2/pm-asm-offsets.s: arch/arm/mach-omap2/pm-asm-offsets.c
 include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORCE
 	$(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
 
-# For rule to generate ti-emif-asm-offsets.h dependency
-include drivers/memory/Makefile.asm-offsets
-
-arch/arm/mach-omap2/sleep33xx.o: include/generated/ti-pm-asm-offsets.h include/generated/ti-emif-asm-offsets.h
-arch/arm/mach-omap2/sleep43xx.o: include/generated/ti-pm-asm-offsets.h include/generated/ti-emif-asm-offsets.h
+$(obj)/sleep33xx.o $(obj)/sleep43xx.o: include/generated/ti-pm-asm-offsets.h
diff --git a/arch/arm/mach-omap2/pm-asm-offsets.c b/arch/arm/mach-omap2/pm-asm-offsets.c
index 6d4392da7c11..b9846b19e5e2 100644
--- a/arch/arm/mach-omap2/pm-asm-offsets.c
+++ b/arch/arm/mach-omap2/pm-asm-offsets.c
@@ -7,9 +7,12 @@
 
 #include <linux/kbuild.h>
 #include <linux/platform_data/pm33xx.h>
+#include <linux/ti-emif-sram.h>
 
 int main(void)
 {
+	ti_emif_asm_offsets();
+
 	DEFINE(AMX3_PM_WFI_FLAGS_OFFSET,
 	       offsetof(struct am33xx_pm_sram_data, wfi_flags));
 	DEFINE(AMX3_PM_L2_AUX_CTRL_VAL_OFFSET,
diff --git a/arch/arm/mach-omap2/sleep33xx.S b/arch/arm/mach-omap2/sleep33xx.S
index 218d79930b04..322b3bb868b4 100644
--- a/arch/arm/mach-omap2/sleep33xx.S
+++ b/arch/arm/mach-omap2/sleep33xx.S
@@ -6,7 +6,6 @@
  *	Dave Gerlach, Vaibhav Bedia
  */
 
-#include <generated/ti-emif-asm-offsets.h>
 #include <generated/ti-pm-asm-offsets.h>
 #include <linux/linkage.h>
 #include <linux/ti-emif-sram.h>
diff --git a/arch/arm/mach-omap2/sleep43xx.S b/arch/arm/mach-omap2/sleep43xx.S
index b24be624e8b9..8903814a6677 100644
--- a/arch/arm/mach-omap2/sleep43xx.S
+++ b/arch/arm/mach-omap2/sleep43xx.S
@@ -6,7 +6,6 @@
  *	Dave Gerlach, Vaibhav Bedia
  */
 
-#include <generated/ti-emif-asm-offsets.h>
 #include <generated/ti-pm-asm-offsets.h>
 #include <linux/linkage.h>
 #include <linux/ti-emif-sram.h>
diff --git a/drivers/memory/emif-asm-offsets.c b/drivers/memory/emif-asm-offsets.c
index 71a89d5d3efd..db8043019ec6 100644
--- a/drivers/memory/emif-asm-offsets.c
+++ b/drivers/memory/emif-asm-offsets.c
@@ -16,77 +16,7 @@
 
 int main(void)
 {
-	DEFINE(EMIF_SDCFG_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_sdcfg_val));
-	DEFINE(EMIF_TIMING1_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_timing1_val));
-	DEFINE(EMIF_TIMING2_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_timing2_val));
-	DEFINE(EMIF_TIMING3_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_timing3_val));
-	DEFINE(EMIF_REF_CTRL_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_ref_ctrl_val));
-	DEFINE(EMIF_ZQCFG_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_zqcfg_val));
-	DEFINE(EMIF_PMCR_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_pmcr_val));
-	DEFINE(EMIF_PMCR_SHDW_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_pmcr_shdw_val));
-	DEFINE(EMIF_RD_WR_LEVEL_RAMP_CTRL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_rd_wr_level_ramp_ctrl));
-	DEFINE(EMIF_RD_WR_EXEC_THRESH_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_rd_wr_exec_thresh));
-	DEFINE(EMIF_COS_CONFIG_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_cos_config));
-	DEFINE(EMIF_PRIORITY_TO_COS_MAPPING_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_priority_to_cos_mapping));
-	DEFINE(EMIF_CONNECT_ID_SERV_1_MAP_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_1_map));
-	DEFINE(EMIF_CONNECT_ID_SERV_2_MAP_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_2_map));
-	DEFINE(EMIF_OCP_CONFIG_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_ocp_config_val));
-	DEFINE(EMIF_LPDDR2_NVM_TIM_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim));
-	DEFINE(EMIF_LPDDR2_NVM_TIM_SHDW_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim_shdw));
-	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val));
-	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_SHDW_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val_shdw));
-	DEFINE(EMIF_DDR_PHY_CTLR_1_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_ddr_phy_ctlr_1));
-	DEFINE(EMIF_EXT_PHY_CTRL_VALS_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_ext_phy_ctrl_vals));
-	DEFINE(EMIF_REGS_AMX3_SIZE, sizeof(struct emif_regs_amx3));
-
-	BLANK();
-
-	DEFINE(EMIF_PM_BASE_ADDR_VIRT_OFFSET,
-	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_virt));
-	DEFINE(EMIF_PM_BASE_ADDR_PHYS_OFFSET,
-	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_phys));
-	DEFINE(EMIF_PM_CONFIG_OFFSET,
-	       offsetof(struct ti_emif_pm_data, ti_emif_sram_config));
-	DEFINE(EMIF_PM_REGS_VIRT_OFFSET,
-	       offsetof(struct ti_emif_pm_data, regs_virt));
-	DEFINE(EMIF_PM_REGS_PHYS_OFFSET,
-	       offsetof(struct ti_emif_pm_data, regs_phys));
-	DEFINE(EMIF_PM_DATA_SIZE, sizeof(struct ti_emif_pm_data));
-
-	BLANK();
-
-	DEFINE(EMIF_PM_SAVE_CONTEXT_OFFSET,
-	       offsetof(struct ti_emif_pm_functions, save_context));
-	DEFINE(EMIF_PM_RESTORE_CONTEXT_OFFSET,
-	       offsetof(struct ti_emif_pm_functions, restore_context));
-	DEFINE(EMIF_PM_ENTER_SR_OFFSET,
-	       offsetof(struct ti_emif_pm_functions, enter_sr));
-	DEFINE(EMIF_PM_EXIT_SR_OFFSET,
-	       offsetof(struct ti_emif_pm_functions, exit_sr));
-	DEFINE(EMIF_PM_ABORT_SR_OFFSET,
-	       offsetof(struct ti_emif_pm_functions, abort_sr));
-	DEFINE(EMIF_PM_FUNCTIONS_SIZE, sizeof(struct ti_emif_pm_functions));
+	ti_emif_asm_offsets();
 
 	return 0;
 }
diff --git a/include/linux/ti-emif-sram.h b/include/linux/ti-emif-sram.h
index 45bc6b376492..53604b087f2c 100644
--- a/include/linux/ti-emif-sram.h
+++ b/include/linux/ti-emif-sram.h
@@ -60,6 +60,81 @@ struct ti_emif_pm_functions {
 	u32 abort_sr;
 } __packed __aligned(8);
 
+static inline void ti_emif_asm_offsets(void)
+{
+	DEFINE(EMIF_SDCFG_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_sdcfg_val));
+	DEFINE(EMIF_TIMING1_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_timing1_val));
+	DEFINE(EMIF_TIMING2_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_timing2_val));
+	DEFINE(EMIF_TIMING3_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_timing3_val));
+	DEFINE(EMIF_REF_CTRL_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_ref_ctrl_val));
+	DEFINE(EMIF_ZQCFG_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_zqcfg_val));
+	DEFINE(EMIF_PMCR_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_pmcr_val));
+	DEFINE(EMIF_PMCR_SHDW_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_pmcr_shdw_val));
+	DEFINE(EMIF_RD_WR_LEVEL_RAMP_CTRL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_rd_wr_level_ramp_ctrl));
+	DEFINE(EMIF_RD_WR_EXEC_THRESH_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_rd_wr_exec_thresh));
+	DEFINE(EMIF_COS_CONFIG_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_cos_config));
+	DEFINE(EMIF_PRIORITY_TO_COS_MAPPING_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_priority_to_cos_mapping));
+	DEFINE(EMIF_CONNECT_ID_SERV_1_MAP_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_1_map));
+	DEFINE(EMIF_CONNECT_ID_SERV_2_MAP_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_2_map));
+	DEFINE(EMIF_OCP_CONFIG_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_ocp_config_val));
+	DEFINE(EMIF_LPDDR2_NVM_TIM_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim));
+	DEFINE(EMIF_LPDDR2_NVM_TIM_SHDW_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim_shdw));
+	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val));
+	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_SHDW_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val_shdw));
+	DEFINE(EMIF_DDR_PHY_CTLR_1_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_ddr_phy_ctlr_1));
+	DEFINE(EMIF_EXT_PHY_CTRL_VALS_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_ext_phy_ctrl_vals));
+	DEFINE(EMIF_REGS_AMX3_SIZE, sizeof(struct emif_regs_amx3));
+
+	BLANK();
+
+	DEFINE(EMIF_PM_BASE_ADDR_VIRT_OFFSET,
+	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_virt));
+	DEFINE(EMIF_PM_BASE_ADDR_PHYS_OFFSET,
+	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_phys));
+	DEFINE(EMIF_PM_CONFIG_OFFSET,
+	       offsetof(struct ti_emif_pm_data, ti_emif_sram_config));
+	DEFINE(EMIF_PM_REGS_VIRT_OFFSET,
+	       offsetof(struct ti_emif_pm_data, regs_virt));
+	DEFINE(EMIF_PM_REGS_PHYS_OFFSET,
+	       offsetof(struct ti_emif_pm_data, regs_phys));
+	DEFINE(EMIF_PM_DATA_SIZE, sizeof(struct ti_emif_pm_data));
+
+	BLANK();
+
+	DEFINE(EMIF_PM_SAVE_CONTEXT_OFFSET,
+	       offsetof(struct ti_emif_pm_functions, save_context));
+	DEFINE(EMIF_PM_RESTORE_CONTEXT_OFFSET,
+	       offsetof(struct ti_emif_pm_functions, restore_context));
+	DEFINE(EMIF_PM_ENTER_SR_OFFSET,
+	       offsetof(struct ti_emif_pm_functions, enter_sr));
+	DEFINE(EMIF_PM_EXIT_SR_OFFSET,
+	       offsetof(struct ti_emif_pm_functions, exit_sr));
+	DEFINE(EMIF_PM_ABORT_SR_OFFSET,
+	       offsetof(struct ti_emif_pm_functions, abort_sr));
+	DEFINE(EMIF_PM_FUNCTIONS_SIZE, sizeof(struct ti_emif_pm_functions));
+}
+
 struct gen_pool;
 
 int ti_emif_copy_pm_function_table(struct gen_pool *sram_pool, void *dst);
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH] ARM: omap2: Fix build when using split object directories
@ 2018-04-11 21:15 ` Dave Gerlach
  0 siblings, 0 replies; 19+ messages in thread
From: Dave Gerlach @ 2018-04-11 21:15 UTC (permalink / raw)
  To: linux-arm-kernel

The sleep33xx and sleep43xx files should not depend on a header file
generated in drivers/memory. Remove this dependency and instead allow
both drivers/memory and arch/arm/mach-omap2 to generate all macros
needed in headers local to their own paths.

This fixes an issue where the build fail will when using O= to set a
split object directory and arch/arm/mach-omap2 is built before
drivers/memory with the following error:

.../drivers/memory/emif-asm-offsets.c:1:0: fatal error: can't open drivers/memory/emif-asm-offsets.s for writing: No such file or directory
compilation terminated.

Fixes: 41d9d44d7258 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for PM")
Acked-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
---
 arch/arm/mach-omap2/Makefile         |  6 +--
 arch/arm/mach-omap2/pm-asm-offsets.c |  3 ++
 arch/arm/mach-omap2/sleep33xx.S      |  1 -
 arch/arm/mach-omap2/sleep43xx.S      |  1 -
 drivers/memory/emif-asm-offsets.c    | 72 +---------------------------------
 include/linux/ti-emif-sram.h         | 75 ++++++++++++++++++++++++++++++++++++
 6 files changed, 80 insertions(+), 78 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 4603c30fef73..0d9ce58bc464 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -243,8 +243,4 @@ arch/arm/mach-omap2/pm-asm-offsets.s: arch/arm/mach-omap2/pm-asm-offsets.c
 include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORCE
 	$(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
 
-# For rule to generate ti-emif-asm-offsets.h dependency
-include drivers/memory/Makefile.asm-offsets
-
-arch/arm/mach-omap2/sleep33xx.o: include/generated/ti-pm-asm-offsets.h include/generated/ti-emif-asm-offsets.h
-arch/arm/mach-omap2/sleep43xx.o: include/generated/ti-pm-asm-offsets.h include/generated/ti-emif-asm-offsets.h
+$(obj)/sleep33xx.o $(obj)/sleep43xx.o: include/generated/ti-pm-asm-offsets.h
diff --git a/arch/arm/mach-omap2/pm-asm-offsets.c b/arch/arm/mach-omap2/pm-asm-offsets.c
index 6d4392da7c11..b9846b19e5e2 100644
--- a/arch/arm/mach-omap2/pm-asm-offsets.c
+++ b/arch/arm/mach-omap2/pm-asm-offsets.c
@@ -7,9 +7,12 @@
 
 #include <linux/kbuild.h>
 #include <linux/platform_data/pm33xx.h>
+#include <linux/ti-emif-sram.h>
 
 int main(void)
 {
+	ti_emif_asm_offsets();
+
 	DEFINE(AMX3_PM_WFI_FLAGS_OFFSET,
 	       offsetof(struct am33xx_pm_sram_data, wfi_flags));
 	DEFINE(AMX3_PM_L2_AUX_CTRL_VAL_OFFSET,
diff --git a/arch/arm/mach-omap2/sleep33xx.S b/arch/arm/mach-omap2/sleep33xx.S
index 218d79930b04..322b3bb868b4 100644
--- a/arch/arm/mach-omap2/sleep33xx.S
+++ b/arch/arm/mach-omap2/sleep33xx.S
@@ -6,7 +6,6 @@
  *	Dave Gerlach, Vaibhav Bedia
  */
 
-#include <generated/ti-emif-asm-offsets.h>
 #include <generated/ti-pm-asm-offsets.h>
 #include <linux/linkage.h>
 #include <linux/ti-emif-sram.h>
diff --git a/arch/arm/mach-omap2/sleep43xx.S b/arch/arm/mach-omap2/sleep43xx.S
index b24be624e8b9..8903814a6677 100644
--- a/arch/arm/mach-omap2/sleep43xx.S
+++ b/arch/arm/mach-omap2/sleep43xx.S
@@ -6,7 +6,6 @@
  *	Dave Gerlach, Vaibhav Bedia
  */
 
-#include <generated/ti-emif-asm-offsets.h>
 #include <generated/ti-pm-asm-offsets.h>
 #include <linux/linkage.h>
 #include <linux/ti-emif-sram.h>
diff --git a/drivers/memory/emif-asm-offsets.c b/drivers/memory/emif-asm-offsets.c
index 71a89d5d3efd..db8043019ec6 100644
--- a/drivers/memory/emif-asm-offsets.c
+++ b/drivers/memory/emif-asm-offsets.c
@@ -16,77 +16,7 @@
 
 int main(void)
 {
-	DEFINE(EMIF_SDCFG_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_sdcfg_val));
-	DEFINE(EMIF_TIMING1_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_timing1_val));
-	DEFINE(EMIF_TIMING2_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_timing2_val));
-	DEFINE(EMIF_TIMING3_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_timing3_val));
-	DEFINE(EMIF_REF_CTRL_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_ref_ctrl_val));
-	DEFINE(EMIF_ZQCFG_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_zqcfg_val));
-	DEFINE(EMIF_PMCR_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_pmcr_val));
-	DEFINE(EMIF_PMCR_SHDW_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_pmcr_shdw_val));
-	DEFINE(EMIF_RD_WR_LEVEL_RAMP_CTRL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_rd_wr_level_ramp_ctrl));
-	DEFINE(EMIF_RD_WR_EXEC_THRESH_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_rd_wr_exec_thresh));
-	DEFINE(EMIF_COS_CONFIG_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_cos_config));
-	DEFINE(EMIF_PRIORITY_TO_COS_MAPPING_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_priority_to_cos_mapping));
-	DEFINE(EMIF_CONNECT_ID_SERV_1_MAP_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_1_map));
-	DEFINE(EMIF_CONNECT_ID_SERV_2_MAP_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_2_map));
-	DEFINE(EMIF_OCP_CONFIG_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_ocp_config_val));
-	DEFINE(EMIF_LPDDR2_NVM_TIM_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim));
-	DEFINE(EMIF_LPDDR2_NVM_TIM_SHDW_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim_shdw));
-	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val));
-	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_SHDW_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val_shdw));
-	DEFINE(EMIF_DDR_PHY_CTLR_1_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_ddr_phy_ctlr_1));
-	DEFINE(EMIF_EXT_PHY_CTRL_VALS_OFFSET,
-	       offsetof(struct emif_regs_amx3, emif_ext_phy_ctrl_vals));
-	DEFINE(EMIF_REGS_AMX3_SIZE, sizeof(struct emif_regs_amx3));
-
-	BLANK();
-
-	DEFINE(EMIF_PM_BASE_ADDR_VIRT_OFFSET,
-	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_virt));
-	DEFINE(EMIF_PM_BASE_ADDR_PHYS_OFFSET,
-	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_phys));
-	DEFINE(EMIF_PM_CONFIG_OFFSET,
-	       offsetof(struct ti_emif_pm_data, ti_emif_sram_config));
-	DEFINE(EMIF_PM_REGS_VIRT_OFFSET,
-	       offsetof(struct ti_emif_pm_data, regs_virt));
-	DEFINE(EMIF_PM_REGS_PHYS_OFFSET,
-	       offsetof(struct ti_emif_pm_data, regs_phys));
-	DEFINE(EMIF_PM_DATA_SIZE, sizeof(struct ti_emif_pm_data));
-
-	BLANK();
-
-	DEFINE(EMIF_PM_SAVE_CONTEXT_OFFSET,
-	       offsetof(struct ti_emif_pm_functions, save_context));
-	DEFINE(EMIF_PM_RESTORE_CONTEXT_OFFSET,
-	       offsetof(struct ti_emif_pm_functions, restore_context));
-	DEFINE(EMIF_PM_ENTER_SR_OFFSET,
-	       offsetof(struct ti_emif_pm_functions, enter_sr));
-	DEFINE(EMIF_PM_EXIT_SR_OFFSET,
-	       offsetof(struct ti_emif_pm_functions, exit_sr));
-	DEFINE(EMIF_PM_ABORT_SR_OFFSET,
-	       offsetof(struct ti_emif_pm_functions, abort_sr));
-	DEFINE(EMIF_PM_FUNCTIONS_SIZE, sizeof(struct ti_emif_pm_functions));
+	ti_emif_asm_offsets();
 
 	return 0;
 }
diff --git a/include/linux/ti-emif-sram.h b/include/linux/ti-emif-sram.h
index 45bc6b376492..53604b087f2c 100644
--- a/include/linux/ti-emif-sram.h
+++ b/include/linux/ti-emif-sram.h
@@ -60,6 +60,81 @@ struct ti_emif_pm_functions {
 	u32 abort_sr;
 } __packed __aligned(8);
 
+static inline void ti_emif_asm_offsets(void)
+{
+	DEFINE(EMIF_SDCFG_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_sdcfg_val));
+	DEFINE(EMIF_TIMING1_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_timing1_val));
+	DEFINE(EMIF_TIMING2_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_timing2_val));
+	DEFINE(EMIF_TIMING3_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_timing3_val));
+	DEFINE(EMIF_REF_CTRL_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_ref_ctrl_val));
+	DEFINE(EMIF_ZQCFG_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_zqcfg_val));
+	DEFINE(EMIF_PMCR_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_pmcr_val));
+	DEFINE(EMIF_PMCR_SHDW_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_pmcr_shdw_val));
+	DEFINE(EMIF_RD_WR_LEVEL_RAMP_CTRL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_rd_wr_level_ramp_ctrl));
+	DEFINE(EMIF_RD_WR_EXEC_THRESH_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_rd_wr_exec_thresh));
+	DEFINE(EMIF_COS_CONFIG_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_cos_config));
+	DEFINE(EMIF_PRIORITY_TO_COS_MAPPING_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_priority_to_cos_mapping));
+	DEFINE(EMIF_CONNECT_ID_SERV_1_MAP_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_1_map));
+	DEFINE(EMIF_CONNECT_ID_SERV_2_MAP_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_2_map));
+	DEFINE(EMIF_OCP_CONFIG_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_ocp_config_val));
+	DEFINE(EMIF_LPDDR2_NVM_TIM_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim));
+	DEFINE(EMIF_LPDDR2_NVM_TIM_SHDW_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim_shdw));
+	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val));
+	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_SHDW_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val_shdw));
+	DEFINE(EMIF_DDR_PHY_CTLR_1_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_ddr_phy_ctlr_1));
+	DEFINE(EMIF_EXT_PHY_CTRL_VALS_OFFSET,
+	       offsetof(struct emif_regs_amx3, emif_ext_phy_ctrl_vals));
+	DEFINE(EMIF_REGS_AMX3_SIZE, sizeof(struct emif_regs_amx3));
+
+	BLANK();
+
+	DEFINE(EMIF_PM_BASE_ADDR_VIRT_OFFSET,
+	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_virt));
+	DEFINE(EMIF_PM_BASE_ADDR_PHYS_OFFSET,
+	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_phys));
+	DEFINE(EMIF_PM_CONFIG_OFFSET,
+	       offsetof(struct ti_emif_pm_data, ti_emif_sram_config));
+	DEFINE(EMIF_PM_REGS_VIRT_OFFSET,
+	       offsetof(struct ti_emif_pm_data, regs_virt));
+	DEFINE(EMIF_PM_REGS_PHYS_OFFSET,
+	       offsetof(struct ti_emif_pm_data, regs_phys));
+	DEFINE(EMIF_PM_DATA_SIZE, sizeof(struct ti_emif_pm_data));
+
+	BLANK();
+
+	DEFINE(EMIF_PM_SAVE_CONTEXT_OFFSET,
+	       offsetof(struct ti_emif_pm_functions, save_context));
+	DEFINE(EMIF_PM_RESTORE_CONTEXT_OFFSET,
+	       offsetof(struct ti_emif_pm_functions, restore_context));
+	DEFINE(EMIF_PM_ENTER_SR_OFFSET,
+	       offsetof(struct ti_emif_pm_functions, enter_sr));
+	DEFINE(EMIF_PM_EXIT_SR_OFFSET,
+	       offsetof(struct ti_emif_pm_functions, exit_sr));
+	DEFINE(EMIF_PM_ABORT_SR_OFFSET,
+	       offsetof(struct ti_emif_pm_functions, abort_sr));
+	DEFINE(EMIF_PM_FUNCTIONS_SIZE, sizeof(struct ti_emif_pm_functions));
+}
+
 struct gen_pool;
 
 int ti_emif_copy_pm_function_table(struct gen_pool *sram_pool, void *dst);
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH] ARM: omap2: Fix build when using split object directories
  2018-04-11 21:15 ` Dave Gerlach
@ 2018-04-12  8:21   ` Anders Roxell
  -1 siblings, 0 replies; 19+ messages in thread
From: Anders Roxell @ 2018-04-12  8:21 UTC (permalink / raw)
  To: Dave Gerlach
  Cc: linux-kernel, Tony Lindgren, Russell King - ARM Linux,
	Santosh Shilimkar, linux-arm-kernel, linux-omap, linux-kbuild,
	Masahiro Yamada, Michal Marek

On 2018-04-11 16:15, Dave Gerlach wrote:
> The sleep33xx and sleep43xx files should not depend on a header file
> generated in drivers/memory. Remove this dependency and instead allow
> both drivers/memory and arch/arm/mach-omap2 to generate all macros
> needed in headers local to their own paths.
> 
> This fixes an issue where the build fail will when using O= to set a
> split object directory and arch/arm/mach-omap2 is built before
> drivers/memory with the following error:
> 
> .../drivers/memory/emif-asm-offsets.c:1:0: fatal error: can't open drivers/memory/emif-asm-offsets.s for writing: No such file or directory
> compilation terminated.
> 
> Fixes: 41d9d44d7258 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for PM")
> Acked-by: Tony Lindgren <tony@atomide.com>
> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Signed-off-by: Dave Gerlach <d-gerlach@ti.com>

Tested-by: Anders Roxell <anders.roxell@linaro.org>

Maybe we can remove drivers/memory/Makefile.asm-offsets and move those
changes into drivers/memory/Makefile ?

Cheers,
Anders

> ---
>  arch/arm/mach-omap2/Makefile         |  6 +--
>  arch/arm/mach-omap2/pm-asm-offsets.c |  3 ++
>  arch/arm/mach-omap2/sleep33xx.S      |  1 -
>  arch/arm/mach-omap2/sleep43xx.S      |  1 -
>  drivers/memory/emif-asm-offsets.c    | 72 +---------------------------------
>  include/linux/ti-emif-sram.h         | 75 ++++++++++++++++++++++++++++++++++++
>  6 files changed, 80 insertions(+), 78 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index 4603c30fef73..0d9ce58bc464 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -243,8 +243,4 @@ arch/arm/mach-omap2/pm-asm-offsets.s: arch/arm/mach-omap2/pm-asm-offsets.c
>  include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORCE
>  	$(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
>  
> -# For rule to generate ti-emif-asm-offsets.h dependency
> -include drivers/memory/Makefile.asm-offsets
> -
> -arch/arm/mach-omap2/sleep33xx.o: include/generated/ti-pm-asm-offsets.h include/generated/ti-emif-asm-offsets.h
> -arch/arm/mach-omap2/sleep43xx.o: include/generated/ti-pm-asm-offsets.h include/generated/ti-emif-asm-offsets.h
> +$(obj)/sleep33xx.o $(obj)/sleep43xx.o: include/generated/ti-pm-asm-offsets.h
> diff --git a/arch/arm/mach-omap2/pm-asm-offsets.c b/arch/arm/mach-omap2/pm-asm-offsets.c
> index 6d4392da7c11..b9846b19e5e2 100644
> --- a/arch/arm/mach-omap2/pm-asm-offsets.c
> +++ b/arch/arm/mach-omap2/pm-asm-offsets.c
> @@ -7,9 +7,12 @@
>  
>  #include <linux/kbuild.h>
>  #include <linux/platform_data/pm33xx.h>
> +#include <linux/ti-emif-sram.h>
>  
>  int main(void)
>  {
> +	ti_emif_asm_offsets();
> +
>  	DEFINE(AMX3_PM_WFI_FLAGS_OFFSET,
>  	       offsetof(struct am33xx_pm_sram_data, wfi_flags));
>  	DEFINE(AMX3_PM_L2_AUX_CTRL_VAL_OFFSET,
> diff --git a/arch/arm/mach-omap2/sleep33xx.S b/arch/arm/mach-omap2/sleep33xx.S
> index 218d79930b04..322b3bb868b4 100644
> --- a/arch/arm/mach-omap2/sleep33xx.S
> +++ b/arch/arm/mach-omap2/sleep33xx.S
> @@ -6,7 +6,6 @@
>   *	Dave Gerlach, Vaibhav Bedia
>   */
>  
> -#include <generated/ti-emif-asm-offsets.h>
>  #include <generated/ti-pm-asm-offsets.h>
>  #include <linux/linkage.h>
>  #include <linux/ti-emif-sram.h>
> diff --git a/arch/arm/mach-omap2/sleep43xx.S b/arch/arm/mach-omap2/sleep43xx.S
> index b24be624e8b9..8903814a6677 100644
> --- a/arch/arm/mach-omap2/sleep43xx.S
> +++ b/arch/arm/mach-omap2/sleep43xx.S
> @@ -6,7 +6,6 @@
>   *	Dave Gerlach, Vaibhav Bedia
>   */
>  
> -#include <generated/ti-emif-asm-offsets.h>
>  #include <generated/ti-pm-asm-offsets.h>
>  #include <linux/linkage.h>
>  #include <linux/ti-emif-sram.h>
> diff --git a/drivers/memory/emif-asm-offsets.c b/drivers/memory/emif-asm-offsets.c
> index 71a89d5d3efd..db8043019ec6 100644
> --- a/drivers/memory/emif-asm-offsets.c
> +++ b/drivers/memory/emif-asm-offsets.c
> @@ -16,77 +16,7 @@
>  
>  int main(void)
>  {
> -	DEFINE(EMIF_SDCFG_VAL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_sdcfg_val));
> -	DEFINE(EMIF_TIMING1_VAL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_timing1_val));
> -	DEFINE(EMIF_TIMING2_VAL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_timing2_val));
> -	DEFINE(EMIF_TIMING3_VAL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_timing3_val));
> -	DEFINE(EMIF_REF_CTRL_VAL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_ref_ctrl_val));
> -	DEFINE(EMIF_ZQCFG_VAL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_zqcfg_val));
> -	DEFINE(EMIF_PMCR_VAL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_pmcr_val));
> -	DEFINE(EMIF_PMCR_SHDW_VAL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_pmcr_shdw_val));
> -	DEFINE(EMIF_RD_WR_LEVEL_RAMP_CTRL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_rd_wr_level_ramp_ctrl));
> -	DEFINE(EMIF_RD_WR_EXEC_THRESH_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_rd_wr_exec_thresh));
> -	DEFINE(EMIF_COS_CONFIG_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_cos_config));
> -	DEFINE(EMIF_PRIORITY_TO_COS_MAPPING_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_priority_to_cos_mapping));
> -	DEFINE(EMIF_CONNECT_ID_SERV_1_MAP_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_1_map));
> -	DEFINE(EMIF_CONNECT_ID_SERV_2_MAP_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_2_map));
> -	DEFINE(EMIF_OCP_CONFIG_VAL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_ocp_config_val));
> -	DEFINE(EMIF_LPDDR2_NVM_TIM_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim));
> -	DEFINE(EMIF_LPDDR2_NVM_TIM_SHDW_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim_shdw));
> -	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val));
> -	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_SHDW_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val_shdw));
> -	DEFINE(EMIF_DDR_PHY_CTLR_1_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_ddr_phy_ctlr_1));
> -	DEFINE(EMIF_EXT_PHY_CTRL_VALS_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_ext_phy_ctrl_vals));
> -	DEFINE(EMIF_REGS_AMX3_SIZE, sizeof(struct emif_regs_amx3));
> -
> -	BLANK();
> -
> -	DEFINE(EMIF_PM_BASE_ADDR_VIRT_OFFSET,
> -	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_virt));
> -	DEFINE(EMIF_PM_BASE_ADDR_PHYS_OFFSET,
> -	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_phys));
> -	DEFINE(EMIF_PM_CONFIG_OFFSET,
> -	       offsetof(struct ti_emif_pm_data, ti_emif_sram_config));
> -	DEFINE(EMIF_PM_REGS_VIRT_OFFSET,
> -	       offsetof(struct ti_emif_pm_data, regs_virt));
> -	DEFINE(EMIF_PM_REGS_PHYS_OFFSET,
> -	       offsetof(struct ti_emif_pm_data, regs_phys));
> -	DEFINE(EMIF_PM_DATA_SIZE, sizeof(struct ti_emif_pm_data));
> -
> -	BLANK();
> -
> -	DEFINE(EMIF_PM_SAVE_CONTEXT_OFFSET,
> -	       offsetof(struct ti_emif_pm_functions, save_context));
> -	DEFINE(EMIF_PM_RESTORE_CONTEXT_OFFSET,
> -	       offsetof(struct ti_emif_pm_functions, restore_context));
> -	DEFINE(EMIF_PM_ENTER_SR_OFFSET,
> -	       offsetof(struct ti_emif_pm_functions, enter_sr));
> -	DEFINE(EMIF_PM_EXIT_SR_OFFSET,
> -	       offsetof(struct ti_emif_pm_functions, exit_sr));
> -	DEFINE(EMIF_PM_ABORT_SR_OFFSET,
> -	       offsetof(struct ti_emif_pm_functions, abort_sr));
> -	DEFINE(EMIF_PM_FUNCTIONS_SIZE, sizeof(struct ti_emif_pm_functions));
> +	ti_emif_asm_offsets();
>  
>  	return 0;
>  }
> diff --git a/include/linux/ti-emif-sram.h b/include/linux/ti-emif-sram.h
> index 45bc6b376492..53604b087f2c 100644
> --- a/include/linux/ti-emif-sram.h
> +++ b/include/linux/ti-emif-sram.h
> @@ -60,6 +60,81 @@ struct ti_emif_pm_functions {
>  	u32 abort_sr;
>  } __packed __aligned(8);
>  
> +static inline void ti_emif_asm_offsets(void)
> +{
> +	DEFINE(EMIF_SDCFG_VAL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_sdcfg_val));
> +	DEFINE(EMIF_TIMING1_VAL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_timing1_val));
> +	DEFINE(EMIF_TIMING2_VAL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_timing2_val));
> +	DEFINE(EMIF_TIMING3_VAL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_timing3_val));
> +	DEFINE(EMIF_REF_CTRL_VAL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_ref_ctrl_val));
> +	DEFINE(EMIF_ZQCFG_VAL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_zqcfg_val));
> +	DEFINE(EMIF_PMCR_VAL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_pmcr_val));
> +	DEFINE(EMIF_PMCR_SHDW_VAL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_pmcr_shdw_val));
> +	DEFINE(EMIF_RD_WR_LEVEL_RAMP_CTRL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_rd_wr_level_ramp_ctrl));
> +	DEFINE(EMIF_RD_WR_EXEC_THRESH_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_rd_wr_exec_thresh));
> +	DEFINE(EMIF_COS_CONFIG_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_cos_config));
> +	DEFINE(EMIF_PRIORITY_TO_COS_MAPPING_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_priority_to_cos_mapping));
> +	DEFINE(EMIF_CONNECT_ID_SERV_1_MAP_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_1_map));
> +	DEFINE(EMIF_CONNECT_ID_SERV_2_MAP_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_2_map));
> +	DEFINE(EMIF_OCP_CONFIG_VAL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_ocp_config_val));
> +	DEFINE(EMIF_LPDDR2_NVM_TIM_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim));
> +	DEFINE(EMIF_LPDDR2_NVM_TIM_SHDW_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim_shdw));
> +	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val));
> +	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_SHDW_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val_shdw));
> +	DEFINE(EMIF_DDR_PHY_CTLR_1_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_ddr_phy_ctlr_1));
> +	DEFINE(EMIF_EXT_PHY_CTRL_VALS_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_ext_phy_ctrl_vals));
> +	DEFINE(EMIF_REGS_AMX3_SIZE, sizeof(struct emif_regs_amx3));
> +
> +	BLANK();
> +
> +	DEFINE(EMIF_PM_BASE_ADDR_VIRT_OFFSET,
> +	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_virt));
> +	DEFINE(EMIF_PM_BASE_ADDR_PHYS_OFFSET,
> +	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_phys));
> +	DEFINE(EMIF_PM_CONFIG_OFFSET,
> +	       offsetof(struct ti_emif_pm_data, ti_emif_sram_config));
> +	DEFINE(EMIF_PM_REGS_VIRT_OFFSET,
> +	       offsetof(struct ti_emif_pm_data, regs_virt));
> +	DEFINE(EMIF_PM_REGS_PHYS_OFFSET,
> +	       offsetof(struct ti_emif_pm_data, regs_phys));
> +	DEFINE(EMIF_PM_DATA_SIZE, sizeof(struct ti_emif_pm_data));
> +
> +	BLANK();
> +
> +	DEFINE(EMIF_PM_SAVE_CONTEXT_OFFSET,
> +	       offsetof(struct ti_emif_pm_functions, save_context));
> +	DEFINE(EMIF_PM_RESTORE_CONTEXT_OFFSET,
> +	       offsetof(struct ti_emif_pm_functions, restore_context));
> +	DEFINE(EMIF_PM_ENTER_SR_OFFSET,
> +	       offsetof(struct ti_emif_pm_functions, enter_sr));
> +	DEFINE(EMIF_PM_EXIT_SR_OFFSET,
> +	       offsetof(struct ti_emif_pm_functions, exit_sr));
> +	DEFINE(EMIF_PM_ABORT_SR_OFFSET,
> +	       offsetof(struct ti_emif_pm_functions, abort_sr));
> +	DEFINE(EMIF_PM_FUNCTIONS_SIZE, sizeof(struct ti_emif_pm_functions));
> +}
> +
>  struct gen_pool;
>  
>  int ti_emif_copy_pm_function_table(struct gen_pool *sram_pool, void *dst);
> -- 
> 2.16.1
> 

-- 
Anders Roxell
anders.roxell@linaro.org
M: +46 709 71 42 85 | IRC: roxell

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH] ARM: omap2: Fix build when using split object directories
@ 2018-04-12  8:21   ` Anders Roxell
  0 siblings, 0 replies; 19+ messages in thread
From: Anders Roxell @ 2018-04-12  8:21 UTC (permalink / raw)
  To: linux-arm-kernel

On 2018-04-11 16:15, Dave Gerlach wrote:
> The sleep33xx and sleep43xx files should not depend on a header file
> generated in drivers/memory. Remove this dependency and instead allow
> both drivers/memory and arch/arm/mach-omap2 to generate all macros
> needed in headers local to their own paths.
> 
> This fixes an issue where the build fail will when using O= to set a
> split object directory and arch/arm/mach-omap2 is built before
> drivers/memory with the following error:
> 
> .../drivers/memory/emif-asm-offsets.c:1:0: fatal error: can't open drivers/memory/emif-asm-offsets.s for writing: No such file or directory
> compilation terminated.
> 
> Fixes: 41d9d44d7258 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for PM")
> Acked-by: Tony Lindgren <tony@atomide.com>
> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Signed-off-by: Dave Gerlach <d-gerlach@ti.com>

Tested-by: Anders Roxell <anders.roxell@linaro.org>

Maybe we can remove drivers/memory/Makefile.asm-offsets and move those
changes into drivers/memory/Makefile ?

Cheers,
Anders

> ---
>  arch/arm/mach-omap2/Makefile         |  6 +--
>  arch/arm/mach-omap2/pm-asm-offsets.c |  3 ++
>  arch/arm/mach-omap2/sleep33xx.S      |  1 -
>  arch/arm/mach-omap2/sleep43xx.S      |  1 -
>  drivers/memory/emif-asm-offsets.c    | 72 +---------------------------------
>  include/linux/ti-emif-sram.h         | 75 ++++++++++++++++++++++++++++++++++++
>  6 files changed, 80 insertions(+), 78 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index 4603c30fef73..0d9ce58bc464 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -243,8 +243,4 @@ arch/arm/mach-omap2/pm-asm-offsets.s: arch/arm/mach-omap2/pm-asm-offsets.c
>  include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORCE
>  	$(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
>  
> -# For rule to generate ti-emif-asm-offsets.h dependency
> -include drivers/memory/Makefile.asm-offsets
> -
> -arch/arm/mach-omap2/sleep33xx.o: include/generated/ti-pm-asm-offsets.h include/generated/ti-emif-asm-offsets.h
> -arch/arm/mach-omap2/sleep43xx.o: include/generated/ti-pm-asm-offsets.h include/generated/ti-emif-asm-offsets.h
> +$(obj)/sleep33xx.o $(obj)/sleep43xx.o: include/generated/ti-pm-asm-offsets.h
> diff --git a/arch/arm/mach-omap2/pm-asm-offsets.c b/arch/arm/mach-omap2/pm-asm-offsets.c
> index 6d4392da7c11..b9846b19e5e2 100644
> --- a/arch/arm/mach-omap2/pm-asm-offsets.c
> +++ b/arch/arm/mach-omap2/pm-asm-offsets.c
> @@ -7,9 +7,12 @@
>  
>  #include <linux/kbuild.h>
>  #include <linux/platform_data/pm33xx.h>
> +#include <linux/ti-emif-sram.h>
>  
>  int main(void)
>  {
> +	ti_emif_asm_offsets();
> +
>  	DEFINE(AMX3_PM_WFI_FLAGS_OFFSET,
>  	       offsetof(struct am33xx_pm_sram_data, wfi_flags));
>  	DEFINE(AMX3_PM_L2_AUX_CTRL_VAL_OFFSET,
> diff --git a/arch/arm/mach-omap2/sleep33xx.S b/arch/arm/mach-omap2/sleep33xx.S
> index 218d79930b04..322b3bb868b4 100644
> --- a/arch/arm/mach-omap2/sleep33xx.S
> +++ b/arch/arm/mach-omap2/sleep33xx.S
> @@ -6,7 +6,6 @@
>   *	Dave Gerlach, Vaibhav Bedia
>   */
>  
> -#include <generated/ti-emif-asm-offsets.h>
>  #include <generated/ti-pm-asm-offsets.h>
>  #include <linux/linkage.h>
>  #include <linux/ti-emif-sram.h>
> diff --git a/arch/arm/mach-omap2/sleep43xx.S b/arch/arm/mach-omap2/sleep43xx.S
> index b24be624e8b9..8903814a6677 100644
> --- a/arch/arm/mach-omap2/sleep43xx.S
> +++ b/arch/arm/mach-omap2/sleep43xx.S
> @@ -6,7 +6,6 @@
>   *	Dave Gerlach, Vaibhav Bedia
>   */
>  
> -#include <generated/ti-emif-asm-offsets.h>
>  #include <generated/ti-pm-asm-offsets.h>
>  #include <linux/linkage.h>
>  #include <linux/ti-emif-sram.h>
> diff --git a/drivers/memory/emif-asm-offsets.c b/drivers/memory/emif-asm-offsets.c
> index 71a89d5d3efd..db8043019ec6 100644
> --- a/drivers/memory/emif-asm-offsets.c
> +++ b/drivers/memory/emif-asm-offsets.c
> @@ -16,77 +16,7 @@
>  
>  int main(void)
>  {
> -	DEFINE(EMIF_SDCFG_VAL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_sdcfg_val));
> -	DEFINE(EMIF_TIMING1_VAL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_timing1_val));
> -	DEFINE(EMIF_TIMING2_VAL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_timing2_val));
> -	DEFINE(EMIF_TIMING3_VAL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_timing3_val));
> -	DEFINE(EMIF_REF_CTRL_VAL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_ref_ctrl_val));
> -	DEFINE(EMIF_ZQCFG_VAL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_zqcfg_val));
> -	DEFINE(EMIF_PMCR_VAL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_pmcr_val));
> -	DEFINE(EMIF_PMCR_SHDW_VAL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_pmcr_shdw_val));
> -	DEFINE(EMIF_RD_WR_LEVEL_RAMP_CTRL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_rd_wr_level_ramp_ctrl));
> -	DEFINE(EMIF_RD_WR_EXEC_THRESH_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_rd_wr_exec_thresh));
> -	DEFINE(EMIF_COS_CONFIG_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_cos_config));
> -	DEFINE(EMIF_PRIORITY_TO_COS_MAPPING_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_priority_to_cos_mapping));
> -	DEFINE(EMIF_CONNECT_ID_SERV_1_MAP_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_1_map));
> -	DEFINE(EMIF_CONNECT_ID_SERV_2_MAP_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_2_map));
> -	DEFINE(EMIF_OCP_CONFIG_VAL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_ocp_config_val));
> -	DEFINE(EMIF_LPDDR2_NVM_TIM_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim));
> -	DEFINE(EMIF_LPDDR2_NVM_TIM_SHDW_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim_shdw));
> -	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val));
> -	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_SHDW_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val_shdw));
> -	DEFINE(EMIF_DDR_PHY_CTLR_1_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_ddr_phy_ctlr_1));
> -	DEFINE(EMIF_EXT_PHY_CTRL_VALS_OFFSET,
> -	       offsetof(struct emif_regs_amx3, emif_ext_phy_ctrl_vals));
> -	DEFINE(EMIF_REGS_AMX3_SIZE, sizeof(struct emif_regs_amx3));
> -
> -	BLANK();
> -
> -	DEFINE(EMIF_PM_BASE_ADDR_VIRT_OFFSET,
> -	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_virt));
> -	DEFINE(EMIF_PM_BASE_ADDR_PHYS_OFFSET,
> -	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_phys));
> -	DEFINE(EMIF_PM_CONFIG_OFFSET,
> -	       offsetof(struct ti_emif_pm_data, ti_emif_sram_config));
> -	DEFINE(EMIF_PM_REGS_VIRT_OFFSET,
> -	       offsetof(struct ti_emif_pm_data, regs_virt));
> -	DEFINE(EMIF_PM_REGS_PHYS_OFFSET,
> -	       offsetof(struct ti_emif_pm_data, regs_phys));
> -	DEFINE(EMIF_PM_DATA_SIZE, sizeof(struct ti_emif_pm_data));
> -
> -	BLANK();
> -
> -	DEFINE(EMIF_PM_SAVE_CONTEXT_OFFSET,
> -	       offsetof(struct ti_emif_pm_functions, save_context));
> -	DEFINE(EMIF_PM_RESTORE_CONTEXT_OFFSET,
> -	       offsetof(struct ti_emif_pm_functions, restore_context));
> -	DEFINE(EMIF_PM_ENTER_SR_OFFSET,
> -	       offsetof(struct ti_emif_pm_functions, enter_sr));
> -	DEFINE(EMIF_PM_EXIT_SR_OFFSET,
> -	       offsetof(struct ti_emif_pm_functions, exit_sr));
> -	DEFINE(EMIF_PM_ABORT_SR_OFFSET,
> -	       offsetof(struct ti_emif_pm_functions, abort_sr));
> -	DEFINE(EMIF_PM_FUNCTIONS_SIZE, sizeof(struct ti_emif_pm_functions));
> +	ti_emif_asm_offsets();
>  
>  	return 0;
>  }
> diff --git a/include/linux/ti-emif-sram.h b/include/linux/ti-emif-sram.h
> index 45bc6b376492..53604b087f2c 100644
> --- a/include/linux/ti-emif-sram.h
> +++ b/include/linux/ti-emif-sram.h
> @@ -60,6 +60,81 @@ struct ti_emif_pm_functions {
>  	u32 abort_sr;
>  } __packed __aligned(8);
>  
> +static inline void ti_emif_asm_offsets(void)
> +{
> +	DEFINE(EMIF_SDCFG_VAL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_sdcfg_val));
> +	DEFINE(EMIF_TIMING1_VAL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_timing1_val));
> +	DEFINE(EMIF_TIMING2_VAL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_timing2_val));
> +	DEFINE(EMIF_TIMING3_VAL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_timing3_val));
> +	DEFINE(EMIF_REF_CTRL_VAL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_ref_ctrl_val));
> +	DEFINE(EMIF_ZQCFG_VAL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_zqcfg_val));
> +	DEFINE(EMIF_PMCR_VAL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_pmcr_val));
> +	DEFINE(EMIF_PMCR_SHDW_VAL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_pmcr_shdw_val));
> +	DEFINE(EMIF_RD_WR_LEVEL_RAMP_CTRL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_rd_wr_level_ramp_ctrl));
> +	DEFINE(EMIF_RD_WR_EXEC_THRESH_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_rd_wr_exec_thresh));
> +	DEFINE(EMIF_COS_CONFIG_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_cos_config));
> +	DEFINE(EMIF_PRIORITY_TO_COS_MAPPING_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_priority_to_cos_mapping));
> +	DEFINE(EMIF_CONNECT_ID_SERV_1_MAP_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_1_map));
> +	DEFINE(EMIF_CONNECT_ID_SERV_2_MAP_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_connect_id_serv_2_map));
> +	DEFINE(EMIF_OCP_CONFIG_VAL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_ocp_config_val));
> +	DEFINE(EMIF_LPDDR2_NVM_TIM_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim));
> +	DEFINE(EMIF_LPDDR2_NVM_TIM_SHDW_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_lpddr2_nvm_tim_shdw));
> +	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val));
> +	DEFINE(EMIF_DLL_CALIB_CTRL_VAL_SHDW_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_dll_calib_ctrl_val_shdw));
> +	DEFINE(EMIF_DDR_PHY_CTLR_1_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_ddr_phy_ctlr_1));
> +	DEFINE(EMIF_EXT_PHY_CTRL_VALS_OFFSET,
> +	       offsetof(struct emif_regs_amx3, emif_ext_phy_ctrl_vals));
> +	DEFINE(EMIF_REGS_AMX3_SIZE, sizeof(struct emif_regs_amx3));
> +
> +	BLANK();
> +
> +	DEFINE(EMIF_PM_BASE_ADDR_VIRT_OFFSET,
> +	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_virt));
> +	DEFINE(EMIF_PM_BASE_ADDR_PHYS_OFFSET,
> +	       offsetof(struct ti_emif_pm_data, ti_emif_base_addr_phys));
> +	DEFINE(EMIF_PM_CONFIG_OFFSET,
> +	       offsetof(struct ti_emif_pm_data, ti_emif_sram_config));
> +	DEFINE(EMIF_PM_REGS_VIRT_OFFSET,
> +	       offsetof(struct ti_emif_pm_data, regs_virt));
> +	DEFINE(EMIF_PM_REGS_PHYS_OFFSET,
> +	       offsetof(struct ti_emif_pm_data, regs_phys));
> +	DEFINE(EMIF_PM_DATA_SIZE, sizeof(struct ti_emif_pm_data));
> +
> +	BLANK();
> +
> +	DEFINE(EMIF_PM_SAVE_CONTEXT_OFFSET,
> +	       offsetof(struct ti_emif_pm_functions, save_context));
> +	DEFINE(EMIF_PM_RESTORE_CONTEXT_OFFSET,
> +	       offsetof(struct ti_emif_pm_functions, restore_context));
> +	DEFINE(EMIF_PM_ENTER_SR_OFFSET,
> +	       offsetof(struct ti_emif_pm_functions, enter_sr));
> +	DEFINE(EMIF_PM_EXIT_SR_OFFSET,
> +	       offsetof(struct ti_emif_pm_functions, exit_sr));
> +	DEFINE(EMIF_PM_ABORT_SR_OFFSET,
> +	       offsetof(struct ti_emif_pm_functions, abort_sr));
> +	DEFINE(EMIF_PM_FUNCTIONS_SIZE, sizeof(struct ti_emif_pm_functions));
> +}
> +
>  struct gen_pool;
>  
>  int ti_emif_copy_pm_function_table(struct gen_pool *sram_pool, void *dst);
> -- 
> 2.16.1
> 

-- 
Anders Roxell
anders.roxell at linaro.org
M: +46 709 71 42 85 | IRC: roxell

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] ARM: omap2: Fix build when using split object directories
  2018-04-12  8:21   ` Anders Roxell
@ 2018-04-12  9:08     ` Masahiro Yamada
  -1 siblings, 0 replies; 19+ messages in thread
From: Masahiro Yamada @ 2018-04-12  9:08 UTC (permalink / raw)
  To: Anders Roxell
  Cc: Dave Gerlach, Linux Kernel Mailing List, Tony Lindgren,
	Russell King - ARM Linux, Santosh Shilimkar, linux-arm-kernel,
	Linux-OMAP, Linux Kbuild mailing list, Michal Marek

2018-04-12 17:21 GMT+09:00 Anders Roxell <anders.roxell@linaro.org>:
> On 2018-04-11 16:15, Dave Gerlach wrote:
>> The sleep33xx and sleep43xx files should not depend on a header file
>> generated in drivers/memory. Remove this dependency and instead allow
>> both drivers/memory and arch/arm/mach-omap2 to generate all macros
>> needed in headers local to their own paths.
>>
>> This fixes an issue where the build fail will when using O= to set a
>> split object directory and arch/arm/mach-omap2 is built before
>> drivers/memory with the following error:
>>
>> .../drivers/memory/emif-asm-offsets.c:1:0: fatal error: can't open drivers/memory/emif-asm-offsets.s for writing: No such file or directory
>> compilation terminated.
>>
>> Fixes: 41d9d44d7258 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for PM")
>> Acked-by: Tony Lindgren <tony@atomide.com>
>> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>> Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
>
> Tested-by: Anders Roxell <anders.roxell@linaro.org>
>
> Maybe we can remove drivers/memory/Makefile.asm-offsets and move those
> changes into drivers/memory/Makefile ?

Agree!




-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH] ARM: omap2: Fix build when using split object directories
@ 2018-04-12  9:08     ` Masahiro Yamada
  0 siblings, 0 replies; 19+ messages in thread
From: Masahiro Yamada @ 2018-04-12  9:08 UTC (permalink / raw)
  To: linux-arm-kernel

2018-04-12 17:21 GMT+09:00 Anders Roxell <anders.roxell@linaro.org>:
> On 2018-04-11 16:15, Dave Gerlach wrote:
>> The sleep33xx and sleep43xx files should not depend on a header file
>> generated in drivers/memory. Remove this dependency and instead allow
>> both drivers/memory and arch/arm/mach-omap2 to generate all macros
>> needed in headers local to their own paths.
>>
>> This fixes an issue where the build fail will when using O= to set a
>> split object directory and arch/arm/mach-omap2 is built before
>> drivers/memory with the following error:
>>
>> .../drivers/memory/emif-asm-offsets.c:1:0: fatal error: can't open drivers/memory/emif-asm-offsets.s for writing: No such file or directory
>> compilation terminated.
>>
>> Fixes: 41d9d44d7258 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for PM")
>> Acked-by: Tony Lindgren <tony@atomide.com>
>> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>> Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
>
> Tested-by: Anders Roxell <anders.roxell@linaro.org>
>
> Maybe we can remove drivers/memory/Makefile.asm-offsets and move those
> changes into drivers/memory/Makefile ?

Agree!




-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] ARM: omap2: Fix build when using split object directories
  2018-04-12  9:08     ` Masahiro Yamada
  (?)
@ 2018-04-13  3:00       ` Dave Gerlach
  -1 siblings, 0 replies; 19+ messages in thread
From: Dave Gerlach @ 2018-04-13  3:00 UTC (permalink / raw)
  To: Masahiro Yamada, Anders Roxell
  Cc: Linux Kernel Mailing List, Tony Lindgren,
	Russell King - ARM Linux, Santosh Shilimkar, linux-arm-kernel,
	Linux-OMAP, Linux Kbuild mailing list, Michal Marek

Hi,
On 04/12/2018 04:08 AM, Masahiro Yamada wrote:
> 2018-04-12 17:21 GMT+09:00 Anders Roxell <anders.roxell@linaro.org>:
>> On 2018-04-11 16:15, Dave Gerlach wrote:
>>> The sleep33xx and sleep43xx files should not depend on a header file
>>> generated in drivers/memory. Remove this dependency and instead allow
>>> both drivers/memory and arch/arm/mach-omap2 to generate all macros
>>> needed in headers local to their own paths.
>>>
>>> This fixes an issue where the build fail will when using O= to set a
>>> split object directory and arch/arm/mach-omap2 is built before
>>> drivers/memory with the following error:
>>>
>>> .../drivers/memory/emif-asm-offsets.c:1:0: fatal error: can't open drivers/memory/emif-asm-offsets.s for writing: No such file or directory
>>> compilation terminated.
>>>
>>> Fixes: 41d9d44d7258 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for PM")
>>> Acked-by: Tony Lindgren <tony@atomide.com>
>>> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>>> Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
>>
>> Tested-by: Anders Roxell <anders.roxell@linaro.org>
>>
>> Maybe we can remove drivers/memory/Makefile.asm-offsets and move those
>> changes into drivers/memory/Makefile ?
> 
> Agree!

Alright, I agree as well, fixed in v2.

Regards,
Dave

> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] ARM: omap2: Fix build when using split object directories
@ 2018-04-13  3:00       ` Dave Gerlach
  0 siblings, 0 replies; 19+ messages in thread
From: Dave Gerlach @ 2018-04-13  3:00 UTC (permalink / raw)
  To: Masahiro Yamada, Anders Roxell
  Cc: Michal Marek, Linux Kbuild mailing list, Tony Lindgren,
	Santosh Shilimkar, Linux Kernel Mailing List,
	Russell King - ARM Linux, Linux-OMAP, linux-arm-kernel

Hi,
On 04/12/2018 04:08 AM, Masahiro Yamada wrote:
> 2018-04-12 17:21 GMT+09:00 Anders Roxell <anders.roxell@linaro.org>:
>> On 2018-04-11 16:15, Dave Gerlach wrote:
>>> The sleep33xx and sleep43xx files should not depend on a header file
>>> generated in drivers/memory. Remove this dependency and instead allow
>>> both drivers/memory and arch/arm/mach-omap2 to generate all macros
>>> needed in headers local to their own paths.
>>>
>>> This fixes an issue where the build fail will when using O= to set a
>>> split object directory and arch/arm/mach-omap2 is built before
>>> drivers/memory with the following error:
>>>
>>> .../drivers/memory/emif-asm-offsets.c:1:0: fatal error: can't open drivers/memory/emif-asm-offsets.s for writing: No such file or directory
>>> compilation terminated.
>>>
>>> Fixes: 41d9d44d7258 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for PM")
>>> Acked-by: Tony Lindgren <tony@atomide.com>
>>> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>>> Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
>>
>> Tested-by: Anders Roxell <anders.roxell@linaro.org>
>>
>> Maybe we can remove drivers/memory/Makefile.asm-offsets and move those
>> changes into drivers/memory/Makefile ?
> 
> Agree!

Alright, I agree as well, fixed in v2.

Regards,
Dave

> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH] ARM: omap2: Fix build when using split object directories
@ 2018-04-13  3:00       ` Dave Gerlach
  0 siblings, 0 replies; 19+ messages in thread
From: Dave Gerlach @ 2018-04-13  3:00 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,
On 04/12/2018 04:08 AM, Masahiro Yamada wrote:
> 2018-04-12 17:21 GMT+09:00 Anders Roxell <anders.roxell@linaro.org>:
>> On 2018-04-11 16:15, Dave Gerlach wrote:
>>> The sleep33xx and sleep43xx files should not depend on a header file
>>> generated in drivers/memory. Remove this dependency and instead allow
>>> both drivers/memory and arch/arm/mach-omap2 to generate all macros
>>> needed in headers local to their own paths.
>>>
>>> This fixes an issue where the build fail will when using O= to set a
>>> split object directory and arch/arm/mach-omap2 is built before
>>> drivers/memory with the following error:
>>>
>>> .../drivers/memory/emif-asm-offsets.c:1:0: fatal error: can't open drivers/memory/emif-asm-offsets.s for writing: No such file or directory
>>> compilation terminated.
>>>
>>> Fixes: 41d9d44d7258 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for PM")
>>> Acked-by: Tony Lindgren <tony@atomide.com>
>>> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>>> Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
>>
>> Tested-by: Anders Roxell <anders.roxell@linaro.org>
>>
>> Maybe we can remove drivers/memory/Makefile.asm-offsets and move those
>> changes into drivers/memory/Makefile ?
> 
> Agree!

Alright, I agree as well, fixed in v2.

Regards,
Dave

> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] ARM: omap2: Fix build when using split object directories
  2018-04-12  9:08     ` Masahiro Yamada
  (?)
@ 2018-04-13 14:06       ` Dave Gerlach
  -1 siblings, 0 replies; 19+ messages in thread
From: Dave Gerlach @ 2018-04-13 14:06 UTC (permalink / raw)
  To: Masahiro Yamada, Anders Roxell, Tony Lindgren
  Cc: Linux Kernel Mailing List, Russell King - ARM Linux,
	Santosh Shilimkar, linux-arm-kernel, Linux-OMAP,
	Linux Kbuild mailing list, Michal Marek

Tony,
On 04/12/2018 04:08 AM, Masahiro Yamada wrote:
> 2018-04-12 17:21 GMT+09:00 Anders Roxell <anders.roxell@linaro.org>:
>> On 2018-04-11 16:15, Dave Gerlach wrote:
>>> The sleep33xx and sleep43xx files should not depend on a header file
>>> generated in drivers/memory. Remove this dependency and instead allow
>>> both drivers/memory and arch/arm/mach-omap2 to generate all macros
>>> needed in headers local to their own paths.
>>>
>>> This fixes an issue where the build fail will when using O= to set a
>>> split object directory and arch/arm/mach-omap2 is built before
>>> drivers/memory with the following error:
>>>
>>> .../drivers/memory/emif-asm-offsets.c:1:0: fatal error: can't open drivers/memory/emif-asm-offsets.s for writing: No such file or directory
>>> compilation terminated.
>>>
>>> Fixes: 41d9d44d7258 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for PM")
>>> Acked-by: Tony Lindgren <tony@atomide.com>
>>> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>>> Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
>>
>> Tested-by: Anders Roxell <anders.roxell@linaro.org>
>>
>> Maybe we can remove drivers/memory/Makefile.asm-offsets and move those
>> changes into drivers/memory/Makefile ?
> 
> Agree!
> 

This is the version of this patch that we want to use, will this go through you?

Regards,
Dave

> 
> 
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] ARM: omap2: Fix build when using split object directories
@ 2018-04-13 14:06       ` Dave Gerlach
  0 siblings, 0 replies; 19+ messages in thread
From: Dave Gerlach @ 2018-04-13 14:06 UTC (permalink / raw)
  To: Masahiro Yamada, Anders Roxell, Tony Lindgren
  Cc: Michal Marek, Linux Kbuild mailing list, Santosh Shilimkar,
	Linux Kernel Mailing List, Russell King - ARM Linux, Linux-OMAP,
	linux-arm-kernel

Tony,
On 04/12/2018 04:08 AM, Masahiro Yamada wrote:
> 2018-04-12 17:21 GMT+09:00 Anders Roxell <anders.roxell@linaro.org>:
>> On 2018-04-11 16:15, Dave Gerlach wrote:
>>> The sleep33xx and sleep43xx files should not depend on a header file
>>> generated in drivers/memory. Remove this dependency and instead allow
>>> both drivers/memory and arch/arm/mach-omap2 to generate all macros
>>> needed in headers local to their own paths.
>>>
>>> This fixes an issue where the build fail will when using O= to set a
>>> split object directory and arch/arm/mach-omap2 is built before
>>> drivers/memory with the following error:
>>>
>>> .../drivers/memory/emif-asm-offsets.c:1:0: fatal error: can't open drivers/memory/emif-asm-offsets.s for writing: No such file or directory
>>> compilation terminated.
>>>
>>> Fixes: 41d9d44d7258 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for PM")
>>> Acked-by: Tony Lindgren <tony@atomide.com>
>>> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>>> Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
>>
>> Tested-by: Anders Roxell <anders.roxell@linaro.org>
>>
>> Maybe we can remove drivers/memory/Makefile.asm-offsets and move those
>> changes into drivers/memory/Makefile ?
> 
> Agree!
> 

This is the version of this patch that we want to use, will this go through you?

Regards,
Dave

> 
> 
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH] ARM: omap2: Fix build when using split object directories
@ 2018-04-13 14:06       ` Dave Gerlach
  0 siblings, 0 replies; 19+ messages in thread
From: Dave Gerlach @ 2018-04-13 14:06 UTC (permalink / raw)
  To: linux-arm-kernel

Tony,
On 04/12/2018 04:08 AM, Masahiro Yamada wrote:
> 2018-04-12 17:21 GMT+09:00 Anders Roxell <anders.roxell@linaro.org>:
>> On 2018-04-11 16:15, Dave Gerlach wrote:
>>> The sleep33xx and sleep43xx files should not depend on a header file
>>> generated in drivers/memory. Remove this dependency and instead allow
>>> both drivers/memory and arch/arm/mach-omap2 to generate all macros
>>> needed in headers local to their own paths.
>>>
>>> This fixes an issue where the build fail will when using O= to set a
>>> split object directory and arch/arm/mach-omap2 is built before
>>> drivers/memory with the following error:
>>>
>>> .../drivers/memory/emif-asm-offsets.c:1:0: fatal error: can't open drivers/memory/emif-asm-offsets.s for writing: No such file or directory
>>> compilation terminated.
>>>
>>> Fixes: 41d9d44d7258 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for PM")
>>> Acked-by: Tony Lindgren <tony@atomide.com>
>>> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>>> Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
>>
>> Tested-by: Anders Roxell <anders.roxell@linaro.org>
>>
>> Maybe we can remove drivers/memory/Makefile.asm-offsets and move those
>> changes into drivers/memory/Makefile ?
> 
> Agree!
> 

This is the version of this patch that we want to use, will this go through you?

Regards,
Dave

> 
> 
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] ARM: omap2: Fix build when using split object directories
  2018-04-13 14:06       ` Dave Gerlach
@ 2018-04-18 17:09         ` Tony Lindgren
  -1 siblings, 0 replies; 19+ messages in thread
From: Tony Lindgren @ 2018-04-18 17:09 UTC (permalink / raw)
  To: Dave Gerlach
  Cc: Masahiro Yamada, Anders Roxell, Linux Kernel Mailing List,
	Russell King - ARM Linux, Santosh Shilimkar, linux-arm-kernel,
	Linux-OMAP, Linux Kbuild mailing list, Michal Marek

* Dave Gerlach <d-gerlach@ti.com> [180413 14:08]:
> This is the version of this patch that we want to use, will this go through you?

Sorry for the delay, I just noticed this. Somehow I thought Santosh
would queue it, but as the regression was introduced by a commit in
my tree I'll pick this patch into omap-for-v4.17/fixes.

Thanks,

Tony

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH] ARM: omap2: Fix build when using split object directories
@ 2018-04-18 17:09         ` Tony Lindgren
  0 siblings, 0 replies; 19+ messages in thread
From: Tony Lindgren @ 2018-04-18 17:09 UTC (permalink / raw)
  To: linux-arm-kernel

* Dave Gerlach <d-gerlach@ti.com> [180413 14:08]:
> This is the version of this patch that we want to use, will this go through you?

Sorry for the delay, I just noticed this. Somehow I thought Santosh
would queue it, but as the regression was introduced by a commit in
my tree I'll pick this patch into omap-for-v4.17/fixes.

Thanks,

Tony

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] ARM: omap2: Fix build when using split object directories
  2018-04-18 17:09         ` Tony Lindgren
  (?)
@ 2018-04-18 17:14           ` Santosh Shilimkar
  -1 siblings, 0 replies; 19+ messages in thread
From: Santosh Shilimkar @ 2018-04-18 17:14 UTC (permalink / raw)
  To: Tony Lindgren, Dave Gerlach
  Cc: Masahiro Yamada, Anders Roxell, Linux Kernel Mailing List,
	Russell King - ARM Linux, linux-arm-kernel, Linux-OMAP,
	Linux Kbuild mailing list, Michal Marek

On 4/18/2018 10:09 AM, Tony Lindgren wrote:
> * Dave Gerlach <d-gerlach@ti.com> [180413 14:08]:
>> This is the version of this patch that we want to use, will this go through you?
> 
> Sorry for the delay, I just noticed this. Somehow I thought Santosh
> would queue it, but as the regression was introduced by a commit in
> my tree I'll pick this patch into omap-for-v4.17/fixes.
> 
I wasn't sure since the patch has both driver and platform code.
Thanks for picking up Tony !!

Acked-by: Santosh Shilimkar <ssantosh@kernel.org>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] ARM: omap2: Fix build when using split object directories
@ 2018-04-18 17:14           ` Santosh Shilimkar
  0 siblings, 0 replies; 19+ messages in thread
From: Santosh Shilimkar @ 2018-04-18 17:14 UTC (permalink / raw)
  To: Tony Lindgren, Dave Gerlach
  Cc: Michal Marek, Anders Roxell, Linux Kbuild mailing list,
	Linux Kernel Mailing List, Russell King - ARM Linux,
	Masahiro Yamada, Linux-OMAP, linux-arm-kernel

On 4/18/2018 10:09 AM, Tony Lindgren wrote:
> * Dave Gerlach <d-gerlach@ti.com> [180413 14:08]:
>> This is the version of this patch that we want to use, will this go through you?
> 
> Sorry for the delay, I just noticed this. Somehow I thought Santosh
> would queue it, but as the regression was introduced by a commit in
> my tree I'll pick this patch into omap-for-v4.17/fixes.
> 
I wasn't sure since the patch has both driver and platform code.
Thanks for picking up Tony !!

Acked-by: Santosh Shilimkar <ssantosh@kernel.org>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH] ARM: omap2: Fix build when using split object directories
@ 2018-04-18 17:14           ` Santosh Shilimkar
  0 siblings, 0 replies; 19+ messages in thread
From: Santosh Shilimkar @ 2018-04-18 17:14 UTC (permalink / raw)
  To: linux-arm-kernel

On 4/18/2018 10:09 AM, Tony Lindgren wrote:
> * Dave Gerlach <d-gerlach@ti.com> [180413 14:08]:
>> This is the version of this patch that we want to use, will this go through you?
> 
> Sorry for the delay, I just noticed this. Somehow I thought Santosh
> would queue it, but as the regression was introduced by a commit in
> my tree I'll pick this patch into omap-for-v4.17/fixes.
> 
I wasn't sure since the patch has both driver and platform code.
Thanks for picking up Tony !!

Acked-by: Santosh Shilimkar <ssantosh@kernel.org>

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2018-04-18 17:14 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-11 21:15 [PATCH] ARM: omap2: Fix build when using split object directories Dave Gerlach
2018-04-11 21:15 ` Dave Gerlach
2018-04-11 21:15 ` Dave Gerlach
2018-04-11 21:15 ` Dave Gerlach
2018-04-12  8:21 ` Anders Roxell
2018-04-12  8:21   ` Anders Roxell
2018-04-12  9:08   ` Masahiro Yamada
2018-04-12  9:08     ` Masahiro Yamada
2018-04-13  3:00     ` Dave Gerlach
2018-04-13  3:00       ` Dave Gerlach
2018-04-13  3:00       ` Dave Gerlach
2018-04-13 14:06     ` Dave Gerlach
2018-04-13 14:06       ` Dave Gerlach
2018-04-13 14:06       ` Dave Gerlach
2018-04-18 17:09       ` Tony Lindgren
2018-04-18 17:09         ` Tony Lindgren
2018-04-18 17:14         ` Santosh Shilimkar
2018-04-18 17:14           ` Santosh Shilimkar
2018-04-18 17:14           ` Santosh Shilimkar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.