From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 16 Jan 2024 12:08:58 +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 1rPhJR-001n2H-1g for lore@lore.pengutronix.de; Tue, 16 Jan 2024 12:08:58 +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 1rPhJS-0003oH-AI; Tue, 16 Jan 2024 12:08:58 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rPhJP-0003nw-US; Tue, 16 Jan 2024 12:08:55 +0100 Received: from [2a0a:edc0:2:b01:1d::c0] (helo=ptx.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rPhJP-000EAJ-I6; Tue, 16 Jan 2024 12:08:55 +0100 Received: from mfe by ptx.whiteo.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1rPhJP-000BaF-Fg; Tue, 16 Jan 2024 12:08:55 +0100 Date: Tue, 16 Jan 2024 12:08:55 +0100 From: Marco Felsch To: Leonard =?utf-8?B?R8O2aHJz?= Message-ID: <20240116110855.i4hyzs5y57fxn3a6@pengutronix.de> References: <20240111150117.3678555-1-l.goehrs@pengutronix.de> <20240111150117.3678555-2-l.goehrs@pengutronix.de> <1a1688bb-0ceb-467d-8dad-45a53005edf6@pengutronix.de> <02dd393b-2737-4c16-8cdb-de3203a47256@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <02dd393b-2737-4c16-8cdb-de3203a47256@pengutronix.de> User-Agent: NeoMutt/20180716 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: , Cc: distrokit@pengutronix.de, Ahmad Fatoum 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 Leonard, On 24-01-16, Leonard Göhrs wrote: > 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? I didn't enable it for i.MX8MQ since I couldn't test it. Regards, Marco > > Leonard >