Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756826AbcJHQav (ORCPT ); Sat, 8 Oct 2016 12:30:51 -0400 Received: from mga07.intel.com ([134.134.136.100]:53908 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752866AbcJHQan (ORCPT ); Sat, 8 Oct 2016 12:30:43 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,461,1473145200"; d="scan'208";a="18032784" Date: Sat, 8 Oct 2016 19:30:38 +0300 From: Jarkko Sakkinen To: Tomas Winkler Cc: tpmdd-devel@lists.sourceforge.net, Jason Gunthorpe , linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 1/4] tpm/tpm_crb: implement tpm crb idle state Message-ID: <20161008163038.GA10489@intel.com> References: <1475927979-23484-1-git-send-email-tomas.winkler@intel.com> <1475927979-23484-2-git-send-email-tomas.winkler@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1475927979-23484-2-git-send-email-tomas.winkler@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1178 Lines: 30 On Sat, Oct 08, 2016 at 02:59:36PM +0300, Tomas Winkler wrote: > From: "Winkler, Tomas" > > The register TPM_CRB_CTRL_REQ_x contains bits goIdle and cmdReady for > SW to indicate that the device can enter or should exit the idle state. > > The legacy ACPI-start (SMI + DMA) based devices do not support these > bits and the idle state management is not exposed to the host SW. > Thus, this functionality only is enabled only for a CRB start (MMIO) > based devices. > > Based on Jarkko Sakkinen > original patch: > 'tpm_crb: implement power tpm crb power management' > > To keep the implementation local to the hw we don't use wait_for_tpm_stat > for polling the TPM_CRB_CTRL_REQ. I just realized that the HW specific argument does not hold at all. The tpm_tis_core heavily uses wait_for_tpm_stat and return value of status is synthetized. It's upper layer for FIFO implemetations but still the arguement still holds. Lets keep it the way it is for now because this is fairly well test but I might consider sending patch that migrates to wait_for_tpm_stat unless there is no real reason not to do so. /Jarkko