arm-trusted-firmware/drivers/arm
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
..
cci Use uintptr_t as base address type in ARM driver APIs 2015-07-09 11:53:32 +01:00
cci400 Fix debug assertion in deprecated CCI-400 driver 2015-10-12 10:21:55 +01:00
ccn Use #ifdef for IMAGE_BL* instead of #if 2017-01-24 01:01:21 +09:00
gic GICv3: Introduce power management APIs for Redistributor 2016-12-15 14:08:26 +00:00
pl011 AArch32: Miscellaneous fixes in the AArch32 code 2016-12-01 11:02:51 +00:00
pl061 utils: move BIT(n) macro to utils.h 2017-01-13 04:34:24 +09:00
sp804 Add SP804 delay timer driver 2015-06-18 16:06:26 +01:00
sp805 Add a simple ARM SP805 watchdog driver 2015-11-27 09:34:20 +00:00
tzc AArch32: Enable GIC and TZC support 2016-08-10 12:35:46 +01:00
tzc400 Refactor the ARM CoreLink TZC-400 driver 2016-03-31 21:23:23 +01:00