mtd: devices: elm: check for hardware engine's design constraints
authorPekon Gupta <pekon@ti.com>
Thu, 20 Mar 2014 13:18:34 +0000 (18:48 +0530)
committerBrian Norris <computersforpeace@gmail.com>
Wed, 26 Mar 2014 06:08:52 +0000 (23:08 -0700)
commit3f4eb14bdbe148fcc3a8e02f506ccc9b8c955ad4
treeeff0b8120b1a9d7c21cb97bbde936fa3e829228d
parentd9ba46d32c0edc5207fec424230dfa786a24a117
mtd: devices: elm: check for hardware engine's design constraints

ELM hardware engine is used by BCH ecc-schemes for detecting and locating ECC
errors. This patch adds the following checks for ELM hardware engine:

 - ELM internal buffers are of 1K,
   so it cannot process data with ecc-step-size > 1K.

 - ELM engine can execute upto maximum of 8 threads in parallel,
   so in *page-mode* (when complete page is processed in single iteration),
   ELM cannot support ecc-steps > 8.

Signed-off-by: Pekon Gupta <pekon@ti.com>
Reviewed-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/devices/elm.c
drivers/mtd/nand/omap2.c
include/linux/platform_data/elm.h