From patchwork Thu Mar 9 16:22:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1754710 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=kzM66Vv8; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PXZGM3s71z2469 for ; Fri, 10 Mar 2023 03:22:33 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 96D2185A1E; Thu, 9 Mar 2023 17:22:21 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="kzM66Vv8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1190485CA2; Thu, 9 Mar 2023 17:22:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BFFDB859CD for ; Thu, 9 Mar 2023 17:22:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x82c.google.com with SMTP id z6so2628477qtv.0 for ; Thu, 09 Mar 2023 08:22:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1678378934; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=oT94CZSz1yo5firmV7xPxR8zC+ykstVurq2OxtVeah0=; b=kzM66Vv8xekWrH5J8POv4hIqGAw3Ha6lC0vLFmlDby2JKZFSpg+YNAG9Yw+fSjGWct /DjIntGS05crCYjMITIvcH0ZXulq1r/k+6EmBECm8opTpFbx1T+jBlbIiVIcccXJh4CF WYo/Mk92uh38Ex/JDd0MWIKuiWv2hhzkH1isE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678378934; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oT94CZSz1yo5firmV7xPxR8zC+ykstVurq2OxtVeah0=; b=iVQVyAbSSgDn94mBJsrUxk+zVuvHziiBv00YUfY+7Og8LXY2Peszi2ZTlJ0S2P/Io5 pVIz08MDllGboX6iyrBYzm9zG7n0/3OVucrMQ9XRWHy63T00CuySx1VtfeMWAKhpdSr1 YEeUXNR1KR7mS+vdsI5bO6AhZT0AsDvxLrKJSkFd+660/zryxxk322+p9IQPrR9PRpQb TIvbpXE/vbNnhfMluDwu/lRrZWdVVZfh7PQcIsbfV1hDU6SpAofdTYAGlzuVzv8rFEP+ R6/7rjb9TJC44YCisIZw/TWmqvQzoQYvfdgJFdl42QzHuAo1id76jYY+fb669yCa7j02 JwWg== X-Gm-Message-State: AO0yUKVTxPz/sYl36W98sJjuyvNDlh+Q4RIk6zICrqjBB/S4Ouryzs1v MyAmmAL98h4KSRjmJVR2l/aTjBKRyTKiuqjpt2jpvQ== X-Google-Smtp-Source: AK7set9QXwV/cJueoYdMJ0eUweLVActmAVUcArDjClQF5bxtyRQmKsYap69agRbWKQDIvA0R63+n7w== X-Received: by 2002:ac8:5f8b:0:b0:3b8:6d3a:5ed4 with SMTP id j11-20020ac85f8b000000b003b86d3a5ed4mr38810960qta.67.1678378934274; Thu, 09 Mar 2023 08:22:14 -0800 (PST) Received: from bill-the-cat.lan (2603-6081-7b00-6400-0000-0000-0000-036b.res6.spectrum.com. [2603:6081:7b00:6400::36b]) by smtp.gmail.com with ESMTPSA id r145-20020a37a897000000b0073b69922cfesm13828287qke.85.2023.03.09.08.22.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 08:22:13 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 1/6] arm: Correct cpu_reset function prototype on some platforms Date: Thu, 9 Mar 2023 11:22:07 -0500 Message-Id: <20230309162212.2096573-1-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Some platforms were not including which sets the prototype for reset_cpu, and in turn had it set wrong. Correct these cases. Signed-off-by: Tom Rini --- arch/arm/mach-hpe/gxp/reset.c | 3 ++- arch/arm/mach-mediatek/mt7981/init.c | 3 ++- arch/arm/mach-mediatek/mt7986/init.c | 3 ++- board/armltd/corstone1000/corstone1000.c | 3 ++- board/bosch/acc/acc.c | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-hpe/gxp/reset.c b/arch/arm/mach-hpe/gxp/reset.c index ce018a35d94d..a147bcac18bd 100644 --- a/arch/arm/mach-hpe/gxp/reset.c +++ b/arch/arm/mach-hpe/gxp/reset.c @@ -7,6 +7,7 @@ * Author: Jean-Marie Verdun */ +#include #include #define GXP_CCR 0xc0000000 @@ -16,7 +17,7 @@ void lowlevel_init(void) { } -void reset_cpu(ulong ignored) +void reset_cpu(void) { writel(1, GXP_CCR); diff --git a/arch/arm/mach-mediatek/mt7981/init.c b/arch/arm/mach-mediatek/mt7981/init.c index d8b10f035808..3c921d6ad5cc 100644 --- a/arch/arm/mach-mediatek/mt7981/init.c +++ b/arch/arm/mach-mediatek/mt7981/init.c @@ -4,6 +4,7 @@ * Author: Sam Shih */ +#include #include #include #include @@ -19,7 +20,7 @@ int dram_init(void) return 0; } -void reset_cpu(ulong addr) +void reset_cpu(void) { psci_system_reset(); } diff --git a/arch/arm/mach-mediatek/mt7986/init.c b/arch/arm/mach-mediatek/mt7986/init.c index fb74b2f34d7b..9d0c0cdcd08f 100644 --- a/arch/arm/mach-mediatek/mt7986/init.c +++ b/arch/arm/mach-mediatek/mt7986/init.c @@ -4,6 +4,7 @@ * Author: Sam Shih */ +#include #include #include #include @@ -19,7 +20,7 @@ int dram_init(void) return 0; } -void reset_cpu(ulong addr) +void reset_cpu(void) { psci_system_reset(); } diff --git a/board/armltd/corstone1000/corstone1000.c b/board/armltd/corstone1000/corstone1000.c index 4f4b96a095c2..6ec8e6144fb4 100644 --- a/board/armltd/corstone1000/corstone1000.c +++ b/board/armltd/corstone1000/corstone1000.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -86,6 +87,6 @@ int dram_init_banksize(void) return 0; } -void reset_cpu(ulong addr) +void reset_cpu(void) { } diff --git a/board/bosch/acc/acc.c b/board/bosch/acc/acc.c index 770ca8b711b0..4a0603d0f3f6 100644 --- a/board/bosch/acc/acc.c +++ b/board/bosch/acc/acc.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -720,7 +721,7 @@ int board_fit_config_name_match(const char *name) return -1; } -void reset_cpu(ulong addr) +void reset_cpu(void) { puts("Hanging CPU for watchdog reset!\n"); hang(); From patchwork Thu Mar 9 16:22:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1754711 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=p14c+olU; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PXZGV3qzqz2469 for ; Fri, 10 Mar 2023 03:22:42 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A729985BE9; Thu, 9 Mar 2023 17:22:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="p14c+olU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7180685D80; Thu, 9 Mar 2023 17:22:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 692CC85A1E for ; Thu, 9 Mar 2023 17:22:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x82d.google.com with SMTP id s12so2514308qtq.11 for ; Thu, 09 Mar 2023 08:22:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1678378935; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=YLjknFDX2ljEdg68iMGvy64YWnuuikEOVjLem+pu2bo=; b=p14c+olUMBa1G1SxuouJeZzF/XSOJM1Z3lXAv9GdgBlOk8IX9tLcAgtO6vOjGdA6Xh 7aJo8vupy2RuAgvyu/xJbUvYnSVL4IzcXXJf3Hq4TwhliNeO5+PWyuqpvgLVDSEKW8XR w9hxrmvQEO3Y31emE8pTwj4Las2gfVbyR9aCg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678378935; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YLjknFDX2ljEdg68iMGvy64YWnuuikEOVjLem+pu2bo=; b=EJKFtpN8bdZF0rbIK37fxu6j36ihdnicTURR0W2Wj19Nr8no/3R5UbOR9wYvvn7xTj TgtU5Xz3x0jVuQnI8cuk4KCiblhv8xlKOVy4RW4wedLdInshJnkLtaownhM0ew9Z+liq s3Y4jGEHqMSnAWRiExb6L57M23NxP+Jdbdc28QReGvo4kJiCXkLKg9fjIdYFZftW0ItE AcDjTgC6qYUzJAac+H6KIPdHfNDUVSpzEYVRvrMsMqvfQ+XjKAY072/ezDO9HsMj6eop 8SWXjSbFvlnQlGsShn401wGNgjOyYoGm+CJwuvJpnLYm6uRfh7577yEu+hamgj5WWY2w 8uXQ== X-Gm-Message-State: AO0yUKXuUAnhrrIROHKggKzAaJDe4n05UBulkVlKjuEZV+DTvhZjhAnZ IS0lClJH9SXAVV8P+GON+I3hcP1ty4UEJK5u3c0W/w== X-Google-Smtp-Source: AK7set8hcMKMyRQw3XHn7FTv6dkhITrS98l4fU1AwTIIs5cW3Cv82cObuYENamL3BQBwAxr5Zg/0BA== X-Received: by 2002:ac8:5793:0:b0:3b6:5d23:8748 with SMTP id v19-20020ac85793000000b003b65d238748mr37886900qta.52.1678378935027; Thu, 09 Mar 2023 08:22:15 -0800 (PST) Received: from bill-the-cat.lan (2603-6081-7b00-6400-0000-0000-0000-036b.res6.spectrum.com. [2603:6081:7b00:6400::36b]) by smtp.gmail.com with ESMTPSA id r145-20020a37a897000000b0073b69922cfesm13828287qke.85.2023.03.09.08.22.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 08:22:14 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 2/6] spl: Add function prototype for spl_mmc_get_uboot_raw_sector Date: Thu, 9 Mar 2023 11:22:08 -0500 Message-Id: <20230309162212.2096573-2-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230309162212.2096573-1-trini@konsulko.com> References: <20230309162212.2096573-1-trini@konsulko.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean We did not add a prototype for spl_mmc_get_uboot_raw_sector to include/spl.h before, so add and document one now. Correct the incorrect prototype in board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c and ensure that we have spl.h where we define a non-weak spl_mmc_get_uboot_raw_sector as well. Signed-off-by: Tom Rini --- arch/arm/mach-imx/image-container.c | 1 + board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c | 3 ++- include/spl.h | 13 +++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/image-container.c b/arch/arm/mach-imx/image-container.c index 06ee608c4a46..5b059a64292e 100644 --- a/arch/arm/mach-imx/image-container.c +++ b/arch/arm/mach-imx/image-container.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c b/board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c index 34109c69ddbd..09e63e052100 100644 --- a/board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c +++ b/board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c @@ -208,7 +208,8 @@ int board_late_init(void) #ifdef CONFIG_SPL_MMC #define UBOOT_RAW_SECTOR_OFFSET 0x40 -unsigned long spl_mmc_get_uboot_raw_sector(struct mmc *mmc) +unsigned long spl_mmc_get_uboot_raw_sector(struct mmc *mmc, + unsigned long raw_sector) { u32 boot_dev = spl_boot_device(); diff --git a/include/spl.h b/include/spl.h index 827bd25c8839..a6cec91f1845 100644 --- a/include/spl.h +++ b/include/spl.h @@ -466,6 +466,19 @@ int spl_mmc_emmc_boot_partition(struct mmc *mmc); void spl_set_bd(void); +/** + * spl_mmc_get_uboot_raw_sector() - Provide raw sector of the start of U-Boot + * + * This is a weak function which by default will provide the raw sector that is + * where the start of the U-Boot image has been written to. + * + * @mmc: struct mmc that describes the devie where U-Boot resides + * @raw_sect: The raw sector number where U-Boot is by default. + * Return: The raw sector location that U-Boot resides at + */ +unsigned long spl_mmc_get_uboot_raw_sector(struct mmc *mmc, + unsigned long raw_sect); + /** * spl_set_header_raw_uboot() - Set up a standard SPL image structure * From patchwork Thu Mar 9 16:22:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1754712 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=AEQ6ZBU5; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PXZGk6Z9Wz2469 for ; Fri, 10 Mar 2023 03:22:54 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 21B8C85B78; Thu, 9 Mar 2023 17:22:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="AEQ6ZBU5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 913D285CA2; Thu, 9 Mar 2023 17:22:22 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0A18C85AB0 for ; Thu, 9 Mar 2023 17:22:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x82f.google.com with SMTP id c3so2531064qtc.8 for ; Thu, 09 Mar 2023 08:22:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1678378936; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=QQNWSO4TdpdiG71pTFxetIxKtOsqpnbkxms7xYp/nNg=; b=AEQ6ZBU5hte4HNqHDkz3+ugawj77M5mj3hp3NdQNMznvWAH2FY7JU5xxi4EryzGnZG f7wAWG+194SLd/XN+CPFGGjjUaFwcCgXyRzPm5mYshrjnbXTCJC39jtsgCTCweATf7Cb R3asg2HO+IjL8YKAn+Ifda3kgf0itFfxynfXk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678378936; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QQNWSO4TdpdiG71pTFxetIxKtOsqpnbkxms7xYp/nNg=; b=6yW5Q3HqiJGyO+qt/il4LzZ3EGn2Y9jpyLw19AUgVYgjEzY6CArAY6vEJ9ynqNuvbL mYJ3XAxno8vHCCugP35F91DTIwXyxrVE6XFdeBd/BYcZKMQLaHjgqIVxGLBoRKBQMaQj 0Mnlepvp5AeuJl7yGJ6/NH/nFKi3jHy60f1B7BhvGzovxsICII/FkQgxwHHq5FIhWszJ 4OHeJce0CZKZVwkRON3I7cGd44RLfN1ytG0LTApT6twveL7FV63qP8Umo+GlJifBIS0P Ai7TK7AO0ivx9jkPf5ASu7Xs4QNbvkK/oRLzrd78qgrkfhtH2WNfZf33M5gWnh3iVaWy Pqyg== X-Gm-Message-State: AO0yUKXCCmepUEeo1bYZ4whNcnbo+23TJMJjyikMJZMPAcPy/CXnnw8p stzB7VMxv6m2DZIyjY9PddtOO8T1bbfBZKzTyTKv3g== X-Google-Smtp-Source: AK7set/HYP78NXA1dZQefC3gLaK5DZOdRnz6a2xNpoReRMY26cLLyZ3OwznmVB0r1/mjaVkjULEnqw== X-Received: by 2002:a05:622a:24b:b0:3b9:b422:4d69 with SMTP id c11-20020a05622a024b00b003b9b4224d69mr40866769qtx.39.1678378935772; Thu, 09 Mar 2023 08:22:15 -0800 (PST) Received: from bill-the-cat.lan (2603-6081-7b00-6400-0000-0000-0000-036b.res6.spectrum.com. [2603:6081:7b00:6400::36b]) by smtp.gmail.com with ESMTPSA id r145-20020a37a897000000b0073b69922cfesm13828287qke.85.2023.03.09.08.22.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 08:22:15 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 3/6] examples: Don't use LTO for hello_world Date: Thu, 9 Mar 2023 11:22:09 -0500 Message-Id: <20230309162212.2096573-3-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230309162212.2096573-1-trini@konsulko.com> References: <20230309162212.2096573-1-trini@konsulko.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean If we're building U-Boot with LTO, we don't want to use that for examples as it's more work than required. Signed-off-by: Tom Rini Reviewed-by: Simon Glass --- examples/standalone/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile index 5b48a9d43c62..559170dd5c97 100644 --- a/examples/standalone/Makefile +++ b/examples/standalone/Makefile @@ -29,6 +29,10 @@ targets += $(patsubst $(obj)/%,%,$(LIB)) $(COBJS) $(LIBOBJS-y) LIBOBJS := $(addprefix $(obj)/,$(LIBOBJS-y)) ELF := $(addprefix $(obj)/,$(ELF)) +# Disable LTO for these builds +CFLAGS_REMOVE_hello_world.o := $(LTO_CFLAGS) +CFLAGS_REMOVE_stubs.o := $(LTO_CFLAGS) + # For PowerPC there's no need to compile standalone applications as a # relocatable executable. The relocation data is not needed, and # also causes the entry point of the standalone application to be From patchwork Thu Mar 9 16:22:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1754713 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=HB78R8oD; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PXZGz5qKjz2469 for ; Fri, 10 Mar 2023 03:23:07 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2C9DF85E8E; Thu, 9 Mar 2023 17:22:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="HB78R8oD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 07FB385AB0; Thu, 9 Mar 2023 17:22:23 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com [IPv6:2607:f8b0:4864:20::f32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C4FDC85B84 for ; Thu, 9 Mar 2023 17:22:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qv1-xf32.google.com with SMTP id nv15so1755945qvb.7 for ; Thu, 09 Mar 2023 08:22:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1678378936; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=inRi1LEWJJ1q6M+OzG8GaiRT/CYCzlsGklO6nI/riiw=; b=HB78R8oDT6yT9wvlIPTSlR5SnAiwNsUmDF42xkudW84p2Q4hLMKZWfKQD0Rsq/Q42W YmezkJtp5wONfUP0a9pLtkd/bKe1Vp3DyBYtR15EHNt1ocUETmGaAEymouGztpWRRaU/ SaB5BDnqCcwcIynhs4jJazLYi7/czqMRkj074= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678378936; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=inRi1LEWJJ1q6M+OzG8GaiRT/CYCzlsGklO6nI/riiw=; b=GtTs2nCObwqSRyOGq+kkQQorkSmG0lNbw41eGhU12ZZuPAf/Slyomcgm01wpUEDkbr ji4EpXkjpwULPHr17gKimN/h4yqzgPD5LAKm3dSfQsospTDS0wYamUZ4k3lgwGJEWZDT QmM9snBibHvDcVf4NAAyZMnFZOJcv9BikEja4PqS7ILpWbRmYHgh6G0yBfKOdBglU4JP 1v6TobvMZWfgaDLvCN3pNTfAjxH5QfxY8NszVBP4xMiwyGTFjhaBwhWMdjczi3YlftrK Q0kLNcDPyKMHRLL8KvR4Vx7hHKng3demFAq7fnA36RcKqdXF/Gn6E8bV/uV++Zv+k4oa UcYQ== X-Gm-Message-State: AO0yUKX7rnbLYH/a9N2S5cPqO7lDCfUKzh/+55jLQPfvUP0h/eE+QALn M2n8xXqP2xZFpnz7/nhVkswqUD6NZGwemjQ82b0aUQ== X-Google-Smtp-Source: AK7set+6qxEn/JJ4ML0OOymW2CIAsiGpsY83OKWLo/GQ+tTJSJSaS5pLyLPAJYGHOKTYt4K77Hc+7g== X-Received: by 2002:a05:6214:258a:b0:569:abb6:f09 with SMTP id fq10-20020a056214258a00b00569abb60f09mr40957645qvb.40.1678378936377; Thu, 09 Mar 2023 08:22:16 -0800 (PST) Received: from bill-the-cat.lan (2603-6081-7b00-6400-0000-0000-0000-036b.res6.spectrum.com. [2603:6081:7b00:6400::36b]) by smtp.gmail.com with ESMTPSA id r145-20020a37a897000000b0073b69922cfesm13828287qke.85.2023.03.09.08.22.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 08:22:16 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Cc: "Ying-Chun Liu (PaulLiu)" Subject: [PATCH 4/6] compulab: imx8mm-cl-iot-gate: Fix some function declarations in eeprom_spl.c Date: Thu, 9 Mar 2023 11:22:10 -0500 Message-Id: <20230309162212.2096573-4-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230309162212.2096573-1-trini@konsulko.com> References: <20230309162212.2096573-1-trini@konsulko.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean We have a few places here we the function declarations do not match their prototypes in another header, correct them. Signed-off-by: Tom Rini --- Cc: "Ying-Chun Liu (PaulLiu)" --- board/compulab/imx8mm-cl-iot-gate/eeprom_spl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/compulab/imx8mm-cl-iot-gate/eeprom_spl.c b/board/compulab/imx8mm-cl-iot-gate/eeprom_spl.c index 90cc33a6e460..b8573aaac283 100644 --- a/board/compulab/imx8mm-cl-iot-gate/eeprom_spl.c +++ b/board/compulab/imx8mm-cl-iot-gate/eeprom_spl.c @@ -101,7 +101,7 @@ u32 cl_eeprom_set_ddrinfo(u32 ddrinfo) return board_ddrinfo; }; -u8 cl_eeprom_get_subind(void) +u32 cl_eeprom_get_subind(void) { if (cl_eeprom_read(BOARD_DDRSUBIND_OFFSET, (uchar *)&board_ddrsubind, BOARD_DDRSUBIND_SIZE)) return 0xff; @@ -109,7 +109,7 @@ u8 cl_eeprom_get_subind(void) return board_ddrsubind; }; -u8 cl_eeprom_set_subind(u8 ddrsubind) +u32 cl_eeprom_set_subind(u32 ddrsubind) { if (cl_eeprom_write(BOARD_DDRSUBIND_OFFSET, (uchar *)&ddrsubind, BOARD_DDRSUBIND_SIZE)) return 0xff; From patchwork Thu Mar 9 16:22:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1754714 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=SouRwECk; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PXZHD5F41z2469 for ; Fri, 10 Mar 2023 03:23:20 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A693785E72; Thu, 9 Mar 2023 17:22:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="SouRwECk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 54E5E85B84; Thu, 9 Mar 2023 17:22:24 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 983D385B78 for ; Thu, 9 Mar 2023 17:22:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x82f.google.com with SMTP id c3so2531152qtc.8 for ; Thu, 09 Mar 2023 08:22:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1678378937; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=p36zz1Fp9dUF9j0B5lhdxJVxLtDPGt2NXDHjIks+bSE=; b=SouRwECkJXQtVQ5cLveW9w1dL5opLhh3H6AOfeilgrSUtIs1TScuhXX/o+TPnXg0LL 8rWEV8rQ51ZvIq22XvlHwbR9R/+HYaw2UT/rjuLrKeE4Tlsc1yThprlPF8EZUnou3GZJ sRTm3EWTevLL7QQ2dCQb/yMeojep9TxIwmCXw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678378937; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p36zz1Fp9dUF9j0B5lhdxJVxLtDPGt2NXDHjIks+bSE=; b=oEXwT1OENnkYlz2rWIwzLhJ4yZrYTkM0qjtzuhRs4TaZoRoD6zYUYR9mDj6rbn6g4r AEqyJU9NE/HYzYt2di527nPbV5emfq/8r4OytrXpER5Q24OsiDvoFC3L+/MUkHHQTsfH 6RW9Zj+bn0daW+VDnvtWDPC4k2ZdrPRcNXWz2mT2RmbQLHDkTEdBlkpPcZZn6JeP2fJR YP01MVLPladcm2tVmcC9tGO+gbQXhua2snebjVECdDkYgbc5gZJS0n2BE3mO7nmmOYeG GFE+RUQX3qzwlHA8wlH2h/bXFLeo3ii5jaJDhWWypxOq4qKW9y8Qx4ZCxvR5O/1QdA4Q jnrw== X-Gm-Message-State: AO0yUKUAGMJtF0kkSdnQGxtZcbgW4aNchu+D0hRmN5Os/Er8/QHn3SBU DeA1M98Sn13NlVSwEmY6/05FEf9WnGf5MpzEh9i7+w== X-Google-Smtp-Source: AK7set+52QvNX2LVF+AC/QreWp827Bl4zttidX2YAFHLvchJdK354eRP2EDFSRiIfbJypa8MoXSEcw== X-Received: by 2002:a05:622a:5c6:b0:3b5:5234:e895 with SMTP id d6-20020a05622a05c600b003b55234e895mr28626874qtb.15.1678378937048; Thu, 09 Mar 2023 08:22:17 -0800 (PST) Received: from bill-the-cat.lan (2603-6081-7b00-6400-0000-0000-0000-036b.res6.spectrum.com. [2603:6081:7b00:6400::36b]) by smtp.gmail.com with ESMTPSA id r145-20020a37a897000000b0073b69922cfesm13828287qke.85.2023.03.09.08.22.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 08:22:16 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Cc: Angus Ainslie , kernel@puri.sm Subject: [PATCH 5/6] purism: librem5: Fix a function declaration in spl.c Date: Thu, 9 Mar 2023 11:22:11 -0500 Message-Id: <20230309162212.2096573-5-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230309162212.2096573-1-trini@konsulko.com> References: <20230309162212.2096573-1-trini@konsulko.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Here we implement usb_gadget_handle_interrupts() but did not include so did not have the declaration correct. Fix this and add the missing include. Signed-off-by: Tom Rini --- Cc: Angus Ainslie Cc: kernel@puri.sm --- board/purism/librem5/spl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/board/purism/librem5/spl.c b/board/purism/librem5/spl.c index 1a203b459990..90f1fcf415f3 100644 --- a/board/purism/librem5/spl.c +++ b/board/purism/librem5/spl.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "librem5.h" DECLARE_GLOBAL_DATA_PTR; @@ -417,7 +418,7 @@ out: return rv; } -int usb_gadget_handle_interrupts(void) +int usb_gadget_handle_interrupts(int index) { dwc3_uboot_handle_interrupt(0); return 0; From patchwork Thu Mar 9 16:22:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1754715 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=lk4Js7M7; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PXZHS6wYRz2469 for ; Fri, 10 Mar 2023 03:23:32 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F32ED85EA5; Thu, 9 Mar 2023 17:22:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="lk4Js7M7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4E3D385AB0; Thu, 9 Mar 2023 17:22:27 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id F1AB285C5A for ; Thu, 9 Mar 2023 17:22:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x831.google.com with SMTP id r16so2531713qtx.9 for ; Thu, 09 Mar 2023 08:22:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1678378937; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Hl2LSJUmuk9UrlQSKYfYFrt8ALBJ+ODLZB4lzkXSJYE=; b=lk4Js7M7oX/xHF+1aVb6q6nHp30jjl+9hImEGoiRAm2ekn9ZJVLBbb4DVUjr2KkG8I H0M2ohY/sYpgchrZLPPQG95KpGoBSlE8rek2276Svdp9Zr+4w5kld7Wf6F09XLkKUONI R21Fc7984uc4VrpMudKF9bx2h5wZP1+AqolJw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678378937; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Hl2LSJUmuk9UrlQSKYfYFrt8ALBJ+ODLZB4lzkXSJYE=; b=dKY3z8lShqcmjhVPkdHtgmKyeE9EDPynpDrYDsbyeFysKRIuWTXfnFVt3RUQhwYtoK dQl6i3JudXngqldPMl5a6kXSK1J86Fl4qZCDk04ZONO9d2mnYj+BKSBeaEDZJFtfP6a6 4n/U+JgqAIHgfLnRpAoiNCkll7A9n1pDZCjNCtxs3zhZ8YKP8/PsKlnUn1yR2p2LUruj FZW85CyOk6/8e4pcBsd2Pcqbx0ySqPXk2Qn38qsMWiIjg9gqZbfanW9GuVQ/m5HcV3g6 He6cA//CNAYydKXOjbeOLMxYZRpMdYqS/vDTGJ3tx+lBM4czNUknTU0o88+2sPLEUaJt vAaw== X-Gm-Message-State: AO0yUKXbNFnxTb5FrEt7zAKR70vx8ylHman5sUkHhqK+CFFD5DB3uGgj IRLUDi80pkImz6CwYd68xPGLYIVdQKgTuNP0UUZuEA== X-Google-Smtp-Source: AK7set/pg9ycCxn2FD5ehRH78WJJJamh+tC5+sU4jjD0tLCTSNtcR/PtlndbAHVjroQOXcHZvM0RrA== X-Received: by 2002:a05:622a:1b9e:b0:3bd:db4:b967 with SMTP id bp30-20020a05622a1b9e00b003bd0db4b967mr39731955qtb.58.1678378937627; Thu, 09 Mar 2023 08:22:17 -0800 (PST) Received: from bill-the-cat.lan (2603-6081-7b00-6400-0000-0000-0000-036b.res6.spectrum.com. [2603:6081:7b00:6400::36b]) by smtp.gmail.com with ESMTPSA id r145-20020a37a897000000b0073b69922cfesm13828287qke.85.2023.03.09.08.22.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 08:22:17 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 6/6] RFC: arm: Enable LTO by default Date: Thu, 9 Mar 2023 11:22:12 -0500 Message-Id: <20230309162212.2096573-6-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230309162212.2096573-1-trini@konsulko.com> References: <20230309162212.2096573-1-trini@konsulko.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean At this point, we have had wide enough testing of LTO on ARM platforms that we hope to have covered all of the issues that linking in manner exposes in terms of run-time failures. Note that on 32bit ARM we must use our private libgcc in order to ensure that we do not have a size mismatch over wchar_t, and we're missing some thumb1 assembly functions for LTO to be usable in that case. Enable this by default, on ARM. Signed-off-by: Tom Rini --- This is not yet ready to go. As noted in this[0] thread there's some issues with weak functions. In addition, platforms such as socfpga_n5x_vab (and _atf) have their SPL grow and meesc_dataflash grows itself. This seems to be in part due to how the sha1_process_one/sha256_process_one abstractions interact with LTO. There might be more issues like this, but it's harder to spot just due to how LTO will essentially inline a large number of functions. Further, my pine64_plus fails to boot with LTO and loops on: U-Boot SPL 2023.04-rc3-00196-gbe79da84c30b-dirty (Mar 08 2023 - 16:10:56 -0500) DRAM: 1024 MiB Trying to boot from MMC1 Trying to boot from MMC1 (repeats) So this very much isn't ready for everyone, just yet. [0]: https://lore.kernel.org/u-boot/783cfab5-feb0-1148-f4be-125195275c98@gmx.de/ --- Kconfig | 2 ++ configs/qemu_arm_defconfig | 1 + 2 files changed, 3 insertions(+) diff --git a/Kconfig b/Kconfig index a75cce7e28fb..14693a92c1b3 100644 --- a/Kconfig +++ b/Kconfig @@ -121,6 +121,8 @@ config ARCH_SUPPORTS_LTO config LTO bool "Enable Link Time Optimizations" depends on ARCH_SUPPORTS_LTO + select USE_PRIVATE_LIBGCC if ARM && !ARM64 + default y if ARM && !(SYS_THUMB_BUILD || SPL_SYS_THUMB_BUILD) help This option enables Link Time Optimization (LTO), a mechanism which allows the compiler to optimize between different compilation units. diff --git a/configs/qemu_arm_defconfig b/configs/qemu_arm_defconfig index aa6bf931b5fd..820f78e76311 100644 --- a/configs/qemu_arm_defconfig +++ b/configs/qemu_arm_defconfig @@ -16,6 +16,7 @@ CONFIG_SYS_LOAD_ADDR=0x40200000 CONFIG_ENV_ADDR=0x4000000 CONFIG_DEBUG_UART=y CONFIG_AHCI=y +# CONFIG_LTO is not set CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y