Frans Hendriks has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31710
Change subject: drivers/spi: Move M25Pxx commands to spi_winbond.h ......................................................................
drivers/spi: Move M25Pxx commands to spi_winbond.h
Move Wnbond M25PXX command values to spi_winbond.h Now the commands value can be used for programming SPI contoller of Intel Braswell, by using including file.
Update winbond.c file with coreboot header.
BUG=N/A TEST=Facebook FBG-1701 with flashrom
Change-Id: I9c17c4ed7004209bd3c619d47a7474b0b7e17495 Signed-off-by: Frans Hendriks fhendriks@eltan.com --- A src/drivers/spi/spi_winbond.h M src/drivers/spi/winbond.c 2 files changed, 49 insertions(+), 22 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/31710/1
diff --git a/src/drivers/spi/spi_winbond.h b/src/drivers/spi/spi_winbond.h new file mode 100644 index 0000000..e21571c --- /dev/null +++ b/src/drivers/spi/spi_winbond.h @@ -0,0 +1,37 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2008, Network Appliance Inc. + * Author: Jason McMullan <mcmullan <at> netapp.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* Winbond specific function */ +/* M25Pxx-specific commands */ +#define CMD_W25_WREN 0x06 /* Write Enable */ +#define CMD_W25_WRDI 0x04 /* Write Disable */ +#define CMD_W25_RDSR 0x05 /* Read Status Register */ +#define CMD_W25_WRSR 0x01 /* Write Status Register */ +#define CMD_W25_RDSR2 0x35 /* Read Status2 Register */ +#define CMD_W25_WRSR2 0x31 /* Write Status2 Register */ +#define CMD_W25_READ 0x03 /* Read Data Bytes */ +#define CMD_W25_FAST_READ 0x0b /* Read Data Bytes at Higher Speed */ +#define CMD_W25_PP 0x02 /* Page Program */ +#define CMD_W25_SE 0x20 /* Sector (4K) Erase */ +#define CMD_W25_RDID 0x9f /* Read ID */ +#define CMD_W25_BE 0xd8 /* Block (64K) Erase */ +#define CMD_W25_CE 0xc7 /* Chip Erase */ +#define CMD_W25_DP 0xb9 /* Deep Power-down */ +#define CMD_W25_RES 0xab /* Release from DP and Read Signature */ +#define CMD_VOLATILE_SREG_WREN 0x50 /* Write Enable for Volatile SREG */ + +/* tw: Maximum time to write a flash cell in milliseconds */ +#define WINBOND_FLASH_TIMEOUT 30 diff --git a/src/drivers/spi/winbond.c b/src/drivers/spi/winbond.c index 8bf8fcd..7276ec1 100644 --- a/src/drivers/spi/winbond.c +++ b/src/drivers/spi/winbond.c @@ -1,7 +1,16 @@ /* * Copyright 2008, Network Appliance Inc. - * Author: Jason McMullan <mcmullan <at> netapp.com> - * Licensed under the GPL-2 or later. + * Jason McMullan mcmullan@netapp.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */
#include <console/console.h> @@ -14,26 +23,7 @@ #include <lib.h>
#include "spi_flash_internal.h" - -/* M25Pxx-specific commands */ -#define CMD_W25_WREN 0x06 /* Write Enable */ -#define CMD_W25_WRDI 0x04 /* Write Disable */ -#define CMD_W25_RDSR 0x05 /* Read Status Register */ -#define CMD_W25_WRSR 0x01 /* Write Status Register */ -#define CMD_W25_RDSR2 0x35 /* Read Status2 Register */ -#define CMD_W25_WRSR2 0x31 /* Write Status2 Register */ -#define CMD_W25_READ 0x03 /* Read Data Bytes */ -#define CMD_W25_FAST_READ 0x0b /* Read Data Bytes at Higher Speed */ -#define CMD_W25_PP 0x02 /* Page Program */ -#define CMD_W25_SE 0x20 /* Sector (4K) Erase */ -#define CMD_W25_BE 0xd8 /* Block (64K) Erase */ -#define CMD_W25_CE 0xc7 /* Chip Erase */ -#define CMD_W25_DP 0xb9 /* Deep Power-down */ -#define CMD_W25_RES 0xab /* Release from DP, and Read Signature */ -#define CMD_VOLATILE_SREG_WREN 0x50 /* Write Enable for Volatile SREG */ - -/* tw: Maximum time to write a flash cell in milliseconds */ -#define WINBOND_FLASH_TIMEOUT 30 +#include "spi_winbond.h"
struct winbond_spi_flash_params { uint16_t id;
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31710 )
Change subject: drivers/spi: Move M25Pxx commands to spi_winbond.h ......................................................................
Patch Set 1:
(3 comments)
https://review.coreboot.org/#/c/31710/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/31710/1//COMMIT_MSG@9 PS1, Line 9: Just one space.
https://review.coreboot.org/#/c/31710/1//COMMIT_MSG@9 PS1, Line 9: Move Wnbond M25PXX command values to spi_winbond.h Dot/period at the end please.
https://review.coreboot.org/#/c/31710/1//COMMIT_MSG@11 PS1, Line 11: including include?
Hello build bot (Jenkins), Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31710
to look at the new patch set (#2).
Change subject: drivers/spi: Move M25Pxx commands to spi_winbond.h ......................................................................
drivers/spi: Move M25Pxx commands to spi_winbond.h
Move Winbond M25PXX command values to spi_winbond.h Now the commands value can be used for programming SPI contoller of Intel Braswell, by including spi_winbond.h
Update winbond.c file with coreboot header.
BUG=N/A TEST=Facebook FBG-1701 with flashrom
Change-Id: I9c17c4ed7004209bd3c619d47a7474b0b7e17495 Signed-off-by: Frans Hendriks fhendriks@eltan.com --- A src/drivers/spi/spi_winbond.h M src/drivers/spi/winbond.c 2 files changed, 49 insertions(+), 22 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/31710/2
Hello build bot (Jenkins), Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31710
to look at the new patch set (#3).
Change subject: drivers/spi: Move M25Pxx commands to spi_winbond.h ......................................................................
drivers/spi: Move M25Pxx commands to spi_winbond.h
Move Winbond M25PXX command values to spi_winbond.h file. Now the commands values can be used, using this spi_winbond.h as #include.
Update winbond.c file with coreboot header.
BUG=N/A TEST=Facebook FBG-1701 with flashrom
Change-Id: I9c17c4ed7004209bd3c619d47a7474b0b7e17495 Signed-off-by: Frans Hendriks fhendriks@eltan.com --- A src/drivers/spi/spi_winbond.h M src/drivers/spi/winbond.c 2 files changed, 49 insertions(+), 22 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/31710/3
Hello build bot (Jenkins), Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31710
to look at the new patch set (#4).
Change subject: drivers/spi: Move M25Pxx commands to spi_winbond.h ......................................................................
drivers/spi: Move M25Pxx commands to spi_winbond.h
Move Winbond M25PXX command values to spi_winbond.h file. Now the commands value can be used for programming SPI contoller of Intel Braswell, using this include file.
Update winbond.c file with coreboot header.
BUG=N/A TEST=Facebook FBG-1701 with flashrom
Change-Id: I9c17c4ed7004209bd3c619d47a7474b0b7e17495 Signed-off-by: Frans Hendriks fhendriks@eltan.com --- A src/drivers/spi/spi_winbond.h M src/drivers/spi/winbond.c 2 files changed, 49 insertions(+), 22 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/31710/4
Hello build bot (Jenkins), Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31710
to look at the new patch set (#5).
Change subject: drivers/spi: Move M25Pxx commands to spi_winbond.h ......................................................................
drivers/spi: Move M25Pxx commands to spi_winbond.h
Move Winbond M25PXX command values to spi_winbond.h file. The command values will be used for programming SPI contoller of Intel Braswell, using this include file.
Update winbond.c file with coreboot header.
BUG=N/A TEST=Facebook FBG-1701 with flashrom
Change-Id: I9c17c4ed7004209bd3c619d47a7474b0b7e17495 Signed-off-by: Frans Hendriks fhendriks@eltan.com --- A src/drivers/spi/spi_winbond.h M src/drivers/spi/winbond.c 2 files changed, 49 insertions(+), 22 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/31710/5
Frans Hendriks has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31710 )
Change subject: drivers/spi: Move M25Pxx commands to spi_winbond.h ......................................................................
Patch Set 5:
(3 comments)
Update the comment
https://review.coreboot.org/#/c/31710/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/31710/1//COMMIT_MSG@9 PS1, Line 9:
Just one space.
Done
https://review.coreboot.org/#/c/31710/1//COMMIT_MSG@9 PS1, Line 9: Move Wnbond M25PXX command values to spi_winbond.h
Dot/period at the end please.
Done
https://review.coreboot.org/#/c/31710/1//COMMIT_MSG@11 PS1, Line 11: including
include?
Done
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31710 )
Change subject: drivers/spi: Move M25Pxx commands to spi_winbond.h ......................................................................
Patch Set 5: Code-Review+2
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/31710 )
Change subject: drivers/spi: Move M25Pxx commands to spi_winbond.h ......................................................................
drivers/spi: Move M25Pxx commands to spi_winbond.h
Move Winbond M25PXX command values to spi_winbond.h file. The command values will be used for programming SPI contoller of Intel Braswell, using this include file.
Update winbond.c file with coreboot header.
BUG=N/A TEST=Facebook FBG-1701 with flashrom
Change-Id: I9c17c4ed7004209bd3c619d47a7474b0b7e17495 Signed-off-by: Frans Hendriks fhendriks@eltan.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/31710 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Patrick Georgi pgeorgi@google.com --- A src/drivers/spi/spi_winbond.h M src/drivers/spi/winbond.c 2 files changed, 49 insertions(+), 22 deletions(-)
Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved
diff --git a/src/drivers/spi/spi_winbond.h b/src/drivers/spi/spi_winbond.h new file mode 100644 index 0000000..e21571c --- /dev/null +++ b/src/drivers/spi/spi_winbond.h @@ -0,0 +1,37 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2008, Network Appliance Inc. + * Author: Jason McMullan <mcmullan <at> netapp.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* Winbond specific function */ +/* M25Pxx-specific commands */ +#define CMD_W25_WREN 0x06 /* Write Enable */ +#define CMD_W25_WRDI 0x04 /* Write Disable */ +#define CMD_W25_RDSR 0x05 /* Read Status Register */ +#define CMD_W25_WRSR 0x01 /* Write Status Register */ +#define CMD_W25_RDSR2 0x35 /* Read Status2 Register */ +#define CMD_W25_WRSR2 0x31 /* Write Status2 Register */ +#define CMD_W25_READ 0x03 /* Read Data Bytes */ +#define CMD_W25_FAST_READ 0x0b /* Read Data Bytes at Higher Speed */ +#define CMD_W25_PP 0x02 /* Page Program */ +#define CMD_W25_SE 0x20 /* Sector (4K) Erase */ +#define CMD_W25_RDID 0x9f /* Read ID */ +#define CMD_W25_BE 0xd8 /* Block (64K) Erase */ +#define CMD_W25_CE 0xc7 /* Chip Erase */ +#define CMD_W25_DP 0xb9 /* Deep Power-down */ +#define CMD_W25_RES 0xab /* Release from DP and Read Signature */ +#define CMD_VOLATILE_SREG_WREN 0x50 /* Write Enable for Volatile SREG */ + +/* tw: Maximum time to write a flash cell in milliseconds */ +#define WINBOND_FLASH_TIMEOUT 30 diff --git a/src/drivers/spi/winbond.c b/src/drivers/spi/winbond.c index 5a75ccc..be08504 100644 --- a/src/drivers/spi/winbond.c +++ b/src/drivers/spi/winbond.c @@ -1,7 +1,16 @@ /* * Copyright 2008, Network Appliance Inc. - * Author: Jason McMullan <mcmullan <at> netapp.com> - * Licensed under the GPL-2 or later. + * Jason McMullan mcmullan@netapp.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */
#include <console/console.h> @@ -14,26 +23,7 @@ #include <lib.h>
#include "spi_flash_internal.h" - -/* M25Pxx-specific commands */ -#define CMD_W25_WREN 0x06 /* Write Enable */ -#define CMD_W25_WRDI 0x04 /* Write Disable */ -#define CMD_W25_RDSR 0x05 /* Read Status Register */ -#define CMD_W25_WRSR 0x01 /* Write Status Register */ -#define CMD_W25_RDSR2 0x35 /* Read Status2 Register */ -#define CMD_W25_WRSR2 0x31 /* Write Status2 Register */ -#define CMD_W25_READ 0x03 /* Read Data Bytes */ -#define CMD_W25_FAST_READ 0x0b /* Read Data Bytes at Higher Speed */ -#define CMD_W25_PP 0x02 /* Page Program */ -#define CMD_W25_SE 0x20 /* Sector (4K) Erase */ -#define CMD_W25_BE 0xd8 /* Block (64K) Erase */ -#define CMD_W25_CE 0xc7 /* Chip Erase */ -#define CMD_W25_DP 0xb9 /* Deep Power-down */ -#define CMD_W25_RES 0xab /* Release from DP, and Read Signature */ -#define CMD_VOLATILE_SREG_WREN 0x50 /* Write Enable for Volatile SREG */ - -/* tw: Maximum time to write a flash cell in milliseconds */ -#define WINBOND_FLASH_TIMEOUT 30 +#include "spi_winbond.h"
struct winbond_spi_flash_params { uint16_t id;