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 7348AC433F5 for ; Wed, 30 Mar 2022 12:45:16 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 646FF840C5; Wed, 30 Mar 2022 14:45:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.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=konsulko.com header.i=@konsulko.com header.b="AXBrEQp2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4C59C840C5; Wed, 30 Mar 2022 14:45:11 +0200 (CEST) Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) (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 82D31840E8 for ; Wed, 30 Mar 2022 14:44:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x82b.google.com with SMTP id m21so2237753qtw.8 for ; Wed, 30 Mar 2022 05:44:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=XINzGJe6K90hkWhfL+xHFf95xMFOtAQZrtuvrF0ztgQ=; b=AXBrEQp2UqVAZl5YH1nhei6s97QUOyN+nhkW0aFHA45Q3Aj12xADvB3rySGaqAdn9P 23X+kxiXqjCFL6yjTPGmyZ0WIgI/lotHRsMe3X1sOLx9jKHBykECO2mLfM85edzgOIXV YyLhKchVbVn54AZFbVqH4K8NEBKcdSpzVWd4s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=XINzGJe6K90hkWhfL+xHFf95xMFOtAQZrtuvrF0ztgQ=; b=GLlJnt5S4pcg+H6aQ93aYfvyeVjL3ZBgYqriljC+0zDJ7Bmge0IW6nUHPPi56wSxS2 MF9Fbzmp5jG8U40kE4lC0kWZeFe6niU9V+1o5TCnsaTdsp5gpdxYl4ZcUJ4HkU+ltEms IoaEiLQmpO4Qrk1Y3cartexUXuBQM9I1BN93yRQIP0yIjUlSDRaiKC06H1EPOT0FChoD KQbJK1a8fhXJ7bBFJ3R+PbR27ofOJFiTy5EKMYnfB6xbqu8kbXzHgNfrQVRnt9qGRA9u tqIJ7D4uZkmN+HjN4BwUhhcGEg8OlmIKrw4dAeTrDfjxz7m9KOSXD1U5gjC09fkOAUKi etnw== X-Gm-Message-State: AOAM531FfZRsqzg98VNi3wBrQRKUB19B4/wFBk0wltvHsYv6PTyL92Z1 ongE2LYrok2aM4jYlp9y3XF36g== X-Google-Smtp-Source: ABdhPJxues6TtmhZMoQ1ESLLSdbQCUffBYmnuOKKYhp2STwqZlePLCLRKJt2vn53ZWIpzd5lR+Wa8A== X-Received: by 2002:a05:622a:5cc:b0:2e1:ecc9:5a2a with SMTP id d12-20020a05622a05cc00b002e1ecc95a2amr32441591qtb.554.1648644298282; Wed, 30 Mar 2022 05:44:58 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-2ef0-5dff-fedb-a8ba.res6.spectrum.com. [2603:6081:7b01:cbda:2ef0:5dff:fedb:a8ba]) by smtp.gmail.com with ESMTPSA id n8-20020ac85a08000000b002e06aa02021sm17725158qta.49.2022.03.30.05.44.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 05:44:57 -0700 (PDT) Date: Wed, 30 Mar 2022 08:44:55 -0400 From: Tom Rini To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Priyanka Jain , Wolfgang Denk , u-boot@lists.denx.de Subject: Re: Broken P2020 board since commit be7dbb60c5bf ("Convert CONFIG_SYS_IMMR to Kconfig") Message-ID: <20220330124455.GQ14476@bill-the-cat> References: <20220330122028.jrcdywdg7j2g2usd@pali> <20220330122917.GP14476@bill-the-cat> <20220330123224.akcgcmf3yuj3ukfn@pali> <20220330124054.p6mqjoxgrhw27ujj@pali> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="E6lVPAHcXg6biC3t" Content-Disposition: inline In-Reply-To: <20220330124054.p6mqjoxgrhw27ujj@pali> X-Clacks-Overhead: GNU Terry Pratchett 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.5 at phobos.denx.de X-Virus-Status: Clean --E6lVPAHcXg6biC3t Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 30, 2022 at 02:40:54PM +0200, Pali Roh=E1r wrote: > On Wednesday 30 March 2022 14:32:24 Pali Roh=E1r wrote: > > On Wednesday 30 March 2022 08:29:17 Tom Rini wrote: > > > On Wed, Mar 30, 2022 at 02:20:28PM +0200, Pali Roh=E1r wrote: > > > > Hello! > > > >=20 > > > > In current master branch is U-Boot for P2020 board (powerpc mpc85xx > > > > based) built by P2020RDB-PC_SDCARD_defconfig completely broken. U-B= oot > > > > does not work at all and on UART is nothing printed. > > > >=20 > > > > I run git bisect and it found commit which broke this P2020 board: > > > >=20 > > > > be7dbb60c5bfa38ea444fe7de1dca8bd35f83f5b is the first bad commit > > > > commit be7dbb60c5bfa38ea444fe7de1dca8bd35f83f5b > > > > Author: Tom Rini > > > > Date: Sun Dec 12 22:12:30 2021 -0500 > > > >=20 > > > > Convert CONFIG_SYS_IMMR to Kconfig > > > >=20 > > > > This converts the following to Kconfig: > > > > CONFIG_SYS_IMMR > > > >=20 > > > > We do this by consolidating the SYS_IMMR options we have and = providing > > > > defaults. > > > >=20 > > > > We also, in the few places where M68K was also sharing code w= ith these > > > > platforms, define it within the file to CONFIG_SYS_MBAR to ma= tch usage. > > > > This should be cleaned up longer term. > > > >=20 > > > > Signed-off-by: Tom Rini > > > >=20 > > > > :040000 040000 12f819284e85d64b7df5da65476038a542e587f5 ea3da4aef= eee93f1566be6b7f85a43846f29aa8b M arch > > > > :040000 040000 afe083b1f22b57470532d2a2c3c37b6a5d4a68d4 302d04810= c9449622ce43982f562d2e8400086ec M configs > > > > :040000 040000 411b7912fc83c8aaf25adf5647400625793cee38 0eff4a6f6= e7b5f21bc3d533e1c5bc1cd2a5ed86b M drivers > > > > :040000 040000 b7d8b45f803b3619f76be355193d5c5645e76782 be2ac1c85= 06e99d1f9c615ad09477884f5ce1231 M include > > > >=20 > > > > So it is relatively new change (Dec 2021). > > > >=20 > > > > Tom, any idea how this commit could broke P2020 board which is mpc8= 5xx > > > > platform? I do not see nothing suspicious in this commit. Before th= is > > > > commit BootROM can successfully boot SPL without any issues and SPL > > > > prints info on UART. This board use include/configs/p1_p2_rdb_pc.h > > > > config file and it was not touched at all. > > > >=20 > > > > Priyanka, Wolfgang, you are marked as maintainers, do you know how = to > > > > debug this issue? Or do you have some P2020 board or other mpc85xx > > > > based, so you could test if U-Boot is working on this platform? > > > >=20 > > > >=20 > > > > For reference I built U-Boot SPL by these commands: > > > >=20 > > > > make CROSS_COMPILE=3Dpowerpc-linux-gnuspe- P2020RDB-PC_SDCARD_defco= nfig spl/u-boot-spl.bin > > > > boot_format config_sram_p2020rdb.dat spl/u-boot-spl.bin -spi u-boot= =2Esdcard.bin > > > >=20 > > > > boot_format and config_sram_p2020rdb.dat are taken from the upstrea= m git > > > > repo from the latest branch nxp/sdk-v2.0.x: > > > > https://source.codeaurora.org/external/qoriq/qoriq-yocto-sdk/boot-f= ormat > > > >=20 > > > > u-boot.sdcard.bin is then copied to SD card (starting from sector z= ero). > > >=20 > > > The likely answer is that one of the sets of games PowerPC platforms > > > play so that "SPL", "TPL" and regular U-Boot to do redefine some symb= ols > > > / base addresses didn't get migrated correctly. Or, re-reading that > > > commit, maybe what I had worked out wasn't right, and > > > CONFIG_SYS_IMMR=3D0xff700000 is wrong? > >=20 > > In include/mpc85xx.h you removed code: > >=20 > > -#ifndef CONFIG_SYS_IMMR > > -#define CONFIG_SYS_IMMR CONFIG_SYS_CCSRBAR > > -#endif > >=20 > > And in include/configs/p1_p2_rdb_pc.h is: > >=20 > > #define CONFIG_SYS_CCSRBAR 0xffe00000 > >=20 > > So it looks like that CONFIG_SYS_IMMR needs to be set to 0xffe00000 > > value. I'm going to test this change. >=20 > Yes, changing it to 0xffe00000 fixed this issue and SPL started printing > on UART again. >=20 > Here are config files which sets custom CONFIG_SYS_CCSRBAR value: >=20 > $ git grep '#define\s*CONFIG_SYS_CCSRBAR\s' include/ > include/configs/MPC8540ADS.h:#define CONFIG_SYS_CCSRBAR 0xe0000000 > include/configs/MPC8548CDS.h:#define CONFIG_SYS_CCSRBAR 0xe0000000 > include/configs/MPC8560ADS.h:#define CONFIG_SYS_CCSRBAR 0xe0000000 > include/configs/P1010RDB.h:#define CONFIG_SYS_CCSRBAR 0= xffe00000 > include/configs/p1_p2_rdb_pc.h:#define CONFIG_SYS_CCSRBAR 0= xffe00000 > include/configs/qemu-ppce500.h:#define CONFIG_SYS_CCSRBAR 0= xe0000000 > include/configs/socrates.h:#define CONFIG_SYS_CCSRBAR 0xE0000000 > include/mpc85xx.h:#define CONFIG_SYS_CCSRBAR CONFIG_SYS_CCSRBA= R_DEFAULT >=20 > And this should be reflected into CONFIG_SYS_IMMR as it looks like that > all above config files are MPC85xx platforms. Ah, OK, so what happened was that what I had been doing to check for unmigrated symbols missed this one as we have SYS_CCSRBAR_DEFAULT in Kconfig but not SYS_CCSRBAR. I'll post something to fix these platforms shortly, thanks! --=20 Tom --E6lVPAHcXg6biC3t Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmJEUL0ACgkQFHw5/5Y0 tyzVoAv/YmdtQrRtMJxEkpHpOeIPMrI9DJ8I1msks0Q737tMtqffUoDqzBF+oLnT qF1us+YbCRYdjNyPhbv16Jo3FhtauBSF4hkbQw7rmp83tmX8ITdTOX0G4qU8optn oiTBZ0MfFWHqWmP/LeSgr9S1mwpJeraKWBH/Nvsiyk4m3G3z2wRuQwZCW3l939GR LONFY+kJD792t8ctK9qPF9sYUryq0FJ8ac4Qkq5r4taN32doBDtvJYFC9MGTOExu Ap+lQnkBG7FjZ3N0JMv6E6Co5//bc0ejGX1enKQzYULiBb1zDpXA1+rLfSOEgsQQ 9WCnjvytY/gu6WBvaxeunnGS68+W13pLWNHwKE5gTlEZaBxewnsbR0DoeD5g5oua B2ODsuQYHpkxCVa+/V+8Y0f0XR9mlIS0+bm5qNXb44HoDBafj9euh4koGR7p+Pnd m8VQy6aZAQG0VxFpajWABMSG9q1mFm7nUJyk+U+P+3wj6kF9deyvF27UzE3LTHmo /blne+5b =JPLM -----END PGP SIGNATURE----- --E6lVPAHcXg6biC3t--