Browse Source

arm: socfpga: Move wrappers into platform directory

Move the wrappers for QTS-generated files into platform directory
out of the board directory. The trick here is to add -I to CFLAGS
such that it points to the board directory in source tree and thus
the qts/ directory there is still reachable.

Signed-off-by: Marek Vasut <marex@denx.de>
Marek Vasut 9 years ago
parent
commit
ca62d2e1fc

+ 9 - 0
arch/arm/mach-socfpga/Makefile

@@ -10,3 +10,12 @@
 obj-y	+= misc.o timer.o reset_manager.o system_manager.o clock_manager.o \
 obj-y	+= misc.o timer.o reset_manager.o system_manager.o clock_manager.o \
 	   fpga_manager.o scan_manager.o
 	   fpga_manager.o scan_manager.o
 obj-$(CONFIG_SPL_BUILD) += spl.o freeze_controller.o
 obj-$(CONFIG_SPL_BUILD) += spl.o freeze_controller.o
+
+# QTS-generated config file wrappers
+obj-y	+= wrap_pll_config.o
+obj-$(CONFIG_SPL_BUILD) += wrap_iocsr_config.o wrap_pinmux_config.o	\
+			   wrap_sdram_config.o
+CFLAGS_wrap_iocsr_config.o	+= -I$(srctree)/board/$(BOARDDIR)
+CFLAGS_wrap_pinmux_config.o	+= -I$(srctree)/board/$(BOARDDIR)
+CFLAGS_wrap_pll_config.o	+= -I$(srctree)/board/$(BOARDDIR)
+CFLAGS_wrap_sdram_config.o	+= -I$(srctree)/board/$(BOARDDIR)

+ 1 - 1
board/altera/socfpga/wrap_iocsr_config.c → arch/arm/mach-socfpga/wrap_iocsr_config.c

@@ -10,7 +10,7 @@
 /*
 /*
  * Yes, dear reader, we're including a C file here, this is no mistake :-)
  * Yes, dear reader, we're including a C file here, this is no mistake :-)
  */
  */
-#include "qts/iocsr_config.c"
+#include <qts/iocsr_config.c>
 
 
 int iocsr_get_config_table(const unsigned int chain_id,
 int iocsr_get_config_table(const unsigned int chain_id,
 			   const unsigned long **table,
 			   const unsigned long **table,

+ 1 - 1
board/altera/socfpga/wrap_pinmux_config.c → arch/arm/mach-socfpga/wrap_pinmux_config.c

@@ -25,7 +25,7 @@
  */
  */
 #define _PRELOADER_PINMUX_CONFIG_H_
 #define _PRELOADER_PINMUX_CONFIG_H_
 #define CONFIG_HPS_PINMUX_NUM
 #define CONFIG_HPS_PINMUX_NUM
-#include "qts/pinmux_config.c"
+#include <qts/pinmux_config.c>
 
 
 void sysmgr_get_pinmux_table(const unsigned long **table,
 void sysmgr_get_pinmux_table(const unsigned long **table,
 			     unsigned int *table_len)
 			     unsigned int *table_len)

+ 1 - 1
board/altera/socfpga/wrap_pll_config.c → arch/arm/mach-socfpga/wrap_pll_config.c

@@ -6,7 +6,7 @@
 
 
 #include <common.h>
 #include <common.h>
 #include <asm/arch/clock_manager.h>
 #include <asm/arch/clock_manager.h>
-#include "qts/pll_config.h"
+#include <qts/pll_config.h>
 
 
 #define MAIN_VCO_BASE (					\
 #define MAIN_VCO_BASE (					\
 	(CONFIG_HPS_MAINPLLGRP_VCO_DENOM <<		\
 	(CONFIG_HPS_MAINPLLGRP_VCO_DENOM <<		\

+ 5 - 5
board/altera/socfpga/wrap_sdram_config.c → arch/arm/mach-socfpga/wrap_sdram_config.c

@@ -8,12 +8,12 @@
 #include <errno.h>
 #include <errno.h>
 #include <asm/arch/sdram.h>
 #include <asm/arch/sdram.h>
 /* QTS output file. */
 /* QTS output file. */
-#include "qts/sdram_config.h"
+#include <qts/sdram_config.h>
 
 
-#include "qts/sequencer_auto_ac_init.h"
-#include "qts/sequencer_auto_inst_init.h"
-#include "qts/sequencer_auto.h"
-#include "qts/sequencer_defines.h"
+#include <qts/sequencer_auto_ac_init.h>
+#include <qts/sequencer_auto_inst_init.h>
+#include <qts/sequencer_auto.h>
+#include <qts/sequencer_defines.h>
 
 
 static const struct socfpga_sdram_config sdram_config = {
 static const struct socfpga_sdram_config sdram_config = {
 	.ctrl_cfg =
 	.ctrl_cfg =

+ 1 - 3
board/altera/socfpga/Makefile

@@ -6,6 +6,4 @@
 # SPDX-License-Identifier:	GPL-2.0+
 # SPDX-License-Identifier:	GPL-2.0+
 #
 #
 
 
-obj-y	:= socfpga.o wrap_pll_config.o
-obj-$(CONFIG_SPL_BUILD) += wrap_iocsr_config.o wrap_pinmux_config.o	\
-			   wrap_sdram_config.o
+obj-y	:= socfpga.o