* [U-Boot] [PATCH v7 77/77] x86: Drop using spi_flash_dm_ops
@ 2016-02-17 8:27 Jagan Teki
2016-02-17 9:07 ` Bin Meng
0 siblings, 1 reply; 3+ messages in thread
From: Jagan Teki @ 2016-02-17 8:27 UTC (permalink / raw)
To: u-boot
spi_flash_erase_dm
spi_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.
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
---
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(-)
diff --git a/arch/x86/lib/mrccache.c b/arch/x86/lib/mrccache.c
index 8c08c14..dca3d84 100644
--- a/arch/x86/lib/mrccache.c
+++ b/arch/x86/lib/mrccache.c
@@ -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;
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH v7 77/77] x86: Drop using spi_flash_dm_ops
2016-02-17 8:27 [U-Boot] [PATCH v7 77/77] x86: Drop using spi_flash_dm_ops Jagan Teki
@ 2016-02-17 9:07 ` Bin Meng
2016-02-17 9:09 ` Jagan Teki
0 siblings, 1 reply; 3+ messages in thread
From: Bin Meng @ 2016-02-17 9:07 UTC (permalink / raw)
To: u-boot
Hi Jagan,
On Wed, Feb 17, 2016 at 4:27 PM, Jagan Teki <jteki@openedev.com> wrote:
> spi_flash_erase_dm
> spi_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.
>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Bin Meng <bmeng.cn@gmail.com>
> Signed-off-by: Jagan Teki <jteki@openedev.com>
> ---
> Changes for v7:
> - newly added patch
>
> 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.
>
> arch/x86/lib/mrccache.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/lib/mrccache.c b/arch/x86/lib/mrccache.c
> index 8c08c14..dca3d84 100644
> --- a/arch/x86/lib/mrccache.c
> +++ b/arch/x86/lib/mrccache.c
> @@ -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;
> --
I confirm this fixed the build error.
Regards,
Bin
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH v7 77/77] x86: Drop using spi_flash_dm_ops
2016-02-17 9:07 ` Bin Meng
@ 2016-02-17 9:09 ` Jagan Teki
0 siblings, 0 replies; 3+ messages in thread
From: Jagan Teki @ 2016-02-17 9:09 UTC (permalink / raw)
To: u-boot
Hi Bin,
On Wednesday 17 February 2016 02:37 PM, Bin Meng wrote:
> Hi Jagan,
>
> On Wed, Feb 17, 2016 at 4:27 PM, Jagan Teki <jteki@openedev.com> wrote:
>> spi_flash_erase_dm
>> spi_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.
>>
>> Cc: Simon Glass <sjg@chromium.org>
>> Cc: Bin Meng <bmeng.cn@gmail.com>
>> Signed-off-by: Jagan Teki <jteki@openedev.com>
>> ---
>> Changes for v7:
>> - newly added patch
>>
>> 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!
--
Jagan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-17 9:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-17 8:27 [U-Boot] [PATCH v7 77/77] x86: Drop using spi_flash_dm_ops Jagan Teki
2016-02-17 9:07 ` Bin Meng
2016-02-17 9:09 ` Jagan Teki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox