]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
arm: socfpga: Move wrappers into platform directory
authorMarek Vasut <marex@denx.de>
Sun, 2 Aug 2015 19:12:09 +0000 (21:12 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 08:30:34 +0000 (10:30 +0200)
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>
arch/arm/mach-socfpga/Makefile
arch/arm/mach-socfpga/wrap_iocsr_config.c [moved from board/altera/socfpga/wrap_iocsr_config.c with 96% similarity]
arch/arm/mach-socfpga/wrap_pinmux_config.c [moved from board/altera/socfpga/wrap_pinmux_config.c with 97% similarity]
arch/arm/mach-socfpga/wrap_pll_config.c [moved from board/altera/socfpga/wrap_pll_config.c with 99% similarity]
arch/arm/mach-socfpga/wrap_sdram_config.c [moved from board/altera/socfpga/wrap_sdram_config.c with 98% similarity]
board/altera/socfpga/Makefile

index 8a745c9b1e80475c6b548e72fc70517337ee700e..316b326d417e602b0fbde813bc4fb43932a3cc69 100644 (file)
 obj-y  += misc.o timer.o reset_manager.o system_manager.o clock_manager.o \
           fpga_manager.o scan_manager.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)
similarity index 96%
rename from board/altera/socfpga/wrap_iocsr_config.c
rename to arch/arm/mach-socfpga/wrap_iocsr_config.c
index 49e922823f3291d542df089a0d6a4214ef555326..31b54260dfde70439c41ac3bdceb0e733c1ea718 100644 (file)
@@ -10,7 +10,7 @@
 /*
  * 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,
                           const unsigned long **table,
similarity index 97%
rename from board/altera/socfpga/wrap_pinmux_config.c
rename to arch/arm/mach-socfpga/wrap_pinmux_config.c
index b33e2cab824861116c48629f6853d1004006b178..688f1e4aca17aa9ecce7c7e24e6f80406fd8b88e 100644 (file)
@@ -25,7 +25,7 @@
  */
 #define _PRELOADER_PINMUX_CONFIG_H_
 #define CONFIG_HPS_PINMUX_NUM
-#include "qts/pinmux_config.c"
+#include <qts/pinmux_config.c>
 
 void sysmgr_get_pinmux_table(const unsigned long **table,
                             unsigned int *table_len)
similarity index 99%
rename from board/altera/socfpga/wrap_pll_config.c
rename to arch/arm/mach-socfpga/wrap_pll_config.c
index 8dbff68f5cc99cf4b47d62cc0740699b3447588a..8a0a0e6889b8efd79c3df35ebcd769eaf5de9627 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <common.h>
 #include <asm/arch/clock_manager.h>
-#include "qts/pll_config.h"
+#include <qts/pll_config.h>
 
 #define MAIN_VCO_BASE (                                        \
        (CONFIG_HPS_MAINPLLGRP_VCO_DENOM <<             \
similarity index 98%
rename from board/altera/socfpga/wrap_sdram_config.c
rename to arch/arm/mach-socfpga/wrap_sdram_config.c
index cd97cc509f3a46dd32905b7d4d7e79fbb7125159..72ce565751d67567ff006f1bdeb62dc3a8775b96 100644 (file)
@@ -8,12 +8,12 @@
 #include <errno.h>
 #include <asm/arch/sdram.h>
 /* 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 = {
        .ctrl_cfg =
index 5a15c71610697cffaeebaa97b9837e7a4ddda778..86f9b78cad7bdba06bff62bb56391f0ee7062679 100644 (file)
@@ -6,6 +6,4 @@
 # 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