]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
mtd: spi-nor: Changes for stacked and parallel
authorHarini Katakam <harini.katakam@xilinx.com>
Mon, 3 Nov 2014 16:31:38 +0000 (22:01 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 5 Nov 2014 08:41:53 +0000 (09:41 +0100)
commit63697f5cf9a6201556947ef0ea29442843e5ba61
tree3a679a2eb36df8155ca93aab752cd646330cf111
parentb1f6558fbb9d978bd7c1bc78e249ac894d6998d9
mtd: spi-nor: Changes for stacked and parallel

This patch adds support for dual parallel and stacked configurations.

The existing "is_dual" property and DUAL_STACK config options were used
to identify the hw configurations.
Added required parameters to spi_nor structure and initialized the same
in m25p80 probe or spi_nor_scan.
Added support for dual stacked and parallel in spi_nor_read/write/erase
functions by doing the following:
- Increase page_size, sector_size, erase_size and total flash size as
  applicable.
- Halve address when in parallel mode.
- When in stacked subtract lower flash address from offset when addressing
  upper chip. Update spi->master->flags so that qspi driver can change CS.

spansion_quad_enable/set_quad_mode are still left unused.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/mtd/devices/m25p80.c
drivers/mtd/spi-nor/spi-nor.c
include/linux/mtd/spi-nor.h