From patchwork Fri Aug 3 08:14:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 953097 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="AUt4zAWf"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 41hfsl5S4Mz9s3Z for ; Fri, 3 Aug 2018 18:12:27 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 5B881C21ECE; Fri, 3 Aug 2018 08:11:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id C36C1C21E68; Fri, 3 Aug 2018 08:10:19 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E0F1AC21F05; Fri, 3 Aug 2018 08:10:06 +0000 (UTC) Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by lists.denx.de (Postfix) with ESMTPS id E7484C21EFB for ; Fri, 3 Aug 2018 08:10:04 +0000 (UTC) Received: by mail-pf1-f181.google.com with SMTP id y10-v6so2834477pfn.8 for ; Fri, 03 Aug 2018 01:10:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=2sAXHXLA1esqT5vPFNZp/SjgD7L3bPm1UBiEgJk6SZs=; b=AUt4zAWfVdov3u+intQabv+XQ4LfSmj6Y9sBFrHpners6Gv0iqTIoNT7vg+ctrqsur OQol/UrxcclXIh9/LV0iMJLVy4arm5Dv0aQeg/QykTwe+tpZSKGoWzUT6jpiSYrz8+f+ UFaTRQYbXpX3Vo6yYy4f+uQhkyC3GvJKgZ1b1KVFOipthgkI4Ha0romZ1vAcI2jkwWnX wqyPEZ2thVDMhL8QsF8iR4cdDBKG92QNlO+XW8fo5+CkV4B0d9kg5iEOKe5yvtGz52oC Fkv5wBq5tDkj/8pgwKYxrKmujHquZUWdv6eVuej83KfmV/lfswr4qZ0IJx2bJLF6IldS ovUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=2sAXHXLA1esqT5vPFNZp/SjgD7L3bPm1UBiEgJk6SZs=; b=iRwmPocKnT+NiVKrVvFkjwGbJiasKErmU1SYSFUIyDZcoeo7atloAxGDt6RThQhxOt RPq31nU89cZsj35krkPCzMWD1JHZU6MSG/1jm3hFYqqCE9mR0kf5ACDn4d61fA6C3Tnt K1lLg5T7N/yGL0A4FO+KOuGR3IF3Ho/7+pGDJoMuJRrPSlqjsIsAKmWzCtln+B58l7hY 7wAK2zhzk50/vsQf4sOwLVfvGpboQg4RFaqYnmv5PRFJs1TzXcjhDm6jcPnR6qsLrwcs EykjXfFtA10ICKYqHL3yzxjUXsBljNKYjf/l56vzewPfhqZxORsbGjKvBa47qa/JSKUu wJyQ== X-Gm-Message-State: AOUpUlEJy99N1EBUM+KkIU0DQKZgtiQVun/bZcNPLEmU3vTRNsBYkzRl QZq2TCc17AguxVrDKuWc2Ik= X-Google-Smtp-Source: AAOMgpfjg665Ux19f9XNepJzrdAyP9ghsNfZH9Nxd2FvPn8sNQ8rhs/dAmn6E0yfMAbz7Kn4XOaU5A== X-Received: by 2002:a63:b213:: with SMTP id x19-v6mr2613317pge.393.1533283803469; Fri, 03 Aug 2018 01:10:03 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id 1-v6sm9190070pfk.134.2018.08.03.01.10.01 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Aug 2018 01:10:02 -0700 (PDT) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Fri, 3 Aug 2018 01:14:32 -0700 Message-Id: <1533284093-3084-1-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 Subject: [U-Boot] [PATCH v3 00/21] dm: pci: Various fixes and test cases update X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This fixes several bugs in dm pci driver, as well as updating test cases running on Sandbox to test dm pci. It turns out adding test cases for v1 (3 commits) reveals more design limitations/bugs of sandbox pci driver. Now the v2/v3 series contains 20+ patches! This series is available for testing at u-boot-x86/pci branch. Changes in v3: - Change commit title to use "440ep-specific" - Update commit message to mention removing redundant asserts - Update doc to describe the "sandbox,dev-info" encodings - Describe test configuration in the commit message Changes in v2: - Mask header_type with 0x7f Bin Meng (21): pci: Remove 440ep-specific macros dm: Correct typos in uclass_first/next_device_check() dm: core: Add ofnode function to read PCI vendor and device id dm: pci: Extract vendor/device id in child_post_bind() dm: pci: Fix scanning multi-function device test: dm: pci: Remove unnecessary steps in dm_test_pci_swapcase() test: dm: pci: Test more than one device on the same bus pci: sandbox: swap_case: Preserve space indicator bit in BAR registers test: dm: pci: Test more than one PCI host controller test: dm: pci: Add tests for configuration space access pci: sandbox: emul: Fix the call to pci_bus_find_devfn() dm: pci: Assign correct driver data when binding a driver pci: sandbox: Support dynamically binding device driver pci: sandbox: swap_case: Declare dynamic driver matching sandbox: Update test.dts for dynamic PCI device driver matching test: dm: pci: Test driver binding with driver data provided pci: sandbox: emul: Rename priv structure test: dm: pci: Add tests for mixed static and dynamic devices on the same bus pci: Add all known capability and extended capability ids dm: pci: Add APIs to find capability and extended capability test: dm: pci: Add cases for finding PCI capability APIs arch/sandbox/dts/test.dts | 41 +++++++++- arch/sandbox/include/asm/test.h | 12 +++ doc/driver-model/pci-info.txt | 28 +++++++ drivers/core/ofnode.c | 36 +++++++++ drivers/misc/swap_case.c | 36 ++++++++- drivers/pci/pci-emul-uclass.c | 24 +++--- drivers/pci/pci-uclass.c | 83 ++++++++++++++++++-- drivers/pci/pci_sandbox.c | 78 ++++++++++++++++-- include/dm/ofnode.h | 13 +++ include/dm/uclass.h | 4 +- include/pci.h | 84 ++++++++++++++++---- test/dm/pci.c | 170 ++++++++++++++++++++++++++++++++++++++-- 12 files changed, 556 insertions(+), 53 deletions(-)