[u-boot] aspeed/flash: fix buffersize of MX6651235F flash chip

Message ID 20171127230108.11935-1-rlippert@google.com
State Accepted, archived
Headers show
Series
  • [u-boot] aspeed/flash: fix buffersize of MX6651235F flash chip
Related show

Commit Message

Robert Lippert Nov. 27, 2017, 11:01 p.m.
The MX66L51235F had a wrong write buffersize of 512 bytes set which
causes issues when trying to write an environment block >256 bytes
as the SPI chip only "listens" to the last 256 bytes.

Signed-off-by: Robert Lippert <rlippert@google.com>
---
 arch/arm/mach-aspeed/flash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Joel Stanley Feb. 13, 2018, 4 a.m. | #1
On Tue, Nov 28, 2017 at 9:31 AM, Robert Lippert <roblip@gmail.com> wrote:
> The MX66L51235F had a wrong write buffersize of 512 bytes set which
> causes issues when trying to write an environment block >256 bytes
> as the SPI chip only "listens" to the last 256 bytes.
>
> Signed-off-by: Robert Lippert <rlippert@google.com>

Thanks Rob. Sorry for letting this one hang around for so long.

Merged into v2016.07-aspeed-openbmc.

Cheers,

Joel

> ---
>  arch/arm/mach-aspeed/flash.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-aspeed/flash.c b/arch/arm/mach-aspeed/flash.c
> index e1e3cf8d7f..907e785d8c 100644
> --- a/arch/arm/mach-aspeed/flash.c
> +++ b/arch/arm/mach-aspeed/flash.c
> @@ -1009,7 +1009,7 @@ static ulong flash_get_size (ulong base, flash_info_t *info)
>                         info->readcmd = 0x0b;
>                         info->dualport = 0;
>                         info->dummybyte = 1;
> -                       info->buffersize = 512;
> +                       info->buffersize = 256;
>                         WriteClk = 50;
>                         EraseClk = 20;
>                         ReadClk  = 50;
> --
> 2.15.0.417.g466bffb3ac-goog
>

Patch

diff --git a/arch/arm/mach-aspeed/flash.c b/arch/arm/mach-aspeed/flash.c
index e1e3cf8d7f..907e785d8c 100644
--- a/arch/arm/mach-aspeed/flash.c
+++ b/arch/arm/mach-aspeed/flash.c
@@ -1009,7 +1009,7 @@  static ulong flash_get_size (ulong base, flash_info_t *info)
 			info->readcmd = 0x0b;
 			info->dualport = 0;
 			info->dummybyte = 1;
-			info->buffersize = 512;
+			info->buffersize = 256;
 			WriteClk = 50;
 			EraseClk = 20;
 			ReadClk  = 50;