aboutsummaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8173/flash_controller.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/mediatek/mt8173/flash_controller.c')
-rw-r--r--src/soc/mediatek/mt8173/flash_controller.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/soc/mediatek/mt8173/flash_controller.c b/src/soc/mediatek/mt8173/flash_controller.c
index ee950b8f81..f4c0de47d8 100644
--- a/src/soc/mediatek/mt8173/flash_controller.c
+++ b/src/soc/mediatek/mt8173/flash_controller.c
@@ -228,14 +228,8 @@ static int nor_erase(const struct spi_flash *flash, u32 offset, size_t len)
return 0;
}
-int spi_flash_programmer_probe(const struct spi_slave *spi,
- int force, struct spi_flash *flash)
+int mtk_spi_flash_probe(const struct spi_slave *spi, struct spi_flash *flash)
{
- static int done;
-
- if (done)
- return 0;
-
write32(&mt8173_nor->wrprot, SFLASH_COMMAND_ENABLE);
memcpy(&flash->spi, spi, sizeof(*spi));
flash->name = "mt8173 flash controller";
@@ -246,6 +240,6 @@ int spi_flash_programmer_probe(const struct spi_slave *spi,
flash->sector_size = 0x1000;
flash->erase_cmd = SECTOR_ERASE_CMD;
flash->size = CONFIG_ROM_SIZE;
- done = 1;
+
return 0;
}