Commit 554c73c0256c9e22af1b89e842a310b73b5eb657
Committed by
Tom Rini
1 parent
e856bdcfb4
Exists in
smarc_8mq_lf_v2020.04
and in
22 other branches
flash: compile common/flash.c iif CONFIG_MTD_NO_FLASH is enabled
The whole of common/flash.c is guarded by #if defined() ... #endif. Move the conditional to common/Makefile. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Showing 2 changed files with 1 additions and 6 deletions Side-by-side Diff
common/Makefile
... | ... | @@ -67,7 +67,7 @@ |
67 | 67 | # others |
68 | 68 | obj-$(CONFIG_BOOTSTAGE) += bootstage.o |
69 | 69 | obj-$(CONFIG_CONSOLE_MUX) += iomux.o |
70 | -obj-y += flash.o | |
70 | +obj-$(CONFIG_MTD_NOR_FLASH) += flash.o | |
71 | 71 | obj-$(CONFIG_CMD_KGDB) += kgdb.o kgdb_stubs.o |
72 | 72 | obj-$(CONFIG_I2C_EDID) += edid.o |
73 | 73 | obj-$(CONFIG_KALLSYMS) += kallsyms.o |
common/flash.c
... | ... | @@ -10,7 +10,6 @@ |
10 | 10 | #include <common.h> |
11 | 11 | #include <flash.h> |
12 | 12 | |
13 | -#if defined(CONFIG_MTD_NOR_FLASH) | |
14 | 13 | #include <mtd/cfi_flash.h> |
15 | 14 | |
16 | 15 | extern flash_info_t flash_info[]; /* info for FLASH chips */ |
... | ... | @@ -218,8 +217,4 @@ |
218 | 217 | break; |
219 | 218 | } |
220 | 219 | } |
221 | - | |
222 | -/*----------------------------------------------------------------------- | |
223 | - */ | |
224 | -#endif /* !CONFIG_MTD_NOR_FLASH */ |