From patchwork Sun Nov 22 08:35:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ovidiu Panait X-Patchwork-Id: 1404450 X-Patchwork-Delegate: trini@ti.com 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; dmarc=none (p=none dis=none) header.from=windriver.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=windriversystems.onmicrosoft.com header.i=@windriversystems.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-windriversystems-onmicrosoft-com header.b=XaZc7wLj; 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 4Cf3gZ70hWz9sSf for ; Sun, 22 Nov 2020 19:42:18 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EFE58825EC; Sun, 22 Nov 2020 09:38:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=windriver.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=windriversystems.onmicrosoft.com header.i=@windriversystems.onmicrosoft.com header.b="XaZc7wLj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1933E825E6; Sun, 22 Nov 2020 09:37:45 +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=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER,SPF_HELO_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-co1nam04on0623.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe4d::623]) (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 B7FB4821A4 for ; Sun, 22 Nov 2020 09:37:25 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=windriver.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Ovidiu.Panait@windriver.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OPJ+MRr1CvEpizo5MHxymUHGVwwz+z/DRUCcqV1jfXaziGIXimhnTBtxP7QHxN+RfqnkFONxhKbWSITP8B8jpIvw2CVdnOSi8wMyk+Ms3WqIUVEiWmRcpcIQezhKsvgZs656Bq9MXSJKH51tJpjdAce93w/JbrV0xzjXAke8iUI+PEzfpTC5b60V9mo4F6cFWS7Rpp53K/5kcobUbG7N9JCH6MOLsmkNXNMj1apU5jljZ+1i3NWevXWV4CgflAiqTNdlRj5iLmPllXtvTndg5wU4aS6g6sVEqEK9hOovaM2jDYQxgAsDea+ta1bfWFLXEeHfruonNFmYtzUtHQnQUA== 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=yXipc3EqcN65S+f7w+Wy/NnJ/0Xz9JtLoo9Hr1IqKuU=; b=AjILCL6lLQ5uIapuiZjNB4S+9k5Un6dI+xF6G1NS5ehSGTfARUSd11bsnhfJM55F4nUiVbAOfpyz58sR6DlkP5mcGXM77BmtShi+QjRWT5MQtZBQwYFgeyFj8x2RQNbaHUtncZbbXx/ySIsXZgONPdbjbM0HTaU0N6jgxPbKJ8fQPVTPdnIWxL7vBmj6Ful5ND0aTDxXWhbpyd9i4t4kZIJ2Gby02jTt/1MtEa9lmmcxcyUxsiC7fGAvtvQWVbjN6ZxzLVgl/9R50eFlok7nf/nHdytJRWmHrruG7sjwxQUKBWXw5/x5M54SZCqbLIndG5yKlDObPdtcSQrQ3C37kQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriversystems.onmicrosoft.com; s=selector2-windriversystems-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yXipc3EqcN65S+f7w+Wy/NnJ/0Xz9JtLoo9Hr1IqKuU=; b=XaZc7wLjkJoGxlCHPxeKcWBlH38htIzZJJqZGs8/6lpkEwOJEwsIBFo9idlWTvcyoct9hXjrnA0Si9wvRATkcCHZRBdXaereBw/zFAwUiGL2KVXX684kVo3h9D3clb6gZJErGKTunf4P+YYZp5t34uKT13H1bBhbt8guscT3rj4= Authentication-Results: lists.denx.de; dkim=none (message not signed) header.d=none;lists.denx.de; dmarc=none action=none header.from=windriver.com; Received: from BL0PR11MB3201.namprd11.prod.outlook.com (2603:10b6:208:6b::21) by MN2PR11MB4223.namprd11.prod.outlook.com (2603:10b6:208:18a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.22; Sun, 22 Nov 2020 08:37:12 +0000 Received: from BL0PR11MB3201.namprd11.prod.outlook.com ([fe80::650a:e5b9:d7:6cc0]) by BL0PR11MB3201.namprd11.prod.outlook.com ([fe80::650a:e5b9:d7:6cc0%5]) with mapi id 15.20.3589.025; Sun, 22 Nov 2020 08:37:11 +0000 From: Ovidiu Panait To: u-boot@lists.denx.de Cc: sjg@chromium.org Subject: [PATCH v2 13/18] common: board_r: Drop initr_jumptable wrapper Date: Sun, 22 Nov 2020 10:35:51 +0200 Message-Id: <20201122083556.6756-14-ovidiu.panait@windriver.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201122083556.6756-1-ovidiu.panait@windriver.com> References: <20201122083556.6756-1-ovidiu.panait@windriver.com> X-Originating-IP: [46.97.150.20] X-ClientProxiedBy: VI1PR07CA0165.eurprd07.prod.outlook.com (2603:10a6:802:3e::13) To BL0PR11MB3201.namprd11.prod.outlook.com (2603:10b6:208:6b::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from otp-linux01.wrs.com (46.97.150.20) by VI1PR07CA0165.eurprd07.prod.outlook.com (2603:10a6:802:3e::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3611.11 via Frontend Transport; Sun, 22 Nov 2020 08:37:11 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fa99f9fc-c431-40f8-a3b2-08d88ec1ce6d X-MS-TrafficTypeDiagnostic: MN2PR11MB4223: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /YpaGdwBfvG7WatczY1Fq0cIN/yNTOyCCR8uWiInslURDkUISjli3C8Nlh+a8dmenyyOI3H81haCAqKhO8LHJC3jfnO0NcuvrMOE0UgRfOMvF1eYIYd+NJAz8O/hVjB5G2pc8jKFGhEFOos/NoswrNhr1Haewjg1DckN2/LmrucxjkGWZut2x/W571NB009erCD6VwaZBAVW1XfBDzYcnz+TbS8REFermS+FybmLw/AyaGD+XQCXtO8R2mfCCoNmSUFgXpMBItuYAtCnc6lp1JdGfCI5S4IXTSsw0yueEQvIa5ODEyzU2uvFWPQZ8G0hyF9X232YDOpI4CahotrLrA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR11MB3201.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(39840400004)(136003)(366004)(376002)(346002)(36756003)(186003)(16526019)(316002)(26005)(4326008)(2616005)(6916009)(83380400001)(6512007)(478600001)(8676002)(2906002)(6486002)(8936002)(52116002)(44832011)(956004)(66946007)(6506007)(86362001)(6666004)(66556008)(1076003)(66476007)(5660300002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 2hgJKFNMW95Wd6Q0fV2T4Wp4JJbeszVHk1LPtLpGpFiVve4YMXIbd2iPbUTCSdpxu85B2nWW6ICroK0g72LwAcMuhPKHhbK129yCjUdar7VPmIwQ7KWph2Lyf9B5MFwUNi1d8hPKD0209jte9JqjLo2Qg5bCWAPHy3lbw7rFmfox1nIqCm3+paeVTIJV44k1od3ewI49FuLaK1DYre5E1lp0r+Im/g3hz2CqbFYVjCMBxMjl+4Slb2b+VU1RSAgvpvLYR+aixIABgpXk1eUQ1CA40C88nuef9R9AOx08N/xKex+lvbpvfeGsQjxBytIigABfxcxbeIpDAr3j9q2cyNcf8TOpY1PT6QJ3PJCyPFn4O4XzEbWcELx/hykDCQbhiCmMwAHi5TT9EGbo2ofS6nkNjXlJwnCEZCgXrWjS87FwGswp7iVgar6khPzNuzZX0xGFf8hO19ibZ9nT8zpoMjERrZz0qgHTM/VTsJB6w5e4V8vdRPpUctx6azOciFXr1FcNxyGauQV+Fb2Vne0/l0HuYf8/OXI0zA5k1Jbk48QdzAXpr8nl6FHO/46t81EmKebqd2vyIpMd6Aim94iY9z/SRUUc3u9SlpO6m45k1ieOYXLQtB83bJHzWTsrixIqFJUKRb+HY0twHjTBd9zYEj+pdRf15oXJRityGeX5f+XFBxdXwX2WrwcWOT6FdI1MxVnNnw0+f/HTdS0Ixn97bMiZrf6unHqCxwHbZCfdcFBsyzqKx7EuCRWAhtiOciuDCsssmw+onT6+2OBYQuCQs6e/FJLaIRVSN06u43WHmaGjcRrO/szF4eak7lKhNg33eMvVrcb0Sbo1cV6um2di5rhHcAuGAxTBVoPQmNClfgu25UUK9tvsgULtKF+NCz1npMuaxSpC0nUv0uMsmYbb6w== X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: fa99f9fc-c431-40f8-a3b2-08d88ec1ce6d X-MS-Exchange-CrossTenant-AuthSource: BL0PR11MB3201.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2020 08:37:11.8078 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: nFUZIPQIYJnaL+rg4/2oz075t3wLVLCOF4qyqSWzXxYefiqsXfLA/DfT2g29OAKCSEVkxXSNOEAMucs/0uQw6uHczG885ouwJxrdFugTnMA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4223 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.3 at phobos.denx.de X-Virus-Status: Clean Add a return value to jumptable_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: Ovidiu Panait Reviewed-by: Simon Glass --- v2 updates: - add function comment common/board_r.c | 8 +------- common/exports.c | 4 +++- include/exports.h | 10 ++++++++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/common/board_r.c b/common/board_r.c index a5cbbcc343..32ad40d372 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -490,12 +490,6 @@ static int initr_malloc_bootparams(void) } #endif -static int initr_jumptable(void) -{ - jumptable_init(); - return 0; -} - #if defined(CONFIG_API) static int initr_api(void) { @@ -757,7 +751,7 @@ static init_fnc_t init_sequence_r[] = { pci_init, #endif stdio_add_devices, - initr_jumptable, + jumptable_init, #ifdef CONFIG_API initr_api, #endif diff --git a/common/exports.c b/common/exports.c index 6253b55694..4578f07021 100644 --- a/common/exports.c +++ b/common/exports.c @@ -25,8 +25,10 @@ unsigned long get_version(void) # define miiphy_set_current_dev dummy #endif -void jumptable_init(void) +int jumptable_init(void) { gd->jt = malloc(sizeof(struct jt_funcs)); #include <_exports.h> + + return 0; } diff --git a/include/exports.h b/include/exports.h index b300554091..faf0f59244 100644 --- a/include/exports.h +++ b/include/exports.h @@ -15,8 +15,14 @@ struct cmd_tbl; struct spi_slave; -/* Set up the jump table for use by the API */ -void jumptable_init(void); +/** + * jumptable_init() - Set up the jump table for use by the API + * + * It is called during the generic post-relocation init sequence. + * + * Return: 0 if OK + */ +int jumptable_init(void); /* These are declarations of exported functions available in C code */ unsigned long get_version(void);