mtd: spi-nor: add the basic data structures
authorHuang Shijie <b32955@freescale.com>
Mon, 24 Feb 2014 10:37:36 +0000 (18:37 +0800)
committerBrian Norris <computersforpeace@gmail.com>
Mon, 14 Apr 2014 18:22:58 +0000 (11:22 -0700)
commit6e602ef73334550bbbb8be1041a3ce6eecbd42f1
treeed7bdda5b4f68113ca57a996dcec304332426aca
parentf39d2fa0122e6abd8505a3598f3aa535d0d5aade
mtd: spi-nor: add the basic data structures

The spi_nor{} is cloned from the m25p{}.
The spi_nor{} can be used by both the m25p80 and spi-nor controller.

We also add the spi_nor_xfer_cfg{} which can be used by the two
fundamental primitives: read_xfer/write_xfer.

 1) the hooks for spi_nor{}:
    @prepare/unpreare: used to do some work before or after the
             read/write/erase/lock/unlock.
    @read_xfer/write_xfer: We can use these two hooks to code all
             the following hooks if the driver tries to implement them
             by itself.
    @read_reg: used to read the registers, such as read status register,
             read configure register.
    @write_reg: used to write the registers, such as write enable,
             erase sector.
    @read_id: read out the ID info.
    @wait_till_ready: wait till the NOR becomes ready.
    @read: read out the data from the NOR.
    @write: write data to the NOR.
    @erase: erase a sector of the NOR.

 2) Add a new field sst_write_second for the SST NOR write.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
include/linux/mtd/spi-nor.h