Skip to content
Snippets Groups Projects
Commit 6c45ef4b authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

ARM: UniPhier: do not compile unnecessary objects


It is true that unused functions are removed from the ELF image
by the compiler's garbage collection but relying on it too much
does not look nice.
Currently, the build is taking more than it should.

Refactor the makefiles to compile only files that are really needed.
CONFIG_SOC_INIT and CONFIG_DRAM_INIT are no longer needed by the
optimization.

Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
parent dc4057eb
No related branches found
No related tags found
No related merge requests found
......@@ -50,21 +50,12 @@ endchoice
config CMD_PINMON
bool "Enable boot mode pins monitor command"
depends on !SPL_BUILD
default y
help
The command "pinmon" shows the state of the boot mode pins.
The boot mode pins are latched when the system reset is deasserted
and determine which device the system should load a boot image from.
config SOC_INIT
bool
default SPL_BUILD
config DRAM_INIT
bool
default SPL_BUILD
config CMD_DDRPHY_DUMP
bool "Enable dump command of DDR PHY parameters"
depends on !SPL_BUILD
......@@ -74,7 +65,7 @@ config CMD_DDRPHY_DUMP
choice
prompt "DDR3 Frequency select"
depends on DRAM_INIT
depends on SPL_BUILD
config DDR_FREQ_1600
bool "DDR3 1600"
......
......@@ -2,24 +2,32 @@
# SPDX-License-Identifier: GPL-2.0+
#
obj-$(CONFIG_SPL_BUILD) += lowlevel_init.o init_page_table.o
obj-$(CONFIG_SPL_BUILD) += spl.o
ifdef CONFIG_SPL_BUILD
obj-y += lowlevel_init.o
obj-y += init_page_table.o
obj-y += spl.o
obj-y += ddrphy_training.o
else
obj-y += timer.o
obj-y += reset.o
obj-y += cache_uniphier.o
obj-y += dram_init.o
obj-$(CONFIG_DRAM_INIT) += ddrphy_training.o
obj-$(CONFIG_BOARD_EARLY_INIT_F) += board_early_init_f.o
obj-$(CONFIG_DISPLAY_CPUINFO) += cpu_info.o
obj-$(CONFIG_MISC_INIT_F) += print_misc_info.o
obj-y += dram_init.o
obj-y += board_common.o
obj-$(CONFIG_BOARD_EARLY_INIT_R) += board_early_init_r.o
obj-$(CONFIG_BOARD_LATE_INIT) += board_late_init.o
obj-y += reset.o
obj-y += cache_uniphier.o
obj-$(CONFIG_UNIPHIER_SMP) += smp.o
obj-$(CONFIG_CMD_PINMON) += cmd_pinmon.o
obj-$(CONFIG_CMD_DDRPHY_DUMP) += cmd_ddrphy.o
obj-y += board_common.o
endif
obj-y += timer.o
obj-$(CONFIG_PFC_MICRO_SUPPORT_CARD) += support_card.o
obj-$(CONFIG_DCC_MICRO_SUPPORT_CARD) += support_card.o
......
......@@ -2,10 +2,13 @@
# SPDX-License-Identifier: GPL-2.0+
#
obj-$(if $(CONFIG_OF_CONTROL),,y) += platdevice.o
obj-y += boot-mode.o
ifdef CONFIG_SPL_BUILD
obj-$(CONFIG_DEBUG_LL) += lowlevel_debug.o
obj-$(CONFIG_SOC_INIT) += bcu_init.o sbc_init.o sg_init.o pll_init.o \
clkrst_init.o
obj-y += bcu_init.o sbc_init.o sg_init.o pll_init.o clkrst_init.o \
pll_spectrum.o umc_init.o ddrphy_init.o
else
obj-$(CONFIG_BOARD_EARLY_INIT_F) += pinctrl.o
obj-$(CONFIG_DRAM_INIT) += pll_spectrum.o umc_init.o ddrphy_init.o
obj-$(if $(CONFIG_OF_CONTROL),,y) += platdevice.o
endif
obj-y += boot-mode.o
......@@ -2,9 +2,13 @@
# SPDX-License-Identifier: GPL-2.0+
#
obj-$(if $(CONFIG_OF_CONTROL),,y) += platdevice.o
obj-y += boot-mode.o
ifdef CONFIG_SPL_BUILD
obj-$(CONFIG_DEBUG_LL) += lowlevel_debug.o
obj-$(CONFIG_SOC_INIT) += sbc_init.o sg_init.o pll_init.o clkrst_init.o
obj-y += sbc_init.o sg_init.o pll_init.o clkrst_init.o \
pll_spectrum.o umc_init.o ddrphy_init.o
else
obj-$(CONFIG_BOARD_EARLY_INIT_F) += pinctrl.o
obj-$(CONFIG_DRAM_INIT) += pll_spectrum.o umc_init.o ddrphy_init.o
obj-$(if $(CONFIG_OF_CONTROL),,y) += platdevice.o
endif
obj-y += boot-mode.o
......@@ -2,10 +2,13 @@
# SPDX-License-Identifier: GPL-2.0+
#
obj-$(if $(CONFIG_OF_CONTROL),,y) += platdevice.o
obj-y += boot-mode.o
ifdef CONFIG_SPL_BUILD
obj-$(CONFIG_DEBUG_LL) += lowlevel_debug.o
obj-$(CONFIG_SOC_INIT) += bcu_init.o sbc_init.o sg_init.o pll_init.o \
clkrst_init.o
obj-y += bcu_init.o sbc_init.o sg_init.o pll_init.o clkrst_init.o \
pll_spectrum.o umc_init.o ddrphy_init.o
else
obj-$(CONFIG_BOARD_EARLY_INIT_F) += pinctrl.o
obj-$(CONFIG_DRAM_INIT) += pll_spectrum.o umc_init.o ddrphy_init.o
obj-$(if $(CONFIG_OF_CONTROL),,y) += platdevice.o
endif
obj-y += boot-mode.o
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment