Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp358633imm; Tue, 3 Jul 2018 21:13:22 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeg8PwWFgcMRG1MOPT/91+udaekOay6f8G++YCoiY0Ma43ubaWiHxXaFg5Fx6Yw1yHFQKVh X-Received: by 2002:a62:c991:: with SMTP id l17-v6mr506042pfk.10.1530677602339; Tue, 03 Jul 2018 21:13:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530677602; cv=none; d=google.com; s=arc-20160816; b=mxrjoqt2duLSA1X9Y5nKMWPg0SxbXWi5gSfwCca/ay+g7fJ9PggmOuRuURTNIsfZLy BBb1fBJTZTchLfNP7g7Y2sDQjia0SYpYGZ9O9HNKEXub6jmJ16Tiuz6io2e0qTwO9joq 0JQGJveX3SwY6Yl4gBMiIlInJTPx3LkJd4jcwMMT2BYYnoGC+RGn9TInCoqe3Ubm3thh vwz6KJJeYqIcFiXYlCrA/XCQdvr1bQqVKSR2LCSfDQlUBInH/BNd3aMH6D6bx+g2MtCU WwF7nUPcSaJsqs5TTsP5IT/FlSo48YqI9/kKaoFd+SI2coxd16n4uzael6AArrUVARXO 9S4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=IgNkWI8XH4RMYklVUtesfZGynyPr3GvsNzYK9TnFnhc=; b=0XFoOfo+1YlyE0L0ot9I3t0Qq4ConV9CgQDBOUUuyhgIfuyz3iYiYekvX1ZoHCCzzK uVlAmPwfWqTQuzEUbHBteF1aMGlxbbGkqq3j37ekVBstT7JZMtPWjahbp/Nw3sNOR8Mm NwFH3TSViKFspGaT3qxRWMFCI8wnoFMem/Lr6I4hr+YwwsRYGWhoSzDvWwnR9XfYIs6G Ozq11ERxndwsn1YpnsQbUtCj4fikpJeIAjyV5zTf6XPb8gM+PSyB2x9P4nwlZkMX++2a hh/RUbMmtn/QJp4fKMegD6455PXt+va7fqmHrFbn/JkqAXRzV6jEvI9dEdxsYe6JV3CB +ohA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZcKKYFzC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y123-v6si2767034pfc.302.2018.07.03.21.13.08; Tue, 03 Jul 2018 21:13:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZcKKYFzC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932615AbeGDEMB (ORCPT + 99 others); Wed, 4 Jul 2018 00:12:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:56354 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932188AbeGDEL6 (ORCPT ); Wed, 4 Jul 2018 00:11:58 -0400 Received: from localhost (unknown [171.76.122.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 12CE1246FD; Wed, 4 Jul 2018 04:11:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1530677517; bh=o0+RWh+P+7LHcyEpD4Uh3M75++66C8JESPt6p4PCGh4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZcKKYFzCALvD5UdN1LkOaXV1UNLItSPzg4zqNZvNicVXuVRrfel1zk9x9l1mynM4z YqzWMI+8NeI2CtNBl3mRNPqU5UHvAO38jVPpBELh9n3T7Pqa4PSNq4vrOPGGY8X8e2 GsC6bay5o7MhiE29HjUVc4NdIfvL2C8ukHPZfREU= Date: Wed, 4 Jul 2018 09:41:54 +0530 From: Vinod To: Timur Tabi Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson , Matt Mackall , Herbert Xu , Arnd Bergmann , Greg Kroah-Hartman , linux-arm-msm@vger.kernel.org, Stephen Boyd , Jeffrey Hugo Subject: Re: [PATCH v3 6/6] crypto: qcom: Add ACPI support Message-ID: <20180704041154.GU22377@vkoul-mobl> References: <20180703060434.19293-1-vkoul@kernel.org> <20180703060434.19293-7-vkoul@kernel.org> <0d523023-52e8-4154-2e5d-69d54458caa0@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0d523023-52e8-4154-2e5d-69d54458caa0@kernel.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03-07-18, 09:10, Timur Tabi wrote: > On 7/3/18 1:04 AM, Vinod Koul wrote: > > Add support for probing on ACPI systems, with ACPI HID QCOM8160. > > > > On ACPI systems, clocks are always enabled, the PRNG should > > already be enabled, and the register region is read-only. > > The driver only verifies that the hardware is already > > enabled never tries to disable or configure it. > > > > Signed-off-by: Timur Tabi > > [port to crypto API] > > Signed-off-by: Vinod Koul > > I've asked a colleague who still works at Qualcomm to test this code on > silicon. It looks okay, but I just want to be sure. > > > + /* > > + * ACPI systems have v2 hardware. The clocks are always enabled, > > + * the PRNG register space is read-only and the PRNG should > > + * already be enabled. > > + */ > > + if (has_acpi_companion(&pdev->dev)) { > > + val = readl(rng->base + PRNG_CONFIG); > > + if (!(val & PRNG_CONFIG_HW_ENABLE)) { > > + dev_err(&pdev->dev, "device is not enabled\n"); > > + return -ENODEV; > > + } > > I'm having second thoughts about this PRNG_CONFIG_HW_ENABLE check. The PRNG > on the QDF2400 is the same as the one on the 8996, so it should have the > same register interface. Currently, the ACPI table points to a full PRNG > register block, but I'm beginning to believe that it should instead point to > a "reduced" block that doesn't have a PRNG_CONFIG register. That was my doubt too. I will go ahead and make it skip this then... -- ~Vinod