On Tue, 2013-06-25 at 20:10 +0100, Martin Michlmayr wrote:
> * Mike Miller <mtmil...@ieee.org> [2013-06-25 12:54]:
> > The relevant line from the installer syslog
> >   Jun 25 15:35:14 kernel: [    8.570234] m25p80 spi0.0: unrecognized JEDEC 
> > id 20ba18
> 
> This ID was added in:
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/mtd/devices/m25p80.c?id=98a9e2450667e497246449f96eab06eb3fb4d24b
> 
> which depends on:
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/mtd/devices/m25p80.c?id=3105875f6b8902628caee2fd7821af43707c6bde
> and
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/mtd/devices/m25p80.c?id=8da28681eb1430fb6715c7aef67001acfbbbcba5
> 
> The other problem is that arch/arm/mach-kirkwood/tsx1x-common.c
> contains:
> 
> static const struct flash_platform_data qnap_tsx1x_flash = {
>         .type           = "m25p128",
>         .name           = "spi_flash",
>         .parts          = qnap_tsx1x_partitions,
>         .nr_parts       = ARRAY_SIZE(qnap_tsx1x_partitions),
> };
> 
> I'm not sure if .type is optional or if we have to create another
> flash_platform_data structure and initialize both (and then one will
> fail).  Ben, do you know what the best solution would be for this?

My reading of the m25p_probe() function is that if the named chip has a
JEDEC ID, and the chip it finds has a different JEDEC ID that's also in
the device ID table, it will then automatically adapt (but will warn).

So long as the same partition map is used for the two chips, I think the
platform code should just probe once as now, though the warning is
annoying.  It seems like there ought to be a way to tell m25p80 to
auto-detect and warn only if the size doesn't match the partition map.

Ben.

-- 
Ben Hutchings
Knowledge is power.  France is bacon.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to