summaryrefslogtreecommitdiff
path: root/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-09-27 08:53:51 -0400
committerTom Rini <trini@konsulko.com>2022-09-27 08:53:51 -0400
commit01c88e3dcd667281cf3aa6f6b47f90900177aff9 (patch)
tree6bbb45f8380069622e4d67e55b7b90044d183a9f /arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
parent55ccdee3155c6cc30eeee846879d06aba6e3fabe (diff)
parent762d410e0db94c41b8d7f1ec85e47f7474655ad8 (diff)
Merge tag 'u-boot-stm32-20220927' of https://source.denx.de/u-boot/custodians/u-boot-stm into next
- Increase SYS_MALLOC_F_LEN for STM32 MCU's board - SPL fixes for STM32F7 MCUs - Device tree alignement with kernelv6.0-rc4 for MCU's board - Device tree alignement with kernelv6.0-rc3 for MPU's board - Update DDR node for STM32MP15 - Cleanup config file for STM32MP1 - Update for cmd_stm32key command - Fix compatible string to add partitions for STM32MP1 - Update for stm32programmer tool
Diffstat (limited to 'arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c')
-rw-r--r--arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
index 1a69bc38979..f1bed7d1a33 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
@@ -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();
@@ -462,7 +462,7 @@ static void get_phase_command(struct stm32prog_data *data)
length = strlen(err_msg);
}
if (phase == PHASE_FLASHLAYOUT)
- destination = STM32_DDR_BASE;
+ destination = CONFIG_SYS_LOAD_ADDR;
stm32prog_serial_putc(length + 5); /* Total length */
stm32prog_serial_putc(phase & 0xFF); /* partition ID */
@@ -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);