Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5945447ybi; Tue, 4 Jun 2019 15:21:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxhuxDgmiECpNeuYn+M513NLYyMY70I9NphrOoWHqfg0frrJTpV5AAn+QL4sFeYL8SHjBJa X-Received: by 2002:a63:135d:: with SMTP id 29mr185534pgt.38.1559686905604; Tue, 04 Jun 2019 15:21:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559686905; cv=none; d=google.com; s=arc-20160816; b=NnGcNCNds+ptibF5GpvQ5AR0pC0pB6tBEjDgJlQkSQV9HP9MGXz8BhWN2snQ/tiU+q 7TBiPBMHuVZGKqCdjIWDdabdsy1XBVV1nmN6sw+mI7G98cuF0W38nYX2CJaBNJdcNVHW yjpoXY0Ov1PTE9Tnyb+z6BXRNYKCS2kp7XbpjpBlaaWgJcF+s4i4znl+tUZbHtiAnLmA WMplwXPxX5rLlnJbf17C3uKyWlGN9mbdPNea5XXS+Pnjg/ENRZDjc2GDYF0YktYjM+g5 S9sZphe8C97w/c3WSHt0ERj0P5HLGxCW9mtvmAaEyiWPppWly7nKXtANg/PoLFk3X1Mp lf9w== 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; bh=7CFZoy+tTyBgH/Y1DK4S3S5eb/9dJPHIxDl6yCqA2lc=; b=z8M8gOHvBCEoUOs/cwjA38R8mbwEvCAXCWNstd3YgSzLzDpwIY75xcLaWkefhL+HG4 rb4i6PBIVMlX13Avumb9jMMJqAw5aAATWynuXR9EX6OwjpHb5ni3SSkRNZreMv1R5ooU 4do9zsIAKtXFwrQLFCKpdATc2G1zy6YrBNyfYngg4tTXloqNAesft7bJDmGjuHb8O1k2 mBgsxrlwEbvNG26gnFierWHAjp45bE8HXX9D84tgzTX773HwSuepyabWuMer/jiDRF6Y W77dIjW7Tyo8PhoiLr7x14LbK5SlLatLGkFT4ptG+5W/In23hOQ2CJ5gEVVeHqSxVvor MpEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wGl1C6Ba; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u188si27277037pfu.228.2019.06.04.15.21.27; Tue, 04 Jun 2019 15:21:45 -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=@linaro.org header.s=google header.b=wGl1C6Ba; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726519AbfFDWUP (ORCPT + 99 others); Tue, 4 Jun 2019 18:20:15 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:34562 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726422AbfFDWUO (ORCPT ); Tue, 4 Jun 2019 18:20:14 -0400 Received: by mail-pg1-f195.google.com with SMTP id h2so7924393pgg.1 for ; Tue, 04 Jun 2019 15:20:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=7CFZoy+tTyBgH/Y1DK4S3S5eb/9dJPHIxDl6yCqA2lc=; b=wGl1C6BaETLmX90w/Z9x0H6LCrbUNoRHAk16TGpmlimLNRWI4t2oIKOB1Y86ONZpcZ J8OB+vLJmS1Mb4CArjMvtfxkPSLGlYaktxEE2U/sTnLItcyqpCaqXqy+zXyoB5esPKaB JRhEkxwMEtSwQ0XinLktQ4Q4ZeXLRgAFltcmXcYmcLW1o/sBRKp9+Zfbfn8NozqaTbvp lrXySHvNNqlM+QjEAjInFTmyXjJQzfr0pnoQvZLaBpZntWeHdrvC4YPoTXW9BzLs4qy5 Bt94TadtVNrxVz8X53dcM3dRC67THeAvHx5rKGWcyi9AnS0rbTm6Fu3BQmn8Rxgm6UlY 6dRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=7CFZoy+tTyBgH/Y1DK4S3S5eb/9dJPHIxDl6yCqA2lc=; b=Z8A2NmRyGN9fcvVEV+uwKaiEkFTHp99KrF6vNJauxcoRfwqUgGGI686MAJWbw8DEfg qeayWCrIMiZYqXaM98+4YQshhV78sQYn3E8IeX0/DNrygimmU8eGWH1h9ScOy45SGa64 2o0Wt7QRsJ/1H60rT16iyMzVHe3dCwNAKAIJ0aSvFkTboNKNfr3bUTAoxhtKd2OZsDrL ApshZ9E9rYrYiYq2A9W/Tld3gawRkDMUOUOgXJkD12plXuoVRmu5NNFAbCV8YOVE3xSA Su+pbwnCwTAAPYHqLmCFjvWAoWdd906gYfD7RGnUFMliA+QsEG9BdBrudxdQ9/X0guJr 9C/A== X-Gm-Message-State: APjAAAWp2I88HA5OLA9iQRJatmC/xbxjA1iqsDfV0R0kjgROhtEM9xRh +fndeoT5OIFHhXjKE2OkcqmyCw== X-Received: by 2002:a17:90a:d3d2:: with SMTP id d18mr4539501pjw.5.1559686813764; Tue, 04 Jun 2019 15:20:13 -0700 (PDT) Received: from minitux (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id u20sm7717211pga.82.2019.06.04.15.20.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2019 15:20:13 -0700 (PDT) Date: Tue, 4 Jun 2019 15:20:10 -0700 From: Bjorn Andersson To: Stephen Boyd Cc: "James E.J. Bottomley" , "Martin K. Petersen" , Pedro Sousa , Andy Gross , Linus Walleij , Rob Herring , Mark Rutland , linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org Subject: Re: [PATCH 2/3] scsi: ufs: Allow resetting the UFS device Message-ID: <20190604222010.GC4814@minitux> References: <20190604072001.9288-1-bjorn.andersson@linaro.org> <20190604072001.9288-3-bjorn.andersson@linaro.org> <5cf68d5b.1c69fb81.281cd.5f93@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5cf68d5b.1c69fb81.281cd.5f93@mx.google.com> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 04 Jun 08:25 PDT 2019, Stephen Boyd wrote: > Quoting Bjorn Andersson (2019-06-04 00:20:00) > > @@ -6104,6 +6105,25 @@ static int ufshcd_abort(struct scsi_cmnd *cmd) > > return err; > > } > > > > +/** > > + ufshcd_device_reset() - toggle the (optional) device reset line > > + * @hba: per-adapter instance > > + * > > + * Toggles the (optional) reset line to reset the attached device. > > + */ > > +static void ufshcd_device_reset(struct ufs_hba *hba) > > +{ > > + /* > > + * The USB device shall detect reset pulses of 1us, sleep for 10us to > > This isn't usb though. No, it is not. > Can we have a gpio reset driver and then > implement this in the reset framework instead? Or did that not work out > for some reason? > The reset DT binding document clearly describes that resets are for chip-internal resets, and this is a general purpose (output-only) pad on the SoC that's connected to the reset pin on the UFS memory. I actually see nothing preventing you to connect said reset pin to any other GPIO. Regards, Bjorn > > + * be on the safe side. > > + */ > > + gpiod_set_value_cansleep(hba->device_reset, 1); > > + usleep_range(10, 15); > > + > > + gpiod_set_value_cansleep(hba->device_reset, 0); > > + usleep_range(10, 15); > > +} > > + > > /** > > * ufshcd_host_reset_and_restore - reset and restore host controller > > * @hba: per-adapter instance