Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 1B1B04322E5; Mon, 17 Aug 2026 14:55:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786978515; cv=none; b=tmqex7HOCFS6RxKgPlyQ9zzBu2eWOR9p6myQjbMWXdT7dQ4dXAJF/lrS2J3Mhnlyr8dvlyq0akIHT104lS/lgxev67o6si1tFw7CzIM/02oX1k7zZz1mtwNL7aUfM16YJ+otBkFnpE4WzE6qS7Frl4b4Rm2FcDRDZvR/ZWKBnbQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786978515; c=relaxed/simple; bh=OwX9drMyTqAPg/j0htYh8TyXB1O7h69ti/W94kCwVRM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CotpRk5UtGVH23ELusfbKJCyOIxRWo5FTPWOUnj+CP7hyMoVblbC9kXlyJKcY7kmuvO3AW5B9fzgHaOduBcXdTde/luKIbSxqhia8XUG+PnsFeNazsr5WsXJHzbQ7x+RZETDWI6vgj9xFtsCFHO7ot0gX/R2DmC/YMQmmyT/SZQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hvmXoWoW; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="hvmXoWoW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71C081F000E9; Mon, 17 Aug 2026 14:55:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786978514; bh=NH8IwkppJmABz7lss6QVUUzaVIj30wVZSpeeMZLs3ks=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=hvmXoWoW3RSKZEZ7p5R2pUIOQdd/Z+DFfjrHpbf44eQoPWbxS2XDCVx7MPV/OzfMR EeFAvA72TOHanNsZQUJjwadntQEcpSvPfJRBEFDPRDch++/eTdtW43OEoFnLLuCJ0/ H2Z9H7r2Vh+HFyreBQ/2++hv2TCz7BDnA5lBTATs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Larisa Grigore , James Clark , Mark Brown , Sasha Levin Subject: [PATCH 6.6 063/156] spi: spi-fsl-dspi: Avoid setup_accel logic for DMA transfers Date: Mon, 17 Aug 2026 15:33:17 +0200 Message-ID: <20260817132537.053865902@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260817132534.666299318@linuxfoundation.org> References: <20260817132534.666299318@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Larisa Grigore [ Upstream commit cac7e5054115fcc41b1cb050af8e8971f7c9b22b ] Repacking multiple smaller words into larger ones to make use of the full FIFO doesn't save anything in DMA mode, so don't bother doing it. Signed-off-by: Larisa Grigore Signed-off-by: James Clark Link: https://patch.msgid.link/20250522-james-nxp-spi-v2-8-bea884630cfb@linaro.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-fsl-dspi.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index 3206c84c6f22f..b7dc2add9114e 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -751,8 +751,12 @@ static void dspi_setup_accel(struct fsl_dspi *dspi) struct spi_transfer *xfer = dspi->cur_transfer; bool odd = !!(dspi->len & 1); - /* No accel for frames not multiple of 8 bits at the moment */ - if (xfer->bits_per_word % 8) + /* + * No accel for DMA transfers or frames not multiples of 8 bits at the + * moment. + */ + if (dspi->devtype_data->trans_mode == DSPI_DMA_MODE || + xfer->bits_per_word % 8) goto no_accel; if (!odd && dspi->len <= dspi->devtype_data->fifo_size * 2) { @@ -761,10 +765,7 @@ static void dspi_setup_accel(struct fsl_dspi *dspi) dspi->oper_bits_per_word = 8; } else { /* Start off with maximum supported by hardware */ - if (dspi->devtype_data->trans_mode == DSPI_XSPI_MODE) - dspi->oper_bits_per_word = 32; - else - dspi->oper_bits_per_word = 16; + dspi->oper_bits_per_word = 32; /* * And go down only if the buffer can't be sent with -- 2.53.0