diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2015-07-25 02:14:13 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-07-30 19:57:55 +0000 |
commit | 5b71b33aba6cb0108a864cc7000918b8f06b139a (patch) | |
tree | aa49a59a306d91b189e9fcdddc3bbb0e2deba628 /board/mec1322_evb | |
parent | 9008c7a4fd131a96ccb0078a46ec545cff2f43b1 (diff) | |
download | chrome-ec-5b71b33aba6cb0108a864cc7000918b8f06b139a.tar.gz |
common: change interface to SPI flash
Allow more than one SPI master.
Add CONFIG variables to address the system SPI flash.
To have SPI master ports, spi_ports array must be defined.
BRANCH=smaug
TEST=compile
BUG=chrome-os-partner:42304
Change-Id: Id43869f648965c1582b7be1c7fb3a38f175fda95
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/288512
Commit-Queue: David James <davidjames@chromium.org>
Diffstat (limited to 'board/mec1322_evb')
-rw-r--r-- | board/mec1322_evb/board.c | 7 | ||||
-rw-r--r-- | board/mec1322_evb/board.h | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/board/mec1322_evb/board.c b/board/mec1322_evb/board.c index 55bed1a5cb..99236b0299 100644 --- a/board/mec1322_evb/board.c +++ b/board/mec1322_evb/board.c @@ -10,6 +10,7 @@ #include "gpio.h" #include "i2c.h" #include "registers.h" +#include "spi.h" #include "util.h" #define GPIO_KB_INPUT GPIO_INPUT @@ -45,6 +46,12 @@ const struct i2c_port_t i2c_ports[] = { }; const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); +/* SPI master ports */ +const struct spi_device_t spi_devices[] = { + { CONFIG_SPI_FLASH_PORT, 0, GPIO_SHD_CS0}, +}; +const unsigned int spi_devices_used = ARRAY_SIZE(spi_devices); + const enum gpio_signal hibernate_wake_pins[] = { GPIO_S1, }; diff --git a/board/mec1322_evb/board.h b/board/mec1322_evb/board.h index 991e52e667..25b20618f7 100644 --- a/board/mec1322_evb/board.h +++ b/board/mec1322_evb/board.h @@ -15,8 +15,7 @@ #define CONFIG_ADC #define CONFIG_SPI_FLASH_SIZE 0x00800000 #define CONFIG_SPI_FLASH_W25Q64 -#define CONFIG_SPI_PORT 0 -#define CONFIG_SPI_CS_GPIO GPIO_SHD_CS0 +#define CONFIG_SPI_FLASH_PORT 0 /* Modules we want to exclude */ #undef CONFIG_EEPROM |