From patchwork Fri Mar 4 13:34:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 548115 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6713:0:0:0:0 with SMTP id u19csp22073mag; Fri, 4 Mar 2022 05:36:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyBIQaY3+Nh/On+QwafYHr0B6YHpqaHsTKglcXMbVoQJx2NtGVpFQzaxSLczmYDAnw14IvB X-Received: by 2002:a17:907:9713:b0:6da:7d49:a61 with SMTP id jg19-20020a170907971300b006da7d490a61mr9618761ejc.555.1646400968913; Fri, 04 Mar 2022 05:36:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646400968; cv=none; d=google.com; s=arc-20160816; b=MQIMZaZsrT5B/STxTKdYp3YeCfL4gvFoqv/OS0afSRP6BfHDwnyQCgJHIHV2SF2M5o E9DO+ukPx0uTV4iAxb3QQRNkunrcv1W1lq12+nnUo19LN4LYOhrfQBNm1eGzOfM31DEK J7K//pF6DDtWz/jh31epvdJYdWiEaiAcFa+GT/s3bZCLOuP9XjzrRErheDE0gezMxs95 dADAWIGH0NPu5UFQkwQMnyncxq81WAKBvlnQKB5QhK9Qp4k7wivLAwBE06KQIcHy+rQH cBP64ii7fQbI8JDsG984UgTbmISgjHUjLtu/Q3zwCkBTfdoLbxuTpKIOD8EvL26wQA5F 6j+A== 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=ggqCrRmZNCmOuhDbTMcb+HYAKqyFami70/Y7CLEs+0w=; b=KoBHzR/Lsozah8rn2Hqrw9iHIKXig7TjdRhd4ojfV3mFI24RoOElDwV/NXKxo6HM9M 2Xsk2GX0RSaJuelXq6UwlrvUkF9RqSFmHF5oOeXpZ/VyOOyI8vELDFxksAbbMqCzPFy6 gYVJMwp4qRN25gY0HPHn9HAy9DfTUSHjbxI+WlFqXea2Fas94+OAhPDWXEMVYgJKL5nq HHoz5NeiG4a4KQ2KI6b5FF0IIXSuXBQRDwYTsgsl7c3EQJCDPn+IrSY+UJMilF/NFN1B enD7Jtjh1ba3jMwLvAxoLulZAKug0olVIFucAzlpDbSHfxPP7PnxdxEeZMcbwspsXDaN NfKg== 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 l17-20020a056402255100b0041290fa3b94si4770162edb.424.2022.03.04.05.36.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 05:36:08 -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 0917E83B8A; Fri, 4 Mar 2022 14:35:38 +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 2A0FD83CE4; Fri, 4 Mar 2022 14:35:24 +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 6EBDD83B6C for ; Fri, 4 Mar 2022 14:35:11 +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 D42F11396; Fri, 4 Mar 2022 05:35:10 -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 342183F70D; Fri, 4 Mar 2022 05:35:08 -0800 (PST) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Simon Glass , Heinrich Schuchardt , Sughosh Ganu Subject: [PATCH v3 5/8] qemu: arm: Remove platform specific function to get RNG device Date: Fri, 4 Mar 2022 19:04:26 +0530 Message-Id: <20220304133429.1047752-6-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220304133429.1047752-1-sughosh.ganu@linaro.org> References: <20220304133429.1047752-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: Simon Glass Reviewed-by: Ilias Apalodimas --- Changes since V2: 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