Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BFF22C61DA4 for ; Thu, 9 Mar 2023 16:22:40 +0000 (UTC) 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) 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 Content-Transfer-Encoding: 8bit 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 * -- 2.34.1