mtd: m25p80: Rework probing/JEDEC code
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Mon, 12 Oct 2009 16:24:38 +0000 (20:24 +0400)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 30 Nov 2009 11:26:15 +0000 (11:26 +0000)
commit18c6182bae0acca220ed6611f741034d563cd19f
treec2d2f380c3a603ba13a5c6891aaf8324af524435
parentb34bc037b26e621e5fc13466767e4da110a7b3d3
mtd: m25p80: Rework probing/JEDEC code

Previosly the driver always tried JEDEC probing, assuming that non-JEDEC
chips will return '0'. But truly non-JEDEC chips (like CAT25) won't do
that, their behaviour on RDID command is undefined, so the driver should
not call jedec_probe() for these chips.

Also, be less strict on error conditions, don't fail to probe if JEDEC
found a chip that is different from what platform code told, instead
just print some warnings and use an information obtained via JEDEC. In
that case we should not trust partitions any longer, but they might be
still useful (i.e. they could protect some parts of the chip).

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/devices/m25p80.c