mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
arm: stm32mp: migrate cmd_stm32prog to log macro
Change debug and pr_ macro to log macro. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
This commit is contained in:
parent
eb653acd63
commit
711b5bc0a2
5 changed files with 78 additions and 78 deletions
|
@ -159,8 +159,8 @@ static int stm32prog_read(struct stm32prog_data *data, u8 phase, u32 offset,
|
|||
dfu_entity->offset = offset;
|
||||
data->offset = offset;
|
||||
data->read_phase = phase;
|
||||
pr_debug("\nSTM32 download read %s offset=0x%x\n",
|
||||
dfu_entity->name, offset);
|
||||
log_debug("\nSTM32 download read %s offset=0x%x\n",
|
||||
dfu_entity->name, offset);
|
||||
ret = dfu_read(dfu_entity, buffer, buffer_size,
|
||||
dfu_entity->i_blk_seq_num);
|
||||
if (ret < 0) {
|
||||
|
@ -198,7 +198,7 @@ int stm32prog_serial_init(struct stm32prog_data *data, int link_dev)
|
|||
sprintf(alias, "serial%d", link_dev);
|
||||
path = fdt_get_alias(gd->fdt_blob, alias);
|
||||
if (!path) {
|
||||
pr_err("%s alias not found", alias);
|
||||
log_err("%s alias not found", alias);
|
||||
return -ENODEV;
|
||||
}
|
||||
node = fdt_path_offset(gd->fdt_blob, path);
|
||||
|
@ -212,7 +212,7 @@ int stm32prog_serial_init(struct stm32prog_data *data, int link_dev)
|
|||
down_serial_dev = dev;
|
||||
}
|
||||
if (!down_serial_dev) {
|
||||
pr_err("%s = %s device not found", alias, path);
|
||||
log_err("%s = %s device not found", alias, path);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
@ -225,11 +225,11 @@ int stm32prog_serial_init(struct stm32prog_data *data, int link_dev)
|
|||
ops = serial_get_ops(down_serial_dev);
|
||||
|
||||
if (!ops) {
|
||||
pr_err("%s = %s missing ops", alias, path);
|
||||
log_err("%s = %s missing ops", alias, path);
|
||||
return -ENODEV;
|
||||
}
|
||||
if (!ops->setconfig) {
|
||||
pr_err("%s = %s missing setconfig", alias, path);
|
||||
log_err("%s = %s missing setconfig", alias, path);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
@ -815,7 +815,7 @@ static void download_command(struct stm32prog_data *data)
|
|||
|
||||
if (data->cursor >
|
||||
image_header->image_length + BL_HEADER_SIZE) {
|
||||
pr_err("expected size exceeded\n");
|
||||
log_err("expected size exceeded\n");
|
||||
result = ABORT_BYTE;
|
||||
goto end;
|
||||
}
|
||||
|
@ -859,8 +859,8 @@ static void read_partition_command(struct stm32prog_data *data)
|
|||
|
||||
rcv_data = stm32prog_serial_getc();
|
||||
if (rcv_data != tmp_xor) {
|
||||
pr_debug("1st checksum received = %x, computed %x\n",
|
||||
rcv_data, tmp_xor);
|
||||
log_debug("1st checksum received = %x, computed %x\n",
|
||||
rcv_data, tmp_xor);
|
||||
goto error;
|
||||
}
|
||||
stm32prog_serial_putc(ACK_BYTE);
|
||||
|
@ -872,12 +872,12 @@ static void read_partition_command(struct stm32prog_data *data)
|
|||
|
||||
rcv_data = stm32prog_serial_getc();
|
||||
if ((rcv_data ^ tmp_xor) != 0xFF) {
|
||||
pr_debug("2nd checksum received = %x, computed %x\n",
|
||||
rcv_data, tmp_xor);
|
||||
log_debug("2nd checksum received = %x, computed %x\n",
|
||||
rcv_data, tmp_xor);
|
||||
goto error;
|
||||
}
|
||||
|
||||
pr_debug("%s : %x\n", __func__, part_id);
|
||||
log_debug("%s : %x\n", __func__, part_id);
|
||||
rcv_data = 0;
|
||||
switch (part_id) {
|
||||
case PHASE_OTP:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue