spi: Do not die() if flash chip is probed multiple times
It turns out that it's not uncommon for a SPI chip to be probed multiple times in different parts of the code during the execution of a stage. The original intent was just to make sure we aren't using the same chip driver for multiple instances of a chip, due to limitations in the driver's design. We'll have a better solution for that eventually, this just un-breaks things (and effectively reverts 5da9e0e). BUG=chrome-os-partner:34750 BRANCH=none TEST=none Signed-off-by: David Hendricks <dhendrix@chromium.org> Change-Id: Ie5c6e7f062a2f7c5361aebf5a4ab62a385739f65 Reviewed-on: https://chromium-review.googlesource.com/236673 Reviewed-by: Julius Werner <jwerner@chromium.org> (cherry picked from commit 0438927fa2469311b20e032377275100eee6e3a6) Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/237026
This commit is contained in:
parent
abee3edeb9
commit
7e89c10482
2 changed files with 0 additions and 6 deletions
|
|
@ -203,9 +203,6 @@ struct spi_flash *spi_flash_probe_gigadevice(struct spi_slave *spi, u8 *idcode)
|
|||
unsigned page_size;
|
||||
unsigned int i;
|
||||
|
||||
if (stm.params)
|
||||
die("Gigadevice driver already initialized.");
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(gigadevice_spi_flash_table); i++) {
|
||||
params = &gigadevice_spi_flash_table[i];
|
||||
if (params->id == ((idcode[1] << 8) | idcode[2]))
|
||||
|
|
|
|||
|
|
@ -192,9 +192,6 @@ struct spi_flash *spi_flash_probe_winbond(struct spi_slave *spi, u8 *idcode)
|
|||
unsigned page_size;
|
||||
unsigned int i;
|
||||
|
||||
if (stm.params)
|
||||
die("Winbond driver already initialized.");
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(winbond_spi_flash_table); i++) {
|
||||
params = &winbond_spi_flash_table[i];
|
||||
if (params->id == ((idcode[1] << 8) | idcode[2]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue