arm-trusted-firmware/plat/mediatek/mt8173
Antonio Nino Diaz 30399885f5 Fix types of arch.h definitions
Define the values as unsigned int or unsigned long long based on the
actual size of the register. This prevents subtle issues caused by
having a type that is too small. For example:

    #define OPTION_ENABLE 0x3
    #define OPTION_SHIFT  32

    uint64_t mask = OPTION_ENABLE << OPTION_SHIFT;

Because OPTION_ENABLE fits in an int, the value is considered an int.
This means that, after shifting it 32 places to the left, the final
result is 0. The correct way to define the values is:

    #define OPTION_ENABLE ULL(0x3)
    #define OPTION_SHIFT  U(32)

In this case, the compiler is forced to use a 64 bit value from the
start, so shifting it 32 places to the left results in the expected
value.

Change-Id: Ieaf2ffc2d8caa48c622db011f2aef549e713e019
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-07-18 11:09:54 +01:00
..
aarch64 Use SPDX license identifiers 2017-05-03 09:39:28 +01:00
drivers Fix order of remaining platform #includes 2017-07-14 10:50:41 +01:00
include Update ULL() macro and instances of ull to comply with MISRA 2018-02-27 17:05:51 +00:00
bl31_plat_setup.c Clean usage of void pointers to access symbols 2018-03-27 13:20:27 +01:00
plat_mt_gic.c Use SPDX license identifiers 2017-05-03 09:39:28 +01:00
plat_pm.c Use SPDX license identifiers 2017-05-03 09:39:28 +01:00
plat_sip_calls.c Fix order of remaining platform #includes 2017-07-14 10:50:41 +01:00
plat_topology.c Use SPDX license identifiers 2017-05-03 09:39:28 +01:00
platform.mk Do not enable SVE on pre-v8.2 platforms 2017-11-30 17:45:23 +00:00
power_tracer.c Fix types of arch.h definitions 2018-07-18 11:09:54 +01:00
scu.c Use SPDX license identifiers 2017-05-03 09:39:28 +01:00