On Fri, Jun 18, 2010 at 06:08, <[email protected]> wrote: > Log Message > > [#5975] make sure id must exist for standard JEDEC flash > > For non-JEDEC, we have no way to make sure whether flash exist or not by > detection > > Modified: trunk/drivers/mtd/devices/m25p80.c (8927 => 8928) > > jid = jedec_probe(spi); > if (!jid) { > - dev_info(&spi->dev, "non-JEDEC variant of %s\n", > - id->name); > + if (data->jedec) { > + dev_err(&spi->dev, "fail to detect%s\n", > + id->name); > + return -ENODEV; > + } else > + dev_info(&spi->dev, "non-JEDEC variant of %s\n", > + id->name); > } else if (jid != id) { > > Modified: trunk/include/linux/spi/flash.h (8927 => 8928) > > + /* > + * 1: standard JEDEC, id need be matched while detecting > + * 0: non-JEDEC, id will be 0. in this case, we can't find > + * make sure whether the flash exists or not by detecting > + */ > + int jedec; > /* we'll likely add more ... use JEDEC IDs, etc */ > };
considering JEDEC compliant flashes are much more common and the non-JEDEC ones are dying out, i think it'd make more sense to invert this. the board resource flag should be "non_jedec" so that no standard flash user has to update their board code with ".jedec = 1". also, the comment above the new jedec field has broken grammar. probably want: In this case, we can't be sure whether the flash exists with runtime probing. -mike _______________________________________________ Linux-kernel-commits mailing list [email protected] https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits
