Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AA6EC636C8 for ; Thu, 15 Jul 2021 18:54:22 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 79F04613DB for ; Thu, 15 Jul 2021 18:54:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 79F04613DB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A1A1782C92; Thu, 15 Jul 2021 20:54:18 +0200 (CEST) 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="VH4GacJl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6ED3082BDC; Thu, 15 Jul 2021 20:54:14 +0200 (CEST) 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 BB40E81664 for ; Thu, 15 Jul 2021 20:54:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=daniel.schwierzeck@gmail.com Received: by mail-ed1-x52b.google.com with SMTP id ca14so9636093edb.2 for ; Thu, 15 Jul 2021 11:54:10 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=d8qP9lpgD1EM9IjAjJKazbpESqRIh8LmeFqUMkxcmtw=; b=VH4GacJlcubuohaF/uhue/T/obHPXZNEnDhvDO+n2yDecYu/LrGhRA1H7Qu6rd4at9 EdC/Exw8q4lILbr/dGnQL3gRtsgueZRcKx/GuMBWptBYDgKP/LQnuO4eEDrJGRntP4zF HZ+3XpEuBvq0znVBkXqYUoo8eDCuD+nRXZ1W/SgxDU44dl27BW+GmVJkhktQrfYA+vwZ 3C883BYy95W4o8hCXil2YQXBUsJzknz2fWiGKS5KYqLgy+cIlRNuEQNXhethveUDr1Yn 5P4ecvIlQJZ9nkey71K+m/3JCpqwWeeNsMQji0TOb2nD/zaO4/4uEHJfCvEFpdJlNgOM J1LA== 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:mime-version:content-transfer-encoding; bh=d8qP9lpgD1EM9IjAjJKazbpESqRIh8LmeFqUMkxcmtw=; b=QojvUUnkMNkACJhBrf+cfq2vbKICj55NknKmaki8Thc4C5TS4BYfsOmkreifNaH5Ei qEdMuT0ssBMNYCZbKrGj78mB6/JWf1XLfUu69D3mcPqOwQvMOcBO5uaG8yMh5xJnbCi+ pvbLD0EaM/E72F5zP5b8bGt1iBeFuokASdQq7ZT2WgS3MxD8dtRLgacmDSq6aoYbFlpP mV/wxTWsNg9LiYgmxnamgQmkP6npUWdVgKx005Q+FxfJS0EPQg+7mx5X4ffl9zJbhf/2 blEC1oyQeZfmSlfx/AQBi3hvPnjXI/w9NdaV45BMsKDPJLHuNGRrwllQfgI7bmC7YFHD Hh1Q== X-Gm-Message-State: AOAM533KQmdGM4XLYuwf5BlulTUaVzfr8WbJzbucRjsRL4PR7zjWl35M /eJCUMKgPCgf6A6RBU8Ennr6wYFCXW8= X-Google-Smtp-Source: ABdhPJwVpRhfOij2QWTiBBzUHZi37FpGESm/0kZMdAV34IZwdiXD9I/OKFluLuKOng1roqiCa2/KxA== X-Received: by 2002:aa7:d395:: with SMTP id x21mr9003937edq.98.1626375250426; Thu, 15 Jul 2021 11:54:10 -0700 (PDT) Received: from workstation.lan.schwierd.dedyn.io (i5E860616.versanet.de. [94.134.6.22]) by smtp.gmail.com with ESMTPSA id t17sm2803486edv.75.2021.07.15.11.54.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jul 2021 11:54:09 -0700 (PDT) From: Daniel Schwierzeck To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Stefan Roese , Daniel Schwierzeck Subject: [PATCH v2 0/6] Convert MIPS Malta boards to PCI DM Date: Thu, 15 Jul 2021 20:53:55 +0200 Message-Id: <20210715185401.301211-1-daniel.schwierzeck@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210706142222.497569-1-daniel.schwierzeck@gmail.com> References: <20210706142222.497569-1-daniel.schwierzeck@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.103.2 at phobos.denx.de X-Virus-Status: Clean This series converts the PCI host controller drivers used by MIPS Malta and the board-specific PCI setup code to PCI driver model. Because the AMD PCNET driver is already converted to ETH driver model, simply enable CONFIG_DM_ETH as well. A patch in PCI uclass core is currently required for MIPS wanting to use PCI DM (except Octeon MIPS64) due to CONFIG_SYS_SDRAM_BASE being used as a virtual address on all MIPS boards. The series for now is only tested with Qemu and the GT64120 PCI controller. The Malta Qemu tests are already covered by U-Boot CI Support for the MSC01 controller is prepared. The used PCI controller depends on the plugged core card (Qemu emulates the CoreLV card with GT64120). Dynamic selection of the according PCI DT nodes via CONFIG_OF_BOARD_FIXUP is prepared but not yet enabled. This requires fixing of the call order of fix_fdt() in board_init_f, otherwise the passed-in rw_fdt_blob pointer will point to a read-only NOR flash address. I'll send a separate RFC patch for this. I'll send a cleanup series for removing non-DM code after the merge windows has closed and the PCI DM conversion deadline has been enforced. Changes in v2: - add empty line before return statements - add empty line before return statements - use dm_pci_clrset_config32() where possible Daniel Schwierzeck (6): dm: pci: add option to map virtual system memory base address pci: gt64120: convert to driver model pci: msc01: convert to driver model MIPS: malta: add DT bindings for PCI host controller MIPS: malta: add support for PCI driver model MIPS: malta: enable PCI driver model arch/mips/Kconfig | 4 ++ arch/mips/dts/mti,malta.dts | 28 +++++++++++++ board/imgtec/malta/malta.c | 80 ++++++++++++++++++++++++++++++++++++- drivers/pci/Kconfig | 13 ++++++ drivers/pci/pci-uclass.c | 9 +++-- drivers/pci/pci_gt64120.c | 74 +++++++++++++++++++++++++++++++++- drivers/pci/pci_msc01.c | 72 ++++++++++++++++++++++++++++++++- 7 files changed, 274 insertions(+), 6 deletions(-) -- 2.32.0