From patchwork Thu Feb 25 09:22:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444196 X-Patchwork-Delegate: priyanka.jain@nxp.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ZePsEzUx; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DmS5l6tgXz9s1l for ; Thu, 25 Feb 2021 20:23:54 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A45928120B; Thu, 25 Feb 2021 10:23:45 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ZePsEzUx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 19F218006D; Thu, 25 Feb 2021 10:23:35 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (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 B14598006D for ; Thu, 25 Feb 2021 10:23:31 +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=bmeng.cn@gmail.com Received: by mail-ed1-x529.google.com with SMTP id p2so5873430edm.12 for ; Thu, 25 Feb 2021 01:23:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mKgBcMPttK8Qdg4IjIRLX9NKWi8Tz/pmkmjmSL5x5G0=; b=ZePsEzUxMZ0ZCeJLpYLs2IOAucHwUTPPq3Wle8btErH+zB7asVg2+pdJh0K7sJTW9x PCkrG41vNFxZz0wV/24ARjxAGDQeeM+EN3MDyF44p6nOS9eDRGvHy0FEFUZp8TajKAZf YwN8iqXTNLo9DsXDrH+HsteRqzgVGmzeADeRTv7m1thyJ9kQDvbwLG7A6Uq/znuCt4zr 4lZW/AjvSsy62rLqVcNfEjs5Q0sxdASb8aMq1YmvCkLcbNW3MPa1lJdN6I5KySgdideE 1xTm733wVkANHW1fxD/jGafXu7x0U33qZioEMwG0UB0L/iTW+Ow4AHrLfkFvm/5beyiG djgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mKgBcMPttK8Qdg4IjIRLX9NKWi8Tz/pmkmjmSL5x5G0=; b=lS+dZGbQ4IBFyK5TcthE+H/tkrKsKGELzUGj813gCaqvKduWGhul/bZjM8jvMeyPCF KPnSlIs/0GB4r25q9cfazHYxd92R5uxtOjnc6JVdRaYj3TUJHJaT3kRhe5e2fuqqcBYI NZZStTGYF1vOk1k4Y4H6MPxV52/GLrwR1ZsQacJ5CZksfYfi2l/YZxLPmTgRAUUsvvk4 5mlXmRAbzmOV5gvssgIa+1kzTYxGVq1VXGtIsydIC7t5KMXAKrx/dfJuzuttkdwwwvAU 3KV2lLlLdAJYF+BYHHnG163budeXSI2od6IK1EhYkXSfFa5KleN805pg9H9gw7pZsrlG O0+g== X-Gm-Message-State: AOAM533lXgqoPM2RFHjXGdiKy+j8z6aoZMW/CIdBEzs/KvmrfRk26X/F pi3D5rGnlFe20HFvYSWNOjY= X-Google-Smtp-Source: ABdhPJwi4/cumqy/VvQ0TlxgHNa+pYn2ryrzEBb3KgC083Bmn3Z567MJtdBmp/5gwtL7AwQXhS1T5w== X-Received: by 2002:a05:6402:5107:: with SMTP id m7mr1881737edd.155.1614245011435; Thu, 25 Feb 2021 01:23:31 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.23.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:23:31 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 01/38] pci: fsl_pci_init: Dynamically allocate the PCI regions Date: Thu, 25 Feb 2021 17:22:22 +0800 Message-Id: <1614244979-48216-2-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean Commit e002474158d1 ("pci: pci-uclass: Dynamically allocate the PCI regions") changes 'struct pci_controller'.regions from pre-allocated array of regions to dynamically allocated, which unfortunately broken lots of boards that still use the non-DM PCI driver. This patch changes the non-DM fsl_pci_init driver to dynamically allocate the regions, just like what's done in the pci uclass driver. Fixes: e002474158d1 ("pci: pci-uclass: Dynamically allocate the PCI regions") Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- (no changes since v2) Changes in v2: - drop the revert patch of commit e002474158d1 - new patch: pci: fsl_pci_init: Dynamically allocate the PCI regions drivers/pci/fsl_pci_init.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c index e72a60c..fc3327e 100644 --- a/drivers/pci/fsl_pci_init.c +++ b/drivers/pci/fsl_pci_init.c @@ -32,6 +32,8 @@ DECLARE_GLOBAL_DATA_PTR; #include #include +#define MAX_PCI_REGIONS 7 + #ifndef CONFIG_SYS_PCI_MEMORY_BUS #define CONFIG_SYS_PCI_MEMORY_BUS 0 #endif @@ -80,6 +82,9 @@ int fsl_setup_hose(struct pci_controller *hose, unsigned long addr) /* Reset hose to make sure its in a clean state */ memset(hose, 0, sizeof(struct pci_controller)); + hose->regions = (struct pci_region *) + calloc(1, MAX_PCI_REGIONS * sizeof(struct pci_region)); + pci_setup_indirect(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data); return fsl_is_pci_agent(hose); From patchwork Thu Feb 25 09:22:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444198 X-Patchwork-Delegate: priyanka.jain@nxp.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=GN0bmQ8i; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DmS5w2sjYz9sVR for ; Thu, 25 Feb 2021 20:24:04 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C67BC80EFE; Thu, 25 Feb 2021 10:23:51 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="GN0bmQ8i"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8AAE380EF2; Thu, 25 Feb 2021 10:23:40 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) (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 E501680927 for ; Thu, 25 Feb 2021 10:23:35 +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=bmeng.cn@gmail.com Received: by mail-ej1-x630.google.com with SMTP id u20so7638035ejb.7 for ; Thu, 25 Feb 2021 01:23:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=A+BT09CeUjJ0VYGveaRlRQiOUl2gWcQxgsJzduTeq2U=; b=GN0bmQ8i7qWz9+/op9VtyZ/zWeBVHpwCrycRAqY/4pcyt6lNk6/42O4f1Idsyn9gHE QbfCMMInRvzT1yi91jxt88evYECs0LltVUCSQQ7mA1WblgrY3iJRDcECvs9f6f5fcbIs RJkhHEPNNTeM8tmf6PHzHaTlClAPlctz79UAZe7EIQZdUz1P2naEBjYdn/C8O6jApqIJ 199IrmzO7zg+WUK6Xi0Tpn7fARTvzgEB6zkviqSKcYdYHpcmwvjOuVYlBuMyFVlmCnTd xGNZRorI7CRHfMPvA+8OVlOIsWgAa66b2D/f5uDPoRQHRMS9EgD/qYuWQiR4i+Pik3Lq JaWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=A+BT09CeUjJ0VYGveaRlRQiOUl2gWcQxgsJzduTeq2U=; b=iKy+b22iCAMLmF+rouItHLR0a5Ag22pwlzwsrObXcVcB1icRvUU4eaKt89cIfI6Ot9 zEGesIshE2zx9Ynl5VuT1ICCa/ab/6PHBfULXY+20OGe1ejemG21p5mc1A5L8K0bdMQJ yDVsrOepgsKj06LyWNUyyRslqMXRaXuTURO8BhAhpWibxtaA5KFaDGzbvAApea9xFwz1 64cTWkznfURPWHLxEeny7BH0wiVhqwMd8prIA8UH2N5rPuzMhHBnz1mi8x/F2p6J38Uw wVaur/pQZnzRXpR7J+M3qDheQNfH1A/tMiOKSCxb73epkaoqqVjlDFcPSNNiqCePgCfV bLfA== X-Gm-Message-State: AOAM532j+GfH3Patd1kwtAS7xniQb5dVSkz5rm2PsOHKUBNiPNcBvgC1 jI+nPM9Rbf0ktMg4Mg49+sY= X-Google-Smtp-Source: ABdhPJysd4mut3m8+mHjrqhwnCNumQwIxZMGZdfk5pz5tLh/cXxFFGEBMbCb9Xrunrkr2aLYN7KOkw== X-Received: by 2002:a17:906:115a:: with SMTP id i26mr1885597eja.10.1614245015578; Thu, 25 Feb 2021 01:23:35 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.23.32 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:23:35 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 02/38] ppc: qemu: Update MAINTAINERS for correct email address Date: Thu, 25 Feb 2021 17:22:23 +0800 Message-Id: <1614244979-48216-3-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean Alex's previous email address is no longer reachable. Signed-off-by: Bin Meng Reviewed-by: Simon Glass Reviewed-by: Priyanka Jain --- (no changes since v1) board/freescale/qemu-ppce500/MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/freescale/qemu-ppce500/MAINTAINERS b/board/freescale/qemu-ppce500/MAINTAINERS index 77d0a4a..e70c095 100644 --- a/board/freescale/qemu-ppce500/MAINTAINERS +++ b/board/freescale/qemu-ppce500/MAINTAINERS @@ -1,5 +1,5 @@ QEMU-PPCE500 BOARD -M: Alexander Graf +M: Alexander Graf S: Maintained F: board/freescale/qemu-ppce500/ F: include/configs/qemu-ppce500.h From patchwork Thu Feb 25 09:22:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444199 X-Patchwork-Delegate: priyanka.jain@nxp.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=tfUobTJ1; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DmS6H2h2Tz9sVR for ; Thu, 25 Feb 2021 20:24:23 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D9081806C3; Thu, 25 Feb 2021 10:24:19 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="tfUobTJ1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 72C8E80F00; Thu, 25 Feb 2021 10:23:46 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) (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 0696D80CE8 for ; Thu, 25 Feb 2021 10:23: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=bmeng.cn@gmail.com Received: by mail-ed1-x52b.google.com with SMTP id l12so5923961edt.3 for ; Thu, 25 Feb 2021 01:23:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5CDejsp1CnMt+tRFi1ts3B9VBWJbLPadCjOaBrDesGQ=; b=tfUobTJ1KSiNTIw+JJbC6VXwvKJkhutlCpwbAD5+03MdTuhBekHX5uC+SWyeDPHb3A fJtz/oSNVV0+IIeWhiQLfy+t+CXzwWgSkUluFY/qBiT4JI/mOSivh6oB3LaJKZw8BcJU dYsxKM/gm/h7W5BAyduPAYmGnCBxmRSfYeHxo9apw2vD013SOPmZks8McxaYyqdJ53wf mc5UTq7y0g0AvkK9yFIRwpX9yZbMSzfW0XSjl2Ac/bnHqc+DcNfkzx770glOK75/WOkH MTC4EUcMzYPdR9tdEAhoOODJNOJBUrgZErXsYugDZAh3qPTJPOXEkSaL6/Mp6bmr5UIX oQcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5CDejsp1CnMt+tRFi1ts3B9VBWJbLPadCjOaBrDesGQ=; b=Kxdv4VS1acGXLpPXwCXfivRlm49JL7eIlEQpPepYTd6pPOaLQqOQDZB/JP6fJtf5+a mDkzQuU4rxOR33Fh/a8dgCUDI7sGz2wfBAJ/l3lnIWJeqSBh7L2Ih785ASY8y1umgZN0 jNc/hr8GJ8eZ8NnY5x8GGUuEGHGrFNZ6X+obevJDcANby8vPNrLn14EZGG4DIGmylnUL pjKos0FyK8FwdWHMdjwb1m3IcBM0hJhC9VwY9UbtgOIK9ThGhUK0EDEc91VoLNzH2O7Z bMeiWwVih9fyxGIA+SQl/OMobAk41ASVxGcTLzQcH0hlvSf+McdtfXo4IjvUz/6LgF74 w2Iw== X-Gm-Message-State: AOAM530wrVlo7TyTRxvBJ8ziYf6emPcrVjGaDqog8QIFxZl+JrRrCoiY SacD+mCUX2FxSrzd2Qrepe0= X-Google-Smtp-Source: ABdhPJyGypTjQN/n/szkB3R+BOJ1lgLTSOkzYtXhzqGNv5Dj0ij4LYmS5Y4ryf6ileY/414t4G11OA== X-Received: by 2002:a05:6402:1155:: with SMTP id g21mr1902413edw.279.1614245019694; Thu, 25 Feb 2021 01:23:39 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.23.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:23:39 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 03/38] common: fdt_support: Support special case of PCI address in fdt_read_prop() Date: Thu, 25 Feb 2021 17:22:24 +0800 Message-Id: <1614244979-48216-4-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean At present fdt_read_prop() can only handle 1 or 2 cells. It is called by fdt_read_range() which may be used to read PCI address from for a PCI bus node where the number of PCI address cell is 3. The property is an array of: { } When trying to read from a PCI bus node using fdt_read_prop(), as the codes below: /* Read */ if (child_addr) { r = fdt_read_prop(ranges, ranges_len, cell, child_addr, acells); if (r) return r; } it will fail, because the PCI child address is made up of 3 cells but fdt_read_prop() cannot handle it. We advance the cell offset by 1 so that the can be correctly read. This adds the special handling of such case. Signed-off-by: Bin Meng Reviewed-by: Simon Glass Reviewed-by: Priyanka Jain --- (no changes since v2) Changes in v2: - add more details in the commit message, and put some comments in the codes to explain why common/fdt_support.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/common/fdt_support.c b/common/fdt_support.c index 08d540b..e624bbd 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -1668,22 +1668,36 @@ u64 fdt_get_base_address(const void *fdt, int node) } /* - * Read a property of size . Currently only supports 1 or 2 cells. + * Read a property of size . Currently only supports 1 or 2 cells, + * or 3 cells specially for a PCI address. */ static int fdt_read_prop(const fdt32_t *prop, int prop_len, int cell_off, uint64_t *val, int cells) { - const fdt32_t *prop32 = &prop[cell_off]; - const unaligned_fdt64_t *prop64 = (const fdt64_t *)&prop[cell_off]; + const fdt32_t *prop32; + const unaligned_fdt64_t *prop64; if ((cell_off + cells) > prop_len) return -FDT_ERR_NOSPACE; + prop32 = &prop[cell_off]; + + /* + * Special handling for PCI address in PCI bus + * + * PCI child address is made up of 3 cells. Advance the cell offset + * by 1 so that the PCI child address can be correctly read. + */ + if (cells == 3) + cell_off += 1; + prop64 = (const fdt64_t *)&prop[cell_off]; + switch (cells) { case 1: *val = fdt32_to_cpu(*prop32); break; case 2: + case 3: *val = fdt64_to_cpu(*prop64); break; default: From patchwork Thu Feb 25 09:22:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444200 X-Patchwork-Delegate: priyanka.jain@nxp.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=e2IxN4W6; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DmS6V6FDXz9sVR for ; Thu, 25 Feb 2021 20:24:34 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 604E78120B; Thu, 25 Feb 2021 10:24:24 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="e2IxN4W6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9E873812B7; Thu, 25 Feb 2021 10:23:52 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) (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 3A77880EF2 for ; Thu, 25 Feb 2021 10:23:44 +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=bmeng.cn@gmail.com Received: by mail-ed1-x530.google.com with SMTP id p2so5874179edm.12 for ; Thu, 25 Feb 2021 01:23:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VoxSxgrJVz+pq1vxzRQwMCZkMRh9wbQkwkmlcHTJKbY=; b=e2IxN4W6fWWeQ4LAXh02N8qZAdwJEeVcPTLszvWdrqYhiGSxmYERvOw8QZ9uXRNsfc bT7yRUyIsppJECfA1u2g2btqnCYIwrH4aHmnmEVQratju8vYTi6lNSsUHo+wZgkl2knO 6Gd3Cu4j/GGQCzmOiBzDlg1Lts1tzgJZBE6CbiPOZqM4IKJNskclMYUSnY1JCCs3hMSv ZgsmCa6fO/ahMjKkkLdiJtmRl0kwbGChV2IpLitkigSmUXkOQhSHLefAcY3/c5liOQYa 98iTBqv4B7BXZ84+bPmRAWD0BOPZ6CDfjU+SlmUE08BxwJSpOW8R1L5XTc0brYyMXAJE ITMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VoxSxgrJVz+pq1vxzRQwMCZkMRh9wbQkwkmlcHTJKbY=; b=ATf10/FoKWb9V2kbompEKFBLz1RTsIkzqM0Z4FNslHExru3ieeTRpjjYapxxfP2+WU vHG3OnoHerg1yxFHIGLcahcuLI6S8FJcpf378m85jSIhiprmSdotlzpPfMHU75t5UsxB A11tEYWD9P2iLGOoK/etrtt/1Ww5wBMOaSkIpi1+13cgn0LrZ0muFBhkB+PwFLv34YYf qy1+3E3MqfelGGvdktxAwdaqIzQEKSQWRNt+GSaDii1JWh9vHLKhPJCn7Ozk/dXn80Dt GfLxvWwBGCE5DmQQ5jNZvtcQWT0knipCUT5oLkTXZDGa8UlB/Bd2Ij0wg9MlGG2kGJ7I WQxQ== X-Gm-Message-State: AOAM5313uAL71fwdYT3E9+MvAgwiUSNEaAU2ifTV0GKKq2SvQeYOuEmn C+PxMspP6EvRDeN0s7+LHqSLMWFOaew= X-Google-Smtp-Source: ABdhPJxHwomRGVZdCDyg9BZME3lsevhv5v/ibGAk2TxvRE4J4ycs3ORTLrgwW0xCBTBDXAjQ9nuv9g== X-Received: by 2002:a05:6402:304b:: with SMTP id bu11mr1821599edb.157.1614245023919; Thu, 25 Feb 2021 01:23:43 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.23.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:23:43 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 04/38] ppc: qemu: Support non-identity PCI bus address Date: Thu, 25 Feb 2021 17:22:25 +0800 Message-Id: <1614244979-48216-5-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean When QEMU originally supported the ppce500 machine back in Jan 2014, it was created with a 1:1 mapping of PCI bus address. Things seemed to change rapidly that in Nov 2014 with the following QEMU commits: commit e6b4e5f4795b ("PPC: e500: Move CCSR and MMIO space to upper end of address space") and commit cb3778a0455a ("PPC: e500 pci host: Add support for ATMUs") the PCI memory and IO physical address were moved to beyond 4 GiB, but PCI bus address remained below 4 GiB, hence a non-identity mapping was created. Unfortunately corresponding U-Boot updates were missed along with the QEMU changes and the U-Boot QEMU ppce500 PCI support has been broken since then. This commit makes the PCI (non-DM version) work again. Signed-off-by: Bin Meng --- (no changes since v1) board/freescale/qemu-ppce500/qemu-ppce500.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c index aa5774f..1d68d30 100644 --- a/board/freescale/qemu-ppce500/qemu-ppce500.c +++ b/board/freescale/qemu-ppce500/qemu-ppce500.c @@ -85,20 +85,24 @@ int checkboard(void) } static int pci_map_region(void *fdt, int pci_node, int range_id, - phys_size_t *ppaddr, pci_addr_t *pvaddr, - pci_size_t *psize, ulong *pmap_addr) + phys_addr_t *pbaddr, phys_size_t *ppaddr, + pci_addr_t *pvaddr, pci_size_t *psize, + ulong *pmap_addr) { - uint64_t addr; + uint64_t baddr; + uint64_t paddr; uint64_t size; ulong map_addr; int r; - r = fdt_read_range(fdt, pci_node, range_id, NULL, &addr, &size); + r = fdt_read_range(fdt, pci_node, range_id, &baddr, &paddr, &size); if (r) return r; + if (pbaddr) + *pbaddr = baddr; if (ppaddr) - *ppaddr = addr; + *ppaddr = paddr; if (psize) *psize = size; @@ -115,7 +119,7 @@ static int pci_map_region(void *fdt, int pci_node, int range_id, return -1; /* Map virtual memory for range */ - assert(!tlb_map_range(map_addr, addr, size, TLB_MAP_IO)); + assert(!tlb_map_range(map_addr, paddr, size, TLB_MAP_IO)); *pmap_addr = map_addr + size; if (pvaddr) @@ -166,24 +170,19 @@ void pci_init_board(void) pci_info.regs = fdt_translate_address(fdt, pci_node, reg); /* Map MMIO range */ - r = pci_map_region(fdt, pci_node, 0, &pci_info.mem_phys, NULL, + r = pci_map_region(fdt, pci_node, 0, &pci_info.mem_bus, + &pci_info.mem_phys, NULL, &pci_info.mem_size, &map_addr); if (r) break; /* Map PIO range */ - r = pci_map_region(fdt, pci_node, 1, &pci_info.io_phys, NULL, + r = pci_map_region(fdt, pci_node, 1, &pci_info.io_bus, + &pci_info.io_phys, NULL, &pci_info.io_size, &map_addr); if (r) break; - /* - * The PCI framework finds virtual addresses for the buses - * through our address map, so tell it the physical addresses. - */ - pci_info.mem_bus = pci_info.mem_phys; - pci_info.io_bus = pci_info.io_phys; - /* Instantiate */ pci_info.pci_num = pci_num + 1; From patchwork Thu Feb 25 09:22:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444201 X-Patchwork-Delegate: priyanka.jain@nxp.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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=MAyruxG6; 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 4DmS6n0sJzz9s1l for ; Thu, 25 Feb 2021 20:24:49 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 80D54812B7; Thu, 25 Feb 2021 10:24:29 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="MAyruxG6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 297A5816A7; Thu, 25 Feb 2021 10:23:54 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (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 AB6AF80F00 for ; Thu, 25 Feb 2021 10:23:48 +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=bmeng.cn@gmail.com Received: by mail-ed1-x534.google.com with SMTP id s8so5935394edd.5 for ; Thu, 25 Feb 2021 01:23:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=brq90tN74kRsnjK01Vv1A2HvG5MDxcmOKGtaXg8LJcI=; b=MAyruxG6H+8T+TZK186KqIE/RkETzT2m8AwjJtC0U3OfyAtCmpLkQCjohDiKKNOOzi 8smAj6Xv77aJgDWyCvIZ1M7HLKawdrlWu+mrXcpaVuHOi5APjgpOY+S0ttx9F8kzxmfL V4kVzPZE5zPRhJ9qDPFqdgdwp1g/koG7hXbiipzJTKK5BkhYwlvNzo4l+hkGhr/hcwqb 1yZH30/PHOLeS9FuFjYXeA6oBnpeKqfX25ygWaEK9AR/OFzyu6TtXEFzMXXt/0stjsQg N37m3/WKsS/Rf0zy+Y8wYTuefQCNyFlpXnaFZJawz9UqS/u83fCkoxvBqXDgzknnQz4T s+TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=brq90tN74kRsnjK01Vv1A2HvG5MDxcmOKGtaXg8LJcI=; b=a3v9LQMYjT9m8jmXlI6axdLmIxRLSq0G814WZ2wzNo82q+6PDSrHDhQOb8YP1S3bpw WJZ8jkbNWmZeKn+/P4tddHM4vzGXHACM18JVCvd/Zn6V7cAlA+kbyr4x3q5PNN4Hz52C DhkMbwyuHN+t7/EA20AqZ1BRO2q5eMWxp2wiqigo0r7A2YD+YbuU6zWpIcmPFRRf9C1B Uk1eehCO8+6YICQEqYg4jNLMvEblwDfTvfGEKfR/F5lG0CgUXU1oUpe/HgDKJANJTPA/ bfTzfMGlJaRsyLnkwYEU2AOTjNL7BKPN3jMlzEu2CP3v4FbaqhGi1pxNyF3FjnLTCDQY s9BQ== X-Gm-Message-State: AOAM531LqtcUEhohcW2KNYuTSiRBAzTsd7wUVgRqJzqF75NAyLhwov8M uhk/gnjQPrgxu5mEHHX43N0= X-Google-Smtp-Source: ABdhPJzIAfa1C54o+lKBfu7ZM20ltGv7ifuC3gmbJWCBAQcZn/LGflr9kSjRU9y225XD4+opmYbclA== X-Received: by 2002:aa7:d296:: with SMTP id w22mr1941960edq.264.1614245028449; Thu, 25 Feb 2021 01:23:48 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.23.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:23:48 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 05/38] ppc: qemu: Fix CONFIG_SYS_PCI_MAP_END Date: Thu, 25 Feb 2021 17:22:26 +0800 Message-Id: <1614244979-48216-6-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean CONFIG_SYS_PCI_MAP_END currently points to 0xe8000000, which means the upper end of the virtual address mapped to PCI bus address ends at 0xe8000000. But this is wrong as the CCSBAR was already mapped at 0xe0000000 with a 1 MiB size. Fixes: fa08d3951777 ("PPC 85xx: Add qemu-ppce500 machine") Signed-off-by: Bin Meng Reviewed-by: Priyanka Jain --- (no changes since v1) include/configs/qemu-ppce500.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/configs/qemu-ppce500.h b/include/configs/qemu-ppce500.h index ee6ef18..f13e4ea 100644 --- a/include/configs/qemu-ppce500.h +++ b/include/configs/qemu-ppce500.h @@ -35,7 +35,7 @@ extern unsigned long long get_phys_ccsrbar_addr_early(void); /* Virtual address range for PCI region maps */ #define CONFIG_SYS_PCI_MAP_START 0x80000000 -#define CONFIG_SYS_PCI_MAP_END 0xe8000000 +#define CONFIG_SYS_PCI_MAP_END 0xe0000000 /* Virtual address to a temporary map if we need it (max 128MB) */ #define CONFIG_SYS_TMPVIRT 0xe8000000 From patchwork Thu Feb 25 09:22:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444203 X-Patchwork-Delegate: priyanka.jain@nxp.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=XmFEnNPc; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DmS730qKSz9sVR for ; Thu, 25 Feb 2021 20:25:03 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2803B816A7; Thu, 25 Feb 2021 10:24:35 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="XmFEnNPc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C664C816A7; Thu, 25 Feb 2021 10:23:58 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) (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 14D568144F for ; Thu, 25 Feb 2021 10:23:53 +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=bmeng.cn@gmail.com Received: by mail-ej1-x62f.google.com with SMTP id d8so7653670ejc.4 for ; Thu, 25 Feb 2021 01:23:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0OjEmPZuyhAQFBlQ0J0ADBHp2GkhvqPyZCzru40eGD4=; b=XmFEnNPc3zu3ORN8/c1xcW5ySYWbSZ+6RiC+Mrh1SGIrNllqxHTna45Ih9JH9w9YEA 1klpadDZf+SBYPBQ96zm0BRo0rpkRoc94eK1elyKV28LHnt1bILjVlm/uXXMxbDwmBDN 3fnHt3/YTi82mWVQh6jBjsiELkOMvCXx/f+agewCRDeVMF+CkSbtZXVo1Dj9PLhAhwxX 0WrjW6bnR+k3evvGYNFutBeAJF6UWPoqAsmYr+iRJXTB3QNFiCfGpQ5GrRqg+Tv07Frt h62z3Ula5nFe8qePbmc0+Rkr+DLeITos6Aknn7KypDs9sXfMUOv8LLv+BCu26TD6GDeT tsgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0OjEmPZuyhAQFBlQ0J0ADBHp2GkhvqPyZCzru40eGD4=; b=TLEfch01ek7x58t8gJ+n1wdQ7Y2CF6oM/h9Vyg/4tLktOJ1sv9QLjfZ7U4df2xX9Jj YiCxF7GrgH8cHg/lq2l3P+yT1N0e4jrfayVLiUQ1pWxhasS0bSVTrs5ZaSkBrqKYOPT3 FtjftSNmYtMI2so/TnpONUfWBtX4/yuPn0rJ6yiAjDWN0pNi0FTHrkrgooxuGSjjj+2o 755uR65MakaOAdCEX+1ePuR+O5HqiSf9dzgBbqOjzFDXAKelEc3N0IzuVo6N7Loyfsia eKt+Cvd80hFgdV1T4TKsfC5dkdNxTJRFUWnVQMFWLpoxhyiyHHSqxSVTfK2yMew2lDDA +PHQ== X-Gm-Message-State: AOAM533GbxDvEL+WcHrhVCa0g/QhIPLR7V+aEmCW73QlTNTzuXDqhj8q BpLe7uDK1lFfm/udN1Z4ACQ= X-Google-Smtp-Source: ABdhPJyWge/wk5uk75tPxtyfzPeN74IDv1HlPFRLn0WmePyXz2IEGFdm710lpRNokWS5DOJh5I64lA== X-Received: by 2002:a17:906:32c5:: with SMTP id k5mr1706083ejk.249.1614245032500; Thu, 25 Feb 2021 01:23:52 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.23.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:23:52 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 06/38] ppc: mpc85xx: Wrap LAW related codes with CONFIG_FSL_LAW Date: Thu, 25 Feb 2021 17:22:27 +0800 Message-Id: <1614244979-48216-7-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean LAW related codes should be wrapped with CONFIG_FSL_LAW. Signed-off-by: Bin Meng Reviewed-by: Priyanka Jain --- (no changes since v1) arch/powerpc/cpu/mpc85xx/cpu.c | 2 ++ arch/powerpc/cpu/mpc85xx/cpu_init_early.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index 5170610..fc25bb2 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu.c +++ b/arch/powerpc/cpu/mpc85xx/cpu.c @@ -395,7 +395,9 @@ int cpu_mmc_init(struct bd_info *bis) void print_reginfo(void) { print_tlbcam(); +#ifdef CONFIG_FSL_LAW print_laws(); +#endif #if defined(CONFIG_FSL_LBC) print_lbc_regs(); #endif diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c index 4195ecc..5a0d33b 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c +++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c @@ -123,7 +123,9 @@ void cpu_init_early_f(void *fdt) setbits_be32(&gur->pmuxcr, MPC85xx_PMUXCR_LCLK_IFC_CS3); #endif +#ifdef CONFIG_FSL_LAW init_laws(); +#endif /* * Work Around for IFC Erratum A003399, issue will hit only when execution From patchwork Thu Feb 25 09:22:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444204 X-Patchwork-Delegate: priyanka.jain@nxp.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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ewZW5DHj; 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 4DmS7K52vbz9s1l for ; Thu, 25 Feb 2021 20:25:17 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 81883819F2; Thu, 25 Feb 2021 10:24:39 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ewZW5DHj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B3BD38144F; Thu, 25 Feb 2021 10:24:06 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) (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 E4AE281810 for ; Thu, 25 Feb 2021 10:23:56 +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=bmeng.cn@gmail.com Received: by mail-ej1-x635.google.com with SMTP id d8so7654120ejc.4 for ; Thu, 25 Feb 2021 01:23:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=33WBq8OR5WtcYvV+OEoEa0H9u2u2HI2w/CbhNJppNS8=; b=ewZW5DHjtberoP9BcJL2/lF+ea27vvlRJrpnXLiHmwqHstH/dpuMDyx8vAEIiV7meT QfNt8mPMuS2VlfmN4tX5ZdzR+Rup6HYEmGg6Crx9WDgIzsi6VWsBbUhO3zLN62I2eQdj 1LUxpjCo4cyV34EMmr3pTc9LQS85Qs0bUuaP0Tk4U383Q15mFoxpHOVazjDj6Fo+q7Yh Sf/bBezZegyPS3UxpVtZxA9m5Y62YmXtJpFMDJAo8CjibsPMSf1lyoth7cg/vDdosept ktc97oFPcNWwYdEshHqqqri9f0BFGTJaRB2aZnPxUx0oTaNVd5lO0VL3BuutjfxTdDeu bUrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=33WBq8OR5WtcYvV+OEoEa0H9u2u2HI2w/CbhNJppNS8=; b=l4oROgmS3Wan2n7i9o6bwqhasAHFyPA88nqtJpIbhmeqeKEIwn6pHHu5EozHuabzGP M45TxN1xadzYyOogP8RwhJevuCSkRci1V1vfflVyDoz9thIidDsV8PXxCwkJHibtGHdj C4ZTTlZFnxyXE7D0SEfVdJVT4kqkbPLPd/Gzyk7SU+gDrxwId5bHwhYpnZNhm2lvf7tR uRsmWr22H0yr6XJDuLxa8r6Tf1u/Bzu953ZjxvyU73KRfa65npae1kKNgT+QbVTzueBa pptLlzIvYsHTC1M4EsU2KR3C5OdBUAGTRiY2nF4XYC8I0Ply9Wmf+POMB8JEyaJB2zEG SHUg== X-Gm-Message-State: AOAM533Iq5/HH+I5p+ne7id3iJ3cJI+mAfmrNIHzO1ti4noaR8XSqbZz pIJPblQSRLJoT7V/GRcHnxY= X-Google-Smtp-Source: ABdhPJyKHqaQiPEkBmAEn9JaR2duyKhyLPTigtcQaqHCdngV1C5zaRtLt4k19khdSZpGhzK6mEXWLA== X-Received: by 2002:a17:906:38b:: with SMTP id b11mr1738630eja.78.1614245036671; Thu, 25 Feb 2021 01:23:56 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.23.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:23:56 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 07/38] ppc: qemu: Drop init_laws() and print_laws() Date: Thu, 25 Feb 2021 17:22:28 +0800 Message-Id: <1614244979-48216-8-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean These are no longer needed. Drop them. Signed-off-by: Bin Meng --- (no changes since v1) board/freescale/qemu-ppce500/qemu-ppce500.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c index 1d68d30..dba5e0f 100644 --- a/board/freescale/qemu-ppce500/qemu-ppce500.c +++ b/board/freescale/qemu-ppce500/qemu-ppce500.c @@ -254,11 +254,6 @@ int ft_board_setup(void *blob, struct bd_info *bd) } #endif -void print_laws(void) -{ - /* We don't emulate LAWs yet */ -} - phys_size_t fixed_sdram(void) { return get_linear_ram_size(); @@ -302,11 +297,6 @@ void init_tlbs(void) 1024 * 1024, TLB_MAP_RAM)); } -void init_laws(void) -{ - /* We don't emulate LAWs yet */ -} - static uint32_t get_cpu_freq(void) { void *fdt = get_fdt_virt(); From patchwork Thu Feb 25 09:22:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444205 X-Patchwork-Delegate: priyanka.jain@nxp.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=MvRqR3VF; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DmS7Y4WDWz9s1l for ; Thu, 25 Feb 2021 20:25:29 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DFC8181F8F; Thu, 25 Feb 2021 10:24:46 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="MvRqR3VF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 86D5F816A7; Thu, 25 Feb 2021 10:24:09 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) (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 0A462812E6 for ; Thu, 25 Feb 2021 10:24:01 +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=bmeng.cn@gmail.com Received: by mail-ed1-x531.google.com with SMTP id w21so5909656edc.7 for ; Thu, 25 Feb 2021 01:24:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9CG3rcHimIxeDAdQGMmGt4eeXXHFrYKhSK8JgAMTO3Y=; b=MvRqR3VF8oNMB1vC6RyEf/Xl6mbEG1ledzgPsfSHr45XkWszlFjkkZsyttyicVsTLT LvH1ldrZdSzoT0JNy0XDfmb81HuQ0H7ygTWmNBQ4MV33GjINrknoXCuGoIFfvjVIDRJZ IahBCc5Kgx9CykbYTXxE0PMcIDMnQqRf1uavS+VPYk79LalCLRa58a6TsR/EwPmNQhbY i3oKaPPcmfcelt2vSL2AKyd1uRK1AkvALpBu3RiemdCTNRPIE7X81sp0q0gg0EKGXOuh 4HCCm6BKypmmke3IBHlDYsNuAmULFRYMDPpzBycg/AImEgWLT/QeHXZ1zr5cWe90+AEy RYIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9CG3rcHimIxeDAdQGMmGt4eeXXHFrYKhSK8JgAMTO3Y=; b=jJ7hsrCmh28Pnj9Fesud6K9Y+DwPDUgz81M6NXuON0bvEOuls7Fc4XapyNc0oymST6 wpti1lO8L5A0LaQkPEDqexRk7G363bDX36gtJKkmywCqnt9n6iLovu1Hg9aA67stUGbD EGDmbon4u5hDPM3bdGLk4VsJ+mfrlCs1UiY2m6u09jui/8UPve9X8fMeKHIhgdy6ADkp Ztqv2crCrS1FT9vX2R0ZOjFWqO+2JrS7Km4DNYkn+PEYUnIp4EHmlLRRhKtAhDYTdDrT sH7aLabcVLnWg4WX0GBTPh4Wk+kpzsJ1DtqNyA3B/83+lcjm2Rd3+iaZTJmhp6HbSCQ5 WlkQ== X-Gm-Message-State: AOAM530ATNS0JrnMEkeisuXw6ekaU2q2ztGeggJgY4jBzicJpKw6ISMV H//pgRBLjJ/qKqYiqMHuf8o= X-Google-Smtp-Source: ABdhPJxd6a66mRTJyE/TUVBKmetVO41Qe3kmHJw6jGxbwG75KIp0rOYlWXSPOJ6SDmenpmz66i36wg== X-Received: by 2002:aa7:d315:: with SMTP id p21mr1933363edq.300.1614245040773; Thu, 25 Feb 2021 01:24:00 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.23.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:24:00 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 08/38] ppc: qemu: Drop board_early_init_f() Date: Thu, 25 Feb 2021 17:22:29 +0800 Message-Id: <1614244979-48216-9-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean This function does nothing. Drop it. Signed-off-by: Bin Meng Reviewed-by: Priyanka Jain --- (no changes since v1) board/freescale/qemu-ppce500/qemu-ppce500.c | 5 ----- configs/qemu-ppce500_defconfig | 1 - 2 files changed, 6 deletions(-) diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c index dba5e0f..4719d98 100644 --- a/board/freescale/qemu-ppce500/qemu-ppce500.c +++ b/board/freescale/qemu-ppce500/qemu-ppce500.c @@ -74,11 +74,6 @@ uint64_t get_phys_ccsrbar_addr_early(void) return r; } -int board_early_init_f(void) -{ - return 0; -} - int checkboard(void) { return 0; diff --git a/configs/qemu-ppce500_defconfig b/configs/qemu-ppce500_defconfig index d17c556..25fcd41 100644 --- a/configs/qemu-ppce500_defconfig +++ b/configs/qemu-ppce500_defconfig @@ -10,7 +10,6 @@ CONFIG_OF_BOARD_SETUP=y CONFIG_OF_STDOUT_VIA_ALIAS=y CONFIG_BOOTDELAY=1 # CONFIG_DISPLAY_BOARDINFO is not set -CONFIG_BOARD_EARLY_INIT_F=y CONFIG_LAST_STAGE_INIT=y # CONFIG_MISC_INIT_R is not set CONFIG_HUSH_PARSER=y From patchwork Thu Feb 25 09:22:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444206 X-Patchwork-Delegate: priyanka.jain@nxp.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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Jk7nXPAx; 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 4DmS7m3Tmxz9s1l for ; Thu, 25 Feb 2021 20:25:40 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B1E03819F3; Thu, 25 Feb 2021 10:24:53 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Jk7nXPAx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1AE75816A7; Thu, 25 Feb 2021 10:24:15 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) (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 E578980EFF for ; Thu, 25 Feb 2021 10:24:04 +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=bmeng.cn@gmail.com Received: by mail-ed1-x530.google.com with SMTP id s8so5936508edd.5 for ; Thu, 25 Feb 2021 01:24:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5YtB5fCM99/jU2MlIlWfMVzz0GqPQbpWC3h8pe6KSbw=; b=Jk7nXPAxRMSyxP5s484MoXKjN/n0B0qarFRpTmgzMYVeubfomNm6yJs6I8w4GBZMnH HjsE6dy8EkA6ALwLOvXtopCPrXkloQUzNciVB/u6m0Ea6KSRoN++LBC/n+Lq9T709uW3 B8lvjsMF8N/mRxbCZ3v/KM2hl07/6GEwOxJDc+Uyeeiu24mbmHRs9eAMHyHPaVGYSLl2 t5SuHmio7tjB5tfxpzgWgEDHmpyyfvlGPvnRWnnBfUnqa9HraBK6ly6XgOCz5Cv3T+8u rLkWhVCVfeu6qFryAVpScv1jF3Yfq78Q+LfbPehJHbBVgUcWIOAcJ68dwUC1NRi5P1fK +Cjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5YtB5fCM99/jU2MlIlWfMVzz0GqPQbpWC3h8pe6KSbw=; b=O0OkVbi7QfWFOUHj8+CXMFP+Dsi2lK2nbsyveUKlWG9sNuOyj2sO6aIDoSbh63mBSY e56adIPktKtvM03oiB2wgmT4y/5+L7xbcOSJnN8mOdXgQ6Es8lPS/Qfu0WPCNgSSasB6 yhedh+meL0FbHNEuAzOOnuEewEc9l+C8pwYQkdDmJ8KwJXfOetCb9L5Sl2G4WC6SlEUc ciAjYI9BAj0pMg1hJ8TDBiAm2eRaGEAQ+ZtVuhncCARHMaMYxGAA1YAR6EnImy8+p1W9 jysNu1vROUfbMChzWybPh/MQz2T40VWHc9Kye3S1tsgrjtOA4tR+6+k79/YaMVy1HLSn kWxg== X-Gm-Message-State: AOAM532ilu1EUzKQMo/u0zvbihudZZ6EMWxZRVc+CwgyALC2YBTBLX90 iGl5O9F47P2/If/HP34M3cc= X-Google-Smtp-Source: ABdhPJwwVJ0wp3VnvbraeTEIHzny4m9as/u52+gKc7hse2qS46hd59SbTfrX6qvZRPAVRczA63q5+w== X-Received: by 2002:a05:6402:304b:: with SMTP id bu11mr1822569edb.157.1614245044616; Thu, 25 Feb 2021 01:24:04 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.24.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:24:04 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 09/38] ppc: qemu: Enable OF_CONTROL Date: Thu, 25 Feb 2021 17:22:30 +0800 Message-Id: <1614244979-48216-10-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean The QEMU ppce500 machine generates a device tree blob and passes it to U-Boot during boot. Let's enable OF_CONTROL with OF_BOARD and provide board_fdt_blob_setup() in the board codes. Signed-off-by: Bin Meng Reviewed-by: Simon Glass Reviewed-by: Priyanka Jain --- (no changes since v1) board/freescale/qemu-ppce500/qemu-ppce500.c | 10 ++++++++++ configs/qemu-ppce500_defconfig | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c index 4719d98..50167d5 100644 --- a/board/freescale/qemu-ppce500/qemu-ppce500.c +++ b/board/freescale/qemu-ppce500/qemu-ppce500.c @@ -364,3 +364,13 @@ u32 cpu_mask(void) { return (1 << cpu_numcores()) - 1; } + +/** + * Return the virtual address of FDT that was passed by QEMU + * + * @return virtual address of FDT received from QEMU in r3 register + */ +void *board_fdt_blob_setup(void) +{ + return get_fdt_virt(); +} diff --git a/configs/qemu-ppce500_defconfig b/configs/qemu-ppce500_defconfig index 25fcd41..4522e18 100644 --- a/configs/qemu-ppce500_defconfig +++ b/configs/qemu-ppce500_defconfig @@ -22,6 +22,8 @@ CONFIG_CMD_PING=y # CONFIG_CMD_HASH is not set CONFIG_CMD_EXT2=y CONFIG_DOS_PARTITION=y +CONFIG_OF_CONTROL=y +CONFIG_OF_BOARD=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y # CONFIG_MMC is not set @@ -29,4 +31,3 @@ CONFIG_E1000=y CONFIG_SYS_NS16550=y CONFIG_ADDR_MAP=y CONFIG_PANIC_HANG=y -CONFIG_OF_LIBFDT=y From patchwork Thu Feb 25 09:22:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444207 X-Patchwork-Delegate: priyanka.jain@nxp.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Z5XJeieL; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DmS7z2z3mz9s1l for ; Thu, 25 Feb 2021 20:25:51 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B459D81FC1; Thu, 25 Feb 2021 10:24:57 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Z5XJeieL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DD487806C5; Thu, 25 Feb 2021 10:24:15 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) (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 20E098144F for ; Thu, 25 Feb 2021 10:24:09 +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=bmeng.cn@gmail.com Received: by mail-ej1-x630.google.com with SMTP id t11so7638547ejx.6 for ; Thu, 25 Feb 2021 01:24:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eqz2+5C2u9imSx5BaAce/wrsbycJEYEvxF5/LQxYCkM=; b=Z5XJeieLikbWOMmGGb0PvXjuWCSjQ/IvINsEEv9ABAvnfLkicqsC3KP9gQpBCnoqFB /dr6uKmYJN/3+4tLHPP4pw/Opw79bDIFbPcYrHekL/VJ8E/WCE1vCk5kOzidrkNu4h+/ Jv7pS8jKLD78D2t4/cEPZ0g1eFSeED9pctIl3VWUIiuALTHD1FbxVD5zzm50KR/+AIKy rwV3c7Tm+3QsUAqm8BPlB6KZrYjv+qYS7WEPB9U2PQfSEO2/MjnQI59qZeM9CpjI/MYy 3pSHf1/4A0rGE+519REuL1cYRecsIpejv6OaOAgytnj6Pdd/xMzef8ew0HaTXJaXNBJi fHMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eqz2+5C2u9imSx5BaAce/wrsbycJEYEvxF5/LQxYCkM=; b=l618D95X+RBaxen6VFF8b9t4ojgEctECbwBax0a71ElkwgNuOLlupgruZWhSfAe18T ciObl+XWFkeKRwAVzsWbqMYrhNX/wcnpMQq8/ftMx+xjug3pxCcVqLISIjTNk6+XR7wA UIEMVi2DhLMPtJbf36D2Qs+NoyAAESd98c0S9OV9aj9nu+R+EJvscKMNwnE81gRBArtY Q8ISnxwvDi8h6dJl2xzLTrAFZIGnvwZjjiqlEABC+7dpgsBMDAGhgHOQ/Lb9LoEgFm+v 37irjvnHmCOFuk3D95bn2qvWkgJyZp7nHg03SDStMLj2zwRDjTpsFveAzstAvQ3BXDtj UU0w== X-Gm-Message-State: AOAM533pwra3gJCSeQ1l5QKLBRnp9m7r7tZRrrrBvH6MV+rTuHYdex/M t50+tz4Xk/teO2cbfPS9pPw= X-Google-Smtp-Source: ABdhPJwDWgLKbIcVjVti1Hn1jMe7tJxnnj4lJ6cJUl4JKBq+6uvbm/n2U0ykBNZ16A72Eo8+g8KJ5A== X-Received: by 2002:a17:906:f1c5:: with SMTP id gx5mr1810612ejb.338.1614245048839; Thu, 25 Feb 2021 01:24:08 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.24.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:24:08 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 10/38] ppc: qemu: Enable driver model Date: Thu, 25 Feb 2021 17:22:31 +0800 Message-Id: <1614244979-48216-11-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean At present QEMU ppce500 target has not been migrated to driver model yet. As a start, let's enable driver model and the 'dm' command. Signed-off-by: Bin Meng Reviewed-by: Simon Glass Reviewed-by: Priyanka Jain --- (no changes since v1) configs/qemu-ppce500_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/qemu-ppce500_defconfig b/configs/qemu-ppce500_defconfig index 4522e18..f2a8b83 100644 --- a/configs/qemu-ppce500_defconfig +++ b/configs/qemu-ppce500_defconfig @@ -16,6 +16,7 @@ CONFIG_HUSH_PARSER=y CONFIG_CMD_REGINFO=y CONFIG_CMD_BOOTZ=y CONFIG_CMD_GREPENV=y +CONFIG_CMD_DM=y CONFIG_CMD_PCI=y CONFIG_CMD_DHCP=y CONFIG_CMD_PING=y @@ -26,6 +27,7 @@ CONFIG_OF_CONTROL=y CONFIG_OF_BOARD=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_DM=y # CONFIG_MMC is not set CONFIG_E1000=y CONFIG_SYS_NS16550=y From patchwork Thu Feb 25 09:22:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444208 X-Patchwork-Delegate: priyanka.jain@nxp.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=DsEPc1WK; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DmS896WMdz9sVR for ; Thu, 25 Feb 2021 20:26:01 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7E19C8120B; Thu, 25 Feb 2021 10:25:06 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="DsEPc1WK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 45DF7806C5; Thu, 25 Feb 2021 10:24:18 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) (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 0C13A812B7 for ; Thu, 25 Feb 2021 10:24:13 +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=bmeng.cn@gmail.com Received: by mail-ej1-x635.google.com with SMTP id n20so7654000ejb.5 for ; Thu, 25 Feb 2021 01:24:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6AW/D331G0CKe/5wz6NMQHJ00tDT1McfyOwRl1ApDbw=; b=DsEPc1WKgF7Xe2OMepASwmf7VnK/sahm5aRxBaQfE4kJVDAzM6MKyqj1gRPhPlDs/8 FpJVyrs/fDoIgI2fRLPcuLdTBrNxI1AeQj8JlRUUQKCXfCLcnG0DO9If5C5466Y6MnTN 8Fipthf1GORCXjHo+ZROJJdjm2i8H6unx4/KQuza+fDaBZWw7lMN4ZVsIUq0CnFf1UA/ dKohntvMldYDg14Oy4NYvdNJho2HXCGDG+eL6wKBOuKN6YhF/Usm7KnLLNUlSGiM60lF InQQt1+cuiulY77+QCBFNe55EdDNiJaNE1FPUIxTCGSPvHAK4/Pgtzn1HtjcHosvcqum ku4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=6AW/D331G0CKe/5wz6NMQHJ00tDT1McfyOwRl1ApDbw=; b=YB+/I0NlTUGh/IEKJxNLFiN4PjYs90E9u7WgM9PrY/B1XpLrFd2zLETRGbEFiZMZkw xuyvjhv9vO3NVsgmO6lAuddMcR3++0A5UJU7k3AFSJ/wevrd6/qcSgMac86Ct3AIO25+ iB0zefRzE5zfSx0lCzq9eIC78kYe8ZZEJ+gFa13KrtEfhT/ca535IJ5SAch9S6kZlhiI xX3g0Wv9lGkP56fz+FP57WTngebesULaya4Z3RhTSNwrGB3RN9bVbf4/ngK1C5L1tFhB gLKHy2wxIkOkOwWDrLVObh6nZsM6hJD4HaBjyzQA4nAxInkXnZ1ZwWFB9MUq1Q4XZ/P5 BR8A== X-Gm-Message-State: AOAM531gw9c/h4qBWaG28G8k/OS/ThGMrH6GsriJwkqrzYOTdUNZGWDi udtUwUsuOSn+DMWVsEHllyM= X-Google-Smtp-Source: ABdhPJxTdzLHQyxhmLHAKEdyfOch1756jwUx+VhH4o74FqYsVnel7L0sGwSa3tf9Mx76Pap6QqwM0w== X-Received: by 2002:a17:907:77c1:: with SMTP id kz1mr1811138ejc.481.1614245052789; Thu, 25 Feb 2021 01:24:12 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.24.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:24:12 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 11/38] include: Remove extern from addr_map.h Date: Thu, 25 Feb 2021 17:22:32 +0800 Message-Id: <1614244979-48216-12-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean Remove the extern of the header because they are useless. Signed-off-by: Bin Meng Reviewed-by: Simon Glass Reviewed-by: Priyanka Jain --- (no changes since v1) include/addr_map.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/addr_map.h b/include/addr_map.h index d322dd2..85e737d 100644 --- a/include/addr_map.h +++ b/include/addr_map.h @@ -8,9 +8,9 @@ #include -extern phys_addr_t addrmap_virt_to_phys(void *vaddr); -extern void *addrmap_phys_to_virt(phys_addr_t paddr); -extern void addrmap_set_entry(unsigned long vaddr, phys_addr_t paddr, - phys_size_t size, int idx); +phys_addr_t addrmap_virt_to_phys(void *vaddr); +void *addrmap_phys_to_virt(phys_addr_t paddr); +void addrmap_set_entry(unsigned long vaddr, phys_addr_t paddr, + phys_size_t size, int idx); #endif From patchwork Thu Feb 25 09:22:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444225 X-Patchwork-Delegate: priyanka.jain@nxp.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=L+IzGIJg; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DmSDw6q8fz9s1l for ; Thu, 25 Feb 2021 20:30:08 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A8B8081C67; Thu, 25 Feb 2021 10:29:58 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="L+IzGIJg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 85F868144F; Thu, 25 Feb 2021 10:24: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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (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 4ECD280F00 for ; Thu, 25 Feb 2021 10:24:17 +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=bmeng.cn@gmail.com Received: by mail-ed1-x52a.google.com with SMTP id h19so5901661edb.9 for ; Thu, 25 Feb 2021 01:24:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sPBpCbkK2yL0BO9SV713f+WoumlJFBaMoZROrUFp6Vg=; b=L+IzGIJgtFIIcIhOW8uoHjv6NrMVu4dG5srrbDba2deZbcUfPcftplvQ63lzieTesi IYN4Vx4g6yoJ2sh0DakeAXw7OY3XbcfKnX7wQKE8iOhQUZmXjxRqZtJzYuk1Y5THYj5F Atl713upZdFskb21/RKNJf8VEj4zlms7m4iVAh5LNIojT8gMZaj+AqgAofO0myrIaoSV oYISAcNbuFoBn8uFVgGeFAfU/l/XmA/qbmVZoceFsrYYOA5uRUeMEORUxRBkkfSuWe5v GQhSBuZmPBbCBUPlC505pXkdop5fFsSKYK91vhAzAqzt8FNzTe5aAg5GUKQvM+UWhJ1n 9QAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sPBpCbkK2yL0BO9SV713f+WoumlJFBaMoZROrUFp6Vg=; b=fGUDvO6PLoW7EPmmsHuXFcnENBNkNXJL/v+6aaZ0QWwUvk1rOnyCixqejsoqQKSDeg Ran6f+8cB9d5p3gJKPRR6OYFm/tWPnvcvtYeEd5mlOWPb71++oDE+XEoDqRF08wj15M3 +ucXXxjZqmJ4/TgIM/8DLcwKG0cLyDW78jy5akL6IRHg52gA0y3r5Zemp3NZcvRwgENK cO/FAu7HgG0VhfId7dLRg97verFRaQPzh/6Pcj/6ji5qv7gZISiYo8DXhS2v6dEz+VKp WxotWIJA5B1cFAhjiM3xKnQeJZbMwwWRHTirtI242vsFIA7lET/rfWYb6/8XY/4nVrqa EvxA== X-Gm-Message-State: AOAM531Gsypzx8TvIvqhRl28QlflVTL3VtLxjrNBSKvov15qR7/LSlA/ TxK0KZbKHNIjMme/USGKk0w= X-Google-Smtp-Source: ABdhPJxkfh+YnkTKxrwlBfXVOwv8P02OcJ+xJi8sCg49dATy8hcjasHhNLBEEayuq+OSlyLpJyzhYQ== X-Received: by 2002:a05:6402:3133:: with SMTP id dd19mr1871894edb.337.1614245057050; Thu, 25 Feb 2021 01:24:17 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.24.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:24:16 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 12/38] lib: addr_map: Move address_map[] type to the header file Date: Thu, 25 Feb 2021 17:22:33 +0800 Message-Id: <1614244979-48216-13-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean At present address_map[] is static and its type is unknown to external modules. In preparation to create a command to list its contents, this patch moves its type definition and declaration to the header file. Signed-off-by: Bin Meng Reviewed-by: Simon Glass Reviewed-by: Priyanka Jain --- (no changes since v1) include/addr_map.h | 8 ++++++++ lib/addr_map.c | 6 +----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/addr_map.h b/include/addr_map.h index 85e737d..55d3a6a 100644 --- a/include/addr_map.h +++ b/include/addr_map.h @@ -8,6 +8,14 @@ #include +struct addrmap { + phys_addr_t paddr; + phys_size_t size; + unsigned long vaddr; +}; + +extern struct addrmap address_map[CONFIG_SYS_NUM_ADDR_MAP]; + phys_addr_t addrmap_virt_to_phys(void *vaddr); void *addrmap_phys_to_virt(phys_addr_t paddr); void addrmap_set_entry(unsigned long vaddr, phys_addr_t paddr, diff --git a/lib/addr_map.c b/lib/addr_map.c index 09771f3..fb2ef40 100644 --- a/lib/addr_map.c +++ b/lib/addr_map.c @@ -6,11 +6,7 @@ #include #include -static struct { - phys_addr_t paddr; - phys_size_t size; - unsigned long vaddr; -} address_map[CONFIG_SYS_NUM_ADDR_MAP]; +struct addrmap address_map[CONFIG_SYS_NUM_ADDR_MAP]; phys_addr_t addrmap_virt_to_phys(void * vaddr) { From patchwork Thu Feb 25 09:22:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444226 X-Patchwork-Delegate: priyanka.jain@nxp.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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=DaAxNamL; 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 4DmSF94G5sz9s1l for ; Thu, 25 Feb 2021 20:30:20 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3818B81FB4; Thu, 25 Feb 2021 10:30:13 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="DaAxNamL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6B708819F2; Thu, 25 Feb 2021 10:24:28 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) (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 6A249812B7 for ; Thu, 25 Feb 2021 10:24:22 +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=bmeng.cn@gmail.com Received: by mail-ej1-x631.google.com with SMTP id k13so7638452ejs.10 for ; Thu, 25 Feb 2021 01:24:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pp2yWSMLS5sAfSlNnFZXKoq5ZSsIz3BsEo0DpGuoYWk=; b=DaAxNamLOUr3DBAKIXMivfkXyJ5IMymSQTco5nsgENhfRyHLuzGXn0HZmI6Hf9wSM8 BToIKweJSAAVuebzVJZAWbWn0rkGdK/P08V91ndR+/ehexszt994lFSWkoN2PO86IC/V 4Bl49gFAgPTvs/7vzWV2C6D1o5rL8KCDcIJg4DjbmhkPqyJ69LpYsVaEvcRVU9V/7tN8 9E1LIFD/U9jmyqB/1hs1UvDIr3xIVpi1XiZwzmRFDgG4YKGiQq2hRT91DDZMXVabV6PG ERRRTa2r0yyyJzr1c5xM7/j2meYf2bJuXGm4EWbh8MeQuUHH619KF9nuoWbI8Udwqp9h 9MgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pp2yWSMLS5sAfSlNnFZXKoq5ZSsIz3BsEo0DpGuoYWk=; b=qJlGZTSl3WypqnjjfuvCsz3AcSCYuL6wsBmVXNrTY2IKZCXuyqR7LN/+no2t8H4j93 6pCNTHqo01KtRimCku+9K6QzcdiVZfmKos/xI7wMGG9pxwEjxLzLX3bn+5j7rV8PyD3s hTL6EHBNQKTOY3AxqOTyAtZI9bIPBEeIqPHpIhm8ZLe8Xaif5Bv/15KMd+IcuJlBxs1L tzNIsu5wtkf3AISo7ePZ0mxDdqapEEgHNVqkdxyaKQjXySbCWjM5yEuy0TVFlzrIOhvC fxAVnSnsckTM3d1CA4gxv/K3toAz21bBfNV7tIuPOvsIVsr62YtpmpHDHY6dHP78yeUg MptQ== X-Gm-Message-State: AOAM531ArbFmkNURT3Q7045D1OKrXYEIHb5WfMOQDAnnIvRGEWHA+CS0 azN4NUVo23/IYpGE4hhj9Og= X-Google-Smtp-Source: ABdhPJyo4Lg3xi75WM/9oY/eOMCxs4S12Y2oblONvvuAW+B64NSUQ1WRPm0zw4ZThLa8HRKnRWaW1g== X-Received: by 2002:a17:907:7784:: with SMTP id ky4mr1739010ejc.89.1614245062146; Thu, 25 Feb 2021 01:24:22 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.24.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:24:21 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini , Marek Szyprowski , Matthias Brugger Subject: [PATCH v3 13/38] cmd: Add a command to display the address map Date: Thu, 25 Feb 2021 17:22:34 +0800 Message-Id: <1614244979-48216-14-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean This adds a new command 'addrmap' to display the address map for non-identity virtual-physical memory mappings. Signed-off-by: Bin Meng Reviewed-by: Simon Glass Reviewed-by: Priyanka Jain --- (no changes since v2) Changes in v2: - add doc/usage/addrmap.rst cmd/Kconfig | 7 +++++++ cmd/Makefile | 1 + cmd/addrmap.c | 35 +++++++++++++++++++++++++++++++++++ doc/usage/addrmap.rst | 41 +++++++++++++++++++++++++++++++++++++++++ doc/usage/index.rst | 1 + 5 files changed, 85 insertions(+) create mode 100644 cmd/addrmap.c create mode 100644 doc/usage/addrmap.rst diff --git a/cmd/Kconfig b/cmd/Kconfig index 928a2a0..2021939 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -97,6 +97,13 @@ config CMD_ACPI between the firmware and OS, and is particularly useful when you want to make hardware changes without the OS needing to be adjusted. +config CMD_ADDRMAP + bool "addrmap" + depends on ADDR_MAP + default y + help + List non-identity virtual-physical memory mappings for 32-bit CPUs. + config CMD_BDI bool "bdinfo" default y diff --git a/cmd/Makefile b/cmd/Makefile index 176bf92..567e2b7 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -13,6 +13,7 @@ obj-y += version.o # command obj-$(CONFIG_CMD_ACPI) += acpi.o +obj-$(CONFIG_CMD_ADDRMAP) += addrmap.o obj-$(CONFIG_CMD_AES) += aes.o obj-$(CONFIG_CMD_AB_SELECT) += ab_select.o obj-$(CONFIG_CMD_ADC) += adc.o diff --git a/cmd/addrmap.c b/cmd/addrmap.c new file mode 100644 index 0000000..bd23549 --- /dev/null +++ b/cmd/addrmap.c @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2021, Bin Meng + */ + +#include +#include +#include + +static int do_addrmap(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) +{ + int i; + + printf(" vaddr paddr size\n"); + printf("================ ================ ================\n"); + + for (i = 0; i < CONFIG_SYS_NUM_ADDR_MAP; i++) { + if (address_map[i].size == 0) + continue; + + printf("%16.8lx %16.8llx %16.8llx\n", + address_map[i].vaddr, + (unsigned long long)address_map[i].paddr, + (unsigned long long)address_map[i].size); + } + + return 0; +} + +U_BOOT_CMD( + addrmap, 1, 1, do_addrmap, + "List non-identity virtual-physical memory mappings for 32-bit CPUs", + "" +); diff --git a/doc/usage/addrmap.rst b/doc/usage/addrmap.rst new file mode 100644 index 0000000..472fd54 --- /dev/null +++ b/doc/usage/addrmap.rst @@ -0,0 +1,41 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +addrmap command +=============== + +Synopsis +-------- + +:: + + addrmap + +Description +----------- + +The addrmap command is used to display non-identity virtual-physical memory +mappings for 32-bit CPUs. + +The output may look like: + +:: + + => addrmap + vaddr paddr size + ================ ================ ================ + e0000000 fe0000000 00100000 + 00000000 00000000 04000000 + 04000000 04000000 04000000 + 80000000 c00000000 10000000 + 90000000 c10000000 10000000 + a0000000 fe1000000 00010000 + +The first column indicates the virtual address. +The second column indicates the physical address. +The third column indicates the mapped size. + +Configuration +------------- + +To use the addrmap command you must specify CONFIG_CMD_ADDRMAP=y. +It is automatically turned on when CONFIG_ADDR_MAP is set. diff --git a/doc/usage/index.rst b/doc/usage/index.rst index a8842bf..f962246 100644 --- a/doc/usage/index.rst +++ b/doc/usage/index.rst @@ -13,6 +13,7 @@ Shell commands .. toctree:: :maxdepth: 1 + addrmap base bootefi booti From patchwork Thu Feb 25 09:22:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444210 X-Patchwork-Delegate: priyanka.jain@nxp.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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=JlAOMUDt; 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 4DmS8z0VKSz9s1l for ; Thu, 25 Feb 2021 20:26:42 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B37AC812A5; Thu, 25 Feb 2021 10:26:34 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="JlAOMUDt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1181C81C73; Thu, 25 Feb 2021 10:24:38 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) (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 CB678819F3 for ; Thu, 25 Feb 2021 10:24:26 +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=bmeng.cn@gmail.com Received: by mail-ej1-x62c.google.com with SMTP id do6so7658775ejc.3 for ; Thu, 25 Feb 2021 01:24:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PPHRD30o34Yo8pz1AgnjyvjHg/M0lVACwzCxyl+/srY=; b=JlAOMUDtFLMSrVhgOu77e10FTP0HBkXr7nx4HJUn7YSDjrIYFl2t5++UZj8AES7JZR yKMNEqn3qS7e0A8WHV6XytxoKzP6JPRvmf/nY5OdL9vzCriAE4DeffVKC611zHEVSj+8 ohSOA7UEVyZ+kUJy0Wz1FxtpFCcnHrvaaUbQDeMBXFfkMzBvQB1h71tvOR7s8PHnFeI/ 4ytsK/Kixkb0h3Y6uyvm9w3U3vvkS98EFyMxCrHWCf8Lfu9npaSWqRIq70eso7nVtfUZ gqaCEu1u5clcS+5krv+YdgvuRNXUBpedUfKly3aIasLO5E5dTM/eJgALkFP7POSSObW5 XMnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PPHRD30o34Yo8pz1AgnjyvjHg/M0lVACwzCxyl+/srY=; b=gMfpzBtUVa8mOcroWCCepyggb2dIt3q4Nc7uevily0Mrr61ZgmM78Zl9S4cK49p6tl 2aTPBYm+xWtWMOXB7fIP8pmN69DmavQgFkheD8nQuaLGp3uE7rU1wAdAwiZ3JRsUqNLk /ga+aHzbuMlgGG2cTqPI27ob9bHOoyIq9ZWsQsHP/fF3mF4TS/YJLTbNjNNO0oX44Sv7 v4Ijw3uQ7uOz+Y94LASdbEZefOjA0weCmiAC21bXkqwkFgMgF29Zf03pq9NUJk3sSyg1 L1QSLEHC7TRtCzz0M+nH1GcVO9DI1yslaOUSz+WWojQ8D85aUUQ3RuQzpc/I0LE1seci c/UQ== X-Gm-Message-State: AOAM530Wtvr4nyO5PyLdczn0wrjoG/8m51HtHUm/mbB3hNPQvO9QwdKH 8apwUpYgtL4CA5vWz2XygwM= X-Google-Smtp-Source: ABdhPJyXH813Nh8yzlrmRCoMk3XPSshoZk018o+INz/UQyfIHm320pMB/3q3aUgppdVlNBfh0pxgXg== X-Received: by 2002:a17:906:38b:: with SMTP id b11mr1740018eja.78.1614245066539; Thu, 25 Feb 2021 01:24:26 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.24.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:24:26 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 14/38] test: cmd: Add a basic test for 'addrmap' command Date: Thu, 25 Feb 2021 17:22:35 +0800 Message-Id: <1614244979-48216-15-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean This adds a basic test for the newly introduced 'addrmap' command. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- (no changes since v2) Changes in v2: - new patch: test: cmd: Add a basic test for 'addrmap' command include/test/suites.h | 2 ++ test/cmd/Makefile | 1 + test/cmd/addrmap.c | 38 ++++++++++++++++++++++++++++++++++++++ test/cmd_ut.c | 6 ++++++ 4 files changed, 47 insertions(+) create mode 100644 test/cmd/addrmap.c diff --git a/include/test/suites.h b/include/test/suites.h index 52e8fc8..f5d8e13 100644 --- a/include/test/suites.h +++ b/include/test/suites.h @@ -26,6 +26,8 @@ int cmd_ut_category(const char *name, const char *prefix, struct unit_test *tests, int n_ents, int argc, char *const argv[]); +int do_ut_addrmap(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]); int do_ut_bootm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_bloblist(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); diff --git a/test/cmd/Makefile b/test/cmd/Makefile index 5451e9e..8699976 100644 --- a/test/cmd/Makefile +++ b/test/cmd/Makefile @@ -6,6 +6,7 @@ ifdef CONFIG_HUSH_PARSER obj-$(CONFIG_CONSOLE_RECORD) += test_echo.o endif obj-y += mem.o +obj-$(CONFIG_CMD_ADDRMAP) += addrmap.o obj-$(CONFIG_CMD_MEM_SEARCH) += mem_search.o obj-$(CONFIG_CMD_PWM) += pwm.o obj-y += setexpr.o diff --git a/test/cmd/addrmap.c b/test/cmd/addrmap.c new file mode 100644 index 0000000..fb74448 --- /dev/null +++ b/test/cmd/addrmap.c @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Tests for addrmap command + * + * Copyright (C) 2021, Bin Meng + */ + +#include +#include +#include +#include + +/* Declare a new addrmap test */ +#define ADDRMAP_TEST(_name, _flags) UNIT_TEST(_name, _flags, addrmap_test) + +/* Test 'addrmap' command output */ +static int addrmap_test_basic(struct unit_test_state *uts) +{ + ut_assertok(console_record_reset_enable()); + ut_assertok(run_command("addrmap", 0)); + ut_assert_nextline(" vaddr paddr size"); + ut_assert_nextline("================ ================ ================"); + /* There should be at least one entry */ + ut_assertok(!ut_check_console_end(uts)); + + return 0; +} +ADDRMAP_TEST(addrmap_test_basic, UT_TESTF_CONSOLE_REC); + +int do_ut_addrmap(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) +{ + struct unit_test *tests = ll_entry_start(struct unit_test, + addrmap_test); + const int n_ents = ll_entry_count(struct unit_test, addrmap_test); + + return cmd_ut_category("cmd_addrmap", "cmd_addrmap_", tests, n_ents, + argc, argv); +} diff --git a/test/cmd_ut.c b/test/cmd_ut.c index 90674d5..8404309 100644 --- a/test/cmd_ut.c +++ b/test/cmd_ut.c @@ -91,6 +91,9 @@ static struct cmd_tbl cmd_ut_sub[] = { U_BOOT_CMD_MKENT(bootm, CONFIG_SYS_MAXARGS, 1, do_ut_bootm, "", ""), #endif U_BOOT_CMD_MKENT(str, CONFIG_SYS_MAXARGS, 1, do_ut_str, "", ""), +#ifdef CONFIG_CMD_ADDRMAP + U_BOOT_CMD_MKENT(addrmap, CONFIG_SYS_MAXARGS, 1, do_ut_addrmap, "", ""), +#endif }; static int do_ut_all(struct cmd_tbl *cmdtp, int flag, int argc, @@ -166,6 +169,9 @@ static char ut_help_text[] = !defined(CONFIG_SPL_BUILD) && !defined(API_BUILD) "ut unicode [test-name] - test Unicode functions\n" #endif +#ifdef CONFIG_CMD_ADDRMAP + "ut addrmap - Very basic test of addrmap command\n" +#endif ; #endif /* CONFIG_SYS_LONGHELP */ From patchwork Thu Feb 25 09:22:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444209 X-Patchwork-Delegate: priyanka.jain@nxp.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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=qvNzIeRY; 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 4DmS8m38b8z9s1l for ; Thu, 25 Feb 2021 20:26:32 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5707380505; Thu, 25 Feb 2021 10:26:29 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="qvNzIeRY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 38AAD81F8D; Thu, 25 Feb 2021 10:24:39 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (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 F0A35819F2 for ; Thu, 25 Feb 2021 10:24:30 +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=bmeng.cn@gmail.com Received: by mail-ed1-x533.google.com with SMTP id d2so5885668edq.10 for ; Thu, 25 Feb 2021 01:24:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dk3UbfR9UBiqeHLji4MR5aYqOMVZE2J3gBlvVUg7c2A=; b=qvNzIeRYT+TvV8HF5wb4bzs4I4smpJWqAhglpbC9ZK2N/5khqX7MbfdfDUYIbsYMn1 CxRDwjrh1F242HmQkbbckES+xOMx3upcpYCIsIdV/A28ULAXZJ5b3Rh9gunxuBh9dXn5 FN3JdNKzldGEMfaleo3xhd3y6UpkjVBcg6Q61fFq6a2E85u5uPrOfW4WHf5DpIHSjRKQ 4+Pv2JiFiYrCns5F6dlHBjstwzYDZsYrA1rqthqt1VV4/6bElFgTVS03V8ACIzeLesQj N1lM5VgtQSdHaO3/3XEptbsRhRIrOutOdByVGotTF5pue+4U7imGW3ZFnkFJfZovLwa5 coFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=dk3UbfR9UBiqeHLji4MR5aYqOMVZE2J3gBlvVUg7c2A=; b=JOYwPeya6TGmhSLRH96f8xpMe6ax6HOUOdfe/OrRijEFn1bdNeqtv+pp8ZXHjgaulC UJZaZFrLSiKRDA/rbUJpISL2EfgcTXphipT30+0irSta9xl7ujRtSJlOFAGC2thuUwQC 5h0lczXwDhI61YKNWrGtvfh5pIqk5C0mU9yuOsH4v4kcSzvmfSJwWbaXNittxHZvQc7f MZpvVKYBmT3sZW+lRwZSxXmFv0UfjUTDHQ66D7+CTtkZT40wGd1VZfKWMlKYHWfggKjv yBdN6ugEHqAvpr7mjijupv78bw0mTBLesklLWSUwbhSRmAltL0h1RN7bzK2Ndozc7njn LlTQ== X-Gm-Message-State: AOAM533XXejlMotyUjKyIVvkfUk/i/f9vr+QB1T43XePT749lybz9G3s Uq+/1J33PCckSjGnofJk+VQ= X-Google-Smtp-Source: ABdhPJzPdo2faqfo0TGw0zQljDOJy9s57PXuaHpZg5qgR8LsSp01hu41xH+7YOxpuc8alwRj6GHvWg== X-Received: by 2002:a05:6402:1b01:: with SMTP id by1mr1068793edb.217.1614245070524; Thu, 25 Feb 2021 01:24:30 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.24.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:24:30 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 15/38] lib: kconfig: Mention CONFIG_ADDR_MAP limitation in the help Date: Thu, 25 Feb 2021 17:22:36 +0800 Message-Id: <1614244979-48216-16-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean Mention that CONFIG_ADDR_MAP only works in the post-relocation phase. Signed-off-by: Bin Meng Reviewed-by: Simon Glass Reviewed-by: Priyanka Jain --- (no changes since v1) lib/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Kconfig b/lib/Kconfig index 7f4c30e..7288340 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -6,6 +6,8 @@ config ADDR_MAP Enables helper code for implementing non-identity virtual-physical memory mappings for 32bit CPUs. + This library only works in the post-relocation phase. + config SYS_NUM_ADDR_MAP int "Size of the address-map table" depends on ADDR_MAP From patchwork Thu Feb 25 09:22:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444211 X-Patchwork-Delegate: priyanka.jain@nxp.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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Tlk+v9yF; 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 4DmS9930xnz9s1l for ; Thu, 25 Feb 2021 20:26:53 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6D063819B8; Thu, 25 Feb 2021 10:26:39 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Tlk+v9yF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DF7CD81DA8; Thu, 25 Feb 2021 10:24: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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) (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 01CF881B94 for ; Thu, 25 Feb 2021 10:24:34 +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=bmeng.cn@gmail.com Received: by mail-ej1-x62e.google.com with SMTP id w1so7633199ejf.11 for ; Thu, 25 Feb 2021 01:24:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Db+DiRjNjb3TFDnFXQVxldXKJsFiUuk3kCleUJaBIhM=; b=Tlk+v9yFIO1tS4EXAb+5MbK6QjYYFW9eEllLStMZ8R+k2n6WKXzePvEgvDTvuw7/cR 1NggCFX4x/lwm7K3836fq1WmYZ5S8o67Jv8+m3c+SEwdz4zwUK6tp3Xp+qYpOz8zIjOE VpfidA3GvTSfT4R9ap6BMAAjMc5vBYyIVICE2MH4xHy+QB5RJ8pYnSG65Nmz4Lkz814w B4VwK/4b9IcZRHG8BpDkTRazup+M1itA6yu202VUoTK7RqUQhrUHwsxTFzglobEhxHQD f3eqr6iM4ZYovljrSZRywOGPYHFxnzZaAwIt80k6IWDa+X3gXmzFp2c381zSOGfZwQDF ErRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Db+DiRjNjb3TFDnFXQVxldXKJsFiUuk3kCleUJaBIhM=; b=Mu31ZeZ6GzsTTF21AvggD89oQWQVPnUoNN8QaPce1qXpk+5X3IDn1at3/JMaYptT73 zikqtXoL1jlxD2r5iWP+K8d+YkQhbU0bT8BOFibxWin0L0s0Dwl7FH4xvRCXZMohAsAR ZkF8hTHfYRVFsbc19Tj3TZ73EDGavkPNzaI5jmoj5o3bjw17cjx+SCU5rJMioenlQWc+ /utq4vcJ4hMmVMaR6HWJGzmTjqiDAyzA9tl6uZKBECdYVnj1Gzp/NeZXp6h6D5/Uo1Vl wp1rP5jRDnzdcJYNIHjw4Mc4X33wRwywjVgaE1oMo8oziMa83rYxsDvfsBSewzr0bly1 HTeQ== X-Gm-Message-State: AOAM5329ali2TFTiAeMJWNjQW9CdamtwheaioBqDsWRLImMomsHWJXkG W2hmQdEOWhPmuBScQBTfZB0= X-Google-Smtp-Source: ABdhPJzIo7N3Zw/VtdJiTDhT/+Dog0sX4ey/SYvHUf3J+fGSkRFpGIqgyrB5BFRP2CRzuW50BAnwyA== X-Received: by 2002:a17:906:4e99:: with SMTP id v25mr278722eju.532.1614245074624; Thu, 25 Feb 2021 01:24:34 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.24.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:24:34 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 16/38] ppc: io.h: Use addrmap_ translation APIs only in post-relocation phase Date: Thu, 25 Feb 2021 17:22:37 +0800 Message-Id: <1614244979-48216-17-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean In phys_to_virt() and virt_to_phys(), if CONFIG_ADDR_MAP is defined, they use addrmap_ translation APIs to do the address translation. However these APIs only work in post-relocation phase. Update the code logic to fall back to use the default one when in pre-relocation phase. Signed-off-by: Bin Meng Reviewed-by: Priyanka Jain --- (no changes since v1) arch/powerpc/include/asm/io.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h index 6d76e3e..998a82a 100644 --- a/arch/powerpc/include/asm/io.h +++ b/arch/powerpc/include/asm/io.h @@ -10,7 +10,10 @@ #include #ifdef CONFIG_ADDR_MAP +#include #include + +DECLARE_GLOBAL_DATA_PTR; #endif #define SIO_CONFIG_RA 0x398 @@ -303,20 +306,20 @@ static inline void out_be32(volatile unsigned __iomem *addr, u32 val) static inline void *phys_to_virt(phys_addr_t paddr) { #ifdef CONFIG_ADDR_MAP - return addrmap_phys_to_virt(paddr); -#else - return (void *)((unsigned long)paddr); + if (gd->flags & GD_FLG_RELOC) + return addrmap_phys_to_virt(paddr); #endif + return (void *)((unsigned long)paddr); } #define phys_to_virt phys_to_virt static inline phys_addr_t virt_to_phys(void * vaddr) { #ifdef CONFIG_ADDR_MAP - return addrmap_virt_to_phys(vaddr); -#else - return (phys_addr_t)((unsigned long)vaddr); + if (gd->flags & GD_FLG_RELOC) + return addrmap_virt_to_phys(vaddr); #endif + return (phys_addr_t)((unsigned long)vaddr); } #define virt_to_phys virt_to_phys From patchwork Thu Feb 25 09:22:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444212 X-Patchwork-Delegate: priyanka.jain@nxp.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=U7/81dyT; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DmS9P3NBlz9s1l for ; Thu, 25 Feb 2021 20:27:05 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EFA4D819F3; Thu, 25 Feb 2021 10:26:44 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="U7/81dyT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6E21281FC1; Thu, 25 Feb 2021 10:24:53 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (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 0D92F819F3 for ; Thu, 25 Feb 2021 10: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=bmeng.cn@gmail.com Received: by mail-ej1-x62d.google.com with SMTP id a22so7636068ejv.9 for ; Thu, 25 Feb 2021 01:24:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YB9PNrEiS59kEGSKHwJmldbbzxv7hNdMLwF6YmGlljc=; b=U7/81dyTfZX6aJBY2VolwzXdhH8T0+aZ6jEK75IC773jCaZ5alCnwlqOdofFT6hpup MC1bA7vsDLwKOh07wZ0W3tjRc+LOj4rve8e4D7NZwN/Jd9BeJ0Ltv1ZDxINFbRwBVYyn 07MvfbCV+KRw8g61S1L0YIfQsvy5sJNrGQmAVchymYU5eSebOPAxcj6wZMXcyRz6DMby ZijSHFj2mQyftji6fGDmShF2z9UyhAeVug9n4ZCRAICpvR/ky4KR7jOv7GZjQJK54j5G tgRof3qRFH6ZSd3Q3ZRuYNstJk40mUCK2efI0eXV0VRagxNHCo1e8yNlKEfAoLqv0yGz nuTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YB9PNrEiS59kEGSKHwJmldbbzxv7hNdMLwF6YmGlljc=; b=afLlau4ZtaiGcL6h2yyjEWZs88oX/IBzBTegZdIy4zI5tD2RyA0SOIm/V6X6DnQMSj Xy8/xXYvAnOSsyWPqiap8NPsa9LqptuBMmOJhYANcdzNP43xrTrQXy5WPGXSBSZ6cIfK 5B7wJgx2aG0PAdVOxQC5iqbiqcF5UnICb93yfoTh8NO5A+qu8TBcEI6ut/+6RCfCsb9y LkJ3drQnKCJa1IqKdB1UULj1uYqqb/tAeH6btfmZ+dZGbxyCiZs81VBo7KF5VN4sBEU8 8yknj3I3987AamcMtvssQRUmoctZvS472AZ3QgAvQwDSA5dXc6wKY7eJSSGw/sF3SsuR 1XRg== X-Gm-Message-State: AOAM5312HVIxzEdF/YIbn9RyEXW5jGtacg+aQtF0UMLqHivV8wfwEKRL o8CXnnJxDnIGdAxAM+MSvR0= X-Google-Smtp-Source: ABdhPJx0ahHRM/eml9bOe6POTbYy8DlAOVsS5kViEGhD8yqEcG59Ra55p0HdPiSw4k9hQLrD6gVdnQ== X-Received: by 2002:a17:906:e0c7:: with SMTP id gl7mr194329ejb.216.1614245079792; Thu, 25 Feb 2021 01:24:39 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.24.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:24:39 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini , Marek Szyprowski , Matthias Brugger Subject: [PATCH v3 17/38] common: Move initr_addr_map() to a bit earlier Date: Thu, 25 Feb 2021 17:22:38 +0800 Message-Id: <1614244979-48216-18-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean At present initr_addr_map() is put at a late stage in the init_sequence_r[] calls. This won't work because lot of device driver initialization (e.g.: serial port) happens before it but is lack of the address translation support. This moves the call to a bit earlier, right after the DM initialization. Signed-off-by: Bin Meng Reviewed-by: Simon Glass Reviewed-by: Priyanka Jain --- (no changes since v1) common/board_r.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/board_r.c b/common/board_r.c index 9793439..c835ff8 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -626,6 +626,9 @@ static init_fnc_t init_sequence_r[] = { #ifdef CONFIG_DM initr_dm, #endif +#ifdef CONFIG_ADDR_MAP + initr_addr_map, +#endif #if defined(CONFIG_ARM) || defined(CONFIG_NDS32) || defined(CONFIG_RISCV) || \ defined(CONFIG_SANDBOX) board_init, /* Setup chipselects */ @@ -661,9 +664,6 @@ static init_fnc_t init_sequence_r[] = { initr_manual_reloc_cmdtable, #endif arch_initr_trap, -#ifdef CONFIG_ADDR_MAP - initr_addr_map, -#endif #if defined(CONFIG_BOARD_EARLY_INIT_R) board_early_init_r, #endif From patchwork Thu Feb 25 09:22:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444214 X-Patchwork-Delegate: priyanka.jain@nxp.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=N2YcJNFQ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DmS9s0pD9z9s1l for ; Thu, 25 Feb 2021 20:27:29 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E3AD281F70; Thu, 25 Feb 2021 10:26:52 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="N2YcJNFQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 06E1481FDD; Thu, 25 Feb 2021 10:24:59 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) (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 2C9AC81FB4 for ; Thu, 25 Feb 2021 10:24:44 +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=bmeng.cn@gmail.com Received: by mail-ej1-x62e.google.com with SMTP id u20so7643588ejb.7 for ; Thu, 25 Feb 2021 01:24:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SKRoFt1kzVU0ajrCqlnMsLJowk6z6xo4AoALlefK9Wc=; b=N2YcJNFQ+A15p6K8b+ofIKILwR24CuDgN26XejCNXhevhNcN5eER0o4Refwa7sVYKn gQUCn13Qe+V62kcSA8HlzznSbi2znZduX15T5yFRSEmwcOf7C4zaKLGjnBFhDNPHsrSk 7ZPiGjCaPClAIJs2/pgdUhuglSvLnEm15W0gSZ6+1Fg/MRhpElZfazM+s+0mMNhOipGI 34WmQ5M5gp9a4yEmU/9Cymzby0D6oTQST15AL/FH0ryuE5OvZsFNpdcVPvjOW3mRbdFF BEiWS4OgPPYwQ5g+OkF1QMrWpWfGTQKTn9jzyWV/S2k23ic+NQDicURg5ZMOpO/tu0M9 oiMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SKRoFt1kzVU0ajrCqlnMsLJowk6z6xo4AoALlefK9Wc=; b=hSp8gtdxYt49JYnyH+gb0ILylWZ82FGVlc3BP5UmbqrJdmZXg1FIIhVXYg0IfnlV7I uKQvu+4YNDyMupfcwNyjo9SEHU0xeTA3yBP8hCGcguGpgTnW5w1vrvLaNoRAuQ+N2pZO mnTeGzXXitbBPgpCqAhst8f8njdTHnk/4mTt3U5CePmbwyIP4QXKIGmGoBOj9QuNCdUg 2qK9iGWQRIplquQip2xLJ4E0eaxwEeEt0UvIKfq7TipdiHyjZfKgJoOHzxaEnEQi6yzm S7vwtUlWtVHvgDoY5C9T5V79QQXuG109ZktPQOGy4PxSQlLTD9LLAxWhipVDPBuKvKos FMpA== X-Gm-Message-State: AOAM533xd41KL4OpweGZMZVQEdyTq6myU/C/URO4Lce2RrjzTBKDk/fd HKZHK96mv8xUhk+PIKS2B48= X-Google-Smtp-Source: ABdhPJz0V5Xo/QGpa5PRr5mvHYrnYXp6R5WIazVgyUdd02rYdsjvhPhtTrI1XcXxT5TFuyBnaj2r+w== X-Received: by 2002:a17:906:34c3:: with SMTP id h3mr1821409ejb.132.1614245083875; Thu, 25 Feb 2021 01:24:43 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.24.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:24:43 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 18/38] ppc: qemu: Switch over to use DM serial Date: Thu, 25 Feb 2021 17:22:39 +0800 Message-Id: <1614244979-48216-19-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean The QEMU ppce500 target integrates 2 NS16550 serial ports. Switch over to use the DM version of the driver by: - drop unnecessary ad-hoc config macros - add get_serial_clock() in the board codes Signed-off-by: Bin Meng Reviewed-by: Simon Glass Reviewed-by: Priyanka Jain --- (no changes since v1) board/freescale/qemu-ppce500/qemu-ppce500.c | 6 ++++++ configs/qemu-ppce500_defconfig | 1 + include/configs/qemu-ppce500.h | 10 ---------- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c index 50167d5..db13582 100644 --- a/board/freescale/qemu-ppce500/qemu-ppce500.c +++ b/board/freescale/qemu-ppce500/qemu-ppce500.c @@ -374,3 +374,9 @@ void *board_fdt_blob_setup(void) { return get_fdt_virt(); } + +/* See CONFIG_SYS_NS16550_CLK in arch/powerpc/include/asm/config.h */ +int get_serial_clock(void) +{ + return get_bus_freq(0); +} diff --git a/configs/qemu-ppce500_defconfig b/configs/qemu-ppce500_defconfig index f2a8b83..c528a68 100644 --- a/configs/qemu-ppce500_defconfig +++ b/configs/qemu-ppce500_defconfig @@ -30,6 +30,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y # CONFIG_MMC is not set CONFIG_E1000=y +CONFIG_DM_SERIAL=y CONFIG_SYS_NS16550=y CONFIG_ADDR_MAP=y CONFIG_PANIC_HANG=y diff --git a/include/configs/qemu-ppce500.h b/include/configs/qemu-ppce500.h index f13e4ea..feac6ef 100644 --- a/include/configs/qemu-ppce500.h +++ b/include/configs/qemu-ppce500.h @@ -73,16 +73,6 @@ extern unsigned long long get_phys_ccsrbar_addr_early(void); #define CONFIG_SYS_MONITOR_LEN (512 * 1024) #define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024) -#define CONFIG_SYS_NS16550_SERIAL -#define CONFIG_SYS_NS16550_REG_SIZE 1 -#define CONFIG_SYS_NS16550_CLK (get_bus_freq(0)) - -#define CONFIG_SYS_BAUDRATE_TABLE \ - {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200} - -#define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500) -#define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600) - /* * General PCI * Memory space is mapped 1-1, but I/O space must start from 0. From patchwork Thu Feb 25 09:22:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444213 X-Patchwork-Delegate: priyanka.jain@nxp.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=QTSwmPyp; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DmS9d0yF8z9s1l for ; Thu, 25 Feb 2021 20:27:17 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7A14B81FC3; Thu, 25 Feb 2021 10:26:48 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="QTSwmPyp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8333581FB4; Thu, 25 Feb 2021 10:24:59 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) (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 B30D281F9E for ; Thu, 25 Feb 2021 10:24:48 +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=bmeng.cn@gmail.com Received: by mail-ed1-x52f.google.com with SMTP id g3so5881548edb.11 for ; Thu, 25 Feb 2021 01:24:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+tfvqyVoAppQVrOb4WhZvXVfPhVpGnYxcwc6M/RoyJk=; b=QTSwmPypUYAmgg3nu1xHE3kyFUsg2PWITtS1SQRmz0XNxJGkhsJQGAm9t1o64vMTM3 viMZq0YKpha30wj6JK5lVLn8qU0hTPlNumTTWwbBaGP1oPdRcK8a0lSrNPx2l1IjkfO1 WiFrOPBNh8o+ZD/QDXSbguL+8y+voU1Uroav31rzv2gGHUFLcsYyOy5AgLBz6L08jMqX oPN2aGuvLHJ3wsdY2uTGzWu6G4Pf86Gfo6ev5OxbAyryj825IzHAjy1cg+ox00JPDzBE OiP+IbihsTnukcNhfzVWD7/aDnSj2htzDfVSIs/mBce7hZ1K9/bffT4p3X89iV79Gbyp f2cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+tfvqyVoAppQVrOb4WhZvXVfPhVpGnYxcwc6M/RoyJk=; b=QKP8+QYFDw9JO4CxZyIr+qHa7cQU4X0cSfI0U4ziz3j8XeylrUfl1dK+gElLOPsh4l rI8Ko1K1yZoye8mBLt7fhYO3Igz7F1Suwt+flS7LdyJnwnApNeoAnVQSifeFtctbubjF EFWS2TDbOmDtaWo2O8BLS04WhrUFjCearS30xvlCrHvi6WgVfAA4k21kGRsQoV3ZhbQp K9HTqfmN1hEBL2Fm14WKiWyRDtGMhxIwtKyMCCitggyf3dlnogWHnZplP1g3VX82vSZ3 rM64FgGUHLcY08EBqtrxCVPFIrmCMk557vV4TEXGlVw3FXyBtBlLTliRRH/AIspQQuFm KW7Q== X-Gm-Message-State: AOAM533ULJwcZKPEdPqIkg2IRyTeRJyEH85IcGFMiYW+hplG+v3w1hQ4 1IyCIl8arfC+DncZywuDURg= X-Google-Smtp-Source: ABdhPJzELNAr8C9YQk5G4/5Kbt6Iv0VqQW+VSoWS758GKU6cv0eN1J3/xNWd95POpDXHdwVa/DvRBg== X-Received: by 2002:aa7:c6d5:: with SMTP id b21mr1899105eds.180.1614245088419; Thu, 25 Feb 2021 01:24:48 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.24.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:24:48 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini , Heiko Schocher Subject: [PATCH v3 19/38] pci: mpc85xx: Wrap LAW programming with CONFIG_FSL_LAW Date: Thu, 25 Feb 2021 17:22:40 +0800 Message-Id: <1614244979-48216-20-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean For the QEMU ppce500 machine, LAW registers are not implemented hence CONFIG_FSL_LAW is not turned on and all LAW APIs are not available. We should wrap all LAW registers programming in the mpc85xx PCI driver with CONFIG_FSL_LAW. Signed-off-by: Bin Meng Reviewed-by: Heiko Schocher Reviewed-by: Priyanka Jain --- (no changes since v1) drivers/pci/pci_mpc85xx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/pci/pci_mpc85xx.c b/drivers/pci/pci_mpc85xx.c index ab6ff45..7387a1e 100644 --- a/drivers/pci/pci_mpc85xx.c +++ b/drivers/pci/pci_mpc85xx.c @@ -46,6 +46,7 @@ static int mpc85xx_pci_dm_write_config(struct udevice *dev, pci_dev_t bdf, return 0; } +#ifdef CONFIG_FSL_LAW static int mpc85xx_pci_dm_setup_laws(struct pci_region *io, struct pci_region *mem, struct pci_region *pre) @@ -68,6 +69,7 @@ mpc85xx_pci_dm_setup_laws(struct pci_region *io, struct pci_region *mem, return 0; } +#endif static int mpc85xx_pci_dm_probe(struct udevice *dev) { @@ -85,7 +87,9 @@ static int mpc85xx_pci_dm_probe(struct udevice *dev) return -EINVAL; } +#ifdef CONFIG_FSL_LAW mpc85xx_pci_dm_setup_laws(io, mem, pre); +#endif pcix = priv->cfg_addr; /* BAR 1: memory */ From patchwork Thu Feb 25 09:22:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444216 X-Patchwork-Delegate: priyanka.jain@nxp.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ckE7DHrg; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DmSBL1cYSz9s1l for ; Thu, 25 Feb 2021 20:27:54 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EC9B782038; Thu, 25 Feb 2021 10:27:04 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ckE7DHrg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 65B3381444; Thu, 25 Feb 2021 10:25:09 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) (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 62C7881444 for ; Thu, 25 Feb 2021 10:24:53 +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=bmeng.cn@gmail.com Received: by mail-ed1-x52e.google.com with SMTP id l12so5928542edt.3 for ; Thu, 25 Feb 2021 01:24:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QYDoUzSNKoOqBL75aG6wHNxq7bhGXgK38G6eAqa8Yqk=; b=ckE7DHrg2uQU3m3SyKnKPaRx6t4KQX09VaigyEw42KOCL0PhD5v4XaoPb5WMZla6Yf FVbveRgoGVz3UtcXRTuX1BaNQJywYzwkeY0mgMC1Q6vkTYCFM2wnHyy1PgWnKpAyEJd7 bMTzcoc8y+Myn8VDz6EJRmhfEQAgRtgQccs+G9nX70D8yBoDXf7gyrneOVz5wfk9u4RY BvKvohnCVNxWx+h/Mi6Egtc3hBlN03MjNtpgbEOlUDmUZ0CXRbYS+V+oSEbidzD8Ut7A WvKUq883lLeGJJbR0OURxoetO8EwEvLXMHFGC9UjivKoB83lD/WwsueTQuAa9kEoUOF8 GYWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QYDoUzSNKoOqBL75aG6wHNxq7bhGXgK38G6eAqa8Yqk=; b=H62ok1fbRYO2jKEYgJVbtuEo3KygJE4nN5iiueez2sed9r6TT7cUWCgSTexwb98JV2 4et5KKrpACRMu/uq2dfy4J1KM+j/tLrc08gsjge+gCxakY4ampsrTf62HJfsnafk5WoM VJtUsQH5P+OP2Q+X6TsIuDX1HsHrpdnXcn6RzNJKxnvwu3JWgooPaRfwx5s/g4U0Li2Q 6b3ohsBTuRmNHTVhsiIt5Pk2PirSSDcUOmodVu/4WkcfiANm1IO7d9xGFd8VNfHAF+wy ReTZmDXFt5sKuS7lPZUT2Kg/7iILgy2SEbRldhkGrx3m+76G1dYZFUkpngb1Uu/UIYb+ SRJg== X-Gm-Message-State: AOAM530K7mzp9C3U4akCrxc9SG2kEBZ+ZDx6qRGPPWGyZOhBmYSdgulZ BTmtnWn+HLYAYs3/pUc44Hk= X-Google-Smtp-Source: ABdhPJwg8d1urmLGMBkgSNZUaFFH5eenn3rp+L7uddAZm3Cp2PqAVYk29N845x4+6tsHup7NCidfww== X-Received: by 2002:a05:6402:424a:: with SMTP id g10mr1914763edb.236.1614245093085; Thu, 25 Feb 2021 01:24:53 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.24.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:24:52 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini , Heiko Schocher Subject: [PATCH v3 20/38] pci: mpc85xx: Support controller register physical address beyond 32-bit Date: Thu, 25 Feb 2021 17:22:41 +0800 Message-Id: <1614244979-48216-21-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean devfdt_get_addr_index() returns fdt_addr_t which might be a 64-bit physical address. Use map_physmem() to return the virtual address that can be used by a 32-bit machine. Signed-off-by: Bin Meng Reviewed-by: Heiko Schocher Reviewed-by: Priyanka Jain --- (no changes since v1) drivers/pci/pci_mpc85xx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/pci/pci_mpc85xx.c b/drivers/pci/pci_mpc85xx.c index 7387a1e..f0d469a 100644 --- a/drivers/pci/pci_mpc85xx.c +++ b/drivers/pci/pci_mpc85xx.c @@ -134,9 +134,8 @@ static int mpc85xx_pci_of_to_plat(struct udevice *dev) addr = devfdt_get_addr_index(dev, 0); if (addr == FDT_ADDR_T_NONE) return -EINVAL; - priv->cfg_addr = (void __iomem *)addr; - addr += 4; - priv->cfg_data = (void __iomem *)addr; + priv->cfg_addr = (void __iomem *)map_physmem(addr, 0, MAP_NOCACHE); + priv->cfg_data = (void __iomem *)((ulong)priv->cfg_addr + 4); return 0; } From patchwork Thu Feb 25 09:22:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444215 X-Patchwork-Delegate: priyanka.jain@nxp.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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=CIqYfsFS; 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 4DmSBB6x0nz9s1l for ; Thu, 25 Feb 2021 20:27:46 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9326281C64; Thu, 25 Feb 2021 10:26:57 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="CIqYfsFS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6BDB3812E4; Thu, 25 Feb 2021 10:25:13 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) (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 27EC981FC3 for ; Thu, 25 Feb 2021 10:24:58 +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=bmeng.cn@gmail.com Received: by mail-ej1-x633.google.com with SMTP id a22so7637846ejv.9 for ; Thu, 25 Feb 2021 01:24:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=po5lCnJS6rLvOkgfdKzYAvDSCgQ0vZIeV7r03vH3Dr0=; b=CIqYfsFSAzUolXjlOMZF4QHPenEU+wuwQ2jaA55dzuxnnypbDFjeWtzhdDKZQBvesI 7p3IYF/QWsJZSBDXKAhbm6NC1JKAH8b9jMngEZ8IOuqgGIuxRR9D+RxfDJplW2qaEXeX 3KOhkdacfWdP9iUybdgyjzTp/O7EwumwCx181BS88tUD0KR72jYNb4F8I6IMhbdUnAbN GkCcC3LFvBgI6VTg1HFsJatl74bS33zSUmgrgqvW+1xw4yyopjfTQDjGu4cSl9CiyHAA 6Ws/wBnk42HWM6D9jz3ANADQTqtTloKLTZfIsm5eErqYyALYdIRLLOrNkCPPIxw7Dwkd k7TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=po5lCnJS6rLvOkgfdKzYAvDSCgQ0vZIeV7r03vH3Dr0=; b=b03QPRRNSBxYuexuqUJOujqhXTwWqMH2U2g2Px7dktkSog6OrSsXYdYDHs010m1Op8 lDY155hrVVstkthFT8BGhYmeLvQ4sZYgP5H47YnjKM11/cdrYTD+Nifq1BLxS5iNFFAy hK9yl+EGPHAFGTSexuNbEPcWAdCcPlw5G5w81jNiCLoWkSc1kneTja6xqB5SOqoq5oBW 9LqiGX9LxhLvx6M/CVhNhU9DWVLlvGygigm3wV5uoS7G1r98wmHynZ/Fi7QlxhB06EoC Ub17D6E8uEngBVAiokHHtbyPyH5h4WV+uRP7nB1vhQCvLScwDVoRCZ3VdXhzQhfnWcn6 5XmA== X-Gm-Message-State: AOAM532uYbJaHz1fEwQ7rxWpx1XFEskZElqnm6AmTteiY937L4Pllr/v vqHCFWoNYCA5Zbz3K2F2MRM= X-Google-Smtp-Source: ABdhPJy3++fhlmOPjgCVD9YWECgM8MvAI+GJMIgVNwv9zRYYv+PXs67AfGWEw8ba+VdgPgZFwWvblQ== X-Received: by 2002:a17:906:3b47:: with SMTP id h7mr281786ejf.377.1614245097902; Thu, 25 Feb 2021 01:24:57 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.24.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:24:57 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini , Heiko Schocher Subject: [PATCH v3 21/38] pci: mpc85xx: Support 64-bit bus and cpu address Date: Thu, 25 Feb 2021 17:22:42 +0800 Message-Id: <1614244979-48216-22-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean At present the driver only supports 32-bit bus and cpu address. The controller's outbound registers/fields for extended address are not programmed. Let's program them to support 64-bit bus and cpu address. Signed-off-by: Bin Meng Reviewed-by: Heiko Schocher --- (no changes since v1) drivers/pci/pci_mpc85xx.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/pci/pci_mpc85xx.c b/drivers/pci/pci_mpc85xx.c index f0d469a..574cb78 100644 --- a/drivers/pci/pci_mpc85xx.c +++ b/drivers/pci/pci_mpc85xx.c @@ -93,18 +93,18 @@ static int mpc85xx_pci_dm_probe(struct udevice *dev) pcix = priv->cfg_addr; /* BAR 1: memory */ - out_be32(&pcix->potar1, (mem->bus_start >> 12) & 0x000fffff); - out_be32(&pcix->potear1, 0); - out_be32(&pcix->powbar1, (mem->phys_start >> 12) & 0x000fffff); - out_be32(&pcix->powbear1, 0); + out_be32(&pcix->potar1, mem->bus_start >> 12); + out_be32(&pcix->potear1, (u64)mem->bus_start >> 44); + out_be32(&pcix->powbar1, mem->phys_start >> 12); + out_be32(&pcix->powbear1, (u64)mem->phys_start >> 44); out_be32(&pcix->powar1, (POWAR_EN | POWAR_MEM_READ | POWAR_MEM_WRITE | (__ilog2(mem->size) - 1))); /* BAR 1: IO */ - out_be32(&pcix->potar2, (io->bus_start >> 12) & 0x000fffff); - out_be32(&pcix->potear2, 0); - out_be32(&pcix->powbar2, (io->phys_start >> 12) & 0x000fffff); - out_be32(&pcix->powbear2, 0); + out_be32(&pcix->potar2, io->bus_start >> 12); + out_be32(&pcix->potear2, (u64)io->bus_start >> 44); + out_be32(&pcix->powbar2, io->phys_start >> 12); + out_be32(&pcix->powbear2, (u64)io->phys_start >> 44); out_be32(&pcix->powar2, (POWAR_EN | POWAR_IO_READ | POWAR_IO_WRITE | (__ilog2(io->size) - 1))); From patchwork Thu Feb 25 09:22:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444217 X-Patchwork-Delegate: priyanka.jain@nxp.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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=AgW7j/qS; 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 4DmSBb085Vz9s1l for ; Thu, 25 Feb 2021 20:28:06 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 72F3C8204A; Thu, 25 Feb 2021 10:27:11 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="AgW7j/qS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C93DD812E4; Thu, 25 Feb 2021 10:25:17 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) (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 B072A81F8D for ; Thu, 25 Feb 2021 10:25:02 +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=bmeng.cn@gmail.com Received: by mail-ej1-x634.google.com with SMTP id do6so7661851ejc.3 for ; Thu, 25 Feb 2021 01:25:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/QjqrpuejqfJw7u5PLUrfacuzHo8AvQ+FlXln2zSOu0=; b=AgW7j/qSb6ZduM7MukuQ1kxiIGcL3bXU+4fxpxVwlvs9EE/4XiYROlH6k/Icb4XvYu C7vWrlzifNZol3j1vEYNDEqcXl4YwZGSxtr1H8rWiDk7ejj9rFxPweRivJ7kxm0bY5Zl wrqji2OoKMIVgzIBOPah9NzT5y7CBMFX8MudWNrdnpaRyiOBi3yt6qnxfexcfVFwuHpw Sd6jEjvS5dzq1obUITCDl9C3iAwNxRk7xvtZW8/kDb05U8KMSWNgdZpm/pXeCrvK1a21 8Y5vmvxZCMcMErMFo1Jo72hEzw3gTjYd/ntVXDCrb1hJ3X+wIAqcPLFow3iqh/jSdhcs PMVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/QjqrpuejqfJw7u5PLUrfacuzHo8AvQ+FlXln2zSOu0=; b=fo3OvdRncXpDpMmNDLm63M4pBrmvbwdEDPIn5sPqURKnoH698JnPFK7pkbjq31RUTn sTXg0DjkvhI7AnedTIyxTFTs1IO+8+09MgJOOirx3NlO+a3Ktl7iMnsbwxPQVpK8JrbG cDkP5ukm1eiB8V0O1i1/ZF3bZOUAiKjef7qb76PZXMLqxgW5cnGuyPuR/sNwA7JuCdXR wyp7rtnxAvei+aEDlGBa0PIVD2ooP/lssd2Hjl58fsIo+nVtsJIUfq6cR9NVD0n4hZii IRpP4RnV3pc2ELcL+4I7S1Xvcr0hTX0yYOUO+WsxIkTSf022JpHqc6uTECGM3fbI5FSf HbLA== X-Gm-Message-State: AOAM531QSwT2nkdN6yyaIGcS7IvxUezTdgZmucOWE3K4mI5SIDv3LCAt h7V6qy6ZYKPqnOm6pKgGCj8= X-Google-Smtp-Source: ABdhPJwSwV8FRloW70uI6JCbtZMF6jzEoB/A8yQ9i8i77wUmpDKxgIs9e1ytNiNz8mlAqp0tOCwPUg== X-Received: by 2002:a17:907:12d0:: with SMTP id vp16mr1853760ejb.232.1614245102138; Thu, 25 Feb 2021 01:25:02 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.24.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:25:01 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 22/38] ppc: qemu: Switch over to use DM ETH and PCI Date: Thu, 25 Feb 2021 17:22:43 +0800 Message-Id: <1614244979-48216-23-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean At present the board supports non-DM version PCI and E1000 drivers. Switch over to use DM ETH and PCI by: - Rewrite the PCI address map functions using DM APIs - Enable CONFIG_MISC_INIT_R to do the PCI initialization and address map - Drop unnecessary ad-hoc config macros - Remove board_eth_init() in the board codes Signed-off-by: Bin Meng Reviewed-by: Simon Glass Reviewed-by: Priyanka Jain --- (no changes since v1) board/freescale/qemu-ppce500/qemu-ppce500.c | 111 ++++++---------------------- configs/qemu-ppce500_defconfig | 4 +- include/configs/qemu-ppce500.h | 13 ---- 3 files changed, 24 insertions(+), 104 deletions(-) diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c index db13582..659f794 100644 --- a/board/freescale/qemu-ppce500/qemu-ppce500.c +++ b/board/freescale/qemu-ppce500/qemu-ppce500.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -79,27 +80,9 @@ int checkboard(void) return 0; } -static int pci_map_region(void *fdt, int pci_node, int range_id, - phys_addr_t *pbaddr, phys_size_t *ppaddr, - pci_addr_t *pvaddr, pci_size_t *psize, - ulong *pmap_addr) +static int pci_map_region(phys_addr_t paddr, phys_size_t size, ulong *pmap_addr) { - uint64_t baddr; - uint64_t paddr; - uint64_t size; ulong map_addr; - int r; - - r = fdt_read_range(fdt, pci_node, range_id, &baddr, &paddr, &size); - if (r) - return r; - - if (pbaddr) - *pbaddr = baddr; - if (ppaddr) - *ppaddr = paddr; - if (psize) - *psize = size; if (!pmap_addr) return 0; @@ -117,82 +100,37 @@ static int pci_map_region(void *fdt, int pci_node, int range_id, assert(!tlb_map_range(map_addr, paddr, size, TLB_MAP_IO)); *pmap_addr = map_addr + size; - if (pvaddr) - *pvaddr = map_addr; - return 0; } -void pci_init_board(void) +int misc_init_r(void) { - struct pci_controller *pci_hoses; - void *fdt = get_fdt_virt(); - int pci_node = -1; - int pci_num = 0; - int pci_count = 0; + struct udevice *dev; + struct pci_region *io; + struct pci_region *mem; + struct pci_region *pre; ulong map_addr; + int ret; - puts("\n"); + /* Ensure PCI is probed */ + uclass_first_device(UCLASS_PCI, &dev); + + pci_get_regions(dev, &io, &mem, &pre); /* Start MMIO and PIO range maps above RAM */ map_addr = CONFIG_SYS_PCI_MAP_START; - /* Count and allocate PCI buses */ - pci_node = fdt_node_offset_by_prop_value(fdt, pci_node, - "device_type", "pci", 4); - while (pci_node != -FDT_ERR_NOTFOUND) { - pci_node = fdt_node_offset_by_prop_value(fdt, pci_node, - "device_type", "pci", 4); - pci_count++; - } - - if (pci_count) { - pci_hoses = malloc(sizeof(struct pci_controller) * pci_count); - } else { - printf("PCI: disabled\n\n"); - return; - } + /* Map MMIO range */ + ret = pci_map_region(mem->phys_start, mem->size, &map_addr); + if (ret) + return ret; - /* Spawn PCI buses based on device tree */ - pci_node = fdt_node_offset_by_prop_value(fdt, pci_node, - "device_type", "pci", 4); - while (pci_node != -FDT_ERR_NOTFOUND) { - struct fsl_pci_info pci_info = { }; - const fdt32_t *reg; - int r; - - reg = fdt_getprop(fdt, pci_node, "reg", NULL); - pci_info.regs = fdt_translate_address(fdt, pci_node, reg); - - /* Map MMIO range */ - r = pci_map_region(fdt, pci_node, 0, &pci_info.mem_bus, - &pci_info.mem_phys, NULL, - &pci_info.mem_size, &map_addr); - if (r) - break; - - /* Map PIO range */ - r = pci_map_region(fdt, pci_node, 1, &pci_info.io_bus, - &pci_info.io_phys, NULL, - &pci_info.io_size, &map_addr); - if (r) - break; - - /* Instantiate */ - pci_info.pci_num = pci_num + 1; - - fsl_setup_hose(&pci_hoses[pci_num], pci_info.regs); - printf("PCI: base address %lx\n", pci_info.regs); - - fsl_pci_init_port(&pci_info, &pci_hoses[pci_num], pci_num); - - /* Jump to next PCI node */ - pci_node = fdt_node_offset_by_prop_value(fdt, pci_node, - "device_type", "pci", 4); - pci_num++; - } + /* Map PIO range */ + ret = pci_map_region(io->phys_start, io->size, &map_addr); + if (ret) + return ret; - puts("\n"); + return 0; } int last_stage_init(void) @@ -235,16 +173,9 @@ static uint64_t get_linear_ram_size(void) panic("Couldn't determine RAM size"); } -int board_eth_init(struct bd_info *bis) -{ - return pci_eth_init(bis); -} - #if defined(CONFIG_OF_BOARD_SETUP) int ft_board_setup(void *blob, struct bd_info *bd) { - FT_FSL_PCI_SETUP; - return 0; } #endif diff --git a/configs/qemu-ppce500_defconfig b/configs/qemu-ppce500_defconfig index c528a68..4a4b369 100644 --- a/configs/qemu-ppce500_defconfig +++ b/configs/qemu-ppce500_defconfig @@ -11,7 +11,6 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y CONFIG_BOOTDELAY=1 # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_LAST_STAGE_INIT=y -# CONFIG_MISC_INIT_R is not set CONFIG_HUSH_PARSER=y CONFIG_CMD_REGINFO=y CONFIG_CMD_BOOTZ=y @@ -29,7 +28,10 @@ CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y # CONFIG_MMC is not set +CONFIG_DM_ETH=y CONFIG_E1000=y +CONFIG_DM_PCI=y +CONFIG_PCI_MPC85XX=y CONFIG_DM_SERIAL=y CONFIG_SYS_NS16550=y CONFIG_ADDR_MAP=y diff --git a/include/configs/qemu-ppce500.h b/include/configs/qemu-ppce500.h index feac6ef..b1ee810 100644 --- a/include/configs/qemu-ppce500.h +++ b/include/configs/qemu-ppce500.h @@ -13,8 +13,6 @@ #define CONFIG_SYS_RAMBOOT -#define CONFIG_PCI1 1 /* PCI controller 1 */ -#define CONFIG_FSL_PCI_INIT /* Use common FSL init code */ #define CONFIG_SYS_PCI_64BIT /* enable 64-bit PCI resources */ #define CONFIG_ENABLE_36BIT_PHYS @@ -73,17 +71,6 @@ extern unsigned long long get_phys_ccsrbar_addr_early(void); #define CONFIG_SYS_MONITOR_LEN (512 * 1024) #define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024) -/* - * General PCI - * Memory space is mapped 1-1, but I/O space must start from 0. - */ - -#ifdef CONFIG_PCI -#define CONFIG_PCI_INDIRECT_BRIDGE - -#define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ -#endif /* CONFIG_PCI */ - #define CONFIG_LBA48 /* From patchwork Thu Feb 25 09:22:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444219 X-Patchwork-Delegate: priyanka.jain@nxp.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=X0mr+Txi; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DmSC13rwGz9s1l for ; Thu, 25 Feb 2021 20:28:29 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 407818201C; Thu, 25 Feb 2021 10:27:23 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="X0mr+Txi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AB3FD81B51; Thu, 25 Feb 2021 10:25:20 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (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 2F28F80F00 for ; Thu, 25 Feb 2021 10:25:07 +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=bmeng.cn@gmail.com Received: by mail-ed1-x533.google.com with SMTP id d2so5887835edq.10 for ; Thu, 25 Feb 2021 01:25:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oT2iPEZXhY1IgB+H6TD/mLiBLLhfju38vufbUzB9j1E=; b=X0mr+TxiPk0yZfd08LzHMPWPQzcCAb4S7kuDDKdnAVPvTy6FdWefZzQmqhvztdfMc9 YbGX0tFoFxZKI4Gp07eLYlJhk5rkzN/JYKNCNEq42wOkUfiMDQLXqKYFEQEW5ecRSjVe gH1U2DI4oj8lVpaQavigQ+uxqMVP4KLV65p+SBGjkOx4Kzb0wzk29r2oKhWY4kdi3+ir 0Ilw2Y4xtJVr0o9hhFagnbOkbpinqzNAm+1t0BpsGjv9+NpTnaRrv81jbRum2LrCESFJ wAwDTuD2Uf3wfIastIcZtt0N6syFsvIvw6T8R1om10wB+3RtvJi7fMjoK91RCzMsKbs5 uqWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=oT2iPEZXhY1IgB+H6TD/mLiBLLhfju38vufbUzB9j1E=; b=iDLnYg1WeasOdynxHBqAijO0vMx4C8Bfx9katmUJSm1O6QipfWSVD18lT7OieIGcmM +owom/HkH8FU9prDVCv2xSUeSMgdI4T4TauEGY6+UXttTNIJk4i/fKzMvNq78jaP63tL hd3yO5aGdsbAWCuiJzw2ii142sgSbtKBZLrBcK/88dS8vj1spy33F9fCJWgMafQ36D96 xBJo3k/WeT1l1e5E7CBGYejiddQcNKBGrCugrsGSKcBKu6IjIHQAipnXiHFiS6b5bAVn WGulIEZcPKH11H0RYcuL+bGGjejnzmcYfae2WK/9w1mFo0V0w41HPJLcGyWNlCv0UVm+ CuGQ== X-Gm-Message-State: AOAM531StiRZu+Fxa+AnutaZzfkk1kZA+ybGGaUgjHoTOmV2wCFMY+TM 4Xj/3LFFlqli4QeRxmRkZUE= X-Google-Smtp-Source: ABdhPJyosmhSWFNxxxK7NawON3hxH0s3/XY5OHkkc2/g51ukI5nDBqhTywlMqbbQOWJtvAfgrTAINw== X-Received: by 2002:a05:6402:b2d:: with SMTP id bo13mr1903797edb.120.1614245106900; Thu, 25 Feb 2021 01:25:06 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.25.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:25:06 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 23/38] ppc: qemu: Drop CONFIG_OF_BOARD_SETUP Date: Thu, 25 Feb 2021 17:22:44 +0800 Message-Id: <1614244979-48216-24-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean ft_board_setup() is now empty. Drop it. Signed-off-by: Bin Meng --- (no changes since v1) board/freescale/qemu-ppce500/qemu-ppce500.c | 7 ------- configs/qemu-ppce500_defconfig | 1 - 2 files changed, 8 deletions(-) diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c index 659f794..79a6986 100644 --- a/board/freescale/qemu-ppce500/qemu-ppce500.c +++ b/board/freescale/qemu-ppce500/qemu-ppce500.c @@ -173,13 +173,6 @@ static uint64_t get_linear_ram_size(void) panic("Couldn't determine RAM size"); } -#if defined(CONFIG_OF_BOARD_SETUP) -int ft_board_setup(void *blob, struct bd_info *bd) -{ - return 0; -} -#endif - phys_size_t fixed_sdram(void) { return get_linear_ram_size(); diff --git a/configs/qemu-ppce500_defconfig b/configs/qemu-ppce500_defconfig index 4a4b369..918739b 100644 --- a/configs/qemu-ppce500_defconfig +++ b/configs/qemu-ppce500_defconfig @@ -6,7 +6,6 @@ CONFIG_MPC85xx=y CONFIG_TARGET_QEMU_PPCE500=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y -CONFIG_OF_BOARD_SETUP=y CONFIG_OF_STDOUT_VIA_ALIAS=y CONFIG_BOOTDELAY=1 # CONFIG_DISPLAY_BOARDINFO is not set From patchwork Thu Feb 25 09:22:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444218 X-Patchwork-Delegate: priyanka.jain@nxp.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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=uuR3CyTc; 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 4DmSBp6sFbz9s1l for ; Thu, 25 Feb 2021 20:28:18 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 026588207B; Thu, 25 Feb 2021 10:27:16 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="uuR3CyTc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CBA2E81444; Thu, 25 Feb 2021 10:25:19 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) (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 851C981C64 for ; Thu, 25 Feb 2021 10:25:11 +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=bmeng.cn@gmail.com Received: by mail-ej1-x630.google.com with SMTP id a22so7638908ejv.9 for ; Thu, 25 Feb 2021 01:25:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wBsSbJYHD9O4ZLxMrIOMC3pWYZt7Ej1US1G5mPaxyjc=; b=uuR3CyTchSDM88H+WPvstERP5QQBwvFZSbtPy0MoAeE/8vs7duyJQAwP3jRdusvLpQ 0YmK1xWSAX2jnQMpzNTuddlfPgah2HdwfzdBHJksR8VPUsCcj32rjXtg+oTzGQ9eQ+KA 0zy8RXSfQbGA+djYki5uLemgD7qV3SdM1331Q2kQ8ErbBH+AvXtB+8T0l+v7eaxKD4KM JULHCSOGTeBt7bUAXHqJwz4hN1sPo166xtID8QdXgYnPWP4RlSmxwpDo+X3aKUcwrLdT WtNb+6kOLMmBvfun6MmEFqESufy0CodCfWq+8Jhju2OqsB4SP8S8RRY7RpkaBGY8fSQU 2Cew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wBsSbJYHD9O4ZLxMrIOMC3pWYZt7Ej1US1G5mPaxyjc=; b=nrropnrqq+cAOcBAizH1kKM2YU4xu5a47/znoF9JmySJw5BBch67teHTL4aE1G8kDV JMUlwypHXUET6zQSwb61w/Yybp6kWgT2YgAMdFwbXGSqml8C1zXBj6CYYK7qHpLMKHwd ea5TRH+9wGgMvlCTas06ffCS+mY3vGVEFi7BnbiVQCb417WDPHTPY8PhYhIaOVqyzCku XDh25LPxyKPCLt8/p/riSDICGk7aDfCUQV3PTbaHHqfHpI75764O2ye58l2RzDxv1pxf KmNodAyzQ4E/5gGaDrmw+iW0Qe+Su8uxupbNZ4Fm0xrEczzwn4WzJ1SRA42HVhazRRYO ERfw== X-Gm-Message-State: AOAM530uQys+QG38FdFQFwyhQG2EtAkpp44Aczmk2Brm5Le2iJmBsnOF 7xISBrBeKAKmRT9FflMOrmY= X-Google-Smtp-Source: ABdhPJzauI3DnP5tVFgh4dwF04LEyL/u0YKxcaIuNiCtrfN62kApBlg+GWJDKjJt5LC/9cAyqNmvEA== X-Received: by 2002:a17:906:38b:: with SMTP id b11mr1742113eja.78.1614245111249; Thu, 25 Feb 2021 01:25:11 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.25.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:25:10 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 24/38] cmd: Fix virtio command dependency Date: Thu, 25 Feb 2021 17:22:45 +0800 Message-Id: <1614244979-48216-25-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean The 'virtio' command calls blk_common_cmd() which is only available when CONFIG_HAVE_BLOCK_DEVICE is on. Fix the Kconfig dependency. Signed-off-by: Bin Meng Reviewed-by: Simon Glass Reviewed-by: Priyanka Jain --- (no changes since v1) cmd/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index 2021939..eda5190 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1344,6 +1344,7 @@ config CMD_PVBLOCK config CMD_VIRTIO bool "virtio" depends on VIRTIO + depends on HAVE_BLOCK_DEVICE default y if VIRTIO help VirtIO block device support From patchwork Thu Feb 25 09:22:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444220 X-Patchwork-Delegate: priyanka.jain@nxp.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=rUjPCGqy; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DmSCD4PlSz9s1l for ; Thu, 25 Feb 2021 20:28:40 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 47F4A82462; Thu, 25 Feb 2021 10:27:31 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="rUjPCGqy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5904581FB9; Thu, 25 Feb 2021 10:25:28 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) (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 1368781F66 for ; Thu, 25 Feb 2021 10:25:16 +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=bmeng.cn@gmail.com Received: by mail-ed1-x52e.google.com with SMTP id l12so5930090edt.3 for ; Thu, 25 Feb 2021 01:25:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=f2gs/4tpJkayHk43mbyg0XDMtZFthYdkCi8NaZV6NEE=; b=rUjPCGqyMl3U+FVSJ5LfIUa8UlwJTlvUyE2/8nfq+ESxJ2v3Y8GBWHRAi1bY25yvXG EDRe+IicUQCAtHTwXgARb0Ji5SYpBSFcE0WEZBp1Z/lT7aae1GMspf9k4+YVsrmdST/0 maDbF013ilJB0ppvXgjHkbpIOpbNud5eC7s2UAnOD9s5X9th3cYEaL1cWjEPkq/GJaJq k39ELgt/5sidylkC/AK7uxQSm1t67IhcO7beQ0doRU35o2cbcsmMgqKPTcKpvuFxuEH8 WWAO3OOqjUqpVNf2aUn/+mNeA0RunCyP3+4DTsuIrRkiKObyXVTitwMcqegjUZmcGBS8 v+GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=f2gs/4tpJkayHk43mbyg0XDMtZFthYdkCi8NaZV6NEE=; b=TtPqUybIcRkoN6KE20mZcgNcvexMWS0XUxebxJkbaUOij3dbQgHeZ82UUfWdd+q9TU syv2FPRywjWHG5iLSz7NztssHSKMQl6GypaInfj6u0zVgxPMC/qMwmH0u6ZSUd44BzXm Mtzvn8QDf41pYY6r1Lif7pnVFRdxyViwvU/mILfFmRdwEuJU3FxUFBn4W4+rCa18EGmF DdHim72N7R/+R/kU5CwxCPwe6pbB89uH5eo1yKke1+lzLq74XbopVwihhpwZmUnBBlSa d9NMzzwxKQWHjo+agjixpAeea0Zn5eZw4tHZrBsoE4cjNePUTvqolGNgDxDk1JTGRBFf /9zA== X-Gm-Message-State: AOAM531f3XZhOFhrywi7GwuaVEazcUrQaV9kpajhI02T2Djk1xRwFQtc I+QnJ4eAZD3/JPYbIOFxjic= X-Google-Smtp-Source: ABdhPJzZEAmmywaMZSrIPwVyo/eoMi3x7Mgb0szA11YafTG58rGNh25tz6gWNnU5K0yCJv6sU9zEFQ== X-Received: by 2002:a05:6402:1b01:: with SMTP id by1mr1071059edb.217.1614245115730; Thu, 25 Feb 2021 01:25:15 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.25.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:25:15 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 25/38] ppc: qemu: Enable VirtIO NET support Date: Thu, 25 Feb 2021 17:22:46 +0800 Message-Id: <1614244979-48216-26-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean By default the QEMU ppce500 machine connects a VirtIO NET to the PCI controller, although it can be replaced to an e1000 NIC via additional command line options. Now that we have switched over to DM PCI, VirtIO support becomes possible. This commit enables the support. Signed-off-by: Bin Meng Reviewed-by: Priyanka Jain --- (no changes since v1) board/freescale/qemu-ppce500/qemu-ppce500.c | 8 ++++++++ configs/qemu-ppce500_defconfig | 2 ++ 2 files changed, 10 insertions(+) diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c index 79a6986..9c30c12 100644 --- a/board/freescale/qemu-ppce500/qemu-ppce500.c +++ b/board/freescale/qemu-ppce500/qemu-ppce500.c @@ -24,6 +24,8 @@ #include #include #include +#include +#include DECLARE_GLOBAL_DATA_PTR; @@ -130,6 +132,12 @@ int misc_init_r(void) if (ret) return ret; + /* + * Make sure virtio bus is enumerated so that peripherals + * on the virtio bus can be discovered by their drivers. + */ + virtio_init(); + return 0; } diff --git a/configs/qemu-ppce500_defconfig b/configs/qemu-ppce500_defconfig index 918739b..202e97e 100644 --- a/configs/qemu-ppce500_defconfig +++ b/configs/qemu-ppce500_defconfig @@ -33,5 +33,7 @@ CONFIG_DM_PCI=y CONFIG_PCI_MPC85XX=y CONFIG_DM_SERIAL=y CONFIG_SYS_NS16550=y +CONFIG_VIRTIO_PCI=y +CONFIG_VIRTIO_NET=y CONFIG_ADDR_MAP=y CONFIG_PANIC_HANG=y From patchwork Thu Feb 25 09:22:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444222 X-Patchwork-Delegate: priyanka.jain@nxp.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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=GJD7LIcw; 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 4DmSCR6yVVz9sVR for ; Thu, 25 Feb 2021 20:28:51 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 65A0C826A6; Thu, 25 Feb 2021 10:27:39 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="GJD7LIcw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AF95A81C64; Thu, 25 Feb 2021 10:25:27 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) (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 33BC681CA6 for ; Thu, 25 Feb 2021 10:25:20 +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=bmeng.cn@gmail.com Received: by mail-ej1-x62b.google.com with SMTP id do6so7663272ejc.3 for ; Thu, 25 Feb 2021 01:25:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3TTAO9V2jhYPCGG0atEB1v9iXcCu0/9ZCohmpfA+zMg=; b=GJD7LIcwhokTum7S3IgJKNiOaPtHrx3spQyNBpkG4pVi+hQytewEzYYJ2A7IBJNbH1 2ZJ7WDD1YNwjnVMcUOQPEG6uj1DLtpStqRJwQuNVDKJa44SYW5iFg8lrlTmudgTtqpwy RM/EQkM0PxIGb+eAVQqxhjXapC42AJ8F7/WxdbX/mnh+yfMjhV8g/niLJObpgn7Y3MYY Crqcf/Dfnhokmq/yK6P78uuSIwJ56293eZ1dSYykeN3CWrewYswOKEIT3Q9Wo8ns7O3v +u5Dr1/ykA8BumcGuzVlM17xVbwVZPTC51DMZQtw9LcXJXEJAGETFALbb7nnSVTmIh8b YLag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3TTAO9V2jhYPCGG0atEB1v9iXcCu0/9ZCohmpfA+zMg=; b=PccImUJ6U9oDUUdPVz9MmSr38BJjHShjAkt47XXrgiP5Zh/GBgYAe0dxPQ/NHl5++J 3E0I5r1B1PEFaFDyMfQqQYm2fbE9GQhfz+AJl9x1PptBPZEQCk+3/98xZ1OKvCVpeJpK y0z3TxYVOwAgFQx73RVGQ3BUjbytz9IZW97PWO5ALuOMwu/rYWoZn45WPbHlFaeUfNU3 QYgwAjtBiAnItNA6glC1krf/3rRSpN9pDCfJXKhqRQ+g2F/NjPqR6CeqIWnjd+sifY2C KRBxRM0keNTzDRLYzf8fKCsjdY1PD/A4zN3TJcZiVUheAc1rYsgzOh6oyY//Qk3jvYzD p9Kg== X-Gm-Message-State: AOAM5314pDKWOseMaCfOBeOzsL93uqo/T887JQPtm9BAq7I268ttuAs4 OIH9DyuAivwwWik3fn30eiM= X-Google-Smtp-Source: ABdhPJxGcO3FKu7MttjNeB2Lza5p74jEO/WdOZJTPEdGGM6W2FzBQiBzW619aQevhTg4f9BNbwuNqQ== X-Received: by 2002:a17:907:10c8:: with SMTP id rv8mr1889921ejb.58.1614245119848; Thu, 25 Feb 2021 01:25:19 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.25.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:25:19 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 26/38] virtio: Fix VirtIO BLK driver dependency Date: Thu, 25 Feb 2021 17:22:47 +0800 Message-Id: <1614244979-48216-27-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean The VirtIO BLK driver depends on the blk uclass driver. Add the dependency in the Kconfig. Signed-off-by: Bin Meng Reviewed-by: Simon Glass Reviewed-by: Priyanka Jain --- (no changes since v2) Changes in v2: - new patch: virtio: Fix VirtIO BLK driver dependency drivers/virtio/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig index e800720..1835607 100644 --- a/drivers/virtio/Kconfig +++ b/drivers/virtio/Kconfig @@ -55,6 +55,7 @@ config VIRTIO_NET config VIRTIO_BLK bool "virtio block driver" depends on VIRTIO + depends on BLK help This is the virtual block driver for virtio. It can be used with QEMU based targets. From patchwork Thu Feb 25 09:22:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444223 X-Patchwork-Delegate: priyanka.jain@nxp.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=k+ft5/HQ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DmSCf4T08z9s1l for ; Thu, 25 Feb 2021 20:29:02 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1DE5B82717; Thu, 25 Feb 2021 10:27:47 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="k+ft5/HQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AA5F081F70; Thu, 25 Feb 2021 10:25:32 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) (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 60F87812E4 for ; Thu, 25 Feb 2021 10:25:24 +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=bmeng.cn@gmail.com Received: by mail-ej1-x631.google.com with SMTP id jt13so7683510ejb.0 for ; Thu, 25 Feb 2021 01:25:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=i/nifGgKu5lnNSnnVuLfEeZy/Vlr5nGJ3h/XV3vkBWE=; b=k+ft5/HQYzvvqErDxMliBQh5m5XOI68OQNkDHsSuCjdrq4zal0afv8wOBttC4r6Snk zdXlAuWnkFQu9YkIfSPASTsmducQbUuZVU7iLSOIjJu3nrJlXRiwdyvMajlGfGn9L+pX 6kb73UPUyv4OnnfkXxKGxDcVk2dWkULIG5fh8aEWlkLEsA6xme7U6pW0DVOgNipSBdcy A3JQskc+11zy74qwfYJ0Q0LDaZMPfN/IL55LTO2m9RZRAonfUL30GvskEYvZyn47O/qw bMQ4+4wpp52bl2jgBFwamONgFVIYr55NxoI75O0/hHDWkQ//9OIh/YhVas86F45Go8R6 Mg6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=i/nifGgKu5lnNSnnVuLfEeZy/Vlr5nGJ3h/XV3vkBWE=; b=lmh77BOZM+VOkIeAxtIugNjtsmCE8LeREDT+Xx6RE9PgKIEOUMt+sg3P0jdkBT2W03 Vkb/DJ5MAzIoVaLXvu8dIeTOmmDyM5SktMZNr/mQc/m+uQBifzM7E3uFtG1cVpEYgAnW E5z1hb4xiHSjLTV6CPC/OL931Px99FTnvvpKBC8dTAb3k1eiXR7s2ykAlrX0fht6T9mS nJ24GqalgzvuLfXy9DDCU3d+tyhGuHlQhFS/xEuG7ZtGXcdeMpWoQH419F5rDwCLqMqO /bRXZdQFDslu+9KVAMJUb36jTLrFMuudg4jvvfF676l2J3xjvWIgxH5+VtsCJFxVWtEJ UCXA== X-Gm-Message-State: AOAM533JiqWinMnUrXzhOYB6NPHjbLS1WcgtC1pzvi1GKNDGhySuOC32 is+PEH1K2i9b+ubdvac3RaE= X-Google-Smtp-Source: ABdhPJxHw1l6f+BhvfdJWvEf8AomNwbzAKFPsHmyWH5Xo3J6apx7uz+ysteiEbre66zzGACWV/7sOw== X-Received: by 2002:a17:906:7fc4:: with SMTP id r4mr1753094ejs.81.1614245124114; Thu, 25 Feb 2021 01:25:24 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.25.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:25:23 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 27/38] ppc: qemu: Enable VirtIO BLK support Date: Thu, 25 Feb 2021 17:22:48 +0800 Message-Id: <1614244979-48216-28-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean Enable VirtIO BLK driver so that we can store a kernel image to a disk image and boot from there. Signed-off-by: Bin Meng Reviewed-by: Priyanka Jain --- (no changes since v2) Changes in v2: - new patch: ppc: qemu: Enable VirtIO BLK support configs/qemu-ppce500_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/qemu-ppce500_defconfig b/configs/qemu-ppce500_defconfig index 202e97e..b2510c8 100644 --- a/configs/qemu-ppce500_defconfig +++ b/configs/qemu-ppce500_defconfig @@ -26,6 +26,8 @@ CONFIG_OF_BOARD=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y +CONFIG_BLK=y +CONFIG_HAVE_BLOCK_DEVICE=y # CONFIG_MMC is not set CONFIG_DM_ETH=y CONFIG_E1000=y @@ -35,5 +37,6 @@ CONFIG_DM_SERIAL=y CONFIG_SYS_NS16550=y CONFIG_VIRTIO_PCI=y CONFIG_VIRTIO_NET=y +CONFIG_VIRTIO_BLK=y CONFIG_ADDR_MAP=y CONFIG_PANIC_HANG=y From patchwork Thu Feb 25 09:22:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444227 X-Patchwork-Delegate: priyanka.jain@nxp.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=nTTpPg1t; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DmSFM1Qb1z9s1l for ; Thu, 25 Feb 2021 20:30:31 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B27068207F; Thu, 25 Feb 2021 10:30:20 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="nTTpPg1t"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0E01181CA8; Thu, 25 Feb 2021 10:25:34 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) (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 5238A80F00 for ; Thu, 25 Feb 2021 10:25:28 +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=bmeng.cn@gmail.com Received: by mail-ej1-x62a.google.com with SMTP id g5so7673262ejt.2 for ; Thu, 25 Feb 2021 01:25:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Z8JB9reF2etrgRoIJDx9aIbyo8qmCAjpFAhwnhqPSYE=; b=nTTpPg1tooWD4zT0607BrbWQP8pWnAkLS5c81Loe87TfZZAhfdy/UWxTvmKXeNT8qf i/cgkc/DjnClQkRQt+HM3W77pP8s/VZVpnifkB4vetPIR9WonVAm+AmBvL4nbIHDv/QU V2XMfLzKWgaMBrYSvIXhC1R6jbzAVtsNLECNO+1zdyeJny31HIz6ki1yWXLHjzJVD32J kXYMscIMOWtEkScz4cld8MPi2yOkylVDWk2YGKYSe0fDaWlfVE2gUB8+Gb67YxhJ0NAy vXmcYrXayawjnVGY3zPv5UKTOb1zgG41HeWhUqRek2UXW7NRO0lV6G/TM+qYFeexJCQ5 ptZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Z8JB9reF2etrgRoIJDx9aIbyo8qmCAjpFAhwnhqPSYE=; b=SIR307xfOIX2LZB6YFm/4sjZt7BnemcH94b3AW9Yy9F8chyLZZ+Wmo2JlTINvGs2pY O46k30/6v7zkybleWF8CXPGRHynqMRX/PJEgk18xyAglgNiUMBQ6jWa/kZg7QOC/cYXY oDEXkRkILw4bvg6+/D/L3QDGqeq0gauF1ZofveFtB1XiBtTHJSxz2KLz0CzM8hU+DrTi QhhHnam6BnvLYw9mjzd3Lhrj4bMxZSte4xczThPlWHR3YHNgYpHg9pJvkxpRt3ILqqjb +y4vcMpnztyXOPu+HOTMMLxrp3u6+j7ydtyKF0v2KDRYja4GRK4ztaAUFm7S69DsvVqI UYWg== X-Gm-Message-State: AOAM532VqQrnHg8dVDMtnO15DHnnC1yPP56HSDQeaMWXC0EG08UKWE/H WPZ/Sj17P2GF8f5y8+Jwesw= X-Google-Smtp-Source: ABdhPJzS99sySVEb9wnqgWMBV0cG1WirPUyyuhW8d9+Kw9BCyoT10b7gyl6iWjOmJIEkaEn6Alx2Ug== X-Received: by 2002:a17:906:4045:: with SMTP id y5mr1793637ejj.529.1614245128059; Thu, 25 Feb 2021 01:25:28 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.25.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:25:27 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 28/38] ppc: mpc85xx: Add 'gpibe' register to 'struct ccsr_gpio' Date: Thu, 25 Feb 2021 17:22:49 +0800 Message-Id: <1614244979-48216-29-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean Without this, the DM GPIO driver for MPC8xxx does not compile for MPC85xx SoCs. Signed-off-by: Bin Meng Reviewed-by: Priyanka Jain --- (no changes since v2) Changes in v2: - new patch: ppc: mpc85xx: Add 'gpibe' register to 'struct ccsr_gpio' arch/powerpc/include/asm/immap_85xx.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/include/asm/immap_85xx.h b/arch/powerpc/include/asm/immap_85xx.h index bfa601e..fec1b33 100644 --- a/arch/powerpc/include/asm/immap_85xx.h +++ b/arch/powerpc/include/asm/immap_85xx.h @@ -272,6 +272,7 @@ typedef struct ccsr_gpio { u32 gpier; u32 gpimr; u32 gpicr; + u32 gpibe; } ccsr_gpio_t; #endif From patchwork Thu Feb 25 09:22:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444229 X-Patchwork-Delegate: priyanka.jain@nxp.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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=jP4aK+y3; 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 4DmSG96Xyrz9sVr for ; Thu, 25 Feb 2021 20:31:13 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7CBC981F8D; Thu, 25 Feb 2021 10:31:05 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="jP4aK+y3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0406780927; Thu, 25 Feb 2021 10:25:41 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) (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 B5D00812E4 for ; Thu, 25 Feb 2021 10:25:32 +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=bmeng.cn@gmail.com Received: by mail-ed1-x535.google.com with SMTP id w21so5915269edc.7 for ; Thu, 25 Feb 2021 01:25:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=N1lsdTpva9Brt15PS/elsroUa8iHZ+LCHHRO8tu5xUM=; b=jP4aK+y3Eq8frl8yWEyjRXjfqLw8xITWYVTEQIMioeTNpo3BFa4ezVTX9nHq5i/Oyp DXku6Gggiopi0ysOhdVHqMBg3suafW+o+0CBqB2s1XG7O31DYUrFslczLDAxn1HaFXMt +lnvbxRWAkomQ2pAT+v780eTq2IJufV3GknEJ3Z3PrZEKr1tquhrlsceT97lOS+jF7Dq bJi7sgUHag87xcPK4BxQJfbh2v/ra8y7sJf67vxh4e980vJNRmrYzdKBXfjp15QDLNFB 6q4dUkVPj+TPOLUwnnIUgrsukP3oKn+nWnsXZrvgfkIWii/URSi7ZBPlV3rJOlJa7E+8 bk9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=N1lsdTpva9Brt15PS/elsroUa8iHZ+LCHHRO8tu5xUM=; b=JWn+g9GqTgygqwziuyChJhLPTgMjTnd3TPz8U4sNqRG/yfQDFdCAjeel1VfURrNDrG tCNbhukI+LR3OwYx+Toc25vIAf2z38ovok1uiXjySZ03WTuBj+Vu3FdhXVRsJK0/RPSk Ofx6zPbkWKOVLNu0fFFTCXtxwf7UUXf5Jg1/KxTi5PSoejZRjON82MZnEbryaVtCDyMP 1DZ8vYrhAF/kLTLy1fr1IFgQLV+2BOAr5UTp/SF2q56JXxgqapt5Nl1ILgrJlkJ8x/B9 NJxfrcc8byherPwtg8KLGC2CV1iVtEbB6C7JzCm4QEQFmSybIiDw9tHbrjIM0VR5i9Yd lYbw== X-Gm-Message-State: AOAM531z8pHdH4IAGcHK9+GJVVDXCFzMcSid7OVE8TlRhsyuUZvBzViB xxospuTC4J2bw2h8UVcWbnE= X-Google-Smtp-Source: ABdhPJz6JrsCIPLtLGpF53oAAhNy+tcukci8583oBeoR6dKiU2in7kxwOmJwdAEV6IVyo5PdeDT4EQ== X-Received: by 2002:a50:8a90:: with SMTP id j16mr1879710edj.334.1614245132408; Thu, 25 Feb 2021 01:25:32 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.25.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:25:31 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 29/38] gpio: mpc8xxx: Support controller register physical address beyond 32-bit Date: Thu, 25 Feb 2021 17:22:50 +0800 Message-Id: <1614244979-48216-30-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean dev_read_addr_size_index() returns fdt_addr_t which might be a 64-bit physical address. This might be true for some 85xx SoCs whose CCSBAR is mapped beyond 4 GiB. Signed-off-by: Bin Meng Reviewed-by: Priyanka Jain --- (no changes since v2) Changes in v2: - new patch: gpio: mpc8xxx: Support controller register physical address beyond 32-bit arch/powerpc/include/asm/arch-mpc85xx/gpio.h | 2 +- drivers/gpio/mpc8xxx_gpio.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/include/asm/arch-mpc85xx/gpio.h b/arch/powerpc/include/asm/arch-mpc85xx/gpio.h index c7086a8..79ba786 100644 --- a/arch/powerpc/include/asm/arch-mpc85xx/gpio.h +++ b/arch/powerpc/include/asm/arch-mpc85xx/gpio.h @@ -18,7 +18,7 @@ #endif struct mpc8xxx_gpio_plat { - ulong addr; + phys_addr_t addr; unsigned long size; uint ngpios; }; diff --git a/drivers/gpio/mpc8xxx_gpio.c b/drivers/gpio/mpc8xxx_gpio.c index c733603..f7ffd89 100644 --- a/drivers/gpio/mpc8xxx_gpio.c +++ b/drivers/gpio/mpc8xxx_gpio.c @@ -20,7 +20,7 @@ struct mpc8xxx_gpio_data { /* The bank's register base in memory */ struct ccsr_gpio __iomem *base; /* The address of the registers; used to identify the bank */ - ulong addr; + phys_addr_t addr; /* The GPIO count of the bank */ uint gpio_count; /* The GPDAT register cannot be used to determine the value of output @@ -181,7 +181,7 @@ static int mpc8xxx_gpio_of_to_plat(struct udevice *dev) if (dev_read_bool(dev, "little-endian")) data->little_endian = true; - plat->addr = (ulong)dev_read_addr_size_index(dev, 0, (fdt_size_t *)&plat->size); + plat->addr = dev_read_addr_size_index(dev, 0, (fdt_size_t *)&plat->size); plat->ngpios = dev_read_u32_default(dev, "ngpios", 32); return 0; @@ -220,7 +220,8 @@ static int mpc8xxx_gpio_probe(struct udevice *dev) mpc8xxx_gpio_plat_to_priv(dev); - snprintf(name, sizeof(name), "MPC@%lx_", data->addr); + snprintf(name, sizeof(name), "MPC@%.8llx", + (unsigned long long)data->addr); str = strdup(name); if (!str) From patchwork Thu Feb 25 09:22:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444230 X-Patchwork-Delegate: priyanka.jain@nxp.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=F4qi4Mfo; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DmSGN3RMDz9s1l for ; Thu, 25 Feb 2021 20:31:24 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E6B6182081; Thu, 25 Feb 2021 10:31:11 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="F4qi4Mfo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E3B5581CA6; Thu, 25 Feb 2021 10:25:41 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (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 E0EB3806C3 for ; Thu, 25 Feb 2021 10:25:36 +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=bmeng.cn@gmail.com Received: by mail-ed1-x529.google.com with SMTP id h19so5906354edb.9 for ; Thu, 25 Feb 2021 01:25:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=H6CuqZ2FIv6Bk75wpYfdzqhaJmS2PJL/BPfqcJu0GTM=; b=F4qi4Mfodquu7I2ObodU0KK0J3Okd7jnCY5ucCSMZE6Wsgcqb0H+UqmnSkKer7S4pb z+084fNynYycyOqcuogQ8WLwJJZYlQ9696SGHiV/QIFgHHVwzdRPNXoY1zMzL6f71JVb fdd83xy6astflfUu86kga1RYMe3yzEhQlQ3N6Z077Y2qe+kCiypCXy84bxVdP/r5erg+ oibJIfpl761VIxnAZ8PgKzM4vrFtXQEdvReqy4HgWJ+G/67jMqh0ZxkFjI5vxiPx5Blj h3BP36lg0qImXwnMgEYrYr6nn7aCUQs9a0PeKMNzpB2V8DmDythFmkPt1wIqVl9reKaM zs5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=H6CuqZ2FIv6Bk75wpYfdzqhaJmS2PJL/BPfqcJu0GTM=; b=gOARuEaTV95eKe7lbceCFU3aY+YH03dODuMtSF57FtegeslDVjgLvHnNjVQUoMFIk5 ynmrf/Y2CfakYiqtcJqc8oGTd9paP0k72NQQ3HTvJ5MlWPAaR+7HD8+gKgOl8NL4vaE8 kIV9/FXud/en/PBrVvCGpyZOnEMzZn2hS+viXmEjv6dOAZ0G2qZdXaieuDbsqRMOr4TD 4hTN4KeMVrNEgA2HBbNO/JKd1EUXdF3J2lf7QbQtSP5xMKTWGYm5LfVTYyxSrzSV7VFY MORhWnogSJuJ1y4gSCs3LbF98mPcs3UIVfWw5+EB7kKEruZvYz/CRwQQHiKdqsEctrGk Zcng== X-Gm-Message-State: AOAM533pDJSqPD9sFgiJ3Xa3TjN1YWvP0A5fMIuMcTjUjPUfnKX+Bqyv hCbr5l+GL9z/1AEzmVP74PU= X-Google-Smtp-Source: ABdhPJwofcvTs8dLMvVv5Dgv1ppG+ePPisbewvynpTmw2SeNhb+t0/NtPnlgwwNV73eqGHnhMKYPUQ== X-Received: by 2002:aa7:c609:: with SMTP id h9mr230931edq.256.1614245136686; Thu, 25 Feb 2021 01:25:36 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.25.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:25:36 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 30/38] ppc: qemu: Enable GPIO support Date: Thu, 25 Feb 2021 17:22:51 +0800 Message-Id: <1614244979-48216-31-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean QEMU ppce500 target integrates a GPIO controller that is compatible with the QorIQ GPIO controller. Enable the DM GPIO driver for it and the 'gpio' command. Signed-off-by: Bin Meng Reviewed-by: Priyanka Jain --- (no changes since v2) Changes in v2: - new patch: ppc: qemu: Enable GPIO support configs/qemu-ppce500_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/qemu-ppce500_defconfig b/configs/qemu-ppce500_defconfig index b2510c8..c5e2ad3 100644 --- a/configs/qemu-ppce500_defconfig +++ b/configs/qemu-ppce500_defconfig @@ -1,6 +1,7 @@ CONFIG_PPC=y CONFIG_SYS_TEXT_BASE=0xf01000 CONFIG_ENV_SIZE=0x2000 +CONFIG_DM_GPIO=y CONFIG_MPC85xx=y # CONFIG_CMD_ERRATA is not set CONFIG_TARGET_QEMU_PPCE500=y @@ -15,6 +16,7 @@ CONFIG_CMD_REGINFO=y CONFIG_CMD_BOOTZ=y CONFIG_CMD_GREPENV=y CONFIG_CMD_DM=y +CONFIG_CMD_GPIO=y CONFIG_CMD_PCI=y CONFIG_CMD_DHCP=y CONFIG_CMD_PING=y @@ -28,6 +30,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_BLK=y CONFIG_HAVE_BLOCK_DEVICE=y +CONFIG_MPC8XXX_GPIO=y # CONFIG_MMC is not set CONFIG_DM_ETH=y CONFIG_E1000=y From patchwork Thu Feb 25 09:22:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444231 X-Patchwork-Delegate: priyanka.jain@nxp.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=tYobePgP; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DmSGc5Bnpz9s1l for ; Thu, 25 Feb 2021 20:31:36 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 323358206F; Thu, 25 Feb 2021 10:31:16 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="tYobePgP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 66E75812E6; Thu, 25 Feb 2021 10:25:48 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (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 CEF6E80505 for ; Thu, 25 Feb 2021 10:25:41 +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=bmeng.cn@gmail.com Received: by mail-ed1-x536.google.com with SMTP id h10so5907346edl.6 for ; Thu, 25 Feb 2021 01:25:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=I6+SSqnYgz4wSQ6SgQkOFZNlhaH1e/pVTL+wrZ6cV2A=; b=tYobePgPvVbR6MHNJKvGUSTQoBY+3ts0HVwOCFCGRBKTo4xYxceZWz3u42JaWjAbnA em7dq6Gf4UTsModUAV8t2VBpUCdRixOy7T2cl1Rffx8fKc2M6FLbQyVn+37YoM2e3koY n4QK13YooauO9W8t8XVrf5nMPigNfYqTqRRnzyu/6BUG82Vm1znjAYP2rOX0SMcRLBSZ CeDsbjlDxEDQYB+c57MmE8+gCTnjW/8tJ9G2q0KuANuxVZLiA+9/9Xba/2GTcHX/wM1n xs3KYStMWulWWTfeP+qVWGoe0+9cF3kstCwdsTnySAYhUXshjOO9nJEH/KDDXG2Uf5he OFQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=I6+SSqnYgz4wSQ6SgQkOFZNlhaH1e/pVTL+wrZ6cV2A=; b=cCgr7500H4iG6uZar/98G7XgnL9j2+Sqm4p5No/i/KTlGuZ+PkCwNaJjh+oyQ2+fnP dGZg3YfUGCa4Vzt5v7nJ4Qn/EmIVwn6OsU8gjLt7XyRbVf5kZcfyeFvJvekrdWT2BwHE ijTg2jC9Y7WiZ+ZzrZ/DnQfk1TjOjTZkcP3BpRgjzyOthVpm91d22lo94JNgqiNxZLa+ VVIm0jIftxngsB/dz+LlqymMg6+F4bjeZZ+TzrfeR4Y8druQSQQ+8erZiVshpJqQ/w3y caqHDf0PetCJhb8L/MyntibVdqiTGVBvpQoU9GQibfzfkqu0M8ZpJD5gTMe5TvsKLd0m ohcw== X-Gm-Message-State: AOAM531eRNukJoK5AI2GH9YvfsdBKApKmoxps8Z8L2VPrXYSRMwf2og3 5Uyxbs1LxKb8Uo5lmA64djk= X-Google-Smtp-Source: ABdhPJzn1mMyFSAq2qkizVdgAdLx5xAfVo43xB4GJcb/dDzfuj9J6hEvzx29odUI81y2Z0zgZCcDVA== X-Received: by 2002:aa7:c150:: with SMTP id r16mr1895303edp.96.1614245140842; Thu, 25 Feb 2021 01:25:40 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.25.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:25:40 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 31/38] dm: sysreset: Add a Kconfig option for the 'reset' command Date: Thu, 25 Feb 2021 17:22:52 +0800 Message-Id: <1614244979-48216-32-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean sysreset uclass driver provides an implementation of 'reset' command using the sysreset_ APIs unconditionally. It also supports the 'poweroff' command using the sysreset_ APIs, but under a Kconfig option CONFIG_SYSRESET_CMD_POWEROFF. Let's do the same for the 'reset' command, by introducing a new Kconfig option CONFIG_SYSRESET_CMD_RESET, and set it to on by default, to allow a board that don't have a sysreset reset driver yet, but have a sysreset poweroff driver to compile without any issue. Signed-off-by: Bin Meng Reviewed-by: Simon Glass Reviewed-by: Priyanka Jain --- (no changes since v2) Changes in v2: - new patch: dm: sysreset: Add a Kconfig option for the 'reset' command drivers/sysreset/Kconfig | 6 ++++++ drivers/sysreset/sysreset-uclass.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/drivers/sysreset/Kconfig b/drivers/sysreset/Kconfig index 0e5c7c9..968dfa4 100644 --- a/drivers/sysreset/Kconfig +++ b/drivers/sysreset/Kconfig @@ -33,6 +33,12 @@ config TPL_SYSRESET if SYSRESET +config SYSRESET_CMD_RESET + bool "sysreset implementation of the reset command" + default y + help + Enable sysreset implementation of the reset command. + if CMD_POWEROFF config SYSRESET_CMD_POWEROFF diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c index a9908eb..6c9dc7a 100644 --- a/drivers/sysreset/sysreset-uclass.c +++ b/drivers/sysreset/sysreset-uclass.c @@ -119,6 +119,7 @@ void reset_cpu(ulong addr) } +#if IS_ENABLED(CONFIG_SYSRESET_CMD_RESET) int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { printf("resetting ...\n"); @@ -128,6 +129,7 @@ int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) return 0; } +#endif #if IS_ENABLED(CONFIG_SYSRESET_CMD_POWEROFF) int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) From patchwork Thu Feb 25 09:22:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444234 X-Patchwork-Delegate: priyanka.jain@nxp.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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=vPdZLAlm; 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 4DmSGs6tCFz9s1l for ; Thu, 25 Feb 2021 20:31:49 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D031A812E4; Thu, 25 Feb 2021 10:31:22 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="vPdZLAlm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id ACC7980F00; Thu, 25 Feb 2021 10:25:53 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) (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 A737881444 for ; Thu, 25 Feb 2021 10:25:45 +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=bmeng.cn@gmail.com Received: by mail-ej1-x62f.google.com with SMTP id jt13so7685087ejb.0 for ; Thu, 25 Feb 2021 01:25:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PlORSy6fqBlWfZv2siUW0hXfeN5BvdYe3YWn/VFBYTY=; b=vPdZLAlmYLgvgK4iywfjlF1BKUI2TXH+LzXPJVWWzKagzU8SH+v5QnWYP2rsQuX+ci 2jAbczxPcP2UrW8URSgb7wlNMPvjYPcub96M2EDnNVFpAd1LhPTCP+U7rSQVKvH25NeY KBUlBkMfoZzkG16gQEUV2sleyrKvFV9Y5/6PwzFfJLDUxZbU614G6dns9dunTuixXNHh KeCNdrhXM+bt2aMJlOKZp+1FIbfBH7AiXf5jAM2OJ8Iobt6+FWEEbXUMWi+lvBAw6jAy 5f4NnBMleZ1PGHF2NvP41Bcz/MJxD4OGN9rohbiu8oZ+FVe5AJ0bUzofXjw1TMsusoxt nh4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PlORSy6fqBlWfZv2siUW0hXfeN5BvdYe3YWn/VFBYTY=; b=JT2nT6jZ3XvbEFSj/pYISpt4/ZpDG0r/oKlM/5tPZ2zLIGAjNsBBNNIr3PiUJ03lbF 4F4M9yRYLAsdM8hoEFRppSGb/aFIf+/5CG7SxrnclzoULK9IBtMjTgz84fv5r9XI5yE3 XScVS2ToUmdyLnVaVfluyeE5ynJUS68Su1VIidVeWp50L5v+z274na7ZoYD6FXSWh1bd SxdHRiy/xLRb+F6HbrWCBMgcHxhS2lhibJHJGMUizQwFRRIqMbzrJgf6xb0DMFtHNbQ7 lyBK1wa1d6G/3DTU3D6lnpbQhPx5tDBIWD0kMpNxMLcTYki19OFHs3TRif1/5Q6nmM+z 7Q6w== X-Gm-Message-State: AOAM532wLHeZsNysaDAFG6iHFsbe6FHiLNntSNAJBseQ/2N59MVsq3BM iD1TZVxkM5h2aQjIzkpIMZE= X-Google-Smtp-Source: ABdhPJw+wbtpCCCYm5GdDlYqvk3KKf6K8F7J2axhsxES+Sk8pkIQyt+h90UG2yKHu2tsdEFNUtmENA== X-Received: by 2002:a17:906:3b47:: with SMTP id h7mr284152ejf.377.1614245145264; Thu, 25 Feb 2021 01:25:45 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.25.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:25:44 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 32/38] ppc: qemu: Enable support for power off via GPIO Date: Thu, 25 Feb 2021 17:22:53 +0800 Message-Id: <1614244979-48216-33-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean The QEMU ppce500 target provides the power off functionality via the GPIO pin#0, and we can support this using the sysreset gpio poweroff driver. Let's enable it. Signed-off-by: Bin Meng Reviewed-by: Priyanka Jain --- (no changes since v2) Changes in v2: - new patch: ppc: qemu: Enable support for power off via GPIO configs/qemu-ppce500_defconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configs/qemu-ppce500_defconfig b/configs/qemu-ppce500_defconfig index c5e2ad3..8798db6 100644 --- a/configs/qemu-ppce500_defconfig +++ b/configs/qemu-ppce500_defconfig @@ -1,7 +1,6 @@ CONFIG_PPC=y CONFIG_SYS_TEXT_BASE=0xf01000 CONFIG_ENV_SIZE=0x2000 -CONFIG_DM_GPIO=y CONFIG_MPC85xx=y # CONFIG_CMD_ERRATA is not set CONFIG_TARGET_QEMU_PPCE500=y @@ -18,6 +17,7 @@ CONFIG_CMD_GREPENV=y CONFIG_CMD_DM=y CONFIG_CMD_GPIO=y CONFIG_CMD_PCI=y +CONFIG_CMD_POWEROFF=y CONFIG_CMD_DHCP=y CONFIG_CMD_PING=y # CONFIG_CMD_HASH is not set @@ -38,6 +38,10 @@ CONFIG_DM_PCI=y CONFIG_PCI_MPC85XX=y CONFIG_DM_SERIAL=y CONFIG_SYS_NS16550=y +CONFIG_SYSRESET=y +# CONFIG_SYSRESET_CMD_RESET is not set +CONFIG_SYSRESET_CMD_POWEROFF=y +CONFIG_POWEROFF_GPIO=y CONFIG_VIRTIO_PCI=y CONFIG_VIRTIO_NET=y CONFIG_VIRTIO_BLK=y From patchwork Thu Feb 25 09:22:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444235 X-Patchwork-Delegate: priyanka.jain@nxp.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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=KXsMLC1M; 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 4DmSH63P9tz9s1l for ; Thu, 25 Feb 2021 20:32:02 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 03C43826B2; Thu, 25 Feb 2021 10:31:28 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="KXsMLC1M"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C0605812E6; Thu, 25 Feb 2021 10:25:54 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) (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 B476C81454 for ; Thu, 25 Feb 2021 10:25:49 +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=bmeng.cn@gmail.com Received: by mail-ej1-x631.google.com with SMTP id n20so7661815ejb.5 for ; Thu, 25 Feb 2021 01:25:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EPF7cP5K+rqm2iYKZkuzQRWPLU52j6PCqcf+hvoDV14=; b=KXsMLC1M7pbvg9qWTu7QECDq1fXoHbhO55JIE8ayItuSiwy9riNW/Yo9YjKHguGKuw JUENp/WbWvFb9PkyyCN9gncs59duwFru87pkO7P+I1DT6Jr0RIP/hgdvPc3h6TxdZV2m Y8adCQmY8ewOojido4z9s8PVopxrqD3xdl7V7YR2G2ztd9IRIuZZXnbPWk8+oybyF+jk n/qyMa/LqDDlHWXYsvjRskesiWEvlhQWoNsGwKzVa4Hx8nFcanBOhHKJ9qGWNnl7rTGd NlAutBn0yRbsEn3DbuaRYCQXmRM+fNTlRQ9tDp4gL9BK8Rx6Pzeq8mMfgw/slxjmxqVY zjFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EPF7cP5K+rqm2iYKZkuzQRWPLU52j6PCqcf+hvoDV14=; b=aBtjqXixwWeA1ZxdgHaJiWSxO3TH9XoFk027V75OHAVESkWkcaiQEI0bpABnDWdZEy qa+KR9es5lPfwgQiVD+e2OcUTMTYqNuhoxoKiJLTTfUzuqFAyEZQYe2CBIUruAwEVrrv XpBO1iverH1T0zW9TVDWPHhQB/ZE1ycpRX/QQuNXjKQUC+PodIUMZfAcSpQY2Dn2nHQE UC/wnSKHMgYVy+ADfD9pFF5zIFWg7M0LY3o3wG6JFMsrvNzMRKnwB2Vwyoxc5RpKr3YK KtTXZVv2n/At2Z3tXqgBCaa1S2O1C7kWOYCSFbuCViNF6IZO2z34cLvD1ZoFERgJjzuc 9w9w== X-Gm-Message-State: AOAM533359yO11MB4hEE232LbEcfo6NzlQkEKCkyYLcqq3yobCiFa+PQ fGiqqN5LfYQUYO+RL51eouE= X-Google-Smtp-Source: ABdhPJxZvH0y4De2HFmVIk2QDuz/qKpr16o4HprM9KvXwKda1fwEd/LcBIIqP2Myjfwj1LBGEYX06w== X-Received: by 2002:a17:907:3f29:: with SMTP id hq41mr1798512ejc.227.1614245149352; Thu, 25 Feb 2021 01:25:49 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.25.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:25:49 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 33/38] ppc: qemu: Enable RTC support via I2C Date: Thu, 25 Feb 2021 17:22:54 +0800 Message-Id: <1614244979-48216-34-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean The QEMU ppce500 target integrates a Freescale I2C controller and has a Pericom pt7c4338 RTC connected to it. Enable corresponding DM drivers so that 'date' command is actually useful. Signed-off-by: Bin Meng Reviewed-by: Priyanka Jain --- (no changes since v2) Changes in v2: - new patch: ppc: qemu: Enable RTC support via I2C configs/qemu-ppce500_defconfig | 3 +++ include/configs/qemu-ppce500.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/configs/qemu-ppce500_defconfig b/configs/qemu-ppce500_defconfig index 8798db6..536fe7d 100644 --- a/configs/qemu-ppce500_defconfig +++ b/configs/qemu-ppce500_defconfig @@ -31,11 +31,14 @@ CONFIG_DM=y CONFIG_BLK=y CONFIG_HAVE_BLOCK_DEVICE=y CONFIG_MPC8XXX_GPIO=y +CONFIG_DM_I2C=y +CONFIG_SYS_I2C_FSL=y # CONFIG_MMC is not set CONFIG_DM_ETH=y CONFIG_E1000=y CONFIG_DM_PCI=y CONFIG_PCI_MPC85XX=y +CONFIG_DM_RTC=y CONFIG_DM_SERIAL=y CONFIG_SYS_NS16550=y CONFIG_SYSRESET=y diff --git a/include/configs/qemu-ppce500.h b/include/configs/qemu-ppce500.h index b1ee810..7c65e64 100644 --- a/include/configs/qemu-ppce500.h +++ b/include/configs/qemu-ppce500.h @@ -73,6 +73,9 @@ extern unsigned long long get_phys_ccsrbar_addr_early(void); #define CONFIG_LBA48 +/* RTC */ +#define CONFIG_RTC_PT7C4338 + /* * Environment */ From patchwork Thu Feb 25 09:22:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444237 X-Patchwork-Delegate: priyanka.jain@nxp.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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Bi4rCFb7; 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 4DmSHZ1mlPz9s1l for ; Thu, 25 Feb 2021 20:32:26 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E4F66827AA; Thu, 25 Feb 2021 10:31: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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Bi4rCFb7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DDB99812E6; Thu, 25 Feb 2021 10:26:15 +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=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) (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 B5DFF80505 for ; Thu, 25 Feb 2021 10:25:53 +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=bmeng.cn@gmail.com Received: by mail-ed1-x52f.google.com with SMTP id j9so5958835edp.1 for ; Thu, 25 Feb 2021 01:25:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nR/kx9zG41yKB/FyXkLW8voO1euP2CfWTh3DNQ/oCio=; b=Bi4rCFb7c4SAsdtWLsja5cXCtpiFmweT1iVJvaZ7dU1y1EsZvSQd+SY1lBS+ptFfVn jRb5h1Kw602WvY60tindvqITnjEtpDJYI97k1ysYk4lz3uO3aBGxmjmNwjgm4ki7sJbo g2ROQj/w0A0sRtQDtF4nI5OgC6xZhxf57Q0996jwAxliPk1obZ9V3pypBjurKSuIrmAf 383cHya18sXthy7B4+883afHRPX6Y+r63Ir4tkT+aDxaDaomIOP+Peoa47ThhD8tps4E NqgP1W3exmzLBKrd/pG+d1Snudzoni8bPNbEq12FVjgewDRttKgN0PAS5jJUiIFU6Y39 yWcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nR/kx9zG41yKB/FyXkLW8voO1euP2CfWTh3DNQ/oCio=; b=D3XZRlpixjJpErmsM0RaBNsHSIbV2AHYzMavpGUScXXfwCvxZz99dPNKfh/mKEmLFy vS4zU6EkxDfloSxSuRoS94EcmLd7JL3sbqCHFJa/7ONpfi0fpoEL251S77zRubUqtuEQ zYffWzqlysjTzYIh4rBrx5C4cyFOGBRYM05FuOKzd43lY/9BTREezYsN0Wd5dQ+fW3Wy 0nQ1V7jd+xQVKBQTqmC1E7LxXz25EaK0ATnHaEtMN8+DwjW9zI7gxUPQgVu5j0t0v1SI JG1vE2OSU3FtQVB2b1+tcrBP7ropa0kLxwWihaCddpVdDMgPGM4oHjAXFkVhha5OMVmW f9AA== X-Gm-Message-State: AOAM532WiqfXilmop76lCVtKhgm3kOIXGQiB47dSDgwMoK7QGr/u5gms 3HSc2PVbjkH+B0TGigb4Smc= X-Google-Smtp-Source: ABdhPJwS2im70R5jarZtTcUrorcVklKoiW8ph9e0IoDVkquGnpqir6tFWsUa97fcsGSRqXu/arvQEw== X-Received: by 2002:a05:6402:3133:: with SMTP id dd19mr1876706edb.337.1614245153335; Thu, 25 Feb 2021 01:25:53 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.25.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:25:52 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 34/38] ppc: qemu: Delete the temporary FDT virtual-physical mapping after U-Boot is relocated Date: Thu, 25 Feb 2021 17:22:55 +0800 Message-Id: <1614244979-48216-35-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean After U-Boot is relocated to RAM already, the previous temporary FDT virtual-physical mapping that was used in the pre-relocation phase is no longer needed. Let's delete the mapping. get_fdt_virt() might be used before and after relocation, update it to return different virtual address of FDT. Signed-off-by: Bin Meng Reviewed-by: Priyanka Jain --- (no changes since v2) Changes in v2: - new patch: ppc: qemu: Delete the temporary FDT virtual-physical mapping after U-Boot is relocated board/freescale/qemu-ppce500/qemu-ppce500.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c index 9c30c12..480776a 100644 --- a/board/freescale/qemu-ppce500/qemu-ppce500.c +++ b/board/freescale/qemu-ppce500/qemu-ppce500.c @@ -31,7 +31,10 @@ DECLARE_GLOBAL_DATA_PTR; static void *get_fdt_virt(void) { - return (void *)CONFIG_SYS_TMPVIRT; + if (gd->flags & GD_FLG_RELOC) + return (void *)gd->fdt_blob; + else + return (void *)CONFIG_SYS_TMPVIRT; } static uint64_t get_fdt_phys(void) @@ -138,6 +141,12 @@ int misc_init_r(void) */ virtio_init(); + /* + * U-Boot is relocated to RAM already, let's delete the temporary FDT + * virtual-physical mapping that was used in the pre-relocation phase. + */ + disable_tlb(find_tlb_idx((void *)CONFIG_SYS_TMPVIRT, 1)); + return 0; } From patchwork Thu Feb 25 09:22:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444228 X-Patchwork-Delegate: priyanka.jain@nxp.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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=sasNlb/A; 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 4DmSFx62DRz9s1l for ; Thu, 25 Feb 2021 20:31:01 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B592B80CE8; Thu, 25 Feb 2021 10:30:58 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="sasNlb/A"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5A8E981454; Thu, 25 Feb 2021 10:26:13 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) (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 CBBC480EFF for ; Thu, 25 Feb 2021 10:25:57 +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=bmeng.cn@gmail.com Received: by mail-ed1-x531.google.com with SMTP id h19so5907735edb.9 for ; Thu, 25 Feb 2021 01:25:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WS4aOH/FXEcXbjmgbUA52XKaodM2DK2qOWGlxyUY0iM=; b=sasNlb/Aj+vlg6bR5zDLCAXcHRTUDyBNROz5HlHb4ZQ6Qfb92v8yBDdLSZ2eDynyDg uN1EDQFvvZk76wAc9fXj0NBcNo5ISVfiWJcjxHKiMGgTVXeNiYQKV4LDONAvPKexau22 UfRYkQCoXleIg/UCZvetc95aPhyD4GcAs3v7nrzEhW9jpKWZBXFDwuFvxe7/NFLBhB1A KRwM0lGf+B9brhheuLQCkV4dI3ypVkVwHAWK+Du2Rr2ZxipZn/3OUFkxLqt2HSNBi/NT QJ4UIQUaehOnNWuFqxL1pQV86wvimAXkBrINxXQ07i35AIw1R99OJhCXEchHmdJAyHFF iSYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WS4aOH/FXEcXbjmgbUA52XKaodM2DK2qOWGlxyUY0iM=; b=DCMHUSox+OxRendHbIDDleLlKy4nbHJHnIsYzWYQU/NAP+zxIfTDNVlpiF8cLKkjve lTC7+h0CJs95GnnE/UmkoNtXpGdfoaTQgJKbB9yk5s+kcb/H+Bn0N6tz+WHowklmszp8 NNa+T6gzIV4q6X3DELmbkSvALMmMVGdWVxDsYTfLxfR3OWlFjKiSBsrGaNg/zp5XWJ+h AugnAGtJIsk5v8QG/DkvLdRCI+KJXmCm+Y7lrX9Z5NRJQhecyaFQuHZKK5d6AfRkAoFP +hnMn0mQH7eyN68lG9IEXQlbaRPgv7kuqucof7f4ybZaGy/WWiA3FeeulfQSgARiXid7 Yhfw== X-Gm-Message-State: AOAM532K1+n9rrcUsTQxtwg9HNvsQx6/S1zQVsKtdqUl471RjrY0BxAd YiuKzzfh3HShCdcLFSTevPGLk1pO6LM= X-Google-Smtp-Source: ABdhPJxaN3ETflmfBWyv/oMzLtTK6RCs9oQ5KLZsAuPR9h+ECH1dRM/cdX71QtrxtMKyNFkyWAfqsA== X-Received: by 2002:a05:6402:1d9b:: with SMTP id dk27mr1920568edb.209.1614245157403; Thu, 25 Feb 2021 01:25:57 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.25.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:25:57 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 35/38] ppc: qemu: Drop a custom env variable 'fdt_addr_r' Date: Thu, 25 Feb 2021 17:22:56 +0800 Message-Id: <1614244979-48216-36-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean Now that we have switched to CONFIG_OF_CONTROL, and we can use the env variable 'fdtcontroladdr' directly instead of creating one that is duplicated. Signed-off-by: Bin Meng Reviewed-by: Priyanka Jain --- (no changes since v2) Changes in v2: - new patch: ppc: qemu: Drop a custom env variable 'fdt_addr_r' board/freescale/qemu-ppce500/qemu-ppce500.c | 3 --- include/configs/qemu-ppce500.h | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c index 480776a..202b7f6 100644 --- a/board/freescale/qemu-ppce500/qemu-ppce500.c +++ b/board/freescale/qemu-ppce500/qemu-ppce500.c @@ -168,9 +168,6 @@ int last_stage_init(void) if (prop && (len >= 8)) env_set_hex("qemu_kernel_addr", *prop); - /* Give the user a variable for the host fdt */ - env_set_hex("fdt_addr_r", (ulong)fdt); - return 0; } diff --git a/include/configs/qemu-ppce500.h b/include/configs/qemu-ppce500.h index 7c65e64..b2e1204 100644 --- a/include/configs/qemu-ppce500.h +++ b/include/configs/qemu-ppce500.h @@ -106,6 +106,6 @@ extern unsigned long long get_phys_ccsrbar_addr_early(void); #define CONFIG_LOADADDR 1000000 #define CONFIG_BOOTCOMMAND \ - "test -n \"$qemu_kernel_addr\" && bootm $qemu_kernel_addr - $fdt_addr_r\0" + "test -n \"$qemu_kernel_addr\" && bootm $qemu_kernel_addr - $fdtcontroladdr\0" #endif /* __QEMU_PPCE500_H */ From patchwork Thu Feb 25 09:22:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444236 X-Patchwork-Delegate: priyanka.jain@nxp.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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=gxCaSBp/; 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 4DmSHL3Q5Tz9s1l for ; Thu, 25 Feb 2021 20:32:14 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1B105826FB; Thu, 25 Feb 2021 10:31:35 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gxCaSBp/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 287EA812E6; Thu, 25 Feb 2021 10:26:15 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) (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 188EE812E6 for ; Thu, 25 Feb 2021 10:26:01 +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=bmeng.cn@gmail.com Received: by mail-ej1-x62c.google.com with SMTP id do6so7666672ejc.3 for ; Thu, 25 Feb 2021 01:26:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YJEqtOi22qV+aiYkPnvK6z5zVY10GCYROhj2N+BUB6o=; b=gxCaSBp/y9SfexkVG9D3ExxKsRBDIETbOjcI+ei1kxXwRCTVxwbjN4TBkNG115+R47 7M1BxvCXaXvcOIN8c1Kn60IXfGxZYUvURkZALqjp5FvE1kk7qvE3uVkZhe16NGsPUZik KFoG2iElPr7ZhqBkbD7h757CixvN50dcCECL9eLuHZrCEbeLcJaklHoW2/DBK+giBkno 7DlHxgEa1x+x1ri3MZowgyqg75IgdNJlZKTLAO96QLRAGfYg0C5CfxCfhYzTsad9nkOR EjVNQrB3hWkLKa3PYACSnaXsCdt/zrFmvWpmjEL7H25h7o0EL/h/lWMb8+lm8jmSYBKL iEFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YJEqtOi22qV+aiYkPnvK6z5zVY10GCYROhj2N+BUB6o=; b=MtLuIT6cDuj/uu1IYuNqY7rGv5FP/XeHMjLgvC13hLGfPKQqEBR3VHkunbjvkSfHpJ 6CUn+j38oHzDpiX6RZhFKpDotew1MO45cwYYSIGhOBGLTdq1nmCBc1rVkw9ibcUQsuwd DY3O4hqrnSkkbRoA+SecGWNPRO1oBQH586cnXEN3vyFKET/3sYT1lR+y5NgweoOenIDI HZyjgjBTrjw6svlOiogfIfZyV+mKOHfJxg4khLbnN3Tl7ZpR0OU4Lx79heS0apKXFkdz m7dlCdzeNbYjHEKMK2paA65Po4eu6qvx4tvR62TdINiCDC4LDbKNtRHTzePnfcvKYYCZ Sy7g== X-Gm-Message-State: AOAM5317KWYX9Wa9jvlJtb+SUZvr/MMfsa/bJeone3tsypRtSN3tF+Vp d440ZbRpLMK8PaHXN8CB8HQ= X-Google-Smtp-Source: ABdhPJwUtbdJS72ueNl+EEp05BTqXInKxChar9dBaY63dYhPkd68XFKOeOmGkMI5QeeF9JA9togWKA== X-Received: by 2002:a17:906:7fc4:: with SMTP id r4mr1754841ejs.81.1614245161310; Thu, 25 Feb 2021 01:26:01 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.25.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:26:00 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 36/38] ppc: qemu: Drop fixed_sdram() Date: Thu, 25 Feb 2021 17:22:57 +0800 Message-Id: <1614244979-48216-37-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean This function is not called anywhere. Only fsl_ddr_sdram_size() is necessary [1] for QEMU. Drop it. [1] arch/powerpc/cpu/mpc85xx/cpu.c::dram_init() Signed-off-by: Bin Meng Reviewed-by: Priyanka Jain --- (no changes since v2) Changes in v2: - new patch: ppc: qemu: Drop fixed_sdram() board/freescale/qemu-ppce500/qemu-ppce500.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c index 202b7f6..7d711b8 100644 --- a/board/freescale/qemu-ppce500/qemu-ppce500.c +++ b/board/freescale/qemu-ppce500/qemu-ppce500.c @@ -187,11 +187,6 @@ static uint64_t get_linear_ram_size(void) panic("Couldn't determine RAM size"); } -phys_size_t fixed_sdram(void) -{ - return get_linear_ram_size(); -} - phys_size_t fsl_ddr_sdram_size(void) { return get_linear_ram_size(); From patchwork Thu Feb 25 09:22:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444238 X-Patchwork-Delegate: priyanka.jain@nxp.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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=eh5waNi4; 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 4DmSJM3V7kz9sVr for ; Thu, 25 Feb 2021 20:33:07 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D0896827C3; Thu, 25 Feb 2021 10:31:46 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="eh5waNi4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3F633808B2; Thu, 25 Feb 2021 10:26:21 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) (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 2A01781810 for ; Thu, 25 Feb 2021 10:26:06 +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=bmeng.cn@gmail.com Received: by mail-ej1-x635.google.com with SMTP id w1so7641760ejf.11 for ; Thu, 25 Feb 2021 01:26:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hrKdE4Hk4Ml2FQlt1OEB9xXNTZYz0PirbdujI2VIx98=; b=eh5waNi4tXkMdnhmz42jKJnqMrGc2cql9Bth+fw7SGm2dMfFtgmvoDyRZ9P9fIq8pu snBswXBqcECxuOaRXIbXTmUYskTc92sdD/mZaaQehWou8tPQ5zmNjQuDbGiEYJjqA+/i 71JgkwRS65Dr8CWBfYPcPSswK/G6SVN6rGpEKEKa8gz1Tj0aEAtak8dkfdT5JHZrMCSO CLRjXrzJDDwKAN0zg9NEGMwDCEcJ0sDI2zVJpR79XB85n+gR6sp2Z0zbfMUYyi53CNsT XKuTCGP8+F50/5dkyWt6ud7WxEwdiHDX4zpWrSDRdbGMxrE7xE2QvVvIMaplL40mIBGr JR8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=hrKdE4Hk4Ml2FQlt1OEB9xXNTZYz0PirbdujI2VIx98=; b=J4PwssLvo7oaaZ7UuXtZemnJjni4LYCi2HPrAF30PZ+q7++c/j/qWK4PFlzsslSQTN kFqvd9AvWGMDCb7yXflrrE/tJHRToU6vHQS+y8yI2eZtt9wfbmPcYjHRZtMTWZATqwGg rV3Ean4MlQIPo1vVgJn3MQcD0oGCMq/ZcKMvjxu050HPUyNrWIAmjUUyi1TJ6kK8B+Un Wo6jKBkJspadBsb4v9MNPcIlsImN9pu3h1j15xqxrUc5Nkf9ApZnjX+kfDfDPUqP7oM9 m2OhPgtz0+kXvpvRqbzWutKlDk7tnMFGoDji6zs2CP/1/u3DDBwxfQg/1OOgqT8SBRl7 gJNg== X-Gm-Message-State: AOAM532AvusCF6yBzMdh/DTIhVhO7EeoSaM4WGJbpR0GsyTDAL10t5i0 jb2j/3o9V1xJEyEeamnLD5o= X-Google-Smtp-Source: ABdhPJwy4MLuJH0LBMz4wFgwwK82Jcsf187om+RQlCM/k2Q/GZVY5y38+0FbhTznXqoA4jST8EpKEA== X-Received: by 2002:a17:906:544b:: with SMTP id d11mr1833309ejp.167.1614245165833; Thu, 25 Feb 2021 01:26:05 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.26.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:26:05 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 37/38] ppc: qemu: Move board directory from board/freescale to board/emulation Date: Thu, 25 Feb 2021 17:22:58 +0800 Message-Id: <1614244979-48216-38-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean board/emulation is the place for other QEMU targets like x86, arm, riscv. Let's move the qemu-ppce500 board codes there. List me as a co-maintainer for this board. Signed-off-by: Bin Meng Reviewed-by: Priyanka Jain --- (no changes since v1) arch/powerpc/cpu/mpc85xx/Kconfig | 2 +- board/{freescale => emulation}/qemu-ppce500/Kconfig | 2 +- board/{freescale => emulation}/qemu-ppce500/MAINTAINERS | 3 ++- board/{freescale => emulation}/qemu-ppce500/Makefile | 0 board/{freescale => emulation}/qemu-ppce500/qemu-ppce500.c | 1 + 5 files changed, 5 insertions(+), 3 deletions(-) rename board/{freescale => emulation}/qemu-ppce500/Kconfig (86%) rename board/{freescale => emulation}/qemu-ppce500/MAINTAINERS (67%) rename board/{freescale => emulation}/qemu-ppce500/Makefile (100%) rename board/{freescale => emulation}/qemu-ppce500/qemu-ppce500.c (99%) diff --git a/arch/powerpc/cpu/mpc85xx/Kconfig b/arch/powerpc/cpu/mpc85xx/Kconfig index 870ab80..f59801a 100644 --- a/arch/powerpc/cpu/mpc85xx/Kconfig +++ b/arch/powerpc/cpu/mpc85xx/Kconfig @@ -1428,6 +1428,7 @@ config SYS_FSL_LBC_CLK_DIV Defines divider of platform clock(clock input to eLBC controller). +source "board/emulation/qemu-ppce500/Kconfig" source "board/freescale/corenet_ds/Kconfig" source "board/freescale/mpc8541cds/Kconfig" source "board/freescale/mpc8548cds/Kconfig" @@ -1437,7 +1438,6 @@ source "board/freescale/mpc8569mds/Kconfig" source "board/freescale/p1010rdb/Kconfig" source "board/freescale/p1_p2_rdb_pc/Kconfig" source "board/freescale/p2041rdb/Kconfig" -source "board/freescale/qemu-ppce500/Kconfig" source "board/freescale/t102xrdb/Kconfig" source "board/freescale/t104xrdb/Kconfig" source "board/freescale/t208xqds/Kconfig" diff --git a/board/freescale/qemu-ppce500/Kconfig b/board/emulation/qemu-ppce500/Kconfig similarity index 86% rename from board/freescale/qemu-ppce500/Kconfig rename to board/emulation/qemu-ppce500/Kconfig index 236cd17..4312d98 100644 --- a/board/freescale/qemu-ppce500/Kconfig +++ b/board/emulation/qemu-ppce500/Kconfig @@ -4,7 +4,7 @@ config SYS_BOARD default "qemu-ppce500" config SYS_VENDOR - default "freescale" + default "emulation" config SYS_CONFIG_NAME default "qemu-ppce500" diff --git a/board/freescale/qemu-ppce500/MAINTAINERS b/board/emulation/qemu-ppce500/MAINTAINERS similarity index 67% rename from board/freescale/qemu-ppce500/MAINTAINERS rename to board/emulation/qemu-ppce500/MAINTAINERS index e70c095..7317983 100644 --- a/board/freescale/qemu-ppce500/MAINTAINERS +++ b/board/emulation/qemu-ppce500/MAINTAINERS @@ -1,6 +1,7 @@ QEMU-PPCE500 BOARD M: Alexander Graf +M: Bin Meng S: Maintained -F: board/freescale/qemu-ppce500/ +F: board/emulation/qemu-ppce500/ F: include/configs/qemu-ppce500.h F: configs/qemu-ppce500_defconfig diff --git a/board/freescale/qemu-ppce500/Makefile b/board/emulation/qemu-ppce500/Makefile similarity index 100% rename from board/freescale/qemu-ppce500/Makefile rename to board/emulation/qemu-ppce500/Makefile diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/emulation/qemu-ppce500/qemu-ppce500.c similarity index 99% rename from board/freescale/qemu-ppce500/qemu-ppce500.c rename to board/emulation/qemu-ppce500/qemu-ppce500.c index 7d711b8..daa103c 100644 --- a/board/freescale/qemu-ppce500/qemu-ppce500.c +++ b/board/emulation/qemu-ppce500/qemu-ppce500.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2007,2009-2014 Freescale Semiconductor, Inc. + * Copyright (C) 2021, Bin Meng */ #include From patchwork Thu Feb 25 09:22:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1444224 X-Patchwork-Delegate: priyanka.jain@nxp.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=KoMc8nqY; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DmSDg5PChz9s1l for ; Thu, 25 Feb 2021 20:29:55 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9F88080EFF; Thu, 25 Feb 2021 10:29:52 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="KoMc8nqY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A8EC3806C3; Thu, 25 Feb 2021 10:26: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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) (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 61D8481444 for ; Thu, 25 Feb 2021 10:26:10 +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=bmeng.cn@gmail.com Received: by mail-ej1-x62b.google.com with SMTP id g5so7676849ejt.2 for ; Thu, 25 Feb 2021 01:26:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pEKCD/6Ska43nFzAk/ybEfWL3gMZ5wG1B8n1Ool8r2U=; b=KoMc8nqYXy2BT/wQtqACS9CqwwfSLmF7UBnA2yzWCl1DRJj1WvhjFqscbgFoE4wF8v K4rIHbuAXlOshUzoMiNwvrAWpp11Nh/Ki9/gPb7PQa+J8UXoOcHRyAourSnAp64cOrq2 MpmVjzsYEV14ZqN3c+Rh8yfW4iusdRvHerHXAEbYuhrMd/4QgO6Cbf2jwMiQTFeOoXJZ l73Yw6H3p/p7J6kBCiCWM3mwIC1rZq+LiQc5XxqvvlHBBnsONrOM1m7GyzSpg8I/xTTt wxtMkFmoobKWvYV7ulW43nkj82YEGe3O6ZBwhUsyVxCc//iXOikjtpabpV9AcGwjj9hr j+yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pEKCD/6Ska43nFzAk/ybEfWL3gMZ5wG1B8n1Ool8r2U=; b=HSk+qoNz92pHXr9kdoFVAB6pFmzqNdAx3CoCLHs7iZoz3Bw7UJ/e+7ZzceMUyNSnnv rJQOy7Dmn7LpSQpIZeZ1XTQS5rLN4P2RbEgZ6I5h/HB9XPlsOdnjSQV1ijnIui8XZnpo sLE5X6g4tV+e5buG0o2tKrR2gQMYdDYAhezFe1FAU3fEnrIDtkHmnlgIehzKE4sbQ8fV A2H0WAwiHcNPWHs4O6ru9wJtYNvfvmTy4wZ2I14xSHbsmxApjcZ8N7s/MJLeGP7yOq8g /XBFcLoQtXeAOEirlZidiSlvtKf3bUo7FA7xoe4Eat2NaGUjz24+dgI9oqQKseXikiCG OMCQ== X-Gm-Message-State: AOAM530czIryslSfyrh0Aw5SQsoo3lQhI56AZes4jnWyFzjZbam+glsd oUFd7OOJjczXu/FdRl3dM0w= X-Google-Smtp-Source: ABdhPJzNu3JQIqNuybB1sAz8kvrsoF+zwLcReS9O5CBwAihKkSKHTxRDqsspzEGUBQW28VvzLzahkQ== X-Received: by 2002:a17:906:4e99:: with SMTP id v25mr283353eju.532.1614245170047; Thu, 25 Feb 2021 01:26:10 -0800 (PST) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id k22sm2987368edv.33.2021.02.25.01.26.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 01:26:09 -0800 (PST) From: Bin Meng To: Simon Glass , Alexander Graf , Priyanka Jain Cc: U-Boot Mailing List , Tom Rini Subject: [PATCH v3 38/38] doc: Add a reST document for qemu-ppce500 Date: Thu, 25 Feb 2021 17:22:59 +0800 Message-Id: <1614244979-48216-39-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> References: <1614244979-48216-1-git-send-email-bmeng.cn@gmail.com> 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.4 at phobos.denx.de X-Virus-Status: Clean Add a reST document to describe how to build and run U-Boot for the QEMU ppce500 machine. Signed-off-by: Bin Meng Reviewed-by: Simon Glass Reviewed-by: Priyanka Jain --- Changes in v3: - rebase on top of u-boot/master Changes in v2: - add descriptions for VirtIO BLK, RTC and power off doc/board/emulation/index.rst | 1 + doc/board/emulation/qemu-ppce500.rst | 88 ++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 doc/board/emulation/qemu-ppce500.rst diff --git a/doc/board/emulation/index.rst b/doc/board/emulation/index.rst index a09ead1..be66b6b 100644 --- a/doc/board/emulation/index.rst +++ b/doc/board/emulation/index.rst @@ -8,6 +8,7 @@ Emulation qemu-arm qemu-mips + qemu-ppce500 qemu-riscv qemu-x86 qemu_capsule_update diff --git a/doc/board/emulation/qemu-ppce500.rst b/doc/board/emulation/qemu-ppce500.rst new file mode 100644 index 0000000..0a5c86c --- /dev/null +++ b/doc/board/emulation/qemu-ppce500.rst @@ -0,0 +1,88 @@ +.. SPDX-License-Identifier: GPL-2.0+ +.. Copyright (C) 2021, Bin Meng + +QEMU PPC E500 +============= + +QEMU for PPC supports a special 'ppce500' machine designed for emulation and +virtualization purposes. This document describes how to run U-Boot under it. + +The QEMU ppce500 machine models a generic PowerPC E500 virtual machine with +support for the VirtIO standard networking device connected to the built-in +PCI host controller. Some common devices in the CCSBAR space are modeled, +including MPIC, 16550A UART devices, GPIO, I2C and PCI host controller with +MSI delivery to MPIC. It uses device-tree to pass configuration information +to guest software. + +Building U-Boot +--------------- +Set the CROSS_COMPILE environment variable as usual, and run:: + + $ make qemu-ppce500_defconfig + $ make + +Running U-Boot +-------------- +The minimal QEMU command line to get U-Boot up and running is:: + + $ qemu-system-ppc -nographic -machine ppce500 -bios u-boot + +You can also run U-Boot using 'qemu-system-ppc64':: + + $ qemu-system-ppc64 -nographic -machine ppce500 -bios u-boot + +The commands above create a target with 128 MiB memory by default. A freely +configurable amount of RAM can be created via the '-m' parameter. For example, +'-m 2G' creates 2 GiB memory for the target, and the memory node in the +embedded DTB created by QEMU reflects the new setting. + +Both qemu-system-ppc and qemu-system-ppc64 provide emulation for the following +32-bit PowerPC CPUs: + +* e500v2 +* e500mc + +Additionally qemu-system-ppc64 provides support for the following 64-bit CPUs: + +* e5500 +* e6500 + +The CPU type can be specified via the '-cpu' command line. If not specified, +it creates a machine with e500v2 core. The following example shows an e6500 +based machine creation:: + + $ qemu-system-ppc64 -nographic -machine ppce500 -cpu e6500 -bios u-boot + +When U-Boot boots, you will notice the following:: + + CPU: Unknown, Version: 0.0, (0x00000000) + Core: e6500, Version: 2.0, (0x80400020) + +This is because we only specified a core name to QEMU and it does not have a +meaningful SVR value which represents an actual SoC that integrates such core. +You can specify a real world SoC device that QEMU has built-in support but all +these SoCs are e500v2 based MPC85xx series, hence you cannot test anything +built for P4080 (e500mc), P5020 (e5500) and T2080 (e6500). + +By default a VirtIO standard PCI networking device is connected as an ethernet +interface at PCI address 0.1.0, but we can switch that to an e1000 NIC by:: + + $ qemu-system-ppc -nographic -machine ppce500 -bios u-boot \ + -nic tap,ifname=tap0,script=no,downscript=no,model=e1000 + +VirtIO BLK driver is also enabled to support booting from a disk image where +a kernel image is stored. Append the following to QEMU:: + + -drive file=disk.img,format=raw,id=disk0 -device virtio-blk-pci,drive=disk0 + +Pericom pt7c4338 RTC is supported so we can use the 'date' command:: + + => date + Date: 2021-02-18 (Thursday) Time: 15:33:20 + +Additionally, 'poweroff' command is supported to shut down the QEMU session:: + + => poweroff + poweroff ... + +These have been tested in QEMU 5.2.0.