diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
index 49dd25b..34a6be6 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
@@ -56,7 +56,7 @@
 		link = LINK_SERIAL;
 
 	if (link == LINK_UNDEFINED) {
-		pr_err("not supported link=%s\n", argv[1]);
+		log_err("not supported link=%s\n", argv[1]);
 		return CMD_RET_USAGE;
 	}
 
@@ -90,7 +90,7 @@
 	data = (struct stm32prog_data *)malloc(sizeof(*data));
 
 	if (!data) {
-		pr_err("Alloc failed.");
+		log_err("Alloc failed.");
 		return CMD_RET_FAILURE;
 	}
 	stm32prog_data = data;
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
index fc9a2af..a8e7158 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
@@ -97,28 +97,28 @@
 	header->image_length = 0x0;
 
 	if (!raw_header || !header) {
-		pr_debug("%s:no header data\n", __func__);
+		log_debug("%s:no header data\n", __func__);
 		return -1;
 	}
 	if (raw_header->magic_number !=
 		(('S' << 0) | ('T' << 8) | ('M' << 16) | (0x32 << 24))) {
-		pr_debug("%s:invalid magic number : 0x%x\n",
-			 __func__, raw_header->magic_number);
+		log_debug("%s:invalid magic number : 0x%x\n",
+			  __func__, raw_header->magic_number);
 		return -2;
 	}
 	/* only header v1.0 supported */
 	if (raw_header->header_version != 0x00010000) {
-		pr_debug("%s:invalid header version : 0x%x\n",
-			 __func__, raw_header->header_version);
+		log_debug("%s:invalid header version : 0x%x\n",
+			  __func__, raw_header->header_version);
 		return -3;
 	}
 	if (raw_header->reserved1 != 0x0 || raw_header->reserved2) {
-		pr_debug("%s:invalid reserved field\n", __func__);
+		log_debug("%s:invalid reserved field\n", __func__);
 		return -4;
 	}
 	for (i = 0; i < (sizeof(raw_header->padding) / 4); i++) {
 		if (raw_header->padding[i] != 0) {
-			pr_debug("%s:invalid padding field\n", __func__);
+			log_debug("%s:invalid padding field\n", __func__);
 			return -5;
 		}
 	}
@@ -376,7 +376,7 @@
 	last = start + size;
 
 	*last = 0x0; /* force null terminated string */
-	pr_debug("flash layout =\n%s\n", start);
+	log_debug("flash layout =\n%s\n", start);
 
 	/* calculate expected number of partitions */
 	part_list_size = 1;
@@ -584,11 +584,11 @@
 			last_addr = (u64)(block_dev->lba - GPT_HEADER_SZ - 1) *
 				    block_dev->blksz;
 		}
-		pr_debug("MMC %d: lba=%ld blksz=%ld\n", dev->dev_id,
-			 block_dev->lba, block_dev->blksz);
-		pr_debug(" available address = 0x%llx..0x%llx\n",
-			 first_addr, last_addr);
-		pr_debug(" full_update = %d\n", dev->full_update);
+		log_debug("MMC %d: lba=%ld blksz=%ld\n", dev->dev_id,
+			  block_dev->lba, block_dev->blksz);
+		log_debug(" available address = 0x%llx..0x%llx\n",
+			  first_addr, last_addr);
+		log_debug(" full_update = %d\n", dev->full_update);
 		break;
 	case STM32PROG_NOR:
 	case STM32PROG_NAND:
@@ -598,7 +598,7 @@
 			return -ENODEV;
 		}
 		get_mtd_by_target(mtd_id, dev->target, dev->dev_id);
-		pr_debug("%s\n", mtd_id);
+		log_debug("%s\n", mtd_id);
 
 		mtdparts_init();
 		mtd = get_mtd_device_nm(mtd_id);
@@ -609,10 +609,10 @@
 		first_addr = 0;
 		last_addr = mtd->size;
 		dev->erase_size = mtd->erasesize;
-		pr_debug("MTD device %s: size=%lld erasesize=%d\n",
-			 mtd_id, mtd->size, mtd->erasesize);
-		pr_debug(" available address = 0x%llx..0x%llx\n",
-			 first_addr, last_addr);
+		log_debug("MTD device %s: size=%lld erasesize=%d\n",
+			  mtd_id, mtd->size, mtd->erasesize);
+		log_debug(" available address = 0x%llx..0x%llx\n",
+			  first_addr, last_addr);
 		dev->mtd = mtd;
 		break;
 	case STM32PROG_RAM:
