Commit 376fbf20 authored by Robert Jarzmik's avatar Robert Jarzmik Committed by David Woodhouse

mtd: docg3: add registers for erasing and writing

Add the required registers and commands to erase and write
flash pages / blocks.
Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Reviewed-by: default avatarIvan Djelic <ivan.djelic@parrot.com>
Reviewed-by: default avatarMike Dunn <mikedunn@newsguy.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 732b63bd
...@@ -130,6 +130,8 @@ ...@@ -130,6 +130,8 @@
#define DOC_SEQ_SET_PLANE1 0x0e #define DOC_SEQ_SET_PLANE1 0x0e
#define DOC_SEQ_SET_PLANE2 0x10 #define DOC_SEQ_SET_PLANE2 0x10
#define DOC_SEQ_PAGE_SETUP 0x1d #define DOC_SEQ_PAGE_SETUP 0x1d
#define DOC_SEQ_ERASE 0x27
#define DOC_SEQ_PLANES_STATUS 0x31
/* /*
* Flash commands * Flash commands
...@@ -144,7 +146,10 @@ ...@@ -144,7 +146,10 @@
#define DOC_CMD_PROG_BLOCK_ADDR 0x60 #define DOC_CMD_PROG_BLOCK_ADDR 0x60
#define DOC_CMD_PROG_CYCLE1 0x80 #define DOC_CMD_PROG_CYCLE1 0x80
#define DOC_CMD_PROG_CYCLE2 0x10 #define DOC_CMD_PROG_CYCLE2 0x10
#define DOC_CMD_PROG_CYCLE3 0x11
#define DOC_CMD_ERASECYCLE2 0xd0 #define DOC_CMD_ERASECYCLE2 0xd0
#define DOC_CMD_READ_STATUS 0x70
#define DOC_CMD_PLANES_STATUS 0x71
#define DOC_CMD_RELIABLE_MODE 0x22 #define DOC_CMD_RELIABLE_MODE 0x22
#define DOC_CMD_FAST_MODE 0xa2 #define DOC_CMD_FAST_MODE 0xa2
...@@ -186,7 +191,7 @@ ...@@ -186,7 +191,7 @@
*/ */
#define DOC_ECCCONF1_BCH_SYNDROM_ERR 0x80 #define DOC_ECCCONF1_BCH_SYNDROM_ERR 0x80
#define DOC_ECCCONF1_UNKOWN1 0x40 #define DOC_ECCCONF1_UNKOWN1 0x40
#define DOC_ECCCONF1_UNKOWN2 0x20 #define DOC_ECCCONF1_PAGE_IS_WRITTEN 0x20
#define DOC_ECCCONF1_UNKOWN3 0x10 #define DOC_ECCCONF1_UNKOWN3 0x10
#define DOC_ECCCONF1_HAMMING_BITS_MASK 0x0f #define DOC_ECCCONF1_HAMMING_BITS_MASK 0x0f
...@@ -224,6 +229,13 @@ ...@@ -224,6 +229,13 @@
#define DOC_READADDR_ONE_BYTE 0x4000 #define DOC_READADDR_ONE_BYTE 0x4000
#define DOC_READADDR_ADDR_MASK 0x1fff #define DOC_READADDR_ADDR_MASK 0x1fff
/*
* Status of erase and write operation
*/
#define DOC_PLANES_STATUS_FAIL 0x01
#define DOC_PLANES_STATUS_PLANE0_KO 0x02
#define DOC_PLANES_STATUS_PLANE1_KO 0x04
/** /**
* struct docg3 - DiskOnChip driver private data * struct docg3 - DiskOnChip driver private data
* @dev: the device currently under control * @dev: the device currently under control
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment