From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B01CBC678D5 for ; Sun, 5 Mar 2023 02:24:50 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 110228591C; Sun, 5 Mar 2023 03:24:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmail.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" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fPt9iwz/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CCB8685927; Sun, 5 Mar 2023 03:24:44 +0100 (CET) Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 98B1E8590C for ; Sun, 5 Mar 2023 03:24:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=martin.p.rowe@gmail.com Received: by mail-oi1-x229.google.com with SMTP id bj30so4659834oib.6 for ; Sat, 04 Mar 2023 18:24:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677983079; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VPQRDbWkedcSxArTTSN7sbupiskscJVo1vvuKxiBnEc=; b=fPt9iwz/g6fhvOfhMi7YQl4Jxp/l/i0wvGiQrPUH4HDHHe32hyRiz3qCtN3f2YYNOV wHtU9Azz92WedqrzJL4GFkKfaNNsmo5b33NF0xdaMmaE2rxTjeyRVIiiH0GkSLBxE8m9 L62Dp0XV7QMsn4YkxpfbqruLC/VnyRBFik5oT7RC5z2FgzB7DzuJ6rTXiiOGWkghnjHX ApkoQ2nVfLzsytOqX5MmKJ6iguzVwId8EeyDUfzBh03zBlYUpvtnnqkYOTxi1T0Dn88P 7qSqoPZkCXp7bgQKCU4Rs4MBQIW9j9x7zPdauBwhzukc9uapr+l/8VT7XIYMK6lA5ArT Hw0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677983079; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VPQRDbWkedcSxArTTSN7sbupiskscJVo1vvuKxiBnEc=; b=GJKbTATYgNKB7FF/LIIYR3wnJtN8dSCC+9hjecMcc3APGLcKZ9D8AEUxjk0xUH8ToN fzuJrQTXI1fBS0FS+Vb/ChD+pybF2nseNrgW19+ONurH9oljPZMRV31hkXvWcf9ZbUz0 ti//aDj9cYk4ay2Vi7yMgAZdD/2PCs7YeJsteQVu2R7s8+cb0svanp5J4e3euRI7m7Sz TIiA7irB9bI9BO7xK1a/oTsLoDxjmxuQNtz0aMeurn8i66bKvN2L7qZPTF7AJACSsPvZ g4fBsjY9ORKyrPdk4scXIiucRM1IsM33/0ByzITOvRr4WvyJ3pn8RphOXSCdsELl5O25 h17Q== X-Gm-Message-State: AO0yUKVwWtCrJmRXBeQkn/HsccV1B4hlVnKVHLlSu2LLDsQN8eJyyLIf 2ly1bT2bIWRrfWdlS0CTRFfZ/5KQZYwxVfaVvF18fv3w5b25og== X-Google-Smtp-Source: AK7set/k6xOxpH9SlVBnFszFwjReYRO9BEn24/WseOZNaTRkEB1dsCRTorOLw4I9oUlaJrH9cI5vrUj8vXzUGQtrcaI= X-Received: by 2002:a05:6808:913:b0:384:253:642d with SMTP id w19-20020a056808091300b003840253642dmr2134099oih.3.1677983079020; Sat, 04 Mar 2023 18:24:39 -0800 (PST) MIME-Version: 1.0 References: <20230304103851.18965-1-pali@kernel.org> In-Reply-To: <20230304103851.18965-1-pali@kernel.org> From: Martin Rowe Date: Sun, 5 Mar 2023 02:24:27 +0000 Message-ID: Subject: Re: [PATCH RFC u-boot-mvebu 0/2] arm: mvebu: Fix eMMC boot To: =?UTF-8?Q?Pali_Roh=C3=A1r?= Cc: u-boot@lists.denx.de Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.39 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean On Sat, 4 Mar 2023 at 10:40, Pali Roh=C3=A1r wrote: > Boot configuration stored in EXT_CSC register is completely ignored by > BootROM: > > https://lore.kernel.org/u-boot/CAOAjy5SYPPzWKok-BSGYwZwcKOQt_aZPgh6FTbrFd= 3F=3D8DM5ZQ@mail.gmail.com/ > > Reflect this eMMC booting in documentation and in the code. > > Martin, can you test this patch series if SPL and main U-Boot is loaded > from the same eMMC HW partition? > boot0: u-boot Works fine, no issues. boot0: zeroed boot1: u-boot user: zeroed It succeeds, eventually... =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D BootROM - 1.73 Booting from MMC BootROM: Bad header at offset 00000000 BootROM: Bad header at offset 00200000 Switching BootPartitions. U-Boot SPL 2023.04-rc3-00159-gd1653548d2-dirty (Mar 05 2023 - 11:50:45 +1000) High speed PHY - Version: 2.0 EEPROM TLV detection failed: Using static config for Clearfog Pro. Detected Device ID 6828 board SerDes lanes topology details: | Lane # | Speed | Type | -------------------------------- | 0 | 3 | SATA0 | | 1 | 0 | SGMII1 | | 2 | 5 | PCIe1 | | 3 | 5 | USB3 HOST1 | | 4 | 5 | PCIe2 | | 5 | 0 | SGMII2 | -------------------------------- High speed PHY - Ended Successfully mv_ddr: 14.0.0 DDR3 Training Sequence - Switching XBAR Window to FastPath Window mv_ddr: completed successfully Trying to boot from MMC1 ERROR: Invalid kwbimage v1 mmc_load_image_raw_sector: mmc block read error spl: mmc: wrong boot mode Trying to boot from BOOTROM Returning to BootROM (return address 0xffff05c4)... Timeout waiting card ready BootROM: Image checksum verification PASSED U-Boot 2023.04-rc3-00159-gd1653548d2-dirty (Mar 05 2023 - 11:50:45 +1000) SoC: MV88F6828-A0 at 1600 MHz DRAM: 1 GiB (800 MHz, 32-bit, ECC not enabled) Core: 38 devices, 22 uclasses, devicetree: separate MMC: mv_sdh: 0 Loading Environment from MMC... *** Warning - bad CRC, using default environment Model: SolidRun Clearfog A1 Board: SolidRun Clearfog Pro Net: Warning: ethernet@70000 (eth1) using random MAC address - 12:07:8b:f9:7a:6f eth1: ethernet@70000 Warning: ethernet@30000 (eth2) using random MAC address - ee:ed:f3:bb:c2:af , eth2: ethernet@30000 Warning: ethernet@34000 (eth3) using random MAC address - ae:34:b9:bb:28:c6 , eth3: ethernet@34000 Hit any key to stop autoboot: 0 =3D> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Between "Returning to BootROM" and "Timeout waiting card ready" takes around 315 seconds. That's long enough that I thought it had hung completely and I only noticed it continue because I left it running while working on something else. I tried several things to reduce this timeout, including reverting to the "non-removable" dts for shdci, but nothing seems to affect it. When bootloader is stored on Boot 0, then SPL should take care of > loading and executing main U-Boot. When it is stored on Boot 1 or User > Data then SPL should return back to BootROM and let BootROM to load and > execute main U-Boot. > > Pali Roh=C3=A1r (2): > tools: kwboot: Fix MMC HW boot partitions info > arm: mvebu: spl: Load proper U-Boot from eMMC Boot 0 partition > > arch/arm/mach-mvebu/Kconfig | 1 + > arch/arm/mach-mvebu/spl.c | 13 +++++++------ > tools/kwboot.c | 6 +++--- > 3 files changed, 11 insertions(+), 9 deletions(-) > > -- > 2.20.1 > >