Message ID | 20221207085137.445249-43-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=WWYy+Qwe; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NRrtY1wktz23pB for <incoming@patchwork.ozlabs.org>; Wed, 7 Dec 2022 20:03:49 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 92EA4856EB; Wed, 7 Dec 2022 09:56:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="WWYy+Qwe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 21FB3856C1; Wed, 7 Dec 2022 09:56:26 +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.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) (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 997C9856C8 for <u-boot@lists.denx.de>; Wed, 7 Dec 2022 09:56:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-pl1-x629.google.com with SMTP id d3so16419814plr.10 for <u-boot@lists.denx.de>; Wed, 07 Dec 2022 00:56:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0WEnnZjBvYsCskBswYlyeo3jm2romWw03fp8IiG7maU=; b=WWYy+Qwef0qfe48QzaL9JjRPBSw/L5xHRrEFQZPVTfA4CEqEgLpukSv8aT5Dit2gyv 1P5PrT7oVB2nmUfKcWB1lQ2zIxKU2ue9VpXRU7z0D2sJ9ie+GjMiz/zT54joy7u0Lzz0 +7HkNTrgD/o0+3DQAW4JqKdOm7JIMcVdbsaqQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0WEnnZjBvYsCskBswYlyeo3jm2romWw03fp8IiG7maU=; b=LWmMjlSSbKpjV1/b9Q0LCdeVYbR5teqLGCus8pHbAnlIGRW3IZyHy/l++wDbN5Y+lt Q19tMDBnFMI0ir3LYNgcJOcgKN7VV+dTbgmSr+M4poXvCIZm0MptAscKg6gIFwQmVCg1 pzc6YrryYG8+hCoCUWih3Iw3bBZ7GmCJuryH3Ah5vlMX+u9va4MCBZ7qCC4EpM+FGMid VH5G7i+ZwpA0q+C4N9Jz42HMhZStkCa28fgsTWQlvK5jmVm6RLZ4O2furkyZofEJb0Tn e1FJm8POQYyY1p6M2nWu4Dtf70JE0g2CWlRCopQHNqdVD6seBqD585PVO6ZOCfcf1sx4 mbBA== X-Gm-Message-State: ANoB5pkeaeQxd2yck9Tiq/mHmLNzCsPQc1Peali7pYuLV6/sBQmZQ1dw wmbCwovadNvtKevaizg4hE2fAxFb6GJ8eTRi X-Google-Smtp-Source: AA0mqf59kqpV3UTjVvo4eJoeNdl75rno9PKWjHOpF0YdfIMRx8XAG9JuWgBB5JewyF/f9hCCHfEVrg== X-Received: by 2002:a17:903:2ce:b0:186:e852:b271 with SMTP id s14-20020a17090302ce00b00186e852b271mr74630288plk.117.1670403381732; Wed, 07 Dec 2022 00:56:21 -0800 (PST) Received: from localhost.localdomain ([27.110.126.54]) by smtp.gmail.com with ESMTPSA id l16-20020a170903121000b0018157b415dbsm14145514plh.63.2022.12.07.00.56.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Dec 2022 00:56:21 -0800 (PST) From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Cc: U-Boot Custodians <u-boot-custodians@lists.denx.de>, Simon Glass <sjg@chromium.org>, Andrew Scull <ascull@google.com>, Bin Meng <bmeng.cn@gmail.com>, Etienne Carriere <etienne.carriere@linaro.org>, =?utf-8?q?Marek_Beh=C3=BAn?= <kabel@kernel.org>, Ramon Fried <rfried.dev@gmail.com>, Sean Anderson <sean.anderson@seco.com> Subject: [PATCH 42/71] virtio: Add a block device Date: Wed, 7 Dec 2022 21:51:08 +1300 Message-Id: <20221207085137.445249-43-sjg@chromium.org> X-Mailer: git-send-email 2.39.0.rc0.267.gcb52ba06e7-goog In-Reply-To: <20221207085137.445249-1-sjg@chromium.org> References: <20221207085137.445249-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean |
Series |
bootstd: Allow migration from distro_bootcmd scripts
|
expand
|
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index dffe10adbf4..72f3853b79f 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -1516,12 +1516,18 @@ sandbox_virtio1 { compatible = "sandbox,virtio1"; + virtio-type = <4>; /* rng */ }; sandbox_virtio2 { compatible = "sandbox,virtio2"; }; + sandbox-virtio-blk { + compatible = "sandbox,virtio1"; + virtio-type = <2>; /* block */ + }; + sandbox_scmi { compatible = "sandbox,scmi-devices"; clocks = <&clk_scmi 2>, <&clk_scmi 0>; diff --git a/drivers/virtio/virtio_sandbox.c b/drivers/virtio/virtio_sandbox.c index cf7761c75ee..b34f1d60455 100644 --- a/drivers/virtio/virtio_sandbox.c +++ b/drivers/virtio/virtio_sandbox.c @@ -161,7 +161,8 @@ static int virtio_sandbox_probe(struct udevice *udev) /* fake some information for testing */ priv->device_features = BIT_ULL(VIRTIO_F_VERSION_1); - uc_priv->device = VIRTIO_ID_RNG; + uc_priv->device = dev_read_u32_default(udev, "virtio-type", + VIRTIO_ID_RNG); uc_priv->vendor = ('u' << 24) | ('b' << 16) | ('o' << 8) | 't'; return 0;
The test code for virtio is fairly simplistic and does not actually create a block device. Add a way to specify the device type in the device tree. Add a block device so that we can do more testing. Signed-off-by: Simon Glass <sjg@chromium.org> --- arch/sandbox/dts/test.dts | 6 ++++++ drivers/virtio/virtio_sandbox.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-)