mbox series

[v2,0/6] mtd: rawnand: atmel: Convert the driver to exec_op()

Message ID 20200429132046.583658-1-boris.brezillon@collabora.com
Headers show
Series mtd: rawnand: atmel: Convert the driver to exec_op() | expand

Message

Boris Brezillon April 29, 2020, 1:20 p.m. UTC
Hello,

This v2 splits changes to make the diff more readable and fixes a bug
reported by Tudor (thanks for testing/helping me debug the issue BTW).
Note that the patch propagating the CS information to sub operations
has been dropped since the new version no longer depends on it, but
will be posted as part of another series where it's needed (the
cafe_nand conversion).

Regards,

Boris

Boris Brezillon (6):
  mtd: rawnand: atmel: Enable the NFC controller at probe time
  mtd: rawnand: atmel: Drop redundant nand_read_page_op()
  mtd: rawnand: atmel: Use nand_{write,read}_data_op()
  mtd: rawnand: atmel: Use nand_prog_page_end_op()
  mtd: rawnand: atmel: Convert the driver to exec_op()
  mtd: rawnand: atmel: Get rid of the legacy interface implementation

 drivers/mtd/nand/raw/atmel/nand-controller.c | 464 +++++++++++--------
 1 file changed, 258 insertions(+), 206 deletions(-)

Comments

Tudor Ambarus May 12, 2020, 8:20 a.m. UTC | #1
Hi, Boris,

On Wednesday, April 29, 2020 4:20:40 PM EEST Boris Brezillon wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
> 
> Hello,
> 
> This v2 splits changes to make the diff more readable and fixes a bug
> reported by Tudor (thanks for testing/helping me debug the issue BTW).
> Note that the patch propagating the CS information to sub operations
> has been dropped since the new version no longer depends on it, but
> will be posted as part of another series where it's needed (the
> cafe_nand conversion).
> 
> Regards,
> 
> Boris
> 
> Boris Brezillon (6):
>   mtd: rawnand: atmel: Enable the NFC controller at probe time
>   mtd: rawnand: atmel: Drop redundant nand_read_page_op()
>   mtd: rawnand: atmel: Use nand_{write,read}_data_op()
>   mtd: rawnand: atmel: Use nand_prog_page_end_op()
>   mtd: rawnand: atmel: Convert the driver to exec_op()
>   mtd: rawnand: atmel: Get rid of the legacy interface implementation
> 
>  drivers/mtd/nand/raw/atmel/nand-controller.c | 464 +++++++++++--------
>  1 file changed, 258 insertions(+), 206 deletions(-)
> 
> --

I got a -ETIMEOUT when trying to write to the NAND flash on sam9x60eK
# nandwrite /dev/mtd11 1M
Writing data to block 0 at offset 0x0
libmtd: error!: cannot write 4096 bytes to mtd11 (eraseblock 0, offset 176128)
        error 110 (Connection timed out)
nandwrite: error!: /dev/mtd11: MTD write failure
           error 110 (Connection timed out)
nandwrite: error!: Data was only partially written due to error
           error 110 (Connection timed out)

On sama5d4_xplained I did the following tests:
1/ check erase, write, read: OK
flash_erase /dev/mtd5 0 4
dd if=/dev/urandom of=1M bs=1M count=1
nandwrite /dev/mtd5 1M
mtd_debug read /dev/mtd5 0 1048576 read
sha1sum read 1M

2/ mtd_speedtest: sama5d4_xplained: 10% write speed drop
before:
mtd_speedtest: eraseblock write speed is 6468 KiB/s
mtd_speedtest: testing eraseblock read speed
mtd_speedtest: eraseblock read speed is 10330 KiB/s

after:
mtd_speedtest: eraseblock write speed is 5728 KiB/s
mtd_speedtest: testing eraseblock read speed
mtd_speedtest: eraseblock read speed is 10261 KiB/s

3/ rootfs on NAND. I could read/write reliably from the flash. Rebooted the 
platform and checked that no corruptions happened after write accesses.

Cheers,
ta