From patchwork Mon Feb 28 12:06:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 546692 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp2675651imf; Mon, 28 Feb 2022 04:08:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJzoIInZCm9e8C0bfXPkg9DsUbLcQsOiQonRUm2mLZspv7Al1qOZvxArva/Nrif/pcPQp09O X-Received: by 2002:a17:906:b845:b0:6cf:37d1:f246 with SMTP id ga5-20020a170906b84500b006cf37d1f246mr15143152ejb.280.1646050122335; Mon, 28 Feb 2022 04:08:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646050122; cv=none; d=google.com; s=arc-20160816; b=n5ShdQO9qNhnmGmEhz9BI3yqKI1i8C/+hIU8I5IFdicl41T+1P75Epq0tPE9nF0ez6 a/+Y4knhU0qg3uPE20qIzcnfNpI+YYRcSa5BVVrP8RnU0Sdfu+gOjk1mycjQIgfby9Wy BFHXXsyqJaFOV16U59MjVlu9XEEGqotS0tKI54WyrTBb1d1p3zC8htrGs6TXAT1OdBSz 7DmalCjDbvdGOaOqcRo3LdNeyrBd8OPOKN7RW74PWMy0FbhOBB4noCMwTeBUrgBw/IGz R2tR4sONV8EjUCsYxyMqpmGW8khhDSA0rARM4AQDOrSCP15YUuq9UqhePKWigV13BB59 UjlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=3GuJ93PcEi0e1UOlnER8/NYSkoJnVKXQS40GmAtz2oQ=; b=A4PAMqKmEZ9CwTb221Vyn1AHHHUm/m2yLKb9ylggwjI5y2zeruM/koa4ib/DaBPcvw osMeXcHKu2h30atoGNlZ061/IuaIBdXLH1MyTX35fRYYlngSCRij5rJWOCtlwbnlAUiK aran6EYNwxYnFjZ3LpjaDyiHMAYx/FJpdF32GeUFxRp9Id6Hv3F4ZiNbqiBsus1qsW5U 4vE0LRptBNiLUHtWkDdYiAQnnimOZ5tXFxcvEHoc8RIsgd2lbW4OZF80tFx9g8EBedRE SoTt2mf6rtcTPSxumFeTDa3k9rTmYO9IBELKnWGl6nl13o+KAnpjciMYnhTQMT957hj0 7G1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id q24-20020aa7cc18000000b00410b96067e0si6445856edt.446.2022.02.28.04.08.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 04:08:42 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9D06D83C27; Mon, 28 Feb 2022 13:08:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id C75AB83C2D; Mon, 28 Feb 2022 13:08:07 +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=-1.2 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 0A70B8309E for ; Mon, 28 Feb 2022 13:07:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sughosh.ganu@linaro.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 76555ED1; Mon, 28 Feb 2022 04:07:47 -0800 (PST) Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.16.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 916533F73D; Mon, 28 Feb 2022 04:07:45 -0800 (PST) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Simon Glass , Heinrich Schuchardt , Mario Six , Sughosh Ganu Subject: [PATCH v2 09/10] qemu: arm: Remove platform specific function to get RNG device Date: Mon, 28 Feb 2022 17:36:37 +0530 Message-Id: <20220228120638.678137-10-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220228120638.678137-1-sughosh.ganu@linaro.org> References: <20220228120638.678137-1-sughosh.ganu@linaro.org> MIME-Version: 1.0 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 The Qemu platform has a function defined to get the random number generator(RNG) device. However, the RNG device can be obtained simply by searching for a device belonging to the RNG uclass. Remove the superfluous platform function defined for the Qemu platform for getting the RNG device. Signed-off-by: Sughosh Ganu Tested-by: Heinrich Schuchardt --- Changes since V1: None board/emulation/qemu-arm/qemu-arm.c | 42 ----------------------------- 1 file changed, 42 deletions(-) diff --git a/board/emulation/qemu-arm/qemu-arm.c b/board/emulation/qemu-arm/qemu-arm.c index 16d5a97167..c9e886e44a 100644 --- a/board/emulation/qemu-arm/qemu-arm.c +++ b/board/emulation/qemu-arm/qemu-arm.c @@ -107,48 +107,6 @@ void enable_caches(void) dcache_enable(); } -#if defined(CONFIG_EFI_RNG_PROTOCOL) -#include -#include - -#include - -efi_status_t platform_get_rng_device(struct udevice **dev) -{ - int ret; - efi_status_t status = EFI_DEVICE_ERROR; - struct udevice *bus, *devp; - - for (uclass_first_device(UCLASS_VIRTIO, &bus); bus; - uclass_next_device(&bus)) { - for (device_find_first_child(bus, &devp); devp; - device_find_next_child(&devp)) { - if (device_get_uclass_id(devp) == UCLASS_RNG) { - *dev = devp; - status = EFI_SUCCESS; - break; - } - } - } - - if (status != EFI_SUCCESS) { - debug("No rng device found\n"); - return EFI_DEVICE_ERROR; - } - - if (*dev) { - ret = device_probe(*dev); - if (ret) - return EFI_DEVICE_ERROR; - } else { - debug("Couldn't get child device\n"); - return EFI_DEVICE_ERROR; - } - - return EFI_SUCCESS; -} -#endif /* CONFIG_EFI_RNG_PROTOCOL */ - #ifdef CONFIG_ARM64 #define __W "w" #else