From patchwork Wed Apr 24 18:53:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramon Fried X-Patchwork-Id: 1090557 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="c5IpBfzZ"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44qGyF2GnHz9s3Z for ; Thu, 25 Apr 2019 09:40:05 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id CEE95C21C2C; Wed, 24 Apr 2019 23:40: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_H2, 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 206CEC21C2C; Wed, 24 Apr 2019 23:39:59 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D020DC21C57; Wed, 24 Apr 2019 18:53:58 +0000 (UTC) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by lists.denx.de (Postfix) with ESMTPS id 7EDEAC21C27 for ; Wed, 24 Apr 2019 18:53:58 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id h4so26596359wre.7 for ; Wed, 24 Apr 2019 11:53:58 -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:mime-version :content-transfer-encoding; bh=S8zcP3jdHlA+xsCUanCJ+cHxxY/fBiyoQIliOoBYo58=; b=c5IpBfzZy3s19pHxZXPsfpm9x66hzAbesFw9h6kmtUL+X1Qum6if5HqbXERKdUNZ47 wOjWNMXKG7kF+rjbsHKyaX82uTd6py5wGzsacfzUR5SpFSr8xFh1OZQBq1wXVrr5U1xC ZDHWxcsmRFdA8+b3lq1dRPdfreaoib/mPreXUIMlKvrpxNTKIlmyYY6YWI0oXgzAttSh 9oCvgcbGTvOBjUPIF/Ii++1SoVSg3tGwRKPIWKv8d7MVI8yGGqunBDnqkO8WgyZEf221 RuGaD2hKAtPVF/lXyVgL0XK+/VaJ8MlwLKH22c3laLQiSiJjVemXbSnvhq2s0Z6vBMpH Ahqg== 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:mime-version :content-transfer-encoding; bh=S8zcP3jdHlA+xsCUanCJ+cHxxY/fBiyoQIliOoBYo58=; b=B8SpHS92Z7jmZM7cFxGQlP+1GtNKuqVMMga0H7MS1gGpFfFhF27Tbdua4jkXDwVV9A fPKfnZUNkzoMbDAYq1baTP3HdycS12Td2EEEMCKGXXyIGzrqlCOQuAsOt9K+rvRyGz4n kKdu3smUEZ/9REmB0pFeQSDCR6H6udgNW0PQQVllcaA9JYUf/SLSY/6SN+qsFKZzPieZ fZBNmQEJZxtZU/Tg+ShQ0ha2iVvhQlwp96Vvo3Khxw4SP9wYXMR9que4LPn1U4phDq6f S7ayTt4wOF2r6GG+A/Yqdsm8YENs+0LjoW+GrVjTi2WOcsu19tcrlkoTvriXd8nhHM0c zThw== X-Gm-Message-State: APjAAAWSJ6QX0Blm+oQOKO/m4akMEbgoCqu7oo0/GcvEzwdR3wnGcA7L 7QMbZlpT0gKVjOOiY4mx1AM= X-Google-Smtp-Source: APXvYqxAyoQN/lYuXXJiA84ewkdpy1r2hGrpAOwCZ7sRDdl2rUTi6I7VQbQZcJJNLlVVlEJu2kazHQ== X-Received: by 2002:adf:f68c:: with SMTP id v12mr6254361wrp.40.1556132037889; Wed, 24 Apr 2019 11:53:57 -0700 (PDT) Received: from localhost.localdomain ([141.226.31.91]) by smtp.gmail.com with ESMTPSA id z15sm11911868wrv.80.2019.04.24.11.53.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Apr 2019 11:53:56 -0700 (PDT) From: Ramon Fried To: sjg@chromium.org Date: Wed, 24 Apr 2019 21:53:43 +0300 Message-Id: <20190424185347.13586-1-ramon.fried@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 24 Apr 2019 23:39:57 +0000 Cc: Ramon Fried , Ran Wang , Eugeniu Rosca , Joe Hershberger , Maxime Ripard , u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 0/4] Add Cadence PCIe endpoint driver with new uclass 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patchset adds support for new uclass, UCLASS_PCI_EP allowing new set of PCI endpoint drivers. Included in the patch is also a driver for Cadence PCIe endpoint. Changes in V2: - Removed "pci.h: add missing maskbit" as it was already merged by Simon. - Added PCI endpoint sandbox driver - Added testing for sandbox driver - Addressed issues raised by Simon in UCLASS_PCI_EP class implementation Ramon Fried (4): drivers: pci_ep: Introduce UCLASS_PCI_EP uclass pci_ep: add Cadence PCIe endpoint driver pci_ep: add pci_ep sandbox driver test: pci_ep: add basic pci_ep tests arch/sandbox/dts/test.dts | 4 + configs/sandbox64_defconfig | 2 + configs/sandbox_defconfig | 2 + .../pci_endpoint/cdns,cdns-pcie-ep.txt | 18 + drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/pci_endpoint/Kconfig | 32 ++ drivers/pci_endpoint/Makefile | 8 + drivers/pci_endpoint/pci_ep-uclass.c | 189 +++++++++ drivers/pci_endpoint/pcie-cadence-ep.c | 177 ++++++++ drivers/pci_endpoint/pcie-cadence.h | 309 ++++++++++++++ drivers/pci_endpoint/sandbox-pci_ep.c | 176 ++++++++ include/dm/uclass-id.h | 1 + include/pci_ep.h | 388 ++++++++++++++++++ test/dm/Makefile | 1 + test/dm/pci_ep.c | 45 ++ 16 files changed, 1355 insertions(+) create mode 100644 doc/device-tree-bindings/pci_endpoint/cdns,cdns-pcie-ep.txt create mode 100644 drivers/pci_endpoint/Kconfig create mode 100644 drivers/pci_endpoint/Makefile create mode 100644 drivers/pci_endpoint/pci_ep-uclass.c create mode 100644 drivers/pci_endpoint/pcie-cadence-ep.c create mode 100644 drivers/pci_endpoint/pcie-cadence.h create mode 100644 drivers/pci_endpoint/sandbox-pci_ep.c create mode 100644 include/pci_ep.h create mode 100644 test/dm/pci_ep.c