@@ -624,13 +624,13 @@
 		stm32prog_err("unknown device type = %d", dev->target);
 		return -ENODEV;
 	}
-	pr_debug(" erase size = 0x%x\n", dev->erase_size);
-	pr_debug(" full_update = %d\n", dev->full_update);
+	log_debug(" erase size = 0x%x\n", dev->erase_size);
+	log_debug(" full_update = %d\n", dev->full_update);
 
 	/* order partition list in offset order */
 	list_sort(NULL, &dev->part_list, &part_cmp);
 	part_id = 1;
-	pr_debug("id : Opt Phase     Name target.n dev.n addr     size     part_off part_size\n");
+	log_debug("id : Opt Phase     Name target.n dev.n addr     size     part_off part_size\n");
 	list_for_each_entry(part, &dev->part_list, list) {
 		if (part->bin_nb > 1) {
 			if ((dev->target != STM32PROG_NAND &&
@@ -650,10 +650,10 @@
 				part->size = block_dev->lba * block_dev->blksz;
 			else
 				part->size = last_addr;
-			pr_debug("-- : %1d %02x %14s %02d.%d %02d.%02d %08llx %08llx\n",
-				 part->option, part->id, part->name,
-				 part->part_type, part->bin_nb, part->target,
-				 part->dev_id, part->addr, part->size);
+			log_debug("-- : %1d %02x %14s %02d.%d %02d.%02d %08llx %08llx\n",
+				  part->option, part->id, part->name,
+				  part->part_type, part->bin_nb, part->target,
+				  part->dev_id, part->addr, part->size);
 			continue;
 		}
 		if (part->part_id < 0) { /* boot hw partition for eMMC */
@@ -709,10 +709,10 @@
 				      part->dev->erase_size);
 			return -EINVAL;
 		}
-		pr_debug("%02d : %1d %02x %14s %02d.%d %02d.%02d %08llx %08llx",
-			 part->part_id, part->option, part->id, part->name,
-			 part->part_type, part->bin_nb, part->target,
-			 part->dev_id, part->addr, part->size);
+		log_debug("%02d : %1d %02x %14s %02d.%d %02d.%02d %08llx %08llx",
+			  part->part_id, part->option, part->id, part->name,
+			  part->part_type, part->bin_nb, part->target,
+			  part->dev_id, part->addr, part->size);
 
 		part_addr = 0;
 		part_size = 0;
@@ -726,7 +726,7 @@
 			 * created for full update
 			 */
 			if (dev->full_update || part->part_id < 0) {
-				pr_debug("\n");
+				log_debug("\n");
 				continue;
 			}
 			struct disk_partition partinfo;
@@ -770,11 +770,11 @@
 
 		/* no partition for this device */
 		if (!part_found) {
-			pr_debug("\n");
+			log_debug("\n");
 			continue;
 		}
 
-		pr_debug(" %08llx %08llx\n", part_addr, part_size);
+		log_debug(" %08llx %08llx\n", part_addr, part_size);
 
 		if (part->addr != part_addr) {
 			stm32prog_err("%s (0x%x): Bad address for partition %d (%s) = 0x%llx <> 0x%llx expected",
@@ -910,8 +910,8 @@
 				continue;
 
 			if (offset + 100 > buflen) {
-				pr_debug("\n%s: buffer too small, %s skippped",
-					 __func__, part->name);
+				log_debug("\n%s: buffer too small, %s skippped",
+					  __func__, part->name);
 				continue;
 			}
 
@@ -959,7 +959,7 @@
 
 		if (offset) {
 			offset += snprintf(buf + offset, buflen - offset, "\"");
-			pr_debug("\ncmd: %s\n", buf);
+			log_debug("\ncmd: %s\n", buf);
 			if (run_command(buf, 0)) {
 				stm32prog_err("GPT partitionning fail: %s",
 					      buf);
@@ -974,7 +974,7 @@
 
 #ifdef DEBUG
 		sprintf(buf, "gpt verify mmc %d", data->dev[i].dev_id);
-		pr_debug("\ncmd: %s", buf);
+		log_debug("\ncmd: %s", buf);
 		if (run_command(buf, 0))
 			printf("fail !\n");
 		else
@@ -1098,10 +1098,10 @@
 		stm32prog_err("invalid target: %d", part->target);
 		return ret;
 	}
-	pr_debug("dfu_alt_add(%s,%s,%s)\n", dfustr, devstr, buf);
+	log_debug("dfu_alt_add(%s,%s,%s)\n", dfustr, devstr, buf);
 	ret = dfu_alt_add(dfu, dfustr, devstr, buf);
-	pr_debug("dfu_alt_add(%s,%s,%s) result %d\n",
-		 dfustr, devstr, buf, ret);
+	log_debug("dfu_alt_add(%s,%s,%s) result %d\n",
+		  dfustr, devstr, buf, ret);
 
 	return ret;
 }
@@ -1116,7 +1116,7 @@
 	sprintf(devstr, "%d", phase);
 	sprintf(buf, "@%s/0x%02x/1*%dBe", name, phase, size);
 	ret = dfu_alt_add(dfu, "virt", devstr, buf);
-	pr_debug("dfu_alt_add(virt,%s,%s) result %d\n", devstr, buf, ret);
+	log_debug("dfu_alt_add(virt,%s,%s) result %d\n", devstr, buf, ret);
 
 	return ret;
 }
@@ -1171,7 +1171,7 @@
 		sprintf(buf, "@FlashLayout/0x%02x/1*256Ke ram %x 40000",
 			PHASE_FLASHLAYOUT, STM32_DDR_BASE);
 		ret = dfu_alt_add(dfu, "ram", NULL, buf);
-		pr_debug("dfu_alt_add(ram, NULL,%s) result %d\n", buf, ret);
+		log_debug("dfu_alt_add(ram, NULL,%s) result %d\n", buf, ret);
 	}
 
 	if (!ret)
@@ -1196,7 +1196,7 @@
 int stm32prog_otp_write(struct stm32prog_data *data, u32 offset, u8 *buffer,
 			long *size)
 {
-	pr_debug("%s: %x %lx\n", __func__, offset, *size);
+	log_debug("%s: %x %lx\n", __func__, offset, *size);
 
 	if (!data->otp_part) {
 		data->otp_part = memalign(CONFIG_SYS_CACHELINE_SIZE, OTP_SIZE);
@@ -1226,7 +1226,7 @@
 		return -1;
 	}
 
-	pr_debug("%s: %x %lx\n", __func__, offset, *size);
+	log_debug("%s: %x %lx\n", __func__, offset, *size);
 	/* alway read for first packet */
 	if (!offset) {
 		if (!data->otp_part)
@@ -1258,7 +1258,7 @@
 	memcpy(buffer, (void *)((u32)data->otp_part + offset), *size);
 
 end_otp_read:
-	pr_debug("%s: result %i\n", __func__, result);
+	log_debug("%s: result %i\n", __func__, result);
 
 	return result;
 }
@@ -1292,20 +1292,20 @@
 			result = 0;
 			break;
 		default:
-			pr_err("%s: OTP incorrect value (err = %ld)\n",
-			       __func__, res.a1);
+			log_err("%s: OTP incorrect value (err = %ld)\n",
+				__func__, res.a1);
 			result = -EINVAL;
 			break;
 		}
 	} else {
-		pr_err("%s: Failed to exec svc=%x op=%x in secure mode (err = %ld)\n",
-		       __func__, STM32_SMC_BSEC, STM32_SMC_WRITE_ALL, res.a0);
+		log_err("%s: Failed to exec svc=%x op=%x in secure mode (err = %ld)\n",
+			__func__, STM32_SMC_BSEC, STM32_SMC_WRITE_ALL, res.a0);
 		result = -EINVAL;
 	}
 
 	free(data->otp_part);
 	data->otp_part = NULL;
-	pr_debug("%s: result %i\n", __func__, result);
+	log_debug("%s: result %i\n", __func__, result);
 
 	return result;
 }
