Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 37B3BC4332F for ; Tue, 29 Mar 2022 16:59:48 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D82628401F; Tue, 29 Mar 2022 18:59:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=google.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=google.com header.i=@google.com header.b="DbluzDHd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2DDD184017; Tue, 29 Mar 2022 18:59:25 +0200 (CEST) Received: from mail-wr1-x449.google.com (mail-wr1-x449.google.com [IPv6:2a00:1450:4864:20::449]) (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 06AB38400A for ; Tue, 29 Mar 2022 18:59:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=36TpDYgYKBoQi0k2ttowwotm.kwu2-jww1tq010.lmv5.lm@flex--ascull.bounces.google.com Received: by mail-wr1-x449.google.com with SMTP id i27-20020adfa51b000000b00205c997f177so1172252wrb.21 for ; Tue, 29 Mar 2022 09:59:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=jiYc1ml4RW4/3Ej2kv26Key+zX7pMYpYc68iVdTko78=; b=DbluzDHdDwONUvbMpwj0Vud90doTqilSJaSvl4SfPGzCnliQHCQcyrbcCcG07TudcO YSY0ZFhiEIjI8m/9AxfySHP1ieIOM6JkxqqHM+/2lW77C3djDZ5Yu3D7G/SNYkOw1IeP tNEBLSOgQ9/2eiDZPvH1+sMgrb+goNKY5lvMcOAMTLNQbvtS204Pq2K2DUMv8rMGIOWW I3w2dWqgJ6nE6fee3Lh3AY3qtU6GpV+QQgpvP8WjAs2M2S7Z77CBZVPahXRKvDtt3rIc ZTZbzrIqkQsqzdD6AMEIwyetLiwMxPuDo5lBzyaAu1IV8EcIu0v6M2KDRnfVgt4mPngH Zu/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=jiYc1ml4RW4/3Ej2kv26Key+zX7pMYpYc68iVdTko78=; b=P11Od9acgFGofuXu3UfHByxyk3SD1PNkyWmeC7flKiXo1+vl/SMcK3Y8n29Kw5um+Y mvlaAIIqAWeBJzmMoqKGfgmFNm3Ifuar4gDahJRdW9v+xh7l3NYKe/xqFLHRpRX3GvS0 V58FHnvY6WTQH5pPqfGAKsyq9FtBSD1xeeYpJ8FyRgIJHQB9NyP5hLb2ABSOgSuTDvEJ xPCpmu7/oS7FlU2wg+XqdzJxoDFn4js8GKWUE4Wcxyqbn0O7TRxqUrqL0wfZ5113E7DH JpgNY8ViRfPSqMS7CRYoEiCvx6rObjQj008rsuOqGfpL5Kky497rXFmdm8WZug876yv2 0IFw== X-Gm-Message-State: AOAM531ibSI19OWA+R/rFMm+1MrhXcKOZ/aNysrq2mr4yDQViDfd5Err clOA6AQxswnusLAavpA1H3RsZnQulsTXpQP0e0w9LjQrG0B4W5cBRTzhF9YVaGpU4KAjBwrxYsj komHviy9+9iHZzRyOXOMIaBD7iF3z3f/wt69GIRvr1Y1/TakIkuTI/VrQ2wI= X-Google-Smtp-Source: ABdhPJwJe6GsmR+t229g5a7Vf8JOjjJphF+phKzIv79aL1mTSy7T0LzIgdLK9XDr3kmZ7fNzvOmWU5csrKk= X-Received: from ascull.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:1510]) (user=ascull job=sendgmr) by 2002:a05:600c:4608:b0:38c:6ba3:1c9f with SMTP id m8-20020a05600c460800b0038c6ba31c9fmr136581wmo.39.1648573161443; Tue, 29 Mar 2022 09:59:21 -0700 (PDT) Date: Tue, 29 Mar 2022 16:58:43 +0000 In-Reply-To: <20220329165900.1139885-1-ascull@google.com> Message-Id: <20220329165900.1139885-2-ascull@google.com> Mime-Version: 1.0 References: <20220329165900.1139885-1-ascull@google.com> X-Mailer: git-send-email 2.35.1.1021.g381101b075-goog Subject: [PATCH v2 01/18] virtio: pci: Allow exclusion of legacy driver From: Andrew Scull To: u-boot@lists.denx.de Cc: sjg@chromium.org, bmeng.cn@gmail.com, adelva@google.com, keirf@google.com, ptosi@google.com, Andrew Scull Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Add a new config to control whether the driver for legacy virtio PCI devices is included in the build. VIRTIO_PCI_LEGACY is included by default when VIRTIO_PCI is selected, but it can also be independently toggled. Signed-off-by: Andrew Scull Reviewed-by: Bin Meng --- drivers/virtio/Kconfig | 9 +++++++++ drivers/virtio/Makefile | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig index 863c3fbe02..586263ec88 100644 --- a/drivers/virtio/Kconfig +++ b/drivers/virtio/Kconfig @@ -37,6 +37,15 @@ config VIRTIO_PCI This driver provides support for virtio based paravirtual device drivers over PCI. +config VIRTIO_PCI_LEGACY + bool "PCI driver for legacy virtio devices" + depends on PCI + select VIRTIO + default VIRTIO_PCI + help + This driver provides support for legacy virtio based paravirtual + device drivers over PCI. + config VIRTIO_SANDBOX bool "Sandbox driver for virtio devices" depends on SANDBOX diff --git a/drivers/virtio/Makefile b/drivers/virtio/Makefile index dc8880937a..4c63a6c690 100644 --- a/drivers/virtio/Makefile +++ b/drivers/virtio/Makefile @@ -5,7 +5,8 @@ obj-y += virtio-uclass.o virtio_ring.o obj-$(CONFIG_VIRTIO_MMIO) += virtio_mmio.o -obj-$(CONFIG_VIRTIO_PCI) += virtio_pci_legacy.o virtio_pci_modern.o +obj-$(CONFIG_VIRTIO_PCI) += virtio_pci_modern.o +obj-$(CONFIG_VIRTIO_PCI_LEGACY) += virtio_pci_legacy.o obj-$(CONFIG_VIRTIO_SANDBOX) += virtio_sandbox.o obj-$(CONFIG_VIRTIO_NET) += virtio_net.o obj-$(CONFIG_VIRTIO_BLK) += virtio_blk.o -- 2.35.1.1021.g381101b075-goog