]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mtd: rawnand: qcom: Pass 18 bit offset from NANDc base to BAM base
authorMd Sadre Alam <quic_mdalam@quicinc.com>
Thu, 10 Apr 2025 10:00:17 +0000 (15:30 +0530)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 29 Apr 2025 09:05:35 +0000 (11:05 +0200)
commitee000969f28bf579d3772bf7c0ae8aff86586e20
tree20d3f4afc37d055fa76f2627bb73e8ba9dced06e
parent2cf4bc06f7008fe3eab4b27d7c0ba9ba08f5dc5d
mtd: rawnand: qcom: Pass 18 bit offset from NANDc base to BAM base

The BAM command descriptor provides only 18 bits to specify the BAM
register offset. Additionally, in the BAM command descriptor, the BAM
register offset is supposed to be specified as "(NANDc base - BAM base)
+ reg_off". Since, the BAM controller expecting the value in the form of
"NANDc base - BAM base", so that added a new field 'bam_offset' in the NAND
properties structure and use it while preparing the command descriptor.

Previously, the driver was specifying the NANDc base address in the BAM
command descriptor.

Cc: stable@vger.kernel.org
Fixes: 8d6b6d7e135e ("mtd: nand: qcom: support for command descriptor formation")
Tested-by: Lakshmi Sowjanya D <quic_laksd@quicinc.com>
Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
Acked-by: Mark Brown <broonie@kernel.org>
Tested-by: Gabor Juhos <j4g8y7@gmail.com> # on IPQ9574
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/qpic_common.c
drivers/mtd/nand/raw/qcom_nandc.c
drivers/spi/spi-qpic-snand.c
include/linux/mtd/nand-qpic-common.h