Use uintptr_t for firmware addr
authorWendy Liang <jliang@xilinx.com>
Sat, 6 Aug 2016 05:22:54 +0000 (22:22 -0700)
committerWendy Liang <jliang@xilinx.com>
Thu, 13 Oct 2016 05:01:47 +0000 (22:01 -0700)
Use uintptr_t for firmware address to avoid compilation warning

Signed-off-by: Wendy Liang <jliang@xilinx.com>
lib/common/firmware.c
lib/common/hil.c
lib/include/openamp/elf_loader.h
lib/include/openamp/firmware.h
lib/include/openamp/hil.h
lib/remoteproc/elf_loader.c
lib/remoteproc/remoteproc.c

index d05a8f9c307470a8bf686881435accc719e3ef4b..8ab7e4e70041c801ba7e8f7d1936854197389f1a 100644 (file)
@@ -61,7 +61,7 @@
 extern struct firmware_info fw_table[];
 extern int fw_table_size;
 
-int config_get_firmware(char *fw_name, unsigned int *start_addr,
+int config_get_firmware(char *fw_name, uintptr_t *start_addr,
                        unsigned int *size)
 {
        int idx;
index 26e0b42792f8d073816209a41118a7435cb73ad0..7bf1c727db5d12fb12185d708daed7138f851a10 100644 (file)
@@ -364,7 +364,7 @@ void hil_shutdown_cpu(struct hil_proc *proc)
  * returns -  status of function execution
  *
  */
-int hil_get_firmware(char *fw_name, unsigned int *start_addr,
+int hil_get_firmware(char *fw_name, uintptr_t *start_addr,
                     unsigned int *size)
 {
        return (config_get_firmware(fw_name, start_addr, size));
index 714664d667f8e6a6682b0e42ebbd1489fc2ca5c2..3654246af1d64066e29ae8bdde577757deb0f569 100644 (file)
@@ -33,7 +33,7 @@
 #include "openamp/remoteproc_loader.h"
 
 /* ELF base types - 32-bit. */
-typedef unsigned int Elf32_Addr;
+typedef uintptr_t Elf32_Addr;
 typedef unsigned short Elf32_Half;
 typedef unsigned int Elf32_Off;
 typedef signed int Elf32_Sword;
index 2c7c48d373b96ea18e1ca5a4c2ba19a1c20d0ec5..a5c6f623b8d3a3aaec50aaf05adb5aae3dbe9f4e 100644 (file)
@@ -31,6 +31,7 @@
 #define FIRMWARE_H
 
 #include "openamp/env.h"
+#include <stdint.h>
 
 /* Max supported firmwares */
 #define FW_COUNT 4
@@ -41,7 +42,7 @@ struct firmware_info {
        unsigned int end_addr;
 };
 
-int config_get_firmware(char *fw_name, unsigned int *start_addr,
+int config_get_firmware(char *fw_name, uintptr_t *start_addr,
                        unsigned int *size);
 
 #endif
index 06a13deb17566437016c7e0e9df05377374756f3..565629bc897856e1721ba177ca0c2a843a5a7fc9 100644 (file)
@@ -392,7 +392,7 @@ void hil_shutdown_cpu(struct hil_proc *proc);
  * returns -  status of function execution
  *
  */
-int hil_get_firmware(char *fw_name, unsigned int *start_addr,
+int hil_get_firmware(char *fw_name, uintptr_t *start_addr,
                     unsigned int *size);
 
 /**
index 6d2de10bc7b679766cd6521105e8aac8ae3477ba..101c6ab875d79c06a13434b6a77c0415a20269e4 100644 (file)
@@ -181,7 +181,7 @@ void *elf_loader_retrieve_resource_section(struct remoteproc_loader *loader,
                *size = rsc_header->sh_size;
 
                /* Locate the start of resource section. */
-               resource_section = (void *)((unsigned int)elf_info->firmware
+               resource_section = (void *)((uintptr_t)elf_info->firmware
                                            + rsc_header->sh_offset);
        }
 
index c779225939e6cfdc70244bd97bd68290367212a1..f7e66018e97d1b6d5bebb343cd2bed9762f14578 100644 (file)
@@ -162,7 +162,8 @@ int remoteproc_init(char *fw_name, void *pdata,
 
        struct remote_proc *rproc;
        struct resource_table *rsc_table;
-       unsigned int fw_addr, fw_size, rsc_size;
+       unsigned int fw_size, rsc_size;
+       uintptr_t fw_addr;
        int status;
 
        if (!fw_name) {
@@ -288,7 +289,7 @@ int remoteproc_boot(struct remote_proc *rproc)
                if (load_addr != RPROC_ERR_PTR) {
                        /* Start the remote cpu */
                        status = hil_boot_cpu(rproc->proc,
-                                             (unsigned int)load_addr);
+                                             (uintptr_t)load_addr);
                        if (status == RPROC_SUCCESS) {
                                /* Wait for remote side to come up. This delay is arbitrary and may
                                 * need adjustment for different configuration of remote systems */