Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp19268rbb; Fri, 23 Feb 2024 10:16:39 -0800 (PST) X-Forwarded-Encrypted: i=4; AJvYcCVNvww6jIVXWw3PtxR5bDl0lNJQQKSzzEG0ZQzW/W3mD2LTcG+TISvZ1K0aRG5my2xz6NS0UHKSG0VQYLf9sYnEvXRtmT8n742k/ZaK3A== X-Google-Smtp-Source: AGHT+IGVJOy1G2WAbLPXaxjV1TUoh4/FIHTU1GWY6NoUnov0ihmoyCuko7ytUNs/w1whKpcmVaNo X-Received: by 2002:a17:903:22c7:b0:1dc:78ce:cf8a with SMTP id y7-20020a17090322c700b001dc78cecf8amr697099plg.17.1708712199627; Fri, 23 Feb 2024 10:16:39 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1708712199; cv=pass; d=google.com; s=arc-20160816; b=MlHlxo+/Sxy5s/Q7Wxe0XUDqDrBJ6+n8aSEQDw3LUiKQwELrjR157L+L4FR7I/EqIV XnC6Rd1/7bZd9vXyMC5NXbNHRJDRl5m4P98y2w0gbCeV/jkeUT1el26gtyo5WO7UA4JE yslOD1uZ7MNmS0XFLWANFPCuKpm9YzlGL2VS28jSyqPQXQ2zWBbAQI7wmX9IGltdn+wC ywQncKATJ2X/wBsd2LFsskO9bXu/lY1g3yJUQ+X8DGlkwhIDy8IqEUdT26eHqJE9+E9C LCKiTbMNquQ96quCYjQiYT/Gs/+PNa5sjsPzpl/Gqmo/nrT4w1KxN6UvF0fTcBBMYOto U7Ug== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=S7wWfneG8wRyf2KX1pRWaaUVIRBRh/PwM028DaY3q+E=; fh=j5IH3SKDo+HWwbMxWKtyEhymuQHyFudsoc+1g2oR0M8=; b=BPlVSz8BunvF9sdlY5B9o9VNi77+Z1wsPRuoZSZm2XVi6maxLxk2uwmNOnfpN6mUJ8 rDEoEHt8lnn9K//yv6YR28Y0ANWqcPVHq0gtkz9KmbQ+XJUQndEhCyToMa+KVUY/o5Mh cN5KLe6gqCBzMAF9LccYTrvlZyu+fCcSehDzbSU3LbwrbXS6k2WbdoU6VPwBe/YYmeQs 9uXnME4mYzZI548VcK+y/swsredOG2vF8hklX6YAB6NjSrJq1Ic1ZKwvwsTCm8X5CNck n23p0bosur34ib35Z86fdIyPqpDjPtnWDcHJlw2FPjEK4EsAALx6JUzKMvg9X/RbmP3y TWlA==; dara=google.com ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=a4W6EDFG; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-kernel+bounces-78958-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78958-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id z1-20020a170902d54100b001da2316af2fsi12340256plf.7.2024.02.23.10.16.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 10:16:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78958-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=a4W6EDFG; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-kernel+bounces-78958-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78958-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 149EC289665 for ; Fri, 23 Feb 2024 18:16:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B5EA140362; Fri, 23 Feb 2024 18:15:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=iki.fi header.i=@iki.fi header.b="a4W6EDFG" Received: from meesny.iki.fi (meesny.iki.fi [195.140.195.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C2841448C3; Fri, 23 Feb 2024 18:15:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=195.140.195.201 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708712117; cv=pass; b=FYJVDkUYyW1G1usmL/55/4UyTozxK2vfGo2UcAT+gBHDUK/R7+dYZj3yiU8KtNC89mxRpMGerLfdKRhw5HXwvB2P/Y+yWadmFgw2xtXSh4VClqTFpqfwLTsPhxX4iQkhAnWDJx0CaA1dweDYdUS53gRYowY3rxS020qsJM0JFTE= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708712117; c=relaxed/simple; bh=WqCQnR+yf94SdIYZnyGag0TszxHaJ7hhPosA+SsHm8Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=b0mjqXOP49HNpeUF4xUads7G5jG4x0dnunS5Ax88EqQH4wPEhVDrez1stSXCb83z8LUauk1Qpuve0Ded8oNn9TICGGULmDTWWaYU1wrqEHYT7eYhI5eqWZGkZSd9g62fAv3DeOctbr3SrS3XBNxs9tcCMXDOREJ6aeBh7F7Mypc= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi; spf=pass smtp.mailfrom=iki.fi; dkim=pass (1024-bit key) header.d=iki.fi header.i=@iki.fi header.b=a4W6EDFG; arc=pass smtp.client-ip=195.140.195.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iki.fi Received: from darkstar.musicnaut.iki.fi (85-76-119-15-nat.elisa-mobile.fi [85.76.119.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: aaro.koskinen) by meesny.iki.fi (Postfix) with ESMTPSA id 4ThJ8953Rqzyyw; Fri, 23 Feb 2024 20:15:05 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1708712106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S7wWfneG8wRyf2KX1pRWaaUVIRBRh/PwM028DaY3q+E=; b=a4W6EDFGmKyOr2SdmLZSg3dUSlW+X4E/6GXl8FL39otWtcVoID++QKWaFFsR8uO+BcgPV4 qAa5WxjBCgUiKUuzLesfUOBlSiUFY/KG8QrFQkOfNYvbRvI5QhNTIJBoGkKG6Hk9GD6zcT rhaWpLPfiAjBeErQEk7W+xXyo+Gb/X8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1708712106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S7wWfneG8wRyf2KX1pRWaaUVIRBRh/PwM028DaY3q+E=; b=LaxA6mjN49qayqu7alMxl1Kw/R+eFqEACpZYvYg60tz5JlhsWTWLJlrPahWh7CQZ4HCvS0 LmjuXISGbjVaCTizFsFT7yySbmkeOlLE7FwAUPeBVxBUd3iMEjdICtdGk51uG/s2rxzk6N 2hVnhxmQVQ60eMocWrohF+BYDT/IHmw= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=aaro.koskinen smtp.mailfrom=aaro.koskinen@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1708712106; a=rsa-sha256; cv=none; b=wCIlShYVXNVTP/xsvjSlt22TjqT7r4xG+k3R3FAQCVm5tereqBPqgJdX74xqTw72DUm1tU mUhgdmBuHKxkNcgkN8jtTT5Fs6kUIn+q5mzkofrKonPWEh9BheVnTL5MJxV8X9Aj1qGyYg oN4HRT5G5F/6A0fl8/7ZnUC6RpPv9bw= From: Aaro Koskinen To: Tony Lindgren , Ulf Hansson , Linus Walleij , linux-omap@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Aaro Koskinen Subject: [PATCH 5/5] MMC: OMAP: restore original power up/down steps Date: Fri, 23 Feb 2024 20:14:39 +0200 Message-Id: <20240223181439.1099750-6-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240223181439.1099750-1-aaro.koskinen@iki.fi> References: <20240223181439.1099750-1-aaro.koskinen@iki.fi> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Commit e519f0bb64ef ("ARM/mmc: Convert old mmci-omap to GPIO descriptors") moved Nokia N810 MMC power up/down from the board file into the MMC driver. The change removed some delays, and ordering without a valid reason. Restore power up/down to match the original code. This matters only on N810 where the 2nd GPIO is in use. Other boards will see an additional delay but that should be a lesser concern than omitting delays altogether. Fixes: e519f0bb64ef ("ARM/mmc: Convert old mmci-omap to GPIO descriptors") Signed-off-by: Aaro Koskinen --- drivers/mmc/host/omap.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 50408771ae01..13fa8588e38c 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -1119,10 +1119,25 @@ static void mmc_omap_set_power(struct mmc_omap_slot *slot, int power_on, host = slot->host; - if (slot->vsd) - gpiod_set_value(slot->vsd, power_on); - if (slot->vio) - gpiod_set_value(slot->vio, power_on); + if (power_on) { + if (slot->vsd) { + gpiod_set_value(slot->vsd, power_on); + msleep(1); + } + if (slot->vio) { + gpiod_set_value(slot->vio, power_on); + msleep(1); + } + } else { + if (slot->vio) { + gpiod_set_value(slot->vio, power_on); + msleep(50); + } + if (slot->vsd) { + gpiod_set_value(slot->vsd, power_on); + msleep(50); + } + } if (slot->pdata->set_power != NULL) slot->pdata->set_power(mmc_dev(slot->mmc), slot->id, power_on, -- 2.39.2