arm-trusted-firmware/plat/rockchip/common
Masahiro Yamada 3d8256b2a1 Use #ifdef for IMAGE_BL* instead of #if
One nasty part of ATF is some of boolean macros are always defined
as 1 or 0, and the rest of them are only defined under certain
conditions.

For the former group, "#if FOO" or "#if !FOO" must be used because
"#ifdef FOO" is always true.  (Options passed by $(call add_define,)
are the cases.)

For the latter, "#ifdef FOO" or "#ifndef FOO" should be used because
checking the value of an undefined macro is strange.

Here, IMAGE_BL* is handled by make_helpers/build_macro.mk like
follows:

  $(eval IMAGE := IMAGE_BL$(call uppercase,$(3)))

  $(OBJ): $(2)
          @echo "  CC      $$<"
          $$(Q)$$(CC) $$(TF_CFLAGS) $$(CFLAGS) -D$(IMAGE) -c $$< -o $$@

This means, IMAGE_BL* is defined when building the corresponding
image, but *undefined* for the other images.

So, IMAGE_BL* belongs to the latter group where we should use #ifdef
or #ifndef.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-01-24 01:01:21 +09:00
..
aarch64 Merge pull request #724 from rockchip-linux/support-rk3399-sdram 2016-10-26 09:54:36 +01:00
drivers/pmu Fix incorrect copyright notices 2016-12-14 14:31:32 +00:00
include utils: move BIT(n) macro to utils.h 2017-01-13 04:34:24 +09:00
pmusram Fix incorrect copyright notices 2016-12-14 14:31:32 +00:00
bl31_plat_setup.c Move BL_COHERENT_RAM_BASE/END defines to common_def.h 2017-01-18 19:33:41 +09:00
params_setup.c rockchip: set gpio2 ~ gpio4 to input and pull none mode 2016-09-10 04:06:44 +08:00
plat_pm.c rockchip: clear the power mode status via M0 2016-10-25 03:29:58 +08:00
plat_topology.c rockchip: support the suspend/resume for rk3399 2016-07-18 19:58:06 +08:00
rockchip_gicv2.c Introduce utils.h header file 2016-07-08 14:37:11 +01:00
rockchip_gicv3.c Use #ifdef for IMAGE_BL* instead of #if 2017-01-24 01:01:21 +09:00
rockchip_sip_svc.c Fix incorrect copyright notices 2016-12-14 14:31:32 +00:00