From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 16 Jan 2024 11:50:01 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rPh16-001m2K-0A for lore@lore.pengutronix.de; Tue, 16 Jan 2024 11:50:01 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1rPh16-0001wC-Sm; Tue, 16 Jan 2024 11:50:00 +0100 Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[127.0.0.1]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1rPh0z-0001vo-F1; Tue, 16 Jan 2024 11:49:53 +0100 Message-ID: <02dd393b-2737-4c16-8cdb-de3203a47256@pengutronix.de> Date: Tue, 16 Jan 2024 11:50:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Ahmad Fatoum , distrokit@pengutronix.de, Marco Felsch References: <20240111150117.3678555-1-l.goehrs@pengutronix.de> <20240111150117.3678555-2-l.goehrs@pengutronix.de> <1a1688bb-0ceb-467d-8dad-45a53005edf6@pengutronix.de> From: =?UTF-8?Q?Leonard_G=C3=B6hrs?= In-Reply-To: <1a1688bb-0ceb-467d-8dad-45a53005edf6@pengutronix.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [DistroKit] [PATCH v1 1/5] tf-a: add patch to auto-detect the correct UART on i.MX8M X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Hi, On 11.01.24 19:03, Ahmad Fatoum wrote: > Hello Leonard, > > On 11.01.24 16:01, Leonard Göhrs wrote: >> diff --git a/configs/platform-v8a/platformconfig b/configs/platform-v8a/platformconfig >> index b71b361..6925dac 100644 >> --- a/configs/platform-v8a/platformconfig >> +++ b/configs/platform-v8a/platformconfig >> @@ -216,7 +216,7 @@ PTXCONF_TF_A_ARM_ARCH_MAJOR_8=y >> PTXCONF_TF_A_ARM_ARCH_MAJOR=8 >> PTXCONF_TF_A_PLATFORMS="imx8mq imx8mm imx8mn imx8mp" >> PTXCONF_TF_A_ARM_ARCH_MINOR=0 >> -PTXCONF_TF_A_EXTRA_ARGS="" >> +PTXCONF_TF_A_EXTRA_ARGS="IMX_BOOT_UART_BASE=0" > > Patches below add auto as alias for 0. I think that would be better as to be > more descriptive. I tried that, but it makes the build fail: -------------------- target: tf-a.compile -------------------- make: Entering directory '…/DistroKit/platform-v8a/build-target/tf-a-v2.8' Building imx8mq CC lib/libc/abort.c … CC plat/common/plat_bl_common.c plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c: In function 'bl31_early_platform_setup2': : error: expected expression before 'auto' plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:136:35: note: in expansion of macro 'IMX_BOOT_UART_BASE' 136 | console_imx_uart_register(IMX_BOOT_UART_BASE, IMX_BOOT_UART_CLK_IN_HZ, | ^~~~~~~~~~~~~~~~~~ plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:136:9: error: too few arguments to function 'console_imx_uart_register' 136 | console_imx_uart_register(IMX_BOOT_UART_BASE, IMX_BOOT_UART_CLK_IN_HZ, | ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:26: plat/imx/common/include/imx_uart.h:14:5: note: declared here 14 | int console_imx_uart_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud, | ^~~~~~~~~~~~~~~~~~~~~~~~~ make: *** [Makefile:1347: …/DistroKit/platform-v8a/build-target/tf-a-v2.8/build/imx8mq/release/bl31/imx8mq_bl31_setup.o] Error 1 make: *** Waiting for unfinished jobs.... make: Leaving directory '…/DistroKit/platform-v8a/build-target/tf-a-v2.8' make: *** [/usr/lib/x86_64-linux-gnu/ptxdist/ptxdist-2023.12.0/rules/tf-a.make:81: …/DistroKit/platform-v8a/state/tf-a.compile] Error 2 I first dismissed it as some hickup between make and the override, but the error is actually totally valid and the version with IMX_BOOT_UART_BASE=0 instead of IMX_BOOT_UART_BASE=auto would have silently broken support for i.MX8MQ, because the automatic UART discovery is not implemented yet for that SoC. @Marco: do you know why auto discovery was not implemented for i.MX8MQ along with the others? Leonard