@@ -1313,7 +1313,7 @@
 int stm32prog_pmic_write(struct stm32prog_data *data, u32 offset, u8 *buffer,
 			 long *size)
 {
-	pr_debug("%s: %x %lx\n", __func__, offset, *size);
+	log_debug("%s: %x %lx\n", __func__, offset, *size);
 
 	if (!offset)
 		memset(data->pmic_part, 0, PMIC_SIZE);
@@ -1338,7 +1338,7 @@
 		return -EOPNOTSUPP;
 	}
 
-	pr_debug("%s: %x %lx\n", __func__, offset, *size);
+	log_debug("%s: %x %lx\n", __func__, offset, *size);
 	ret = uclass_get_device_by_driver(UCLASS_MISC,
 					  DM_DRIVER_GET(stpmic1_nvm),
 					  &dev);
@@ -1373,7 +1373,7 @@
 	memcpy(buffer, &data->pmic_part[offset], *size);
 
 end_pmic_read:
-	pr_debug("%s: result %i\n", __func__, result);
+	log_debug("%s: result %i\n", __func__, result);
 	return result;
 }
 
@@ -1429,7 +1429,7 @@
 	if (!fsbl)
 		return -ENOMEM;
 	ret = dfu->read_medium(dfu, 0, fsbl, &size);
