Message ID | 20220419095614.88472-1-alban.bedel@aerq.com |
---|---|
State | Superseded |
Delegated to: | Stefano Babic |
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=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=l2task.onmicrosoft.com header.i=@l2task.onmicrosoft.com header.a=rsa-sha256 header.s=selector1-l2task-onmicrosoft-com header.b=glYxKhYv; dkim=fail reason="signature verification failed" (1024-bit key) header.d=l2task.onmicrosoft.com header.i=@l2task.onmicrosoft.com header.a=rsa-sha256 header.s=selector1-l2task-onmicrosoft-com header.b=QBABeLtW; dkim=pass (2048-bit key; unprotected) header.d=aerq.com header.i=@aerq.com header.a=rsa-sha256 header.s=hse1 header.b=V3yyKHvm; 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 4KjLbZ06nGz9sG6 for <incoming@patchwork.ozlabs.org>; Tue, 19 Apr 2022 21:06:49 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 81ACE83DAF; Tue, 19 Apr 2022 13:05:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=aerq.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=l2task.onmicrosoft.com header.i=@l2task.onmicrosoft.com header.b="glYxKhYv"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=l2task.onmicrosoft.com header.i=@l2task.onmicrosoft.com header.b="QBABeLtW"; dkim=pass (2048-bit key; unprotected) header.d=aerq.com header.i=@aerq.com header.b="V3yyKHvm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 73D1F83B4D; Tue, 19 Apr 2022 11:56:42 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mx-relay100-hz2.antispameurope.com (mx-relay100-hz2.antispameurope.com [94.100.136.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7307283B38 for <u-boot@lists.denx.de>; Tue, 19 Apr 2022 11:56:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=aerq.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=alban.bedel@aerq.com Received: from mail-am5eur03lp2057.outbound.protection.outlook.com ([104.47.8.57]) by mx-relay100-hz2.antispameurope.com; Tue, 19 Apr 2022 11:56:37 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=l2task.onmicrosoft.com; s=selector1-l2task-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4JZFMTh3VpitldMYcE+EpZucgJ3LvsHdFqr1IH3rd3k=; b=glYxKhYvCrO2KWotZCqk+GXq1hqh9559wYK50ZCe423pQ9sGcE5xIX4VN2ZphiX32RNMG311mV7UFSlXfXlYyIFRZgI+dfXbPkCIRbP3yuNkL0h8GmS5Vm4AiPJKz4E4IZNucOsyUGHbGItoinwz9LLqk1z0q+GrD8PCqZN6xAE= Received: from AS9PR05CA0022.eurprd05.prod.outlook.com (2603:10a6:20b:488::16) by AM6PR10MB2805.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:ad::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.20; Tue, 19 Apr 2022 09:56:30 +0000 Received: from VE1EUR03FT064.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:488:cafe::1f) by AS9PR05CA0022.outlook.office365.com (2603:10a6:20b:488::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.20 via Frontend Transport; Tue, 19 Apr 2022 09:56:30 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 52.169.0.179) smtp.mailfrom=aerq.com; dkim=fail (body hash did not verify) header.d=l2task.onmicrosoft.com;dmarc=fail action=quarantine header.from=aerq.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning aerq.com discourages use of 52.169.0.179 as permitted sender) Received: from eu2.smtp.exclaimer.net (52.169.0.179) by VE1EUR03FT064.mail.protection.outlook.com (10.152.19.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5164.19 via Frontend Transport; Tue, 19 Apr 2022 09:56:29 +0000 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (104.47.2.56) by eu2.smtp.exclaimer.net (52.169.0.179) with Exclaimer Signature Manager ESMTP Proxy eu2.smtp.exclaimer.net (tlsversion=TLS12, tlscipher=TLS_ECDHE_WITH_AES256_SHA384); Tue, 19 Apr 2022 09:56:29 +0000 X-ExclaimerHostedSignatures-MessageProcessed: true X-ExclaimerProxyLatency: 8546490 X-ExclaimerImprintLatency: 500015 X-ExclaimerImprintAction: b8de5a70cbab48e886810a06ccd6103d ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a+ovscHIoSE4/aHRn8p6KrtwfW5s6YL3x9g6T52uYNiX5VXkqpHuRsTh8HH1Zhd4fRRjlk5fWwilxPPrpGAE7jyCe9pbKUblfnIbPVn8bD2rJQolu+6vErwqtc775VoGAXKW6KZE+52U9Isw3TC3+G32UWHsMPcANKmPyLOoEbiEJxh4ThD/hASRpU+uXiM6DURLl026ZT+YJELqhHNixoN/oxSfKqZQBarYdEXyFOL+oAy+kR1smr9pOk42UnkIrwJhjnsGtTjYjpAx2oAnlvVTRFa7lXjHS/EiINMx3kVhJ3AJYfLv6KLRyHH6EOVYeG04SZ0j28ncama5NxGBAA== 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=Zh7Xn96EJFoPuldbauE53Z5c90laebU17oeF83DYrxI=; b=kjOnNZsUmvhj4v6TN2iphbI7DBRy0Q2OGjabselSy4iJc+FuJM1wq3hYeZdNRJ9ZiLkM+0D7SnArMgfgKjkmp9CiibURWwCmKKSPp9OashQBNpeND3r/TIf/Zchv3Bvad7tXPwOZxRTdIN7CrNDAmQtLsCNVoXw1eVwLf9PVbEkgiRPzvPXSJqJy4SS4edqkkEBcrOPKW7gBzwFehwI3VN0HUwaq7Su5JcUjbjNtNOh5B0UFtO2TANbcPioqy6VI5kh9VIJJpXsV+6XMJSc+8LdgdzDdSfJEcZ49g7Pw9sdHj35VyYUyjotgeWT4TICeMlYMwDyWHDilzrBHB2XNug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=aerq.com; dmarc=pass action=none header.from=aerq.com; dkim=pass header.d=aerq.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=l2task.onmicrosoft.com; s=selector1-l2task-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Zh7Xn96EJFoPuldbauE53Z5c90laebU17oeF83DYrxI=; b=QBABeLtWAhTS69zk3lkwjDOKWg/jRYTPugE0xaw0rnsKPTtWXPRYTvgyf3NQkrCYmm6TthRQK9K0RCQl5XoCg79UQDzwV6WRkh27E5Al8bOveH5osXNtz9oKVOFVFv3C1YtGJN25zI/0+e8Mwf7qoJ7fRIL8B404mZQ3jNXhwnM= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=aerq.com; Received: from AS8PR10MB5000.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:405::24) by AM6PR10MB1861.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:3b::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.13; Tue, 19 Apr 2022 09:56:26 +0000 Received: from AS8PR10MB5000.EURPRD10.PROD.OUTLOOK.COM ([fe80::c88b:46b9:deb7:c8c5]) by AS8PR10MB5000.EURPRD10.PROD.OUTLOOK.COM ([fe80::c88b:46b9:deb7:c8c5%9]) with mapi id 15.20.5164.026; Tue, 19 Apr 2022 09:56:26 +0000 From: Alban Bedel <alban.bedel@aerq.com> To: u-boot@lists.denx.de CC: Stefano Babic <sbabic@denx.de>, Fabio Estevam <festevam@gmail.com>, "NXP i.MX U-Boot Team" <uboot-imx@nxp.com>, Alban Bedel <alban.bedel@aerq.com> Subject: [PATCH] imx: spl: Default to SPD when booting from USB serial download Date: Tue, 19 Apr 2022 11:56:14 +0200 Message-ID: <20220419095614.88472-1-alban.bedel@aerq.com> X-Mailer: git-send-email 2.32.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AS9PR04CA0125.eurprd04.prod.outlook.com (2603:10a6:20b:531::16) To AS8PR10MB5000.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:405::24) X-MS-Office365-Filtering-Correlation-Id: e9b6f830-93a0-4810-12ff-08da21eae092 X-MS-TrafficTypeDiagnostic: AM6PR10MB1861:EE_|VE1EUR03FT064:EE_|AM6PR10MB2805:EE_ X-Microsoft-Antispam-PRVS: <AM6PR10MB2805738B77C19BC69F3364F096F29@AM6PR10MB2805.EURPRD10.PROD.OUTLOOK.COM> X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: FKYYv4LBClI61GC435IhR2G8eiY8qnRRo3yA97whVu8kFvDbWIHMEFNNriXbi9rRspiBqfqGPrFyGyPhGIY7vwyXYKgsFUiSmOjl+Wov2RZf7O79Yxvr8d1m4o6oBXkMWZjeVN5AqkGitsT8Vak8rutpEpnDAEV/I3DjgIcPXBV1O6OtksKTvDpbcon+SERBMoEgwNohFkfoIi+fcVekYLv30lManszn0feql0vna4UnEhlA8xI9uaVe2/MBuMflXY74I+QNNucl1GMvybRe3uRu0DESie26WZfdVYGbXBY4MNWpCMjTKJxih5nBCoVfJFLSTJtXZYWPqAx45FBmw8q5ieiQdSthk0nPSo/fvR4OgFLhBHcbqC/pEsV+GIQ4WrcE52h70+ANDhrLfq31oS9oIzWfpb6L/KerZpZhcoSCOgKf4MaK438MO4fuv5e12yMij4cL6FcFX/sI3U8p/xvJoCPjj49Cc3BTVxznDulOx/K0+jjz1O57ZEOUZsSzskp+HzvD7MVMdp/Bo/62Xh/9P5NPEOdiRFvxaRQMCXmu7lV7m0FmAsfpe3wta9pQuB6j3x5LU5T5tVmR2zxx7hVKmhh1424NaujhvzWaoT7/jDFB8C2o/wcSPtMFOq+eF1rsvgFZSz0oC9bouCtSDA== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR10MB5000.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(5660300002)(8936002)(38100700002)(44832011)(2906002)(82960400001)(6512007)(1076003)(186003)(107886003)(508600001)(6666004)(6506007)(6486002)(52116002)(2616005)(54906003)(6916009)(8676002)(66946007)(66556008)(66476007)(4326008)(316002)(83380400001)(86362001)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR10MB1861 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: cbf44465-1928-457f-b334-08da21eade72 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iMqDbFscczN/SkOblemKbhF6+KOlkUIsz/S1CT5VVXratPPDrrhw3MLjpny9c28JbIA1eR7LBgX4gtjLbtmz5diEDgvnUof5x3hNgsb1dPBx3X2CDM0Zx8D3H8HfjNyBpDfJGi5yRnTg24Apk5cTq5qJ5FbkxC6GmbHx9kFGpbKfAbaAQUKp4MrbJtV1jOULoEbwG9/FE7CT8v6ioD45v3caaUtXpKKqZO8i+c+uS3RnHnFq9gLnplhvLvYBR3VTwOy9dPtdXW1h9oCzqbNiBdPg14t1/9nnuU1NiqDSQSNLspf4q1ZuvyYvke8EzgKqu6mVdaSeLIdgyUEDR0lCNNB66aobLdxhslFA0v8rxw+pfyiol4X2EdMyoNz/KwQWSV8wRZ5Hkgcwk4LoFGJjH6YsGO+4lHGXGzjTpU8N5cPX6LMJxWq5jDPOMPik3KACNTzD/vXBB8Crv04PshJDeemXyFJH588C9X+OvORN1oa0lAXlxYEWa0dRIXULNRJ8YhAj8lzM/kQnrN5fQ7wYNatRKVoNtZix83C/wTfkOyl3nGM6d2jzn17vU2pwjDSkYmAe48R1Uek6rvwdnD1EKgHOffTuMdb7lr4pkJo9c6BAItTXZjO6/uvEmL7I92kp+rWPaxZpglepL780d2bbFQ== X-Forefront-Antispam-Report: CIP:52.169.0.179; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:eu2.smtp.exclaimer.net; PTR:eu2.smtp.exclaimer.net; CAT:NONE; SFS:(13230001)(4636009)(46966006)(36840700001)(54906003)(47076005)(1076003)(316002)(86362001)(186003)(70206006)(2616005)(82960400001)(107886003)(36860700001)(8936002)(70586007)(5660300002)(83380400001)(2906002)(4326008)(336012)(44832011)(6506007)(508600001)(36756003)(7636003)(8676002)(6916009)(26005)(7596003)(356005)(82310400005)(6512007)(6486002)(6666004); DIR:OUT; SFP:1102; X-OriginatorOrg: aerq.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2022 09:56:29.6642 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e9b6f830-93a0-4810-12ff-08da21eae092 X-MS-Exchange-CrossTenant-Id: bf24ff3e-ad0a-4c79-a44a-df7092489e22 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bf24ff3e-ad0a-4c79-a44a-df7092489e22; Ip=[52.169.0.179]; Helo=[eu2.smtp.exclaimer.net] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR10MB2805 MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="sha-256"; boundary="----2EBC2AF122BE46BA05506759A48CB57B" X-cloud-security-sender: alban.bedel@aerq.com X-cloud-security-recipient: u-boot@lists.denx.de X-cloud-security-crypt: load encryption module X-cloud-security-crypt-policy: TRYSMIME X-cloud-security-Mailarchiv: E-Mail archived for: alban.bedel@aerq.com X-cloud-security-Mailarchivtype: outbound X-cloud-security-Virusscan: CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on mx-relay100-hz2.antispameurope.com with 9A69B1600A57 X-cloud-security-connect: mail-am5eur03lp2057.outbound.protection.outlook.com[104.47.8.57], TLS=1, IP=104.47.8.57 X-cloud-security-Digest: 3ed9c1aeae317e5bd4cb5fcb9417a51a X-cloud-security-crypt: smime sign status=06 sign_complete X-cloud-security: scantime:1.861 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=aerq.com; h=from:to:cc :subject:date:message-id:content-transfer-encoding:mime-version :content-type; s=hse1; bh=Puj3fDdcOkGFy5B1tZvI/xKTUMilum6wZkwgHf ruw6U=; b=V3yyKHvmmwfgaky9/Qk6e0yvWqNSbQUs3zAFUufAHxGCC35TR9AB0T 8rPE7yVb0zgW3LcwzzbFVRBRSU+1/6wlvss3f03YU+s4urNJ09gRjgodloC3T7JO 3V9HE7vPLzb3SE8j+8Og1w71ZUFPXQsG11oXODiWO+bsDCTx7ypzvhWPtH7shOkX xVRZu0+KnAiSB+aR/yr1P8EJEav2h4Bafzh9nYxBDrVeA4sg/mMs11XGanVyLOCj GorYFbPdGb62uJv+k5i9YfzZvvZ3sLqfRmBi8L9Tv2JdJh9YzGft1RpHVtoDP7po Xg5rwPgac/K83lHaL2cYg88UTop92u8A== X-Mailman-Approved-At: Tue, 19 Apr 2022 13:04:55 +0200 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 |
imx: spl: Default to SPD when booting from USB serial download
|
expand
|
On Tue, 2022-04-19 at 11:56 +0200, Alban Bedel wrote: > On the iMX platforms the USB boot is in fact boot from USB serial > download and not from a USB mass storage. So returning > BOOT_DEVICE_USB typically doesn't make sense as USB SPD is then used > to continue booting, for this we need to return BOOT_DEVICE_BOARD. > > Still return BOOT_DEVICE_USB when USB mass storage support has been > built in the SPL. With USB-C on both side, the programmer could > switch back to device mode and use the exposed mass storage device > after the serial download finished. > Can this patch please be considered? It still apply as is on master. Alban
diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index 64ca29677212..2c2b2b126ad7 100644 --- a/arch/arm/mach-imx/spl.c +++ b/arch/arm/mach-imx/spl.c @@ -177,7 +177,8 @@ u32 spl_boot_device(void) case QSPI_BOOT: return BOOT_DEVICE_NOR; case USB_BOOT: - return BOOT_DEVICE_USB; + return IS_ENABLED(CONFIG_SPL_USB_STORAGE) ? + BOOT_DEVICE_USB : BOOT_DEVICE_BOARD; default: return BOOT_DEVICE_NONE; }
On the iMX platforms the USB boot is in fact boot from USB serial download and not from a USB mass storage. So returning BOOT_DEVICE_USB typically doesn't make sense as USB SPD is then used to continue booting, for this we need to return BOOT_DEVICE_BOARD. Still return BOOT_DEVICE_USB when USB mass storage support has been built in the SPL. With USB-C on both side, the programmer could switch back to device mode and use the exposed mass storage device after the serial download finished. Signed-off-by: Alban Bedel <alban.bedel@aerq.com> --- arch/arm/mach-imx/spl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)