public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] configs: am65x_usbdfu: add SPL_USE_TINY_PRINTF_POINTER_SUPPORT
@ 2025-11-05  6:02 Anshul Dalal
  2025-11-05  6:05 ` Anshul Dalal
  0 siblings, 1 reply; 3+ messages in thread
From: Anshul Dalal @ 2025-11-05  6:02 UTC (permalink / raw)
  To: u-boot
  Cc: Tom Rini, Andrew Davis, Judith Mendez, Udit Kumar,
	Hrushikesh Salunke, Neha Malcom Francis, Vignesh R, Anshul Dalal

Since the commit 1e24e84db41a ("tiny-printf: Handle formatting of %p
with an extra Kconfig"), SPL_USE_TINY_PRINTF_POINTER_SUPPORT has been
made mandatory in order to use %p which would earlier have defaulted to
a 'long' print.

Without this config symbol, k3_sysfw_dfu_download fails to set the
correct value for the DFU string with:

 sprintf(dfu_str, "sysfw.itb ram 0x%p 0x%x", addr,
   CONFIG_K3_SYSFW_IMAGE_SIZE_MAX);

The value we get "sysfw.itb ram 0x? 0x41c29d40" causes a boot failure.

Therefore this patch sets SPL_USE_TINY_PRINTF_POINTER_SUPPORT for the
usbdfu defconfig and also cleans up the usage of "CONFIG_*=n".

Signed-off-by: Anshul Dalal <anshuld@ti.com>
---
Not sure if a 'Fixes' tag is appropriate here since the commit
1e24e84db41a ("tiny-printf: Handle formatting of %p with an extra
Kconfig") did cause a regression though I think the problem existed with
the usage of "%p" with TINY_PRINTF set to begin with.
---
 configs/am65x_evm_r5_usbdfu_defconfig | 63 ++++++++++++++++++-----------------
 1 file changed, 32 insertions(+), 31 deletions(-)

diff --git a/configs/am65x_evm_r5_usbdfu_defconfig b/configs/am65x_evm_r5_usbdfu_defconfig
index f9161f1fe111ff97f7aa79f10b21c3b0ab1dad32..b3def7946b3eb799582f04cc522725cb3f9a6eb1 100644
--- a/configs/am65x_evm_r5_usbdfu_defconfig
+++ b/configs/am65x_evm_r5_usbdfu_defconfig
@@ -6,6 +6,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x57000
 CONFIG_SPL_GPIO=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SPL_USE_TINY_PRINTF_POINTER_SUPPORT=y
 CONFIG_SOC_K3_AM654=y
 CONFIG_K3_EARLY_CONS=y
 CONFIG_TARGET_AM654_R5_EVM=y
@@ -41,34 +42,34 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0451
 CONFIG_USB_GADGET_PRODUCT_NUM=0x6162
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_SPL_DFU=y
-CONFIG_MMC=n
-CONFIG_SPL_DM_SPI=n
-CONFIG_SPL_MMC=n
-CONFIG_SPL_FS_FAT=n
-CONFIG_SPL_SPI_FLASH_SUPPORT=n
-CONFIG_SPL_SPI=n
-CONFIG_SPL_SYS_MMCSD_RAW_MODE=n
-CONFIG_SPL_DM_SPI_FLASH=n
-CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=n
-CONFIG_SPL_SPI_LOAD=n
-CONFIG_CMD_MMC=n
-CONFIG_ENV_OVERWRITE=n
-CONFIG_ENV_IS_IN_FAT=n
-CONFIG_DMA_CHANNELS=n
-CONFIG_TI_K3_NAVSS_UDMA=n
-CONFIG_SUPPORT_EMMC_BOOT=n
-CONFIG_MMC_HS200_SUPPORT=n
-CONFIG_SPL_MMC_HS200_SUPPORT=n
-CONFIG_MMC_SDHCI=n
-CONFIG_SPL_MMC_SDHCI_ADMA=n
-CONFIG_MMC_SDHCI_AM654=n
-CONFIG_MTD=n
-CONFIG_DM_SPI_FLASH=n
-CONFIG_SPI_FLASH_SFDP_SUPPORT=n
-CONFIG_SPI_FLASH_STMICRO=n
-CONFIG_SOC_DEVICE=n
-CONFIG_SOC_DEVICE_TI_K3=n
-CONFIG_SOC_TI=n
-CONFIG_SPI=n
-CONFIG_DM_SPI=n
-CONFIG_CADENCE_QSPI=n
+# CONFIG_MMC is not set
+# CONFIG_SPL_DM_SPI is not set
+# CONFIG_SPL_MMC is not set
+# CONFIG_SPL_FS_FAT is not set
+# CONFIG_SPL_SPI_FLASH_SUPPORT is not set
+# CONFIG_SPL_SPI is not set
+# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set
+# CONFIG_SPL_DM_SPI_FLASH is not set
+# CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT is not set
+# CONFIG_SPL_SPI_LOAD is not set
+# CONFIG_CMD_MMC is not set
+# CONFIG_ENV_OVERWRITE is not set
+# CONFIG_ENV_IS_IN_FAT is not set
+# CONFIG_DMA_CHANNELS is not set
+# CONFIG_TI_K3_NAVSS_UDMA is not set
+# CONFIG_SUPPORT_EMMC_BOOT is not set
+# CONFIG_MMC_HS200_SUPPORT is not set
+# CONFIG_SPL_MMC_HS200_SUPPORT is not set
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_SPL_MMC_SDHCI_ADMA is not set
+# CONFIG_MMC_SDHCI_AM654 is not set
+# CONFIG_MTD is not set
+# CONFIG_DM_SPI_FLASH is not set
+# CONFIG_SPI_FLASH_SFDP_SUPPORT is not set
+# CONFIG_SPI_FLASH_STMICRO is not set
+# CONFIG_SOC_DEVICE is not set
+# CONFIG_SOC_DEVICE_TI_K3 is not set
+# CONFIG_SOC_TI is not set
+# CONFIG_SPI is not set
+# CONFIG_DM_SPI is not set
+# CONFIG_CADENCE_QSPI is not set

---
base-commit: 1c250e444ad3b15315ee8b0fcb3fc3acc26449e2
change-id: 20251105-am65_dfu_fix-1144eec06b19

Best regards,
-- 
Anshul Dalal <anshuld@ti.com>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] configs: am65x_usbdfu: add SPL_USE_TINY_PRINTF_POINTER_SUPPORT
  2025-11-05  6:02 [PATCH] configs: am65x_usbdfu: add SPL_USE_TINY_PRINTF_POINTER_SUPPORT Anshul Dalal
@ 2025-11-05  6:05 ` Anshul Dalal
  2025-11-05 13:54   ` Tom Rini
  0 siblings, 1 reply; 3+ messages in thread
From: Anshul Dalal @ 2025-11-05  6:05 UTC (permalink / raw)
  To: Anshul Dalal, u-boot
  Cc: Tom Rini, Andrew Davis, Judith Mendez, Udit Kumar,
	Hrushikesh Salunke, Neha Malcom Francis, Vignesh R,
	Christoph Niedermaier

On Wed Nov 5, 2025 at 11:32 AM IST, Anshul Dalal wrote:
> Since the commit 1e24e84db41a ("tiny-printf: Handle formatting of %p
> with an extra Kconfig"), SPL_USE_TINY_PRINTF_POINTER_SUPPORT has been
> made mandatory in order to use %p which would earlier have defaulted to
> a 'long' print.
>
> Without this config symbol, k3_sysfw_dfu_download fails to set the
> correct value for the DFU string with:
>
>  sprintf(dfu_str, "sysfw.itb ram 0x%p 0x%x", addr,
>    CONFIG_K3_SYSFW_IMAGE_SIZE_MAX);
>
> The value we get "sysfw.itb ram 0x? 0x41c29d40" causes a boot failure.
>
> Therefore this patch sets SPL_USE_TINY_PRINTF_POINTER_SUPPORT for the
> usbdfu defconfig and also cleans up the usage of "CONFIG_*=n".
>
> Signed-off-by: Anshul Dalal <anshuld@ti.com>
> ---
> Not sure if a 'Fixes' tag is appropriate here since the commit
> 1e24e84db41a ("tiny-printf: Handle formatting of %p with an extra
> Kconfig") did cause a regression though I think the problem existed with
> the usage of "%p" with TINY_PRINTF set to begin with.
> ---
>  configs/am65x_evm_r5_usbdfu_defconfig | 63 ++++++++++++++++++-----------------
>  1 file changed, 32 insertions(+), 31 deletions(-)
>
> diff --git a/configs/am65x_evm_r5_usbdfu_defconfig b/configs/am65x_evm_r5_usbdfu_defconfig
> index f9161f1fe111ff97f7aa79f10b21c3b0ab1dad32..b3def7946b3eb799582f04cc522725cb3f9a6eb1 100644
> --- a/configs/am65x_evm_r5_usbdfu_defconfig
> +++ b/configs/am65x_evm_r5_usbdfu_defconfig
> @@ -6,6 +6,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x57000
>  CONFIG_SPL_GPIO=y
>  CONFIG_SPL_LIBCOMMON_SUPPORT=y
>  CONFIG_SPL_LIBGENERIC_SUPPORT=y
> +CONFIG_SPL_USE_TINY_PRINTF_POINTER_SUPPORT=y
>  CONFIG_SOC_K3_AM654=y
>  CONFIG_K3_EARLY_CONS=y
>  CONFIG_TARGET_AM654_R5_EVM=y
> @@ -41,34 +42,34 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0451
>  CONFIG_USB_GADGET_PRODUCT_NUM=0x6162
>  CONFIG_USB_GADGET_DOWNLOAD=y
>  CONFIG_SPL_DFU=y
> -CONFIG_MMC=n
> -CONFIG_SPL_DM_SPI=n
> -CONFIG_SPL_MMC=n
> -CONFIG_SPL_FS_FAT=n
> -CONFIG_SPL_SPI_FLASH_SUPPORT=n
> -CONFIG_SPL_SPI=n
> -CONFIG_SPL_SYS_MMCSD_RAW_MODE=n
> -CONFIG_SPL_DM_SPI_FLASH=n
> -CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=n
> -CONFIG_SPL_SPI_LOAD=n
> -CONFIG_CMD_MMC=n
> -CONFIG_ENV_OVERWRITE=n
> -CONFIG_ENV_IS_IN_FAT=n
> -CONFIG_DMA_CHANNELS=n
> -CONFIG_TI_K3_NAVSS_UDMA=n
> -CONFIG_SUPPORT_EMMC_BOOT=n
> -CONFIG_MMC_HS200_SUPPORT=n
> -CONFIG_SPL_MMC_HS200_SUPPORT=n
> -CONFIG_MMC_SDHCI=n
> -CONFIG_SPL_MMC_SDHCI_ADMA=n
> -CONFIG_MMC_SDHCI_AM654=n
> -CONFIG_MTD=n
> -CONFIG_DM_SPI_FLASH=n
> -CONFIG_SPI_FLASH_SFDP_SUPPORT=n
> -CONFIG_SPI_FLASH_STMICRO=n
> -CONFIG_SOC_DEVICE=n
> -CONFIG_SOC_DEVICE_TI_K3=n
> -CONFIG_SOC_TI=n
> -CONFIG_SPI=n
> -CONFIG_DM_SPI=n
> -CONFIG_CADENCE_QSPI=n
> +# CONFIG_MMC is not set
> +# CONFIG_SPL_DM_SPI is not set
> +# CONFIG_SPL_MMC is not set
> +# CONFIG_SPL_FS_FAT is not set
> +# CONFIG_SPL_SPI_FLASH_SUPPORT is not set
> +# CONFIG_SPL_SPI is not set
> +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set
> +# CONFIG_SPL_DM_SPI_FLASH is not set
> +# CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT is not set
> +# CONFIG_SPL_SPI_LOAD is not set
> +# CONFIG_CMD_MMC is not set
> +# CONFIG_ENV_OVERWRITE is not set
> +# CONFIG_ENV_IS_IN_FAT is not set
> +# CONFIG_DMA_CHANNELS is not set
> +# CONFIG_TI_K3_NAVSS_UDMA is not set
> +# CONFIG_SUPPORT_EMMC_BOOT is not set
> +# CONFIG_MMC_HS200_SUPPORT is not set
> +# CONFIG_SPL_MMC_HS200_SUPPORT is not set
> +# CONFIG_MMC_SDHCI is not set
> +# CONFIG_SPL_MMC_SDHCI_ADMA is not set
> +# CONFIG_MMC_SDHCI_AM654 is not set
> +# CONFIG_MTD is not set
> +# CONFIG_DM_SPI_FLASH is not set
> +# CONFIG_SPI_FLASH_SFDP_SUPPORT is not set
> +# CONFIG_SPI_FLASH_STMICRO is not set
> +# CONFIG_SOC_DEVICE is not set
> +# CONFIG_SOC_DEVICE_TI_K3 is not set
> +# CONFIG_SOC_TI is not set
> +# CONFIG_SPI is not set
> +# CONFIG_DM_SPI is not set
> +# CONFIG_CADENCE_QSPI is not set
>
> ---
> base-commit: 1c250e444ad3b15315ee8b0fcb3fc3acc26449e2
> change-id: 20251105-am65_dfu_fix-1144eec06b19
>
> Best regards,

CC: +Christoph Niedermaier


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] configs: am65x_usbdfu: add SPL_USE_TINY_PRINTF_POINTER_SUPPORT
  2025-11-05  6:05 ` Anshul Dalal
