Message ID | 20220310205059.499269-26-sean.anderson@seco.com |
---|---|
State | Superseded |
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@bilbo.ozlabs.org Authentication-Results: bilbo.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=URqv0dKG; dkim-atps=neutral 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=<UNKNOWN>) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4KF1Yk50Hbz9sGB for <incoming@patchwork.ozlabs.org>; Fri, 11 Mar 2022 07:55:54 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1898E83B6D; Thu, 10 Mar 2022 21:54:00 +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="URqv0dKG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 792C583B2D; Thu, 10 Mar 2022 21:52: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_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on0626.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0d::626]) (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 240B083AEF for <u-boot@lists.denx.de>; Thu, 10 Mar 2022 21:51:51 +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=g8bR14yZmA749G0vNr1Slp4TWdUMjA9me69OtraKXt7NsAa+bWgInbFvpr7ALqIk1aa+cDvng7QU4zTQekmQipCp6hn+LGqrfhnzpgc4xcmoCmsCQJAvkW3VniDhhixaqO+UK7qkGulAWDq57TN9yYgL7kuj23OBBNv+ymfzyvgsclaTCAYu5hfFYHu4LEatwkojEHSmwbpH0vRAacY0GeCeqf3YPs0iBJEGyo6bYu3TtMlVQ0b39+GiwJYXGsxvq+lBl+BUqvUlzMUacjFdZ5wN1Hlc0AGzzdEay4D7qD4U6YKwMrA3NnDz3MIhqCUXfawlm7zr5FXkMk1hp4/o4g== 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=NRs8GRlcVb0UHXhulriNTlC8GJ4toTtjpI3JAinPBSw=; b=fXXi+1lxjDA31GB76iSaY0fKNTDgYFzHLTR5jtIffOHdGQEJpAWwo1m6Sb1LMsP46yWbEpqiHJ7+m6NA9EfuCeFXCQOPqu+6fOK9m/t+jY01fSNgZzMgJofjfqbg+FHAmnHrd+zwLFw3rqI/W7Xmy23F0ovb3YzMbMC+gd4nST+GknTzl1ouRyxgEYantkwWNjtKaVxTIZqPO2ymtN2iWy/Qvegs7w/lc0476U+LNc5o3tdwe5v9DZ526lUDC79HilXSkHt5mNjP9z3KnCbbjEL3g26ECGi3vrfcEiZLj/dD8r2H97RVyY8KJ8KX0EVDmaNZjqVGCJDUyw+MzA/t5A== 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=NRs8GRlcVb0UHXhulriNTlC8GJ4toTtjpI3JAinPBSw=; b=URqv0dKGOzZqt8Ku3sgg9wRKnKGtX2LRWRZCgAFh2tjVEvGOd2RnjMLNKuwX4ZofXCEn/lph+r9hr7k6Z3MqGMyjLuO/WZTvYsYUOj8IwuD2OYnXgaGIUsoxEhjKo5M3FpDh77ie4zbWoAf5LRUiogZTIb8ZJU7E4AHAqu0IckUGjx0aR4ssrpj8tICjmuw30/9jYfS4KsQhmDRmUqbzs9D3CGIzFQfDi1JAloys6RFRNdSfyT2h7+64ZVKjvA1bCzXoE7iFI2VxblsHObHQ8TOuucCEPrcvkVUGj9mhyhqhAJaBLR3NZh8LQYCxEMeq/g9VWKcG1EoEI4bHQWl45Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) by DB6PR0301MB2439.eurprd03.prod.outlook.com (2603:10a6:4:5b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.14; Thu, 10 Mar 2022 20:51:50 +0000 Received: from DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::9860:b15b:f166:5896]) by DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::9860:b15b:f166:5896%3]) with mapi id 15.20.5061.022; Thu, 10 Mar 2022 20:51:50 +0000 From: Sean Anderson <sean.anderson@seco.com> To: Tom Rini <trini@konsulko.com> Cc: Liviu Dudau <liviu.dudau@foss.arm.com>, u-boot@lists.denx.de, Simon Glass <sjg@chromium.org>, Linus Walleij <linus.walleij@linaro.org>, Andre Przywara <andre.przywara@arm.com>, Sean Anderson <sean.anderson@seco.com>, Mingkai Hu <mingkai.hu@nxp.com>, Priyanka Jain <priyanka.jain@nxp.com>, Rajesh Bhagat <rajesh.bhagat@nxp.com> Subject: [PATCH v2 25/28] arm64: ls1046a: Support semihosting fallback Date: Thu, 10 Mar 2022 15:50:55 -0500 Message-Id: <20220310205059.499269-26-sean.anderson@seco.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220310205059.499269-1-sean.anderson@seco.com> References: <20220310205059.499269-1-sean.anderson@seco.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BL1PR13CA0433.namprd13.prod.outlook.com (2603:10b6:208:2c3::18) To DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 030490aa-d0d4-4694-9733-08da02d7ccda X-MS-TrafficTypeDiagnostic: DB6PR0301MB2439:EE_ X-Microsoft-Antispam-PRVS: <DB6PR0301MB243918DC8CE5D2142031F2D3960B9@DB6PR0301MB2439.eurprd03.prod.outlook.com> X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NMXan89COpIpXhpunZxGYweSdaHpDhVUbxkgVnrVS+4stnSUrffNswN2AIHZdMEucToCMn/4Dv7NG+TO7IhbNN7r3T63hzgMoRtGApe22pgFLiGT/z7xLQntCOVdhUSg4xVvz2xz6IgEfw1lr5XwakBi7pzPUCJE0iFBx+ili0e/IxnIKLiWPnq96YOtb11gaoSIVAvYvuxHvD20bfkf1fWOcFf3IKVJ1p1VQESorj7NSjFHAHTOhpw30z20poU2dl2MQa6EOCz18VyQIhxBQHA3PMqR4nwtHHmA4M3kwzRSZySBOVITWV7ljnlgKf/TMDJ33HnOg+8Eg93HKkShRsI54aeUo9K93uBIteZ2D5XeTFdyD4ZjdGeyZhfj0Khz9BIw4Qlh9cQcCfLiH3WRg1fy3v4L/z3LhA2DLSbRtWYqL7A0cNi0Mqx73f7dTL72kXmsfEuboDHGHYDYVhq/Ae8rAS7bhUY1z4u9cGVcNW2LVSmrcjienZ7w/jQ2UC0MgXGbsmZWJUNe00jCBYLrcrLB2/QwhC3L9REz7X2e/TNnN/H7HpIliCKZaYZXkGXwI17g1OhkNasLA1qtrlwT3VyCCF7dgcK5Ruq+SMJejpseZ1F/e4s++bN8I5DO5y4ncOTxxBxaFqmcrKqPzLVkSX8wDKrSsR5hZNOk4WygXyhO9uGemHdfBXQ82lBt12GwNBAD//sxEOA5TFG27QnOHQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB7PR03MB4523.eurprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(54906003)(66476007)(316002)(4326008)(66556008)(6916009)(8676002)(66946007)(44832011)(36756003)(86362001)(2906002)(38350700002)(38100700002)(5660300002)(8936002)(6512007)(52116002)(6486002)(6506007)(508600001)(186003)(26005)(2616005)(1076003)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Bj4KwyOWia3Mc/oQdaZDLT4cwWE1Epxtdtv7ap5BRX7xHkVyoJ/d+tfO60tzeqmBOywscDZlvv/sZbDYsmysUmPUnnM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/cyVhd1tucWqXMJWR+8k8cScUScJFm0mVD8XXkEt0yzClOgm0/cG0ocQxV5X9eX3bWbk0iIiCWSE/zD320hVkgCQgK66Qy4ywtr9etx7aB8kHFQwZ6HD8HMBYNpjq5iS6yFPpd9+6p1wpmRWRHSHKIlSgmNGmGN5yb4KkYLEOcUyyRVPX8vHWsKCZ/8KSepIFxq8thsLSuyd3Mym1NATFsdxaEaD6It5AXZCVMTTOQbJlKZN5aYr4ZripjUWENHi1W0m64FfL7ALNoWB4naDGCNMdgM3U2teX+3mECHrFgUz8zQ+036DQ65Ca8S4rDPM865esOVu/6iIWKuUWrjfzvm5ied/FDMHcS3jQwCse5Jgj6WtcNURrBN60iyv5H0J927VrvqGPx7fzTRvvynqqFSSAwpm3q4GEAlj0HEyzaKPaDwdJK8lmfpMdz/QyDt4/bO2yNxkkQn6cO8bE= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: 030490aa-d0d4-4694-9733-08da02d7ccda X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4523.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2022 20:51:50.5073 (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: h0LtfG15UwUZ3XNCYEHQXIqPjIodvvKmsMhFoYRd78ztlDfjqFVMlLouQzf6jngXZbho5j/Tb5nEGO6RGFDz0g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0301MB2439 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.5 at phobos.denx.de X-Virus-Status: Clean |
Series |
arm: semihosting: Cleanups and new features
|
expand
|
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c index 1a7dde30a5..5f09ef0a4a 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c @@ -12,6 +12,7 @@ #include <image.h> #include <init.h> #include <log.h> +#include <semihosting.h> #include <spl.h> #include <asm/cache.h> #include <asm/global_data.h> @@ -27,7 +28,7 @@ DECLARE_GLOBAL_DATA_PTR; u32 spl_boot_device(void) { - if (IS_ENABLED(CONFIG_SPL_SEMIHOSTING)) + if (semihosting_enabled()) return BOOT_DEVICE_SMH; #ifdef CONFIG_SPL_MMC return BOOT_DEVICE_MMC1; diff --git a/board/freescale/ls1046ardb/ls1046ardb.c b/board/freescale/ls1046ardb/ls1046ardb.c index 9af7cf763b..f2949cf8b6 100644 --- a/board/freescale/ls1046ardb/ls1046ardb.c +++ b/board/freescale/ls1046ardb/ls1046ardb.c @@ -32,7 +32,8 @@ DECLARE_GLOBAL_DATA_PTR; struct serial_device *default_serial_console(void) { #if IS_ENABLED(CONFIG_SEMIHOSTING_SERIAL) - return &serial_smh_device; + if (semihosting_enabled()) + return &serial_smh_device; #endif return &eserial1_device; }
Use the semihosting_enabled function to determine whether or not to enable semihosting devices. This allows for graceful fallback in the event a debugger is not attached. Signed-off-by: Sean Anderson <sean.anderson@seco.com> --- Changes in v2: - New arch/arm/cpu/armv8/fsl-layerscape/spl.c | 3 ++- board/freescale/ls1046ardb/ls1046ardb.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)