From patchwork Wed Apr 14 18:51:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1466387 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.a=rsa-sha256 header.s=selector1 header.b=gBzKG91h; 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FLBRb0zkNz9sVw for ; Thu, 15 Apr 2021 04:52:27 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0E41381E72; Wed, 14 Apr 2021 20:52:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk 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=prevas.dk header.i=@prevas.dk header.b="gBzKG91h"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 11EDA81E1C; Wed, 14 Apr 2021 20:52:08 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER, SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20722.outbound.protection.outlook.com [IPv6:2a01:111:f400:7d00::722]) (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 B4ECF81E23 for ; Wed, 14 Apr 2021 20:51:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rasmus.villemoes@prevas.dk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R0Q6KDiW5zOhNkv4fUD7dHt98yd1T3BvZ/HUmzN6g9Q9p4S/NiyM34B3SaD/k1tDOVDHouKIZr50XGyC5SkyyDcujGpJ313pbuPSLCbLyszkMA77nNKrqlrci7CwtsbYFN+ja18xKn+Sd1aXIjG9AqOD6sppRk1RyTnsvYdQmD3Dr4U0Dg0MbLhZalfBxOngjSXAsFVQsd/oPVhZ4cLdr4o/abvG2vDdHaAgBCsCjvf/UCNXIuPopxVXfuQf2ZT+OC9/WtNj+dyOgXB9cb4joE+hgqYN3yufVq5mRUCJmkPYEy9IaJWWoqFcw49s4BR0Sipv9qEFxr0Nao7avbCn5A== 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-SenderADCheck; bh=KyUqmhFpXMEDdIFt+wT4MvK9c/r7lQu/u+hGr22QkL4=; b=nlnSyHLcDw47M5PMzUB0WH355Bsu8pNfqxp0rTl4NFDN5YcziKlBxgNijFxWxc9ERgsbdsRi9p0pZ4ENsVXBruLjsiscX24zcBbX+/zFn+xxe7qQl6Jo0Mi9vHszxKKCNl21Jut4u6owI6cLMLuHx3/bDFWMzmuIFDQwr9psTeePUTK6mguVJSuV1trKHuMKYwH3m3fX/t30OLMhZ+WhFAJUlWor2Lk+HLkPEielEWyag8v2u5SMs+ADQwOkD4zGj9hQJ6WXtWvN1RFRhIqDJQyJRj59GF+2ih69UmalLlTyFP2FmEpvYR/5fzJttJLToQ1YjwJGsaMuPYkxkTlXQQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KyUqmhFpXMEDdIFt+wT4MvK9c/r7lQu/u+hGr22QkL4=; b=gBzKG91hnKjHRhrg8QO6OZTa2u9RY4X7wcUwiKxjjJIeSDMP/RsS37gng7pLodJEKHHJd/r+P604XE1LS45IVAjMyxFPzhoByg5VD4FWl69c1xIhRsZFKeuwqks77DD6OMEKLcLMM+iS+ecUSsXyY+LVr1YIE6VWoMEirdf5Cn4= Authentication-Results: lists.denx.de; dkim=none (message not signed) header.d=none;lists.denx.de; dmarc=none action=none header.from=prevas.dk; Received: from AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:3f::10) by AM0PR10MB2626.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:131::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.22; Wed, 14 Apr 2021 18:51:53 +0000 Received: from AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM ([fe80::edba:45:89f8:b31f]) by AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM ([fe80::edba:45:89f8:b31f%7]) with mapi id 15.20.4020.023; Wed, 14 Apr 2021 18:51:52 +0000 From: Rasmus Villemoes To: u-boot@lists.denx.de Cc: Joe Hershberger , Wolfgang Denk , Tom Rini , Heiko Schocher , Rasmus Villemoes Subject: [PATCH resend 0/2] add CONFIG_ENV_SECT_SIZE_AUTO Date: Wed, 14 Apr 2021 20:51:41 +0200 Message-Id: <20210414185143.4148401-1-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.29.2 X-Originating-IP: [80.208.71.248] X-ClientProxiedBy: AM6P193CA0127.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:85::32) To AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:3f::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from prevas-ravi.prevas.se (80.208.71.248) by AM6P193CA0127.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:85::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16 via Frontend Transport; Wed, 14 Apr 2021 18:51:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0dd96fda-6d57-433b-4a15-08d8ff765e4e X-MS-TrafficTypeDiagnostic: AM0PR10MB2626: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1169; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: y+8kq8RTNyFCjPgBSiFqPEMTepvSdtJV3fdYGsyLx3dnABYpcRHjf9DFkrz+rJf8YBQy6a9yAFfnkmKKzpqA0vwJgPl7OkdroJQlv8tDOdN4N1s3oZdHIU8NvDoww9hhUWomYdFmuytr+GIoxHiOdDuqOis2ddZzhRzMs5LBYwhUd30cNN7uANO9+Uzrdv+4QNjvKfaHAyp9QF33JYCQnHrDlAKKf93T1ddidnKR+WpFpLcU3Tzo1IQ27jnZd+trRreZdVYm21iHcfYzAsEZcS4mUcpI8wEnpkMha9NSwxwAHLX1Unp+SZqtHHiJm/uYX9pdTQM64Lk8nSLds9A1O9Yko02GjhtOmcTC3pzh8x9lvEEGbPu0+583+u1CvjSqIe6GDpLCn4GK/x7k2mcWIWfE5eNPCb6myBuQvhteemBk3VV4sqB8VKRPBaKW62FtIIfeo0p8eLQaMcKoTyeFvE4gdY8ghO+gc22xFLQICer7cVrAoTWCGU3PAU4yEHa8QkA/zypkYJ5zRPimN0IeVNQ19zsEmDA3+jUBZi35/XpNuKpc7k/MChJlawzalSm/kcnNw33H1gN2BAlx0VKRfh2fFQ9ZcMdHbfhy2cZ1thH3+VO+eEwdFgtMfWAAHALr3I4IOUVRIlJ5cLhd+/arCXopv7gsskcrvJMU88CBSe0= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(366004)(346002)(376002)(396003)(136003)(39830400003)(36756003)(52116002)(478600001)(38100700002)(2906002)(4326008)(8676002)(6506007)(5660300002)(16526019)(38350700002)(6486002)(186003)(8976002)(83380400001)(44832011)(26005)(66476007)(4744005)(1076003)(86362001)(66946007)(2616005)(956004)(6512007)(6916009)(107886003)(316002)(8936002)(6666004)(66556008)(54906003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: 76/dAx0xXI+gVLaZ+87Yks2YDlEAWxaboGzqBdtoYI1ja8ZjuIM4WwEC0pfUPR+c7kpPXGkgUl7dgysLACAxKuLGzRyhAwUREGWmKUhx3KNfBMBFC98A66yiwrDfM6aMFOhtJc0EAdTEubhTdRY5f4Yxyd9AJom64As7WuqVTedXIvYwXhG9C7ucjGyxzP1+XZR0Yz+AwFGq855+VYeLubXqoR96saDSQSAj1f6JONtV7+iYkrTHK/oC5lI1jO3qtiv99Vv884nOIKOlPfGqTLDthOp6A5rWAeSHe81/D4ZRrPEtTaCdq9oY3B9ijnJpA17C7tkKbTcmaKZrXVOIfKiSUQFIT7vHmInsKdNGeZo99uYfFRq6GTclQQ2Bs/MU6FWViyYwil+py9UWQktqNPV9L1Dg8N5d6PFNR5zLfv+p93imf0yntjf6MmbN3a/kqkYEOWDmfAepH1RASptA+Gkj51Y5YkJVTI7jGzsK/FRj3uMz7t8jbr87UqOPvOPbi8YBklNJ6tBVytzAcU+ux7T+74po5PIkGwUZk9RAbxJavLsIi+tdvxyY5+kfg7wLwJxFHRTllFwd+Y/T7Kzw5y/qprXRZYHNG34V6VXozoOAfBzUsg+JfMMWxf6zDDmf5V2dMolQi164JfvdqynhXw37sbEOoGC/zSXBhmaMpeXKKIFBM0Y94pwrb9jeJblZYEsnWqdjC0Ty7gkYGi7XiyHt3xt8XoNWgD/6JBRTgOveCXHd0dE/bxWg0cDXtgWbIQ8fJAomMAwHWQWjGHMcF1HVSQnepbwyJTM+027oAOKAFXkzyWV1Xbl9/Y3evMNILUC39ZQTWlLlYD9CId6mtjSm7dBuecaEn9y0/BkiVdFQXCjJpULJ+wpbhPUYAquwUDgIL/8/l8nxfXF1rfFlxjFU1xgfUVr6Udu4rpHQEy9iZVLNjxhTAMdDaWRCql7IksaZus/xL0tT5TOuJr6MDARluhszqYxalht9Dz/1sZJrZfOejSCUyJfwkhhY21RB57YoIsg4NG3aH5WPyXSLv4byVQws0w+AABfRdDYvthnaHBnAhC1U7lAOYNhgs90Ril252UQOhZpAviTWaIbZEJn9eEorlahVSTxow+LDgJ5yJO6udg9i5vczQ+fzab2MOKoFmabj1+MVGdfkN4Ux5QenMK1a8nBh3xDL2QhpjnTf3jBSr8rV642Wb1oxy8aiCeLF7vlii+Syz33EazJBvzCoW6RpCGlb4m/q5ol7vrbyr2cczmNEVHi14+t1KAQ/m5po1nIK2kQaeArvCUOE4hg702ABf/Ct9cedqUe/dYmBSOdd+2Y8ZfcQ+yTbCtc6 X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 0dd96fda-6d57-433b-4a15-08d8ff765e4e X-MS-Exchange-CrossTenant-AuthSource: AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2021 18:51:52.7917 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ow/xsjlBKYZ/MU7g+GgVsYiS0ZqMrK/BvZiEA5YpBozbAQWk1RG8aesqxqiIDV2gjbXhvCNw3yPGc9Z+hXUpRUfF4vpKx2xaHiTAduklTsQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR10MB2626 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.4 at phobos.denx.de X-Virus-Status: Clean This is a resend, just rebased to current master, of patches I sent way back in May. This is roughly the U-Boot side equivalent to commit e282c422e0 (tools: fw_env: use erasesize from MEMGETINFO ioctl), at least for SPI_FLASH backend. When CONFIG_ENV_SECT_SIZE_AUTO is not selected (and it is of course default n), there's no functional change, and the compiler even seems to generate identical binary code. The motivation is to cut about half a second off boottime on our newer revisions, while still having the same U-Boot binary work on both. Rasmus Villemoes (2): env/sf.c: use a variable to hold the sector size env: add CONFIG_ENV_SECT_SIZE_AUTO env/Kconfig | 14 ++++++++++++++ env/sf.c | 32 ++++++++++++++++++++------------ 2 files changed, 34 insertions(+), 12 deletions(-)