@ 2025-11-05 13:54   ` Tom Rini
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Rini @ 2025-11-05 13:54 UTC (permalink / raw)
  To: Anshul Dalal
  Cc: u-boot, Andrew Davis, Judith Mendez, Udit Kumar,
	Hrushikesh Salunke, Neha Malcom Francis, Vignesh R,
	Christoph Niedermaier

[-- Attachment #1: Type: text/plain, Size: 4269 bytes --]

On Wed, Nov 05, 2025 at 11:35:03AM +0530, Anshul Dalal wrote:

> On Wed Nov 5, 2025 at 11:32 AM IST, Anshul Dalal wrote:
> > Since the commit 1e24e84db41a ("tiny-printf: Handle formatting of %p
> > with an extra Kconfig"), SPL_USE_TINY_PRINTF_POINTER_SUPPORT has been
> > made mandatory in order to use %p which would earlier have defaulted to
> > a 'long' print.
> >
> > Without this config symbol, k3_sysfw_dfu_download fails to set the
> > correct value for the DFU string with:
> >
> >  sprintf(dfu_str, "sysfw.itb ram 0x%p 0x%x", addr,
> >    CONFIG_K3_SYSFW_IMAGE_SIZE_MAX);
> >
> > The value we get "sysfw.itb ram 0x? 0x41c29d40" causes a boot failure.
> >
> > Therefore this patch sets SPL_USE_TINY_PRINTF_POINTER_SUPPORT for the
> > usbdfu defconfig and also cleans up the usage of "CONFIG_*=n".
> >
> > Signed-off-by: Anshul Dalal <anshuld@ti.com>
> > ---
> > Not sure if a 'Fixes' tag is appropriate here since the commit
> > 1e24e84db41a ("tiny-printf: Handle formatting of %p with an extra
> > Kconfig") did cause a regression though I think the problem existed with
> > the usage of "%p" with TINY_PRINTF set to begin with.
> > ---
> >  configs/am65x_evm_r5_usbdfu_defconfig | 63 ++++++++++++++++++-----------------
> >  1 file changed, 32 insertions(+), 31 deletions(-)
> >
> > diff --git a/configs/am65x_evm_r5_usbdfu_defconfig b/configs/am65x_evm_r5_usbdfu_defconfig
> > index f9161f1fe111ff97f7aa79f10b21c3b0ab1dad32..b3def7946b3eb799582f04cc522725cb3f9a6eb1 100644
> > --- a/configs/am65x_evm_r5_usbdfu_defconfig
> > +++ b/configs/am65x_evm_r5_usbdfu_defconfig
> > @@ -6,6 +6,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x57000
> >  CONFIG_SPL_GPIO=y
> >  CONFIG_SPL_LIBCOMMON_SUPPORT=y
> >  CONFIG_SPL_LIBGENERIC_SUPPORT=y
> > +CONFIG_SPL_USE_TINY_PRINTF_POINTER_SUPPORT=y
> >  CONFIG_SOC_K3_AM654=y
> >  CONFIG_K3_EARLY_CONS=y
> >  CONFIG_TARGET_AM654_R5_EVM=y
> > @@ -41,34 +42,34 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0451
> >  CONFIG_USB_GADGET_PRODUCT_NUM=0x6162
> >  CONFIG_USB_GADGET_DOWNLOAD=y
> >  CONFIG_SPL_DFU=y
> > -CONFIG_MMC=n
> > -CONFIG_SPL_DM_SPI=n
> > -CONFIG_SPL_MMC=n
> > -CONFIG_SPL_FS_FAT=n
> > -CONFIG_SPL_SPI_FLASH_SUPPORT=n
> > -CONFIG_SPL_SPI=n
> > -CONFIG_SPL_SYS_MMCSD_RAW_MODE=n
> > -CONFIG_SPL_DM_SPI_FLASH=n
> > -CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=n
> > -CONFIG_SPL_SPI_LOAD=n
> > -CONFIG_CMD_MMC=n
> > -CONFIG_ENV_OVERWRITE=n
> > -CONFIG_ENV_IS_IN_FAT=n
> > -CONFIG_DMA_CHANNELS=n
> > -CONFIG_TI_K3_NAVSS_UDMA=n
> > -CONFIG_SUPPORT_EMMC_BOOT=n
> > -CONFIG_MMC_HS200_SUPPORT=n
> > -CONFIG_SPL_MMC_HS200_SUPPORT=n
> > -CONFIG_MMC_SDHCI=n
> > -CONFIG_SPL_MMC_SDHCI_ADMA=n
> > -CONFIG_MMC_SDHCI_AM654=n
> > -CONFIG_MTD=n
> > -CONFIG_DM_SPI_FLASH=n
> > -CONFIG_SPI_FLASH_SFDP_SUPPORT=n
> > -CONFIG_SPI_FLASH_STMICRO=n
> > -CONFIG_SOC_DEVICE=n
> > -CONFIG_SOC_DEVICE_TI_K3=n
> > -CONFIG_SOC_TI=n
> > -CONFIG_SPI=n
> > -CONFIG_DM_SPI=n
> > -CONFIG_CADENCE_QSPI=n
> > +# CONFIG_MMC is not set
> > +# CONFIG_SPL_DM_SPI is not set
> > +# CONFIG_SPL_MMC is not set
> > +# CONFIG_SPL_FS_FAT is not set
> > +# CONFIG_SPL_SPI_FLASH_SUPPORT is not set
> > +# CONFIG_SPL_SPI is not set
> > +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set
> > +# CONFIG_SPL_DM_SPI_FLASH is not set
> > +# CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT is not set
> > +# CONFIG_SPL_SPI_LOAD is not set
> > +# CONFIG_CMD_MMC is not set
> > +# CONFIG_ENV_OVERWRITE is not set
> > +# CONFIG_ENV_IS_IN_FAT is not set
> > +# CONFIG_DMA_CHANNELS is not set
> > +# CONFIG_TI_K3_NAVSS_UDMA is not set
> > +# CONFIG_SUPPORT_EMMC_BOOT is not set
> > +# CONFIG_MMC_HS200_SUPPORT is not set
> > +# CONFIG_SPL_MMC_HS200_SUPPORT is not set
> > +# CONFIG_MMC_SDHCI is not set
> > +# CONFIG_SPL_MMC_SDHCI_ADMA is not set
> > +# CONFIG_MMC_SDHCI_AM654 is not set
> > +# CONFIG_MTD is not set
> > +# CONFIG_DM_SPI_FLASH is not set
> > +# CONFIG_SPI_FLASH_SFDP_SUPPORT is not set
> > +# CONFIG_SPI_FLASH_STMICRO is not set
> > +# CONFIG_SOC_DEVICE is not set
> > +# CONFIG_SOC_DEVICE_TI_K3 is not set
> > +# CONFIG_SOC_TI is not set
> > +# CONFIG_SPI is not set
> > +# CONFIG_DM_SPI is not set
> > +# CONFIG_CADENCE_QSPI is not set

That second half is unrelated and should be dropped.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-11-05 13:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-05  6:02 [PATCH] configs: am65x_usbdfu: add SPL_USE_TINY_PRINTF_POINTER_SUPPORT Anshul Dalal
2025-11-05  6:05 ` Anshul Dalal
2025-11-05 13:54   ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox