hw/dma: sifive_pdma: support high 32-bit access of 64-bit register
Real PDMA supports high 32-bit read/write memory access of 64-bit
register.
The following result is PDMA tested in U-Boot on Unmatched board:
1. Real PDMA allows high 32-bit read/write to 64-bit register.
=> mw.l 0x3000000 0x0 <= Disclaim channel 0
=> mw.l 0x3000000 0x1 <= Claim channel 0
=> mw.l 0x3000010 0x80000000 <= Write low 32-bit NextDest (NextDest = 0x280000000)
=> mw.l 0x3000014 0x2 <= Write high 32-bit NextDest
=> md.l 0x3000010 1 <= Dump low 32-bit NextDest
03000010:
80000000
=> md.l 0x3000014 1 <= Dump high 32-bit NextDest
03000014:
00000002
=> mw.l 0x3000018 0x80001000 <= Write low 32-bit NextSrc (NextSrc = 0x280001000)
=> mw.l 0x300001c 0x2 <= Write high 32-bit NextSrc
=> md.l 0x3000018 1 <= Dump low 32-bit NextSrc
03000010:
80001000
=> md.l 0x300001c 1 <= Dump high 32-bit NextSrc
03000014:
00000002
2. PDMA transfer from 0x280001000 to 0x280000000 is OK.
=> mw.q 0x3000008 0x4 <= NextBytes = 4
=> mw.l 0x3000004 0x22000000 <= wsize = rsize = 2 (2^2 = 4 bytes)
=> mw.l 0x280000000 0x87654321 <= Fill test data to dst
=> mw.l 0x280001000 0x12345678 <= Fill test data to src
=> md.l 0x280000000 1; md.l 0x280001000 1 <= Dump src/dst memory contents
280000000:
87654321 !Ce.
280001000:
12345678 xV4.
=> md.l 0x3000000 8 <= Dump PDMA status
03000000:
00000001 22000000 00000004 00000000 ......."........
03000010:
80000000 00000002 80001000 00000002 ................
=> mw.l 0x3000000 0x3 <= Set channel 0 run and claim bits
=> md.l 0x3000000 8 <= Dump PDMA status
03000000:
40000001 22000000 00000004 00000000 ...@..."........
03000010:
80000000 00000002 80001000 00000002 ................
=> md.l 0x280000000 1; md.l 0x280001000 1 <= Dump src/dst memory contents
280000000:
12345678 xV4.
280001000:
12345678 xV4.
Signed-off-by: Jim Shu <jim.shu@sifive.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Message-id:
20220104063408.658169-2-jim.shu@sifive.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>