Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp5773637rdb; Sun, 17 Sep 2023 11:36:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFX3+q5CpU8loJLLsTnkuBpI7YMNqvfMtOHtLFp6q07fNNMET5C5DOH0nYsOyr15gPkRBXC X-Received: by 2002:a05:6a21:7888:b0:154:fb34:5f09 with SMTP id bf8-20020a056a21788800b00154fb345f09mr9825628pzc.15.1694975811029; Sun, 17 Sep 2023 11:36:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694975811; cv=none; d=google.com; s=arc-20160816; b=aJo/wHBL7k8BmZmEvkJ8aJI4QJq5h3yUV9lvZDuhiXdTYaYDhRDd+NDZ1f/+yBPPrl bwnaJGZwco9CAlNAne2iO+cQiYeBwhj0GrIkJnpBPlBeWaQrST9wt8KuIgufAFk1EIWF l5enNEymkhjJ7vlhNaXesZNz1Nw37Fc/ZnyyRekSsqYutUwN6EvsumZjzK6lFY2mtXlv dAchRja3dnp+1TVAYk0r3i/fzHUP4NYAQXvdiOwM9fcYA96LJhiUYKTqVs71sj0Q46WK Skmct4sfTsq+zAC0mrj6xMY/ip+jBicB97J5CTDWO6lZZ236MYK/KMv1PciGLuWvRMFR RyvQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=DeueOuoVmZw39cDuG06Cps8ippAl5MH5eqOWbaiqh3g=; fh=9zYOrtVBulhZriEkd7bmM+wB6NIaCAP90sGtVY79v/Q=; b=VF5JRZ33wXuly3zXLwYtGHVxRK0HyU2Bv2SeEOP1vH77xLoWPfdvXs+2RDQBKvNvzc N04lRB8DYsdzvHDskei4kwBvgqqWxIZGIKnJxmcHzartHM2luS6qDp/+c22ZBKS44Yzi WcQa8320X2D99RLcLEfm6TTNbxnHhm2dtTiXE09mJjMs8e2A7ZB6JwTTEZRmacMLS4Sz hzwEuSp0Xub0cw40MUO6bscA2FglVx93BhDuOf6JbzdNz27WnzjQ9iKG2chXJlIC1QxY EZRkK8qQB1miOKfs+pYs87l9WJ4ggwTr0yddMi+SUrMET/TRjF3OFjSQhM4DCa3vThzn HcLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TH8UdH3k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id e15-20020a6558cf000000b005652bd28000si6830642pgu.4.2023.09.17.11.36.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 11:36:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TH8UdH3k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 29D70823267A; Sun, 17 Sep 2023 09:41:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232086AbjIQQlI (ORCPT + 99 others); Sun, 17 Sep 2023 12:41:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237087AbjIQQlE (ORCPT ); Sun, 17 Sep 2023 12:41:04 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DEC8ED; Sun, 17 Sep 2023 09:40:58 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-31f7638be6eso3571179f8f.3; Sun, 17 Sep 2023 09:40:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694968857; x=1695573657; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=DeueOuoVmZw39cDuG06Cps8ippAl5MH5eqOWbaiqh3g=; b=TH8UdH3kkLSkJhxPtP4i3HsgVHkgqLeJmYY8bZINLmHF/LqKsHnWEujZE43zcfHz3k 3V8qrFourTv+Q5Ep06GZl/20NIIbtUFXSepNk0R5snenoL0h8M+4cW9DupyrRJ87RnQp S/gAn79KqoTX90DQBQYqSKDs+CagqltpOKysk4c6CRj41MvUTkS45y06uZhhXhassJra czokkwiawiQXczUGx8f2YgPL2NTxkX43lmaKTW+7sbi3GsWlb2V3h6soSW1Rz4XJMm/W tYPi2byUdLSqBy9qo4DFftF7SLsripbDYyw7R8LcClN1PjbeTudVYCA3IjHVhAwu+A+b ldmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694968857; x=1695573657; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DeueOuoVmZw39cDuG06Cps8ippAl5MH5eqOWbaiqh3g=; b=UXndguQL/2ZNm/pkAkvE9/8xyWf7w7jNA13QPg5mB8USFQEIzVFMThcZel6FoI9MFk xvgGEfbXxqmUVXMN96eKv+gEI/lBroQwyIpUPBjumHYs7eNEONJChsIbffWWvBL/l7Gz /Dbly7n0uXnkEnBXfLmglDHVGzEZEvS8plgzPpjEaUKx8VOrQnvh+92d6S4IRpfiHXyp ixtishFoeVcRLslW7ioXOeqsuCGk48SN6c8LhNTPB93qUgo0H0gET+auIGFBOwO+SKzC F9oo7Jt4gqzZETs2C67d92TKZf4JUFm6qJvT1gzoGO3PuBN6bIj7xsMI9vYX9XOV8HnN SVJg== X-Gm-Message-State: AOJu0Yynky6gS0WyE04aOnfocYpzWrSj5WkQRC5LhiPgUufF0PwVKTZp MaETn9p9DpFMEBa0Az9I2x0= X-Received: by 2002:a5d:5504:0:b0:314:dc0:2fca with SMTP id b4-20020a5d5504000000b003140dc02fcamr5756561wrv.29.1694968856668; Sun, 17 Sep 2023 09:40:56 -0700 (PDT) Received: from localhost.localdomain ([109.38.142.63]) by smtp.gmail.com with ESMTPSA id jl6-20020a17090775c600b009ade1a4f795sm2879205ejc.168.2023.09.17.09.40.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 09:40:56 -0700 (PDT) From: Stefan Moring To: broonie@kernel.org, shawnguo@kernel.org, s.hauer@pengutronxi.de, festevam@gmail.com, linux-imx@nxmp.com, linux-psi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, sre@kernel.org Cc: Stefan Moring Subject: [PATCH 1/1] take in account bits per word instead of assuming 8-bits Date: Sun, 17 Sep 2023 18:40:37 +0200 Message-ID: <20230917164037.29284-1-stefanmoring@gmail.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Sun, 17 Sep 2023 09:41:46 -0700 (PDT) The IMX spi driver has a hardcoded 8, breaking the driver for word lengths other than 8. Signed-off-by: Stefan Moring --- drivers/spi/spi-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index a8a74c7cb79f..498e35c8db2c 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -662,7 +662,7 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx_data *spi_imx, if (spi_imx->count >= 512) ctrl |= 0xFFF << MX51_ECSPI_CTRL_BL_OFFSET; else - ctrl |= (spi_imx->count*8 - 1) + ctrl |= (spi_imx->count * spi_imx->bits_per_word - 1) << MX51_ECSPI_CTRL_BL_OFFSET; } -- 2.42.0