-	pr_debug("%s read size=%lx ret=%d\n", __func__, size, ret);
+	log_debug("%s read size=%lx ret=%d\n", __func__, size, ret);
 	if (ret)
 		goto error;
 
@@ -1439,8 +1439,8 @@
 		offset += size;
 		/* write to the next erase block */
 		ret = dfu->write_medium(dfu, offset, fsbl, &size);
-		pr_debug("%s copy at ofset=%lx size=%lx ret=%d",
-			 __func__, offset, size, ret);
+		log_debug("%s copy at ofset=%lx size=%lx ret=%d",
+			  __func__, offset, size, ret);
 		if (ret)
 			goto error;
 	}
@@ -1751,6 +1751,6 @@
 	if (dfu->alt == stm32prog_data->cur_part->alt_id) {
 		dfu->offset = stm32prog_data->offset;
 		stm32prog_data->dfu_seq = 0;
-		pr_debug("dfu offset = 0x%llx\n", dfu->offset);
+		log_debug("dfu offset = 0x%llx\n", dfu->offset);
 	}
 }
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
index bae4e91..be482c3 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
@@ -172,7 +172,7 @@
 	if (data->phase != PHASE_RESET) { \
 		sprintf(data->error, args); \
 		data->phase = PHASE_RESET; \
-		pr_err("Error: %s\n", data->error); } \
+		log_err("Error: %s\n", data->error); } \
 	}
 
 /* Main function */
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
index 8aad4be..e534b3f 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
@@ -159,8 +159,8 @@
 		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 @@
 	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 @@
 			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 @@
 	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 @@
 
 		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 @@
 
 	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 @@
 
 	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:
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c
index 30547f9..bc44d9f 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c
@@ -47,11 +47,11 @@
 	int ret;
 
 	if (*len < 5) {
-		pr_err("size not allowed\n");
+		log_err("size not allowed\n");
 		return  -EINVAL;
 	}
 	if (offset) {
-		pr_err("invalid offset\n");
+		log_err("invalid offset\n");
 		return  -EINVAL;
 	}
 	phase = pt[0];
@@ -66,7 +66,7 @@
 	/* set phase and offset */
 	ret = stm32prog_set_phase(stm32prog_data, phase, address);
 	if (ret)
-		pr_err("failed: %d\n", ret);
+		log_err("failed: %d\n", ret);
 	return ret;
 }
 
@@ -81,7 +81,7 @@
 	int length;
 
 	if (*len < PHASE_MIN_SIZE) {
-		pr_err("request exceeds allowed area\n");
+		log_err("request exceeds allowed area\n");
 		return  -EINVAL;
 	}
 	if (offset) {
@@ -171,8 +171,8 @@
 {
 	if (dfu->dev_type != DFU_DEV_VIRT) {
 		*size = 0;
-		pr_debug("%s, invalid dev_type = %d\n",
-			 __func__, dfu->dev_type);
+		log_debug("%s, invalid dev_type = %d\n",
+			  __func__, dfu->dev_type);
 		return -EINVAL;
 	}
 
@@ -227,6 +227,6 @@
 
 int g_dnl_get_board_bcd_device_number(int gcnum)
 {
-	pr_debug("%s\n", __func__);
+	log_debug("%s\n", __func__);
 	return 0x200;
 }
