stm32mp: stm32prog: solve warning for 64bits compilation

Solve many compilation warning when stm32prog is activated on the aarch64.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
This commit is contained in:
Patrick Delaunay
2022-09-06 18:53:19 +02:00
committed by Patrice Chotard
parent ada8fe0c42
commit 3df19b8bec
5 changed files with 31 additions and 32 deletions

View File

@@ -300,7 +300,7 @@ static void stm32prog_serial_putc(u8 w_byte)
}
/* Helper function ************************************************/
static u8 stm32prog_start(struct stm32prog_data *data, u32 address)
static u8 stm32prog_start(struct stm32prog_data *data, uintptr_t address)
{
u8 ret = 0;
struct dfu_entity *dfu_entity;
@@ -353,7 +353,7 @@ static u8 stm32prog_start(struct stm32prog_data *data, u32 address)
} else {
void (*entry)(void) = (void *)address;
printf("## Starting application at 0x%x ...\n", address);
printf("## Starting application at 0x%p ...\n", (void *)address);
(*entry)();
printf("## Application terminated\n");
ret = -ENOEXEC;
@@ -368,9 +368,9 @@ static u8 stm32prog_start(struct stm32prog_data *data, u32 address)
* @tmp_xor: Current xor value to update
* Return: The address area
*/
static u32 get_address(u8 *tmp_xor)
static uintptr_t get_address(u8 *tmp_xor)
{
u32 address = 0x0;
uintptr_t address = 0x0;
u8 data;
data = stm32prog_serial_getc();
@@ -487,7 +487,7 @@ static void get_phase_command(struct stm32prog_data *data)
*/
static void read_memory_command(struct stm32prog_data *data)
{
u32 address = 0x0;
uintptr_t address = 0x0;
u8 rcv_data = 0x0, tmp_xor = 0x0;
u32 counter = 0x0;
@@ -532,7 +532,7 @@ static void read_memory_command(struct stm32prog_data *data)
*/
static void start_command(struct stm32prog_data *data)
{
u32 address = 0;
uintptr_t address = 0;
u8 tmp_xor = 0x0;
u8 ret, rcv_data;
@@ -546,8 +546,7 @@ static void start_command(struct stm32prog_data *data)
return;
}
/* validate partition */
ret = stm32prog_start(data,
address);
ret = stm32prog_start(data, address);
if (ret)
stm32prog_serial_result(ABORT_BYTE);