hikey: fix build issue with CLANG
authorHaojian Zhuang <haojian.zhuang@linaro.org>
Fri, 2 Mar 2018 06:25:41 +0000 (14:25 +0800)
committerHaojian Zhuang <haojian.zhuang@linaro.org>
Tue, 6 Mar 2018 09:59:47 +0000 (17:59 +0800)
plat/hisilicon/hikey/hikey_bl1_setup.c:565:47:
error: value size does not match register size specified by the
constraint and modifier [-Werror,-Wasm-operand-widths]
        __asm__ volatile ("mrs  %0, cpacr_el1" : "=r"(data));

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
plat/hisilicon/hikey/hikey_bl1_setup.c

index df0ad8e03760a13e879ded5badb12e53fc778c65..52dcf6b1e1f356b1a0c8834d41e4d6a6e93960d1 100644 (file)
@@ -572,7 +572,7 @@ image_desc_t *bl1_plat_get_image_desc(unsigned int image_id)
 void bl1_plat_set_ep_info(unsigned int image_id,
                entry_point_info_t *ep_info)
 {
-       unsigned int data = 0;
+       uint64_t data = 0;
 
        if (image_id == BL2_IMAGE_ID)
                return;
@@ -583,7 +583,7 @@ void bl1_plat_set_ep_info(unsigned int image_id,
                __asm__ volatile ("msr  cpacr_el1, %0" : : "r"(data));
                __asm__ volatile ("mrs  %0, cpacr_el1" : "=r"(data));
        } while ((data & (3 << 20)) != (3 << 20));
-       INFO("cpacr_el1:0x%x\n", data);
+       INFO("cpacr_el1:0x%lx\n", data);
 
        ep_info->args.arg0 = 0xffff & read_mpidr();
        ep_info->spsr = SPSR_64(MODE_EL1, MODE_SP_ELX,