Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp542318lqp; Wed, 12 Jun 2024 08:58:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU2FL8t0MvkldVo6dIydTfP9JtKrmuPCU6Kzp6BbRhGSfsz4nDq7G4T+LfY7rpQlNzrOexwGxTbB3xtUoGXyX63DXnWiimtH8NXHc0U9g== X-Google-Smtp-Source: AGHT+IGeCDlnvEWfFKsKAjiERLbxiyscnvigr2YkGvq0uNM83vkB7ANRIPqdk0Gy/HOND/dehHzV X-Received: by 2002:a19:9146:0:b0:52c:90ba:9708 with SMTP id 2adb3069b0e04-52c9a3c78dfmr1179213e87.19.1718207907341; Wed, 12 Jun 2024 08:58:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718207907; cv=pass; d=google.com; s=arc-20160816; b=A4BBGa/Huh61sKAjclJfDXKOy3N3ahAa+g/3y2p30tWY8q6d0ASJOubd3PzimAwdvk q+4tt6R/c2Rwf3viiPV4dFIl8xEvi5gb6MMUaFb17EJFAjxtz9OSB/faG163fFOUkeyO wZYS1IbGqPj7yBuDxEZVaaOvi0b7qSLP6wk08SNc/iGGJil8J4/Zce74nm214nRQpeqP aULs8RFC8MffLTxvEtQDIBiAAd7T0y6e3mOXObQ0SSip7DcSGNiG8qwaqJXag/BIx+LF Z4XIaeT2IaIbvAHNSagAT6ZVkjpf7DrTiIPfV1VLM6LsJiZH1XFDeHwkfaD2ZWnNCW1v kK/Q== ARC-Message-Signature: i=2; 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=dJ9Y/VrKby1Wxmwofz/eLW6udgRQBGJhpilhQ0Rts3A=; fh=KP+vxQOMIjDjiGnY3egZRBhdKIs3xVNJjJRfMjXE/fE=; b=k/Lnrkx9+j+ImoVc25QDiyt1Y8xY9fwWZHISMbkBNRkFt45d/F1ZTpL42bvFKyHfqH jTTKvXdWLyQu7Ai0lz+B2etPNG0VBZRqzHHCeJiqV6dsClAXcbQNO5YVXCZPkgtYecCO kIK6S9flncntS4LC4uq9zEkt0e1zYqlZvlkHzdQu/KhpB7UJ2C1C6jS/QPjVH2zarTWM /tmX/2OMAfOGDy+3LXtg3SgVrw0jxRSl8FDB4kv+KOaCJdmJLXTpdNN6XBuLr+qfjKJF YKjKlxYv71yMDGuMEyOPP0ue+QiZlOLmXQMG6NcKrrQoMQOdM2XDKVR9aMp0K+VUCqp8 umIw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aqL4E593; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-211819-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211819-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f37770f16si196794866b.961.2024.06.12.08.58.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 08:58:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211819-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aqL4E593; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-211819-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211819-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 4BB571F281EF for ; Wed, 12 Jun 2024 15:49:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4074E181B87; Wed, 12 Jun 2024 15:49:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aqL4E593" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.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 63A5A181337; Wed, 12 Jun 2024 15:49:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718207341; cv=none; b=aQGNhPHc5OfwAc1Qma8abqYYCV6eCWWsoejYuq4F3/wFETneYV1faZICpK3IVhU19YWlimK3pAxN4F+GPMWU6nSW3lPxBA79ucr8wKOJuoOgyXSEySehZKqObK5zFTdUH9w4QprfrcL3byM308guU69Ljzto4Ae8N2bxVVP2pUs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718207341; c=relaxed/simple; bh=LaagHmLtHa02PqrnfSRNf9Efh1AA8FhF1xWGgB7qiDU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YgZigFvpafUVuAHudzG88e5gw4qr3JB2exGBrOUJ1IodQshvZdSUIbMuhQVlbV74Bx5lr+5smrp1nVM8+7RudPe4ow9P9A+bIw88zMIcxyELMvptKnSt/TYmXULGQaAiiCyZa1ZO1ZLYaKHGN3Itcb1YTJ3xcwFXZ9t202uKWDI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aqL4E593; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E301C4AF1A; Wed, 12 Jun 2024 15:48:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718207340; bh=LaagHmLtHa02PqrnfSRNf9Efh1AA8FhF1xWGgB7qiDU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aqL4E593HE6FBLtOmyFIOKrIMD5dhcFtcEOaqwRwBYlr1rbWEEnLlf+zTxQsPG65G ofyRr1EkMcr5oB38/1mB9k1dAFO6+hhLIxiySP3+gG+tYPX3W/WIyyArM7LmBzlOJp pe1n/JtogylSDtRVl/c7V6jIga7KJVIUZBt9kS24wUBdwNH6zXXHl/nfUM1HFOWgrX d3H5OPazlmfW+yiIBbwmMvz56hzvj6qAdlk3D/7/XynHvKCVwzO2CP0NEGapX1NXBb LsdvXZFG0HfeubchgL3r6NlvS3hCh4tN0Gse4UlNlG9JN/2hkm0yU3rztyxNQxyPA4 vUhU6xhQSehLw== From: Conor Dooley To: linux-mmc@vger.kernel.org Cc: conor@kernel.org, Conor Dooley , Ulf Hansson , cyril.jean@microchip.com, Mark Brown , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-spi@vger.kernel.org Subject: [RFC v1 3/3] spi: microchip-core-qspi: set min_speed_hz during probe Date: Wed, 12 Jun 2024 16:48:33 +0100 Message-ID: <20240612-attach-distaste-5c32099c1a76@spud> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240612-brigade-shell-1f626e7e592f@spud> References: <20240612-brigade-shell-1f626e7e592f@spud> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=943; i=conor.dooley@microchip.com; h=from:subject:message-id; bh=AySwqgGoZBkSC9iafcJMybZD7Uy/tn7eS25Dxx5hvrk=; b=owGbwMvMwCFWscWwfUFT0iXG02pJDGmZh32tHs8R7f/0n1feU7W14kqKbsjk9CkTQhyVVnyZs uC+/BGhjlIWBjEOBlkxRZbE230tUuv/uOxw7nkLM4eVCWQIAxenAEykSJiR4RuXXZvMB8HqXcFv C+00E083mzUE73ea47Wi9hRP4PzyHIa/4pvd6hnvGbExncp1ZFykb6bmnc/84fHZZYnrQ1Mbi+Y xAgA= X-Developer-Key: i=conor.dooley@microchip.com; a=openpgp; fpr=F9ECA03CF54F12CD01F1655722E2C55B37CF380C Content-Transfer-Encoding: 8bit From: Conor Dooley The controller's minimum possible bus clock is 1/30 the rate of the input clock. Naively set the minimum bus clock speed the controller is capable of during probe, assuming that the rate will never reduce further. Signed-off-by: Conor Dooley --- drivers/spi/spi-microchip-core-qspi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spi-microchip-core-qspi.c b/drivers/spi/spi-microchip-core-qspi.c index 1b23a38c155c..a549911b2f66 100644 --- a/drivers/spi/spi-microchip-core-qspi.c +++ b/drivers/spi/spi-microchip-core-qspi.c @@ -763,6 +763,7 @@ static int mchp_coreqspi_probe(struct platform_device *pdev) ctlr->transfer_one_message = mchp_coreqspi_transfer_one_message; ctlr->num_chipselect = 2; ctlr->use_gpio_descriptors = true; + ctlr->min_speed_hz = clk_get_rate(qspi->clk) / 30; ret = devm_spi_register_controller(&pdev->dev, ctlr); if (ret) -- 2.43.0