From patchwork Wed Mar 9 12:27:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 549709 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6713:0:0:0:0 with SMTP id u19csp3515307mag; Wed, 9 Mar 2022 04:30:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwb0RjPdF0IKfUtyLaMW88yBuEVFKBGLXs+fRYL60b8s4gQ+7OaHWFPRNWV7Nfk+xeV2K4Y X-Received: by 2002:a17:907:c16:b0:6db:1dfc:ca73 with SMTP id ga22-20020a1709070c1600b006db1dfcca73mr13004533ejc.192.1646829030917; Wed, 09 Mar 2022 04:30:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646829030; cv=none; d=google.com; s=arc-20160816; b=dXNWLHtZpszk8dnClPBfbLEpL/7uC6gHyd5rR2ZcXbA4YsdE2uLO9CjnQEA206WVJ5 pp0uO7hQxTsjd5tp1ntSFs6LEbH/Ca36z7ZUGrfUF+GSVGuG/e5kexejVjFOg39woKYS 4bvzzN/AljMAs2AZwKlQNRGJyZmhxnYlWnaPwRy4DEx0lBYFlKcpJsTnBXEvQP2GcNMV IiQtws/aERmrfApURQTvItO8huN8S14qIJ55UK9ySaLWMFT9phyvOftRGeY7HAy/btgn 1ZwdYO+9GOAHfEgkZHwTKJnrRXvy6MA7cUXTCpW6uUM+Qm6c51FkhBNOyCFXqpnL8+SI vOvQ== 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=ZX+XQfqDdJUHEpXoPq4Y9xu+CMhi1wrHd0BrM7s8R14=; b=Nwx4Bb85rZ71bccvmIPDh8LHtTDF0hXRrX5MLR7ty1AgG7uIKExO9tB9+ZvsI6p1BM aKoGglMXiC8VNCKLH6BQXnQe1XeRW/FZo0eREy/AJ5JIxpJl/JMyCKh1zyNJlXr8oN+y LyjfZ9ZU2OqTskTRBOnJVZNSKHzbxQjmt8eN4ITD3OC4fONnxGo5xKzPBoXQKJNjOzaa yYwGunuB8ou10SXc571SBDD4TKCRMa5kadBZ/qc1dFRVgouimS+3GU8v5IW440TegW8N WcQJ5fIayJdb8zJ3n3Z/Ec4xWcbWj80qc7ymEMS8xHTcT++4lAuOp1dGqiq3OKqVWVGN zmmQ== 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 dn4-20020a17090794c400b006da7d637146si1173045ejc.142.2022.03.09.04.30.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Mar 2022 04:30:30 -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 106C4839CB; Wed, 9 Mar 2022 13:30:26 +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 BB19C83981; Wed, 9 Mar 2022 13:29:04 +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 DABA283829 for ; Wed, 9 Mar 2022 13:28:44 +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 412F01688; Wed, 9 Mar 2022 04:28:44 -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 7528D3FA4D; Wed, 9 Mar 2022 04:28:42 -0800 (PST) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Simon Glass , Heinrich Schuchardt , Sughosh Ganu Subject: [PATCH v4 5/8] qemu: arm: Remove platform specific function to get RNG device Date: Wed, 9 Mar 2022 17:57:57 +0530 Message-Id: <20220309122800.3940001-6-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220309122800.3940001-1-sughosh.ganu@linaro.org> References: <20220309122800.3940001-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 Reviewed-by: Ilias Apalodimas Reviewed-by: Simon Glass --- Changes since V3: 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