Uwe Poeche has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34345 )
Change subject: include/spi-generic: moving common flash timouts ......................................................................
include/spi-generic: moving common flash timouts
This patch moves SPI_FLASH Timeouts from spi/spi_flash_internal.h for SPI SW-sequencing in include/spi-generic.h to provide also for SPI HW-sequencing.
tested on siemens/bdx1 and checked if all includes of spi_flash_internal.h on other places provide an include of spi-generic.h before
Change-Id: I837f1a027b836996bc42389bdf7dbab7f0e9db09 Signed-off-by: Uwe Poeche uwe.poeche@siemens.com --- M src/drivers/spi/spi_flash_internal.h M src/include/spi-generic.h 2 files changed, 9 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/34345/1
diff --git a/src/drivers/spi/spi_flash_internal.h b/src/drivers/spi/spi_flash_internal.h index 4a9e289..95c51a8 100644 --- a/src/drivers/spi/spi_flash_internal.h +++ b/src/drivers/spi/spi_flash_internal.h @@ -7,15 +7,6 @@ #ifndef SPI_FLASH_INTERNAL_H #define SPI_FLASH_INTERNAL_H
-/* Common parameters -- kind of high, but they should only occur when there - * is a problem (and well your system already is broken), so err on the side - * of caution in case we're dealing with slower SPI buses and/or processors. - */ -#define CONF_SYS_HZ 100 -#define SPI_FLASH_PROG_TIMEOUT (2 * CONF_SYS_HZ) -#define SPI_FLASH_PAGE_ERASE_TIMEOUT (5 * CONF_SYS_HZ) -#define SPI_FLASH_SECTOR_ERASE_TIMEOUT (10 * CONF_SYS_HZ) - /* Common commands */ #define CMD_READ_ID 0x9f
diff --git a/src/include/spi-generic.h b/src/include/spi-generic.h index d0f957f..93704f8 100644 --- a/src/include/spi-generic.h +++ b/src/include/spi-generic.h @@ -16,6 +16,15 @@ #ifndef _SPI_GENERIC_H_ #define _SPI_GENERIC_H_
+/* Common parameters -- kind of high, but they should only occur when there + * is a problem (and well your system already is broken), so err on the side + * of caution in case we're dealing with slower SPI buses and/or processors. + */ +#define CONF_SYS_HZ 100 +#define SPI_FLASH_PROG_TIMEOUT (2 * CONF_SYS_HZ) +#define SPI_FLASH_PAGE_ERASE_TIMEOUT (5 * CONF_SYS_HZ) +#define SPI_FLASH_SECTOR_ERASE_TIMEOUT (10 * CONF_SYS_HZ) + #include <commonlib/region.h> #include <stdint.h> #include <stddef.h>