[PATCH v7 4/4] configs: sama5d2: enable option CONFIG_ATMEL_TCB_TIMER

Eugen.Hristev at microchip.com Eugen.Hristev at microchip.com
Tue Mar 22 12:18:39 CET 2022


On 3/11/22 11:35 AM, Clément Léger wrote:
> Enable CONFIG_ATMEL_TCB_TIMER and disable CONFIG_ATMEL_PIT_TIMER.
> This will allow using the TCB timer instead of the PIT one when running
> under OP-TEE.

Hello Clement,

We have to make sure that the PIT_TIMER was not mandatory for SPL 
operations, and if it was, the TCB_TIMER successfully replaces it.

If we have the PIT_TIMER with the u-boot property
u-boot,dm-pre-reloc;
then the PIT_TIMER is available in the SPL and the SPL works :

RomBOOT
;4▒ls▒K{▒KOp▒C▒▒
<debug_uart>

U-Boot SPL 2022.04-rc4-00204-g5f7086d8a8-dirty (Mar 22 2022 - 13:10:58 
+0200)
SPL: Unsupported Boot Device!
SPL: failed to boot from all boot devices


(well, it fails to boot because I removed the MMC drivers to have it 
smaller than 64k, but it boots)


However, with your patches, even if I add the pre-reloc property to the 
tcb nodes, it fails to boot:

RomBOOT
;4▒Ls▒k{▒kOp▒C▒▒
<debug_uart>
Could not initialize timer (err -22)

Could not initialize timer (err -22)

Could not initialize timer (err -22)

Could not initialize timer (err -22)

...



Could you investigate this please ?

Otherwise we cannot switch to using the TCB if it does not fully replace 
the PIT_TIMER in all the use cases.


Thanks,

Eugen



> 
> Reviewed-by: Claudiu Beznea <claudiu.beznea at microchip.com>
> Signed-off-by: Clément Léger <clement.leger at bootlin.com>
> ---
>   configs/sama5d2_icp_mmc_defconfig            | 2 +-
>   configs/sama5d2_ptc_ek_mmc_defconfig         | 2 +-
>   configs/sama5d2_ptc_ek_nandflash_defconfig   | 2 +-
>   configs/sama5d2_xplained_emmc_defconfig      | 2 +-
>   configs/sama5d2_xplained_mmc_defconfig       | 2 +-
>   configs/sama5d2_xplained_qspiflash_defconfig | 2 +-
>   configs/sama5d2_xplained_spiflash_defconfig  | 2 +-
>   7 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/configs/sama5d2_icp_mmc_defconfig b/configs/sama5d2_icp_mmc_defconfig
> index 7761a57e0c..c035d7aad8 100644
> --- a/configs/sama5d2_icp_mmc_defconfig
> +++ b/configs/sama5d2_icp_mmc_defconfig
> @@ -82,6 +82,6 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_TIMER=y
>   CONFIG_SPL_TIMER=y
> -CONFIG_ATMEL_PIT_TIMER=y
> +CONFIG_ATMEL_TCB_TIMER=y
>   CONFIG_OF_LIBFDT_OVERLAY=y
>   # CONFIG_EFI_LOADER_HII is not set
> diff --git a/configs/sama5d2_ptc_ek_mmc_defconfig b/configs/sama5d2_ptc_ek_mmc_defconfig
> index 9f458e100b..7cb5ba37f6 100644
> --- a/configs/sama5d2_ptc_ek_mmc_defconfig
> +++ b/configs/sama5d2_ptc_ek_mmc_defconfig
> @@ -71,7 +71,7 @@ CONFIG_DM_SERIAL=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_TIMER=y
> -CONFIG_ATMEL_PIT_TIMER=y
> +CONFIG_ATMEL_TCB_TIMER=y
>   CONFIG_USB=y
>   CONFIG_USB_EHCI_HCD=y
>   CONFIG_USB_STORAGE=y
> diff --git a/configs/sama5d2_ptc_ek_nandflash_defconfig b/configs/sama5d2_ptc_ek_nandflash_defconfig
> index 6460ff3dad..667a10e93f 100644
> --- a/configs/sama5d2_ptc_ek_nandflash_defconfig
> +++ b/configs/sama5d2_ptc_ek_nandflash_defconfig
> @@ -71,7 +71,7 @@ CONFIG_DM_SERIAL=y
>   CONFIG_DEBUG_UART_ANNOUNCE=y
>   CONFIG_ATMEL_USART=y
>   CONFIG_TIMER=y
> -CONFIG_ATMEL_PIT_TIMER=y
> +CONFIG_ATMEL_TCB_TIMER=y
>   CONFIG_USB=y
>   CONFIG_USB_EHCI_HCD=y
>   CONFIG_USB_STORAGE=y
> diff --git a/configs/sama5d2_xplained_emmc_defconfig b/configs/sama5d2_xplained_emmc_defconfig
> index 844a9cde64..72544b65bb 100644
> --- a/configs/sama5d2_xplained_emmc_defconfig
> +++ b/configs/sama5d2_xplained_emmc_defconfig
> @@ -90,7 +90,7 @@ CONFIG_DM_SPI=y
>   CONFIG_ATMEL_QSPI=y
>   CONFIG_TIMER=y
>   CONFIG_SPL_TIMER=y
> -CONFIG_ATMEL_PIT_TIMER=y
> +CONFIG_ATMEL_TCB_TIMER=y
>   CONFIG_USB=y
>   CONFIG_USB_EHCI_HCD=y
>   CONFIG_USB_STORAGE=y
> diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig
> index 0de0636587..bcdb84ce2c 100644
> --- a/configs/sama5d2_xplained_mmc_defconfig
> +++ b/configs/sama5d2_xplained_mmc_defconfig
> @@ -92,7 +92,7 @@ CONFIG_DM_SPI=y
>   CONFIG_ATMEL_QSPI=y
>   CONFIG_TIMER=y
>   CONFIG_SPL_TIMER=y
> -CONFIG_ATMEL_PIT_TIMER=y
> +CONFIG_ATMEL_TCB_TIMER=y
>   CONFIG_USB=y
>   CONFIG_USB_EHCI_HCD=y
>   CONFIG_USB_STORAGE=y
> diff --git a/configs/sama5d2_xplained_qspiflash_defconfig b/configs/sama5d2_xplained_qspiflash_defconfig
> index a6e002e59e..c30a90a3e1 100644
> --- a/configs/sama5d2_xplained_qspiflash_defconfig
> +++ b/configs/sama5d2_xplained_qspiflash_defconfig
> @@ -91,7 +91,7 @@ CONFIG_DM_SPI=y
>   CONFIG_ATMEL_QSPI=y
>   CONFIG_TIMER=y
>   CONFIG_SPL_TIMER=y
> -CONFIG_ATMEL_PIT_TIMER=y
> +CONFIG_ATMEL_TCB_TIMER=y
>   CONFIG_USB=y
>   CONFIG_USB_EHCI_HCD=y
>   CONFIG_USB_STORAGE=y
> diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig
> index 676385fe55..eae54469f8 100644
> --- a/configs/sama5d2_xplained_spiflash_defconfig
> +++ b/configs/sama5d2_xplained_spiflash_defconfig
> @@ -95,7 +95,7 @@ CONFIG_DM_SPI=y
>   CONFIG_ATMEL_QSPI=y
>   CONFIG_TIMER=y
>   CONFIG_SPL_TIMER=y
> -CONFIG_ATMEL_PIT_TIMER=y
> +CONFIG_ATMEL_TCB_TIMER=y
>   CONFIG_USB=y
>   CONFIG_USB_EHCI_HCD=y
>   CONFIG_USB_STORAGE=y
> --
> 2.34.1
> 



More information about the U-Boot mailing list