1 --- a/drivers/mtd/spi-nor/bcm53xxspiflash.c
2 +++ b/drivers/mtd/spi-nor/bcm53xxspiflash.c
3 @@ -173,7 +173,8 @@ static const struct spi_device_id *bcm53
5 /* TODO: Try more ID commands */
7 - return ERR_PTR(-ENODEV);
8 + /* Some chips used by Broadcom may actually support JEDEC */
9 + return spi_nor_read_id(nor);
12 id = spi_nor_match_id(name);
13 --- a/drivers/mtd/spi-nor/spi-nor.c
14 +++ b/drivers/mtd/spi-nor/spi-nor.c
15 @@ -630,7 +630,7 @@ const struct spi_device_id spi_nor_ids[]
17 EXPORT_SYMBOL_GPL(spi_nor_ids);
19 -static const struct spi_device_id *spi_nor_read_id(struct spi_nor *nor)
20 +const struct spi_device_id *spi_nor_read_id(struct spi_nor *nor)
24 @@ -661,6 +661,7 @@ static const struct spi_device_id *spi_n
25 dev_err(nor->dev, "unrecognized JEDEC id %06x\n", jedec);
26 return ERR_PTR(-ENODEV);
28 +EXPORT_SYMBOL_GPL(spi_nor_read_id);
30 static int spi_nor_read(struct mtd_info *mtd, loff_t from, size_t len,
31 size_t *retlen, u_char *buf)
32 --- a/include/linux/mtd/spi-nor.h
33 +++ b/include/linux/mtd/spi-nor.h
34 @@ -188,6 +188,8 @@ struct spi_nor {
38 +const struct spi_device_id *spi_nor_read_id(struct spi_nor *nor);
41 * spi_nor_scan() - scan the SPI NOR
42 * @nor: the spi_nor structure