From patchwork Thu Feb 24 18:05:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 545599 Delivered-To: patch@linaro.org Received: by 2002:ac0:d8d1:0:0:0:0:0 with SMTP id b17csp438233imj; Thu, 24 Feb 2022 10:07:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJwjtJ37pOyUMcE7JQh4Op2bxdaCzz6QBe687AZYR5kqPa8xz3cgoj5u1oAHnfSIqqjCqjHi X-Received: by 2002:a50:fe08:0:b0:40f:932a:47b0 with SMTP id f8-20020a50fe08000000b0040f932a47b0mr3601027edt.64.1645726076691; Thu, 24 Feb 2022 10:07:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645726076; cv=none; d=google.com; s=arc-20160816; b=VBlFYULv7Is8AczrRc2J15FZsyefNA1x1IkXX+skRuLgfrmDE2/9If6P9zm5N+pEQf DTJxkcV0AAd7hku6RNdslu9DPSptYPDlx+C7c4NwnxibvK32iTMB3yEl02NgbscCkHkV XAL/SEScjpO8tZeAZIkfG6e//rcMU5yNGLpH0hd/u3Szwwa3cKknKXnIDwuIKtQOQiKO +hDXoV30m9yMfoGJh3xwnHH/wjYOn0MpBuEUbKkyjmLT3GHZVedwn3h1CT6Rt6CqApVO p8w2Qrw+7VVH5MSPvN5NF2EiEF1SVHSayymRYsINkTciprhWY1HNwZhJJYy/7sxE0/Ko KksA== 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:references:in-reply-to :message-id:date:subject:cc:to:from; bh=jYdrG0lDFs0BpEvHifZM7R8y2jrqz/Qm8Ot5lh98QBI=; b=j7K9FO++Jkx2IS1oqV10yCuvuqqvOUmyrdVngEQqlGbGHx21zvIb0zIHEMMoUP7Ypl n8UpEuOCFvRCk0wdQ6/p+Z+8OQNl0eb53SqUfIRSZCATFBBn1cnQvIUQtd0jSO9fIsvR NQ59jzC+NGnC49wUlsO7c19g5TlLpV6Fi6PjATSViJi8cqFfkksXPcTi1WjANSQ3oTGB OE3x4u0cVDW3MKVw2mTXSU+5n4Im9bAbQO2EZFxvvY3IhzqkFV+r6T7ILhEVQ0t3cvIm cxZmuJ2luOaFxJWaZI0NekncvTh/4E9BtKS4HwO3xyX9EvGYXt21Z1YeVsG491oA7ICx PuBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id dr14-20020a170907720e00b006d03ab2b4dcsi58901ejc.712.2022.02.24.10.07.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Feb 2022 10:07:56 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 2562083CDE; Thu, 24 Feb 2022 19:07:10 +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 26E1283C9B; Thu, 24 Feb 2022 19:06:46 +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 9FFF983CF4 for ; Thu, 24 Feb 2022 19:06:40 +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 2098F106F; Thu, 24 Feb 2022 10:06:40 -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 B468F3F70D; Thu, 24 Feb 2022 10:06:37 -0800 (PST) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Simon Glass , Heinrich Schuchardt , Mario Six , Sughosh Ganu Subject: [PATCH 09/10] qemu: arm: Remove platform specific function to get RNG device Date: Thu, 24 Feb 2022 23:35:51 +0530 Message-Id: <20220224180552.26901-10-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220224180552.26901-1-sughosh.ganu@linaro.org> References: <20220224180552.26901-1-sughosh.ganu@linaro.org> 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 --- 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