diff mbox

[U-Boot] bugfix: unlock current sector instead of sector 0 before, buffered write

Message ID 570A3B25.6030409@behr-iss.de
State Awaiting Upstream
Delegated to: Stefan Roese
Headers show

Commit Message

Rouven Behr April 10, 2016, 11:38 a.m. UTC

Comments

Stefan Roese April 13, 2016, 11:53 a.m. UTC | #1
Hi Rouven,

On 10.04.2016 13:38, Rouven Behr wrote:
>

Applied to u-boot-cfi-flash.

Please don't send patches attached next time. I'm fixing
this in this patch, but please use 'git send-email' (or
something similar) next time. And also, please always add
a small text to the commit text itself (additional to the
patch subject) next time.

Thanks,
Stefan
diff mbox

Patch

From deafe926491ca94c846c9e03249336d928e362ab Mon Sep 17 00:00:00 2001
From: Rouven Behr <u-boot@behr-iss.de>
Date: Sun, 10 Apr 2016 13:03:20 +0200
Subject: [PATCH] bugfix: unlock current sector instead of sector 0 before
 buffered write

Signed-off-by: Rouven Behr <u-boot@behr-iss.de>
---
 drivers/mtd/cfi_flash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 18831c6..8ccaff0 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -979,7 +979,7 @@  static int flash_write_cfibuffer (flash_info_t * info, ulong dest, uchar * cp,
 
 	case CFI_CMDSET_AMD_STANDARD:
 	case CFI_CMDSET_AMD_EXTENDED:
-		flash_unlock_seq(info,0);
+		flash_unlock_seq(info, sector);
 
 #ifdef CONFIG_FLASH_SPANSION_S29WS_N
 		offset = ((unsigned long)dst - info->start[sector]) >> shift;
-- 
1.9.1