From nobody Mon Dec 1 23:06:23 2025 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D22E22B5A3 for ; Sat, 29 Nov 2025 10:29:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764412176; cv=none; b=FN66C3wGdCyeMwk7V9+vD1j638DEGLJ/fzNZ5Qm40ua1CKYeoVzvmebvtaF8UMfUuCXZhM2t4Gcc+/N/as+SKefFes4gV841zqWcLVJhH+q07yYFSEjRFv7Q0NLNTbF+NyzzmNZHoILpehYEt9VeF+utPE4JIOcGm2/9k/EDe5o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764412176; c=relaxed/simple; bh=EXIAZkX9JbCZEV40QF6tt5G/xP6fu5FJr2BYKTQr4tk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=pM5gagQ1l2sMp18TTcl9kSLm9kZLDnIdGnlW/6OmumWaatEqbQvxkDTSFETTPgf7NiytntFD8zCpTVPpfgnN6h1/xpdJdb9hf3rDWmKWcZ9goCSOoySKhhkpiNodgd1KCr08r2Ou3vEyq/vXFzwogTdVb4xs5hj4JwA15M5PtSo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=US8FPeQ0; arc=none smtp.client-ip=209.85.221.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="US8FPeQ0" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-42bb288c219so2431137f8f.1 for ; Sat, 29 Nov 2025 02:29:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764412172; x=1765016972; darn=vger.kernel.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=XB8ojDLPmRPjgdbiNqqeSPVDfEQQay9vSxKvQQfS0ls=; b=US8FPeQ05vlOd8gQODpXBhwYuCM/mO7vzxuPEHHukdEDD2zn3/RoG6LVb+6zo8RqdH q3sZUUMsUR84Kf06K+K19b3MyaoOk8fvsOt+SnRrh+xhViNql1BjpXVpUBdU0CCekrlk qrdFIIpmYbrSjppsqiLcTWONtuKgLRNbAvmd4RIhFe3A1sLUF7ZeHWc3zVwJrFOD5ZMs oIb89v6lr/2+JS9k6LaO4h44PujWed+okdl6FuMZLpcl06s3VGjX++aoDUB6T8N58r8J TDFwj2ZW2zBJoZiJ//k5IL/ZM5Rsh8fJx9Zgk7LOzqNR7cRsKjR/4WDiNDuFlEKrUy3H pnzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764412172; x=1765016972; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=XB8ojDLPmRPjgdbiNqqeSPVDfEQQay9vSxKvQQfS0ls=; b=H27JHTotWpFOnwmGDnUE7wSc17oCi42wMOGM82O1VDQr+ln8n5OpxYtzDFZTKYBZtO SIwlEKH1MyNEiIHBfePmSJD81lvGoQQoVH3hLfskAsTlZHL8JlON6duF1h1yJC+lw7NF FXv7nHWkODGJlXH+xIKsTbh2SEETD8QseQdGLJ9ESC24IL+azJLIP+U8Q/N6/tQ/mKuV bVgpwgPeVpvRY9PIE13bJtFGu8YT/LRugOUKLeC72kO/nXYb1P/hOz3/hMa/cT0xsD3b qnKb4wAYdzj6043Qzfa8I68ETVnEcKkboc1CPV6TGoHmrvPSLZOvBfy/79aZizydu3iv 4Tjw== X-Forwarded-Encrypted: i=1; AJvYcCXlvHayFQBXZPe/Jr5bmAp3V8j+d0SUPKbEohTT6992Jk1rFjM+gekCxz7ngs+b2azuW8aKQc6Lfi4oP44=@vger.kernel.org X-Gm-Message-State: AOJu0YygwGu7nrd0xA/dif80wO3G3gVFadw+sMwOa2aWLjdoME939mAr 2OnUYV2T15SOJRoSGLDE3QT0Ihh4Xc6f3nL1IIE2Y/LAQmOzaPeqAEz+ X-Gm-Gg: ASbGncsfkhZdxUlhDm6tx2Z74VoxW20cOjSR7RRVGRZUC0wXOgzKEnhy5mg0XKRJCxM +fvBwGHp3Q7CCNa2c6TEPRTq5+EjoOLdFuOWELx+uFT9Mes2gzoFqvLhH9dY65eU7qEKLlMle7X 1uH0Rdish0i7LcIHXgfb9A6lkwItskphrge2sjOX/JhPIoTq/TF9zP13tWiUPo/z7KVsBRajGUe Lj9FWVp6BV4oUtspE2kYuFNSdpfcAYldv66u8P7dIQ0MkQNjPkRebyhgow9zw/ZV6kiM85EhneX ffwcXN5WmSmHLN+cvxdKa8Kx4pbXIFdKhL0McJEwF/t3AdGG903amjOghNYuSJs955ukJBp8OSf 7BjuYPjUZI8zQmq2/kOhG4sO4tFuAyo+2V31eS+UAK6adz7EBRZKi7O06RTFkMBRXNHGPK+kanf hCBErgfK5nSfK6+ylp7LcGl6YQ/fSbkAboQsCF7+nptTpIr6p3sD0= X-Google-Smtp-Source: AGHT+IFF8NfCPDZoCDRvd2e/3m3f9IuNEk2//VmqY35vg4vwN/ox68TOxm1dPHp0YHoIW6ze/wYpJw== X-Received: by 2002:a05:6000:4026:b0:42b:2c54:d9ba with SMTP id ffacd0b85a97d-42cc1cbd449mr38035756f8f.20.1764412172508; Sat, 29 Nov 2025 02:29:32 -0800 (PST) Received: from [192.168.0.253] (5D59A51C.catv.pool.telekom.hu. [93.89.165.28]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-42e1c5c30b8sm14740128f8f.7.2025.11.29.02.29.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Nov 2025 02:29:32 -0800 (PST) From: Gabor Juhos Date: Sat, 29 Nov 2025 11:29:27 +0100 Subject: [PATCH] spi: spi-qpic-snand: remove superfluous qcom_spi_set_read_loc() calls Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251129-qpic-snand-superfluous-readloc-v1-1-b84ca17095d9@gmail.com> X-B4-Tracking: v=1; b=H4sIAAbLKmkC/x3NwQrCMAyA4VcZORtYy6biq4iHkGYaGG1NqAhj7 76y43f5/w1cTMXhMWxg8lPXkjvCZQD+UH4LauqGOMY5hHjHb1VGz5QTeqtiy9pKczShtBZGvnG cZoojTVfokWqy6P8cPF/7fgAo3rvCcAAAAA== X-Change-ID: 20251128-qpic-snand-superfluous-readloc-c7c245a20a46 To: Mark Brown Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Md Sadre Alam , Varadarajan Narayanan , Sricharan Ramabadhran , linux-mtd@lists.infradead.org, linux-arm-msm@vger.kernel.org, Gabor Juhos X-Mailer: b4 0.14.2 Before configuring the registers related to page read, both the qcom_spi_read_page_ecc() and the qcom_spi_read_page_oob() functions are calling qcom_spi_set_read_loc() to set the read location for the first codeword. However the qcom_spi_set_read_loc() function puts the passed value into the register write cache only, from where those gets written to the corresponding register later via DMA. Yet, the qcom_spi_set_read_loc() is also gets called within the internal loops, and during the first iteration the read location register values written by the initial call gets overwritten in the register cache. This means that the values written by the first calls are never getting used in practice, so remove the calls as those are superfluous. Signed-off-by: Gabor Juhos --- drivers/spi/spi-qpic-snand.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/spi/spi-qpic-snand.c b/drivers/spi/spi-qpic-snand.c index 7681a91d67d563fd21fcbd69d223b6e846e97787..0334ba738bef2811e3458d20ce6= 9bd3a213cb20b 100644 --- a/drivers/spi/spi-qpic-snand.c +++ b/drivers/spi/spi-qpic-snand.c @@ -850,8 +850,6 @@ static int qcom_spi_read_page_ecc(struct qcom_nand_cont= roller *snandc, snandc->regs->ecc_bch_cfg =3D cpu_to_le32(ecc_bch_cfg); snandc->regs->exec =3D cpu_to_le32(1); =20 - qcom_spi_set_read_loc(snandc, 0, 0, 0, ecc_cfg->cw_data, 1); - qcom_clear_bam_transaction(snandc); =20 qcom_write_reg_dma(snandc, &snandc->regs->addr0, NAND_ADDR0, 2, 0); @@ -941,8 +939,6 @@ static int qcom_spi_read_page_oob(struct qcom_nand_cont= roller *snandc, snandc->regs->ecc_bch_cfg =3D cpu_to_le32(ecc_bch_cfg); snandc->regs->exec =3D cpu_to_le32(1); =20 - qcom_spi_set_read_loc(snandc, 0, 0, 0, ecc_cfg->cw_data, 1); - qcom_write_reg_dma(snandc, &snandc->regs->addr0, NAND_ADDR0, 2, 0); qcom_write_reg_dma(snandc, &snandc->regs->cfg0, NAND_DEV0_CFG0, 3, 0); qcom_write_reg_dma(snandc, &snandc->regs->erased_cw_detect_cfg_clr, --- base-commit: cb5c2eb459f4c98d584eaf3d3ea7c3612385d081 change-id: 20251128-qpic-snand-superfluous-readloc-c7c245a20a46 Best regards, --=20 Gabor Juhos