On 2/22/22 22:32, Dinh Nguyen wrote:
On 2/22/22 12:30, Marek Vasut wrote:
On 2/22/22 16:49, Dinh Nguyen wrote:
On 2/21/22 11:05, Marek Vasut wrote:
On 2/21/22 17:38, Dinh Nguyen wrote:
On 2/20/22 22:32, Marek Vasut wrote:
On SoCFPGA Gen5, DAC memcpy_fromio() in cqspi_direct_read_execute()
leads to data abort, disable DAC to avoid triggering it:
Unhandled fault: imprecise external abort (0x1406) at 0x0400d3e9
[0400d3e9] *pgd=00000000
Signed-off-by: Marek Vasut <marex@xxxxxxx>
Cc: Dinh Nguyen <dinguyen@xxxxxxxxxx>
Cc: Pratyush Yadav <p.yadav@xxxxxx>
---
drivers/spi/spi-cadence-quadspi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-cadence-quadspi.c
b/drivers/spi/spi-cadence-quadspi.c
index b808c94641fa6..65f2c2449be09 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -1870,7 +1870,7 @@ static const struct cqspi_driver_platdata
intel_lgm_qspi = {
};
static const struct cqspi_driver_platdata socfpga_qspi = {
- .quirks = CQSPI_NO_SUPPORT_WR_COMPLETION,
+ .quirks = CQSPI_DISABLE_DAC_MODE |
CQSPI_NO_SUPPORT_WR_COMPLETION,
};
static const struct cqspi_driver_platdata versal_ospi = {
Acked-by: Dinh Nguyen <dinguyen@xxxxxxxxxx>
Is this DAC really not working on socfpga gen5 or is there some
other issue ?
I don't know the answer to this question. What is the DAC in the QSPI
module and how do I go about testing it?
DAC = direct access.
How do you go about testing this -- compile kernel with/without this
patch, boot on SoCFPGA Gen5 with QSPI NOR attached, the kernel crashes
without this patch on imprecise external abort.
Hmm...I just tested v5.17-rc3 on a C5 board and QSPI looks to be working
fine:
[ 1.744489] spi-nor spi1.0: found n25q512ax3, expected mt25qu02g
[ 1.750534] dma-pl330 ffe01000.pdma: Reset Channel-0 CS-f FTC-40000
[ 1.756941] spi-nor spi1.0: n25q512ax3 (65536 Kbytes)
[ 1.762369] 2 fixed-partitions partitions found on MTD device
ff705000.spi.0
[ 1.769425] Creating 2 MTD partitions on "ff705000.spi.0":
[ 1.774925] 0x000000000000-0x000000800000 : "Flash 0 Raw Data"
[ 1.781942] 0x000000800000-0x000008000000 : "Flash 0 jffs2 Filesystem"
[ 1.788468] mtd: partition "Flash 0 jffs2 Filesystem" extends beyond
the end of device "ff705000.spi.0" -- size truncated to 0x3800000
I wonder if we might be missing some clock enable somewhere.
Can you mail me the whole boot log ? (I'm using u-boot 2022.01 btw.)