From: Marek Vasut Date: Sun, 2 Aug 2015 19:12:09 +0000 (+0200) Subject: arm: socfpga: Move wrappers into platform directory X-Git-Tag: v2015.10-rc3~96^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca62d2e1fca4e89b1e15e6bdc634f6ef39a7360d;p=platform%2Fkernel%2Fu-boot.git 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 --- diff --git a/arch/arm/mach-socfpga/Makefile b/arch/arm/mach-socfpga/Makefile index 8a745c9..316b326 100644 --- a/arch/arm/mach-socfpga/Makefile +++ b/arch/arm/mach-socfpga/Makefile @@ -10,3 +10,12 @@ 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) diff --git a/board/altera/socfpga/wrap_iocsr_config.c b/arch/arm/mach-socfpga/wrap_iocsr_config.c similarity index 96% rename from board/altera/socfpga/wrap_iocsr_config.c rename to arch/arm/mach-socfpga/wrap_iocsr_config.c index 49e9228..31b5426 100644 --- a/board/altera/socfpga/wrap_iocsr_config.c +++ b/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 :-) */ -#include "qts/iocsr_config.c" +#include int iocsr_get_config_table(const unsigned int chain_id, const unsigned long **table, diff --git a/board/altera/socfpga/wrap_pinmux_config.c b/arch/arm/mach-socfpga/wrap_pinmux_config.c similarity index 97% rename from board/altera/socfpga/wrap_pinmux_config.c rename to arch/arm/mach-socfpga/wrap_pinmux_config.c index b33e2ca..688f1e4 100644 --- a/board/altera/socfpga/wrap_pinmux_config.c +++ b/arch/arm/mach-socfpga/wrap_pinmux_config.c @@ -25,7 +25,7 @@ */ #define _PRELOADER_PINMUX_CONFIG_H_ #define CONFIG_HPS_PINMUX_NUM -#include "qts/pinmux_config.c" +#include void sysmgr_get_pinmux_table(const unsigned long **table, unsigned int *table_len) diff --git a/board/altera/socfpga/wrap_pll_config.c b/arch/arm/mach-socfpga/wrap_pll_config.c similarity index 99% rename from board/altera/socfpga/wrap_pll_config.c rename to arch/arm/mach-socfpga/wrap_pll_config.c index 8dbff68..8a0a0e6 100644 --- a/board/altera/socfpga/wrap_pll_config.c +++ b/arch/arm/mach-socfpga/wrap_pll_config.c @@ -6,7 +6,7 @@ #include #include -#include "qts/pll_config.h" +#include #define MAIN_VCO_BASE ( \ (CONFIG_HPS_MAINPLLGRP_VCO_DENOM << \ diff --git a/board/altera/socfpga/wrap_sdram_config.c b/arch/arm/mach-socfpga/wrap_sdram_config.c similarity index 98% rename from board/altera/socfpga/wrap_sdram_config.c rename to arch/arm/mach-socfpga/wrap_sdram_config.c index cd97cc5..72ce565 100644 --- a/board/altera/socfpga/wrap_sdram_config.c +++ b/arch/arm/mach-socfpga/wrap_sdram_config.c @@ -8,12 +8,12 @@ #include #include /* QTS output file. */ -#include "qts/sdram_config.h" +#include -#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 +#include +#include +#include static const struct socfpga_sdram_config sdram_config = { .ctrl_cfg = diff --git a/board/altera/socfpga/Makefile b/board/altera/socfpga/Makefile index 5a15c71..86f9b78 100644 --- a/board/altera/socfpga/Makefile +++ b/board/altera/socfpga/Makefile @@ -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