Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3507429ioa; Tue, 26 Apr 2022 05:06:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBgjlwUk/Kb3lXaay+yAMWTmgC/8I0X5FUaLiquCqgJYN0s9es5GzNvxqpIq27kKxKOOA3 X-Received: by 2002:a63:83c6:0:b0:3ab:5070:4763 with SMTP id h189-20020a6383c6000000b003ab50704763mr7735247pge.467.1650974788896; Tue, 26 Apr 2022 05:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650974788; cv=none; d=google.com; s=arc-20160816; b=H6zvcjyy4vtFON6nGhbcrtqiRxm/D5xY5LPpThaR7xCEuXMiGMnLXFHFHCjgUAvGK6 7GxgJAYQ0ZxR9YHaDJGpiNLLwPTCuaN5gZm5Gy2+JVncyet+S2zzJ3j3qhj9kUpj0P5e PJl5qMzHVnLVBv3uDUk6/FLQKvZvKDiR76D2+JEP8RNmJ6oFTHS6ORRFLoZVjNRpM2R7 IG/hs90Del5Up6u/ESQkTUxXub9Z9ra4zJj8CbCDKVGTydz7yViKk/zma8CXBjvabgmd mEayrQzkE220tlZfmLcmYWfIcDdceRgqvqBfaHtoqwujQM6s/PMr/+gY07amgs0q/MSj BWyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=RtMu1MrSkM6V3Lmf7EDQ6hoRWULCjgc3bueDM2QGRkA=; b=LllqLh+QhTzaz3piGJC9CT8BYnt1NJ33HzdG3s7Bsp3+jbVjJYDD7sO2k11SO953Q3 PcYD1Z7ayVCdgrtPWZHF5fFtcFCp6p35NbWi4bV+nPpeRtH0+zBxQ/CIzsE9pCVDcyv/ +RI9VH0woPfT90Jmgm6jBpLVoGUbIn1gglt4sO6sWsmblPBPSTzsunuDv32q9aFv9a1i zU/JtmodUBwvcwDQpxo+tbOvxpEk6MoNn5lkWm3bFGWpNgy8etppZ9D4m46TYNxdt8pj 0KVmwRvGtBHNmfMhpjSK+dKAwM8QTFIlPXs31Tb/LRIjuutmmQ3SevXrM9Rna8odVoYe FC4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KoACSR9+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m10-20020a170902db0a00b00158da20757fsi4995977plx.513.2022.04.26.05.06.08; Tue, 26 Apr 2022 05:06:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KoACSR9+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239599AbiDZJWF (ORCPT + 99 others); Tue, 26 Apr 2022 05:22:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345706AbiDZI5o (ORCPT ); Tue, 26 Apr 2022 04:57:44 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 587A662F2; Tue, 26 Apr 2022 01:42:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 10297B81D09; Tue, 26 Apr 2022 08:42:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F762C385A0; Tue, 26 Apr 2022 08:42:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650962535; bh=8lOvhLAFxd8QUqgv//ER/ADXQbcIfcssIo0AaOmgPks=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KoACSR9++M/Q0kobqXhQDtfeXhqu0PuzxJWNHTe/n8xG09X3ZbSmWqZyTiIrmIzGf qFjiyR7vfIPk8ekGLjY+xyrzycORaAI3AW5dKmKmJXBcNSmpa9+ZcmrjuNr8auBTPp d4GHTEqR/0A9EppxFF7I/s7IfdIm6qD3NBhkRdbU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tudor Ambarus , Mark Brown Subject: [PATCH 5.15 122/124] spi: atmel-quadspi: Fix the buswidth adjustment between spi-mem and controller Date: Tue, 26 Apr 2022 10:22:03 +0200 Message-Id: <20220426081750.757259643@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426081747.286685339@linuxfoundation.org> References: <20220426081747.286685339@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tudor Ambarus commit 8c235cc25087495c4288d94f547e9d3061004991 upstream. Use the spi_mem_default_supports_op() core helper in order to take into account the buswidth specified by the user in device tree. Cc: Fixes: 0e6aae08e9ae ("spi: Add QuadSPI driver for Atmel SAMA5D2") Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20220406133604.455356-1-tudor.ambarus@microchip.com Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- drivers/spi/atmel-quadspi.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/spi/atmel-quadspi.c +++ b/drivers/spi/atmel-quadspi.c @@ -277,6 +277,9 @@ static int atmel_qspi_find_mode(const st static bool atmel_qspi_supports_op(struct spi_mem *mem, const struct spi_mem_op *op) { + if (!spi_mem_default_supports_op(mem, op)) + return false; + if (atmel_qspi_find_mode(op) < 0) return false;