mtd: devices: elm: configure parallel channels based on ecc_steps
authorPekon Gupta <pekon@ti.com>
Thu, 20 Mar 2014 13:18:36 +0000 (18:48 +0530)
committerBrian Norris <computersforpeace@gmail.com>
Wed, 26 Mar 2014 06:09:02 +0000 (23:09 -0700)
commit79f013518d435e238e6bddd0073de631bbefb556
tree725d64591ed30edb913828c6b92511eecc1e087d
parentea0760244d235688b5fae4e5cdd9412c1fb1c2fe
mtd: devices: elm: configure parallel channels based on ecc_steps

ELM hardware can process up to maximum of 8 hannels in parallel for
ECC error detection. Currently the number of channels getting configured for
processing is static determined by macro ERROR_VECTOR_MAX. However, the actual
number of channels that need to be processed is the ECC step number.
This patch just avoids configuring extra unused channels.

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