x86: Drop using spi_flash_dm_ops
PATCH v7 77/77 x86: Drop using spi_flash_dm_ops
spi_flash_erase_dmspi_flash_write_dm
These spi_flash_dm_ops never no longer available on new spi-nor changes, so use spi_flash_erase/write ops with mtd uclass changes.
---
Changes for v7:
- newly added patch
This patch is on top of spi-nor core changes, will send this again with the series.
arch/x86/lib/mrccache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/lib/mrccache.c +3 -3
@@ -109,6 +109,7 @@ static struct mrc_data_container *find_next_mrc_cache(struct mrc_region *entry,int mrccache_update (struct udevice *sf,struct mrc_region *entry,struct mrc_data_container *cur) { +struct mtd_info *mtd =dev_get_uclass_priv (sf);struct mrc_data_container *cache;ulong offset;ulong base_addr;
@@ -139,7 +140,7 @@ int mrccache_update(struct udevice *sf, struct mrc_region *entry,debug ("Erasing the MRC cache region of %x bytes at %x\n" , entry->length, entry->offset); - ret =spi_flash_erase_dm (sf, entry->offset, entry->length); + ret =spi_flash_erase (mtd, entry->offset, entry->length);if (ret) {debug ("Failed to erase flash region\n" );return ret;
@@ -150,8 +151,7 @@ int mrccache_update(struct udevice *sf, struct mrc_region *entry,/* Write the data out */ offset = (ulong )cache - base_addr + entry->offset;debug ("Write MRC cache update to flash at %lx\n" , offset); - ret =spi_flash_write_dm (sf, offset, cur->data_size +sizeof (*cur), - cur); + ret =spi_flash_write (mtd, offset, cur->data_size +sizeof (*cur), cur);if (ret) {debug ("Failed to write to SPI flash\n" );return ret;
Signature · 1 line
1.9.1
PATCH v7 77/77 x86: Drop using spi_flash_dm_ops
Hi Jagan,
Quoted 10 lines · Jagan Teki
spi_flash_erase_dmspi_flash_write_dmThese
spi_flash_dm_opsnever no longer available on new spi-nor changes, so use spi_flash_erase/write ops with mtd uclass changes.Cc Simon Glass <[email protected]>Cc Bin Meng <[email protected]>Signed-off-by Jagan Teki <[email protected]>
Quoted 6 lines
---
Changes for v7:
- newly added patchThis patch is on top of spi-nor core changes, will send this again with the series.
Yes, you need squash this patch somewhere in the middle of your whole series, otherwise buildman will complain.
Quoted 26 lines
arch/x86/lib/mrccache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)arch/x86/lib/mrccache.c +2
-1@@ -109,6 +109,7 @@ static struct mrc_data_container *find_next_mrc_cache(struct mrc_region *entry,int mrccache_update (struct udevice *sf,struct mrc_region *entry,struct mrc_data_container *cur) { +struct mtd_info *mtd =dev_get_uclass_priv (sf);struct mrc_data_container *cache;ulong offset;ulong base_addr;@@ -139,7 +140,7 @@ int mrccache_update(struct udevice *sf, struct mrc_region *entry,debug ("Erasing the MRC cache region of %x bytes at %x\n" , entry->length, entry->offset); - ret =spi_flash_erase_dm (sf, entry->offset, entry->length); + ret =spi_flash_erase (mtd, entry->offset, entry->length);if (ret) {debug ("Failed to erase flash region\n" );return ret;
arch/x86/lib/mrccache.c int mrccache_update(struct udevice *sf, struct mrc_region *entry,
Quoted 10 lines
arch/x86/lib/mrccache.c +1
-3@@ -150,8 +151,7 @@ int mrccache_update(struct udevice *sf, struct mrc_region *entry,/* Write the data out */ offset = (ulong )cache - base_addr + entry->offset;debug ("Write MRC cache update to flash at %lx\n" , offset); - ret =spi_flash_write_dm (sf, offset, cur->data_size +sizeof (*cur), - cur); + ret =spi_flash_write (mtd, offset, cur->data_size +sizeof (*cur), cur);if (ret) {debug ("Failed to write to SPI flash\n" );return ret; --
I confirm this fixed the build error.
Regards,
Bin
PATCH v7 77/77 x86: Drop using spi_flash_dm_ops
Hi Bin,
Quoted 17 lines · Bin Meng
Hi Jagan,
Quoted 14 lines · Jagan Teki
spi_flash_erase_dmspi_flash_write_dmThese
spi_flash_dm_opsnever no longer available on new spi-nor changes, so use spi_flash_erase/write ops with mtd uclass changes.Cc Simon Glass <[email protected]>Cc Bin Meng <[email protected]>Signed-off-by Jagan Teki <[email protected]>---
Changes for v7:
- newly added patch
Quoted 5 lines
Quoted 2 lines
This patch is on top of spi-nor core changes, will send this again with the series.
Yes, you need squash this patch somewhere in the middle of your whole series, otherwise buildman will complain.
Sure I will do that and send the patch.
thanks!
Signature · 1 line
Jagan