Message ID | 20221122175452.473845-2-sean.anderson@seco.com |
---|---|
State | Accepted |
Commit | 0db588caf99821b616169a7888d8a9515604940c |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> 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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=seco.com header.i=@seco.com header.a=rsa-sha256 header.s=selector1 header.b=JgCmitOj; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4NGsP50v5Mz23nn for <incoming@patchwork.ozlabs.org>; Wed, 23 Nov 2022 04:55:36 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 63A17854A7; Tue, 22 Nov 2022 18:55:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=seco.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=seco.com header.i=@seco.com header.b="JgCmitOj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 49C27850D1; Tue, 22 Nov 2022 18:55:18 +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_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0619.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe02::619]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DDA8485480 for <u-boot@lists.denx.de>; Tue, 22 Nov 2022 18:55:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=seco.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sean.anderson@seco.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V1yYq2PcOVOPN0DI2ztSwpN8sahoXpMKy6sx8Uw+HoQ1tAAYoITO5MAf/BaTcefKmeh3mCJP2IHOwudzeOX4a9RUy5Whj4pqAbUk6ossW5qypWIDQLrxs1LyLInAZdoVOztkSJ2uJTiVsOPvIjr+YH8kIC/pVuS6Q8qHVnPg1nemuoqQm4JLhtaNI03RHH2NMWU8TGsTQz9lu5ArKsaTMHNPlD2YqV98NHRiUlaMERIov7jnsIZv353fYSHzOSHKdrFUIQGUcpa6oRlJuEJBsdQ4eUcd1WF0cbOyzCS/iPLnnLyV/AljXODS1SGmQ43QRh+GXVwag3M75BIV/yWPXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=R5W3TMxKN6CWyKTEMl4NWGlUB4PmVZzrjB0+Tk9ryps=; b=lwgUMhthZVJLIaAYPnyrIGhzoQbI5hoQ9ENPVC1ikZKwCuj7c6Zcj+tsg8TC2j/JXCBA3kiBR1gTuBIsPIjylCJV0rC8XaAr6uof/y0b0MXq0XMHhKC0q2anzjrwjO79082QuGGILperKAdqpWMZO70hsGas86zkgfHPEnYCFEPq8LmeUiLL6syuOLskiMNboYDyPLWmgfVUMmkzRGqQjkNZMS+m4ogKwYYkdE3xfEMonqhqWb0xQnMBnNfOxKqtSeTvvVkjTPn9RdeLxo2gOLDqNgdG1pWNnm/5DaMgAA5dRLboJs5Wk4XbE82TbcwK3SJ9o5xHV6Nn305z2wTjWg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=R5W3TMxKN6CWyKTEMl4NWGlUB4PmVZzrjB0+Tk9ryps=; b=JgCmitOj60XxNv2bVkrfoKGW5yGtXx1Jg0bKb10wlnGyk4UhOEDqypRCs5Wv5HgyhJw5eRHYxWMdCTI6VwqkGtRwB4GzSYuLCRtwoyn8o/eFAb7dkvAEU4nz6QovMkZwFF07CsqSVp2MPp7MlIsh2d0UtCotfW14zIJBlNye8jgyq5vqnuP3yWe74S2p8nZtGIe9VrJ0NxzaPCu1sjzPfE2r24X0jvYmcW7ko1xA5nwFJDTAq0XpvHS9bq1LNMaN8+cASAVaMBL51/vF5LFLmZIxbPW7qYTNU2S1Sa/pOCC1xlmMtlUeiSyoApyn+2zfPeqDtky1c1wFFgDkV+CSTg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB9PR03MB8847.eurprd03.prod.outlook.com (2603:10a6:10:3dd::13) by GV1PR03MB8494.eurprd03.prod.outlook.com (2603:10a6:150:8d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.11; Tue, 22 Nov 2022 17:55:14 +0000 Received: from DB9PR03MB8847.eurprd03.prod.outlook.com ([fe80::2b95:1fe4:5d8f:22fb]) by DB9PR03MB8847.eurprd03.prod.outlook.com ([fe80::2b95:1fe4:5d8f:22fb%7]) with mapi id 15.20.5834.015; Tue, 22 Nov 2022 17:55:13 +0000 From: Sean Anderson <sean.anderson@seco.com> To: u-boot@lists.denx.de, Tom Rini <trini@konsulko.com> Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>, Simon Glass <sjg@chromium.org>, Sean Anderson <sean.anderson@seco.com>, Bin Meng <bmeng.cn@gmail.com> Subject: [PATCH v4 1/2] x86: fsp: Only compile fsp_save_s3_stack if (SPL_)DM_RTC is enabled Date: Tue, 22 Nov 2022 12:54:51 -0500 Message-Id: <20221122175452.473845-2-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20221122175452.473845-1-sean.anderson@seco.com> References: <20221122175452.473845-1-sean.anderson@seco.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MN2PR20CA0055.namprd20.prod.outlook.com (2603:10b6:208:235::24) To DB9PR03MB8847.eurprd03.prod.outlook.com (2603:10a6:10:3dd::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR03MB8847:EE_|GV1PR03MB8494:EE_ X-MS-Office365-Filtering-Correlation-Id: 104ee29b-4c96-493d-972b-08daccb2b4e2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2qC8DeQofPrcLIo2YVNq/LVSCFgOQpow2+KRqM60Le2OQlavXY17Do/oQuTezIANRoPaZfmaHF+GQYfLr8QuVv0yio5wgZ/N4N4juu2QArBSZuJ0daoz7mDQxKpwEuR+8MDVrjjcZE17b1f17FeF+2spaQs6zb6wST39aE1ue5TQBDIlNJdSqWWLdRE4AG/053ltCcE77AUXbBRO1NbrEeHIh/cpYufE9Sr9OcxJuvicsgbab13j4iJvOY+U78NW8tFKL7ryFbrqliO3IHh7t8P1wgnBEwu7CKeF8jUZkmDZwSXV4bL+L1t1+FZ1J6eAOgfGTSTz6pCzBFJn3XsS664cPzN/lHF/F3gUeQ396SjE36tchwVcAiqjN59vX4wUy3dsdPrpKfUNwPGG8Yd+xSrhXsmoQfwZKBFSpThb5QMDsGpJQEA0P3AivXkQ6kHP9hsRgMZ17Pkgoc4GJO+xt7XKohG/lxiigY5OFXPx+dZkTrTaKJEbo18L3dVwsGc+nHimzpBS6qsooEdHTnrqwErzJOwE0qKei6bflDaNbqn3etSyOcm1LlUamDYastjto/Lj3ARmQb/czK5BDJgwBUpsyPCXe2++85+3auJG9AcwE1H4egcOjJNgqWgqtA3vx18234kyogpscYzzh7NcFFjysioCLaAFwyARSfKA2Px9EYoZSA5yLbk2re2biNwvVbECOx5/TWO4uyICEt3B/g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR03MB8847.eurprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(376002)(366004)(396003)(136003)(39850400004)(346002)(451199015)(6916009)(66476007)(8936002)(44832011)(4326008)(8676002)(5660300002)(41300700001)(54906003)(316002)(83380400001)(6486002)(478600001)(6506007)(86362001)(2906002)(36756003)(26005)(66556008)(186003)(1076003)(2616005)(66946007)(6666004)(52116002)(38100700002)(38350700002)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8B83OjCoYJSY9Ck1epb4aW741pzOZM9yOGSvM186RGt0FpQe1jttn/m+f9qVlCLxjt2ZePufz++8yEBomhpY3G5xVnIMS8wLTCuUF/IBdwDpoZTpILkgyq6LEi90MBFh8DpyBUZl8Avhxg+voKYOOUnGyky7neOC1jXvj8WCcqO8gw9KQZy1EDUZ3B7Xhk76VHsXmSQ4gv+xnYVEy+GMiycO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KFuWL3XkErT5aTkUDkxNwGxsUWv1pFVkpZQ5NL31hj9t/q2w1Pg3UhRt/vWJfSF7HWr+9r1bSC3/0XPXfffREOZyQPGK6kCBeFLPn+EbJBuxnnU0ed08/vkq7FeUQkfvLl+oi/yt6mdv/f+p80z2e/tNeK3RaLHYgRxyI2cbyKdi2TZ29SCMmue9u7NwWDe9e/mnVAdWHtVewtrdECfQjQxeLusYcWkCdWrGRJW5aiJmnFAPmMG2vZ9ojDGGNwF6c0ueDulItVzilsz8faLFyRWJmlGSKBnf0SIFkNM8xVirNhdycMzfT2kPmakVG6arIk68zq6IbuzUw== X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: 104ee29b-4c96-493d-972b-08daccb2b4e2 X-MS-Exchange-CrossTenant-AuthSource: DB9PR03MB8847.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2022 17:55:13.9527 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9MhC8NDRX7gTYky2G8+yGndtZKXhnKYk5mc0/9woG6yotlPL8rL4H4vNcBJh9ES7RVHmnhvbVFPu0t8JMFPyBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR03MB8494 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean |
Series |
rtc: Add fallbacks for dm functions
|
expand
|
On Tue, Nov 22, 2022 at 12:54:51PM -0500, Sean Anderson wrote: > This function calls rtc_write32, which has a different signature > depending on if (SPL_)DM_RTC is enabled or not. This could result in a > mismatch in SPL if DM_RTC was enabled but SPL_DM_RTC, as the non-DM > declaration would still be used in SPL even though the implementation > would be for non-DM_RTC. We are switching to the correct definitions in > the next commit, so this will become a compilation error. Since > fsp_save_s3_stack is not called from SPL, avoid compiling it if > (SPL_)DM_RTC is disabled. > > Signed-off-by: Sean Anderson <sean.anderson@seco.com> Applied to u-boot/next, thanks!
diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c index 82f7d3ab5f..8f2977a807 100644 --- a/arch/x86/lib/fsp/fsp_common.c +++ b/arch/x86/lib/fsp/fsp_common.c @@ -61,6 +61,7 @@ void board_final_init(void) debug("OK\n"); } +#if CONFIG_IS_ENABLED(DM_RTC) int fsp_save_s3_stack(void) { struct udevice *dev; @@ -84,3 +85,4 @@ int fsp_save_s3_stack(void) return 0; } +#endif
This function calls rtc_write32, which has a different signature depending on if (SPL_)DM_RTC is enabled or not. This could result in a mismatch in SPL if DM_RTC was enabled but SPL_DM_RTC, as the non-DM declaration would still be used in SPL even though the implementation would be for non-DM_RTC. We are switching to the correct definitions in the next commit, so this will become a compilation error. Since fsp_save_s3_stack is not called from SPL, avoid compiling it if (SPL_)DM_RTC is disabled. Signed-off-by: Sean Anderson <sean.anderson@seco.com> --- Changes in v4: - Don't compile fsp_save_s3_stack in SPL (or TPL/VPL). Changes in v3: - New arch/x86/lib/fsp/fsp_common.c | 2 ++ 1 file changed, 2 insertions(+)