Skip to content
Snippets Groups Projects
Commit 79b4c08f authored by Haikun Wang's avatar Haikun Wang Committed by Jagan Teki
Browse files

dm: sf: Add Atmel DataFlash spi flash driver


Atmel DataFlash chips have commands different from common spi
flash commands.
Atmel DataFlash also have special page-size.
This driver add support for accessing Atmel DataFlash.
It is based on the Driver Model.
Example:
=> sf probe 1:0
SPI DataFlash: Detected AT45DB021B with page size 264 Bytes, erase size 264 Bytes, total 264 KiB, revision d
=> sf erase 0 42000
SF: 270336 bytes @ 0x0 Erased: OK
=> mw.l 82000000 45444342 20000
=> sf write 82000000 0 42000
SF: 270336 bytes @ 0x0 Written: OK
=> sf read 83000000 0 42000
SF: 270336 bytes @ 0x0 Read: OK
=> cmp.b 82000000 83000000 42000
Total of 270336 byte(s) were the same

Signed-off-by: default avatarHaikun Wang <haikun.wang@freescale.com>
Tested-by: default avatarHaikun Wang <haikun.wang@freescale.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
Reviewed-by: default avatarChakra Divi <cdivi@openedev.com>
Reviewed-by: default avatarJagan Teki <jteki@openedev.com>
parent 7853d76b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment