drivers: samples: espi: Adjust terms per eSPI specification 1.5
Replace CONFIG_ESPI_SLAVE by CONFIG_ESPI_TARGET Replace CONFIG_ESPI_SAF by CONFIG_ESPI_TAF Replace ESPI_BUS_SAF_NOTIFICATION with ESPI_TAF_BUS_NOTIFICATION in API Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
This commit is contained in:
parent
eff681d50d
commit
f854b8b799
12 changed files with 54 additions and 54 deletions
|
@ -10,8 +10,8 @@ zephyr_library_sources_ifdef(CONFIG_ESPI_NPCX host_subs_npcx.c)
|
|||
zephyr_library_sources_ifdef(CONFIG_ESPI_TAF_NPCX espi_taf_npcx.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_USERSPACE espi_handlers.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_ESPI_EMUL espi_emul.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_ESPI_SAF_XEC espi_saf_mchp_xec.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_ESPI_TAF_XEC espi_saf_mchp_xec.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_ESPI_XEC_V2 espi_mchp_xec_v2.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_ESPI_XEC_V2 espi_mchp_xec_host_v2.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_ESPI_IT8XXX2 espi_it8xxx2.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_ESPI_SAF_XEC_V2 espi_saf_mchp_xec_v2.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_ESPI_TAF_XEC_V2 espi_saf_mchp_xec_v2.c)
|
||||
|
|
|
@ -22,11 +22,11 @@ module = ESPI
|
|||
module-str = espi
|
||||
source "subsys/logging/Kconfig.template.log_config"
|
||||
|
||||
config ESPI_SLAVE
|
||||
bool "ESPI slave driver"
|
||||
config ESPI_TARGET
|
||||
bool "ESPI target driver"
|
||||
default y
|
||||
help
|
||||
Enables eSPI driver in slave mode.
|
||||
Enables eSPI driver in target mode.
|
||||
|
||||
config ESPI_INIT_PRIORITY
|
||||
int "ESPI Controller driver initialization priority"
|
||||
|
@ -50,20 +50,20 @@ config ESPI_AUTOMATIC_WARNING_ACKNOWLEDGE
|
|||
bool "Automatic acknowledge for eSPI HOST warnings"
|
||||
default y
|
||||
depends on ESPI_VWIRE_CHANNEL
|
||||
depends on ESPI_SLAVE
|
||||
depends on ESPI_TARGET
|
||||
help
|
||||
Enable automatic acknowledgment from eSPI slave towards eSPI host
|
||||
Enable automatic acknowledgment from eSPI target towards eSPI controller
|
||||
whenever it receives suspend or reset warning.
|
||||
If this is disabled, it means the app wants to be give the opportunity
|
||||
to prepare for either HOST suspend or reset.
|
||||
|
||||
config ESPI_AUTOMATIC_BOOT_DONE_ACKNOWLEDGE
|
||||
bool "Automatic acknowledge slave boot status"
|
||||
bool "Automatic acknowledge target boot status"
|
||||
default y
|
||||
depends on ESPI_VWIRE_CHANNEL
|
||||
depends on ESPI_SLAVE
|
||||
depends on ESPI_TARGET
|
||||
help
|
||||
Enable automatic acknowledgment from slave basic configuration been
|
||||
Enable automatic acknowledgment from target basic configuration been
|
||||
completed by sending a virtual wire message to the eSPI master.
|
||||
This depends on SPI boot configuration. It could be either very
|
||||
early in the flow after the VW channel is configured. Or it could be
|
||||
|
@ -176,19 +176,19 @@ config ESPI_OOB_CHANNEL_RX_ASYNC
|
|||
Enables asynchronous handling for host-initiated OOB traffic.
|
||||
Otherwise OOB traffic is assumed to be always client-initiated.
|
||||
|
||||
config ESPI_SAF
|
||||
bool "ESPI SAF driver"
|
||||
config ESPI_TAF
|
||||
bool "ESPI TAF driver"
|
||||
depends on ESPI_FLASH_CHANNEL
|
||||
help
|
||||
Enable Slave Attached Flash eSPI driver. SAF depends upon ESPI driver
|
||||
Enable Target Attached Flash eSPI driver. TAF depends upon ESPI driver
|
||||
and flash channel.
|
||||
|
||||
config ESPI_SAF_INIT_PRIORITY
|
||||
int "ESPI SAF driver initialization priority"
|
||||
depends on ESPI_SAF
|
||||
config ESPI_TAF_INIT_PRIORITY
|
||||
int "ESPI TAF driver initialization priority"
|
||||
depends on ESPI_TAF
|
||||
default 4
|
||||
help
|
||||
Driver initialization priority for eSPI SAF driver. SAF driver must
|
||||
Driver initialization priority for eSPI TAF driver. TAF driver must
|
||||
initialize after the ESPI driver.
|
||||
|
||||
endif # ESPI
|
||||
|
|
|
@ -63,21 +63,21 @@ config ESPI_FLASH_BUFFER_SIZE
|
|||
Use maximum RAM buffer size defined by spec but allow applications
|
||||
to override if eSPI host doesn't support it.
|
||||
|
||||
config ESPI_SAF_XEC
|
||||
bool "XEC Microchip ESPI SAF driver"
|
||||
config ESPI_TAF_XEC
|
||||
bool "XEC Microchip ESPI TAF driver"
|
||||
default y
|
||||
depends on SOC_SERIES_MEC15XX
|
||||
depends on DT_HAS_MICROCHIP_XEC_ESPI_SAF_ENABLED
|
||||
help
|
||||
Enable the Microchip XEC SAF ESPI driver for MEC15xx family.
|
||||
Enable the Microchip XEC TAF ESPI driver for MEC15xx family.
|
||||
|
||||
config ESPI_SAF_XEC_V2
|
||||
bool "XEC Microchip ESPI SAF V2 driver"
|
||||
config ESPI_TAF_XEC_V2
|
||||
bool "XEC Microchip ESPI TAF V2 driver"
|
||||
default y
|
||||
depends on SOC_SERIES_MEC172X
|
||||
depends on DT_HAS_MICROCHIP_XEC_ESPI_SAF_V2_ENABLED
|
||||
help
|
||||
Enable the Microchip XEC SAF ESPI driver for MEC172x series.
|
||||
Enable the Microchip XEC TAF ESPI driver for MEC172x series.
|
||||
|
||||
endif #ESPI_XEC
|
||||
|
||||
|
@ -154,19 +154,19 @@ config ESPI_PERIPHERAL_XEC_EMI2
|
|||
|
||||
endif #ESPI_PERIPHERAL_CHANNEL
|
||||
|
||||
config ESPI_SAF
|
||||
bool "XEC Microchip ESPI SAF driver"
|
||||
config ESPI_TAF
|
||||
bool "XEC Microchip ESPI TAF driver"
|
||||
depends on ESPI_FLASH_CHANNEL
|
||||
help
|
||||
Enable Slave Attached Flash eSPI driver. SAF depends upon ESPI XEC driver
|
||||
Enable Target Attached Flash eSPI driver. TAF depends upon ESPI XEC driver
|
||||
and flash channel.
|
||||
|
||||
config ESPI_SAF_INIT_PRIORITY
|
||||
int "ESPI SAF driver initialization priority"
|
||||
depends on ESPI_SAF
|
||||
config ESPI_TAF_INIT_PRIORITY
|
||||
int "ESPI TAF driver initialization priority"
|
||||
depends on ESPI_TAF
|
||||
default 4
|
||||
help
|
||||
Driver initialization priority for eSPI SAF driver.
|
||||
Driver initialization priority for ESPI TAF driver.
|
||||
|
||||
config ESPI_PERIPHERAL_ACPI_EC_IBF_EVT_DATA
|
||||
bool "Read ACPI EC Event Data in IBF ISR"
|
||||
|
|
|
@ -310,8 +310,8 @@ static void espi_bus_cfg_update_isr(const struct device *dev)
|
|||
espi_vw_send_bootload_done(dev);
|
||||
}
|
||||
|
||||
#if (defined(CONFIG_ESPI_FLASH_CHANNEL) && defined(CONFIG_ESPI_SAF))
|
||||
/* If CONFIG_ESPI_SAF is set, set to auto or manual mode accroding
|
||||
#if (defined(CONFIG_ESPI_FLASH_CHANNEL) && defined(CONFIG_ESPI_TAF))
|
||||
/* If CONFIG_ESPI_TAF is set, set to auto or manual mode accroding
|
||||
* to configuration.
|
||||
*/
|
||||
if (IS_BIT_SET(inst->ESPICFG, NPCX_ESPICFG_FLCHANMODE)) {
|
||||
|
@ -348,7 +348,7 @@ static void espi_bus_oob_rx_isr(const struct device *dev)
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_ESPI_FLASH_CHANNEL)
|
||||
#if defined(CONFIG_ESPI_SAF)
|
||||
#if defined(CONFIG_ESPI_TAF)
|
||||
static struct espi_taf_pckt taf_pckt;
|
||||
|
||||
static uint32_t espi_taf_parse(const struct device *dev)
|
||||
|
@ -382,7 +382,7 @@ static uint32_t espi_taf_parse(const struct device *dev)
|
|||
|
||||
return (uint32_t)&taf_pckt;
|
||||
}
|
||||
#endif /* CONFIG_ESPI_SAF */
|
||||
#endif /* CONFIG_ESPI_TAF */
|
||||
|
||||
static void espi_bus_flash_rx_isr(const struct device *dev)
|
||||
{
|
||||
|
@ -404,9 +404,9 @@ static void espi_bus_flash_rx_isr(const struct device *dev)
|
|||
#endif
|
||||
k_sem_give(&data->flash_rx_lock);
|
||||
} else { /* Target Attached Flash Access */
|
||||
#if defined(CONFIG_ESPI_SAF)
|
||||
#if defined(CONFIG_ESPI_TAF)
|
||||
struct espi_event evt = {
|
||||
.evt_type = ESPI_BUS_SAF_NOTIFICATION,
|
||||
.evt_type = ESPI_BUS_TAF_NOTIFICATION,
|
||||
.evt_details = ESPI_CHANNEL_FLASH,
|
||||
.evt_data = espi_taf_parse(dev),
|
||||
};
|
||||
|
@ -1401,7 +1401,7 @@ static int espi_npcx_init(const struct device *dev)
|
|||
/* Configure host sub-modules which HW blocks belong to core domain */
|
||||
npcx_host_init_subs_core_domain(dev, &data->callbacks);
|
||||
|
||||
#if defined(CONFIG_ESPI_FLASH_CHANNEL) && defined(CONFIG_ESPI_SAF)
|
||||
#if defined(CONFIG_ESPI_FLASH_CHANNEL) && defined(CONFIG_ESPI_TAF)
|
||||
npcx_init_taf(dev, &data->callbacks);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -849,7 +849,7 @@ static const struct espi_saf_xec_config espi_saf_xec_config = {
|
|||
|
||||
DEVICE_DT_INST_DEFINE(0, &espi_saf_xec_init, NULL,
|
||||
&espi_saf_xec_data, &espi_saf_xec_config, POST_KERNEL,
|
||||
CONFIG_ESPI_SAF_INIT_PRIORITY, &espi_saf_xec_driver_api);
|
||||
CONFIG_ESPI_TAF_INIT_PRIORITY, &espi_saf_xec_driver_api);
|
||||
|
||||
static int espi_saf_xec_init(const struct device *dev)
|
||||
{
|
||||
|
|
|
@ -1027,7 +1027,7 @@ static void espi_saf_done_isr(const struct device *dev)
|
|||
struct mchp_espi_saf * const regs = xcfg->saf_base;
|
||||
const struct espi_xec_irq_info *safirq = &xcfg->irq_info_list[0];
|
||||
uint32_t ecp_status = regs->SAF_ECP_STATUS;
|
||||
struct espi_event evt = { .evt_type = ESPI_BUS_SAF_NOTIFICATION,
|
||||
struct espi_event evt = { .evt_type = ESPI_BUS_TAF_NOTIFICATION,
|
||||
.evt_details = BIT(0),
|
||||
.evt_data = ecp_status };
|
||||
|
||||
|
@ -1142,7 +1142,7 @@ static int espi_saf_xec_init(const struct device *dev)
|
|||
DEVICE_DT_INST_DEFINE(0, &espi_saf_xec_init, NULL, \
|
||||
&espisaf_xec_data_##n, \
|
||||
&espisaf_xec_config_##n, POST_KERNEL, \
|
||||
CONFIG_ESPI_SAF_INIT_PRIORITY, \
|
||||
CONFIG_ESPI_TAF_INIT_PRIORITY, \
|
||||
&espi_saf_xec_driver_api); \
|
||||
\
|
||||
static void espi_saf_xec_connect_irqs_##n(void) \
|
||||
|
|
|
@ -499,7 +499,7 @@ static void espi_taf_work(struct k_work *item)
|
|||
static void espi_taf_event_handler(const struct device *dev, struct espi_callback *cb,
|
||||
struct espi_event event)
|
||||
{
|
||||
if ((event.evt_type != ESPI_BUS_SAF_NOTIFICATION) ||
|
||||
if ((event.evt_type != ESPI_BUS_TAF_NOTIFICATION) ||
|
||||
(event.evt_details != ESPI_CHANNEL_FLASH)) {
|
||||
return;
|
||||
}
|
||||
|
@ -510,7 +510,7 @@ static void espi_taf_event_handler(const struct device *dev, struct espi_callbac
|
|||
|
||||
int npcx_init_taf(const struct device *dev, sys_slist_t *callbacks)
|
||||
{
|
||||
espi_init_callback(&espi_taf_cb, espi_taf_event_handler, ESPI_BUS_SAF_NOTIFICATION);
|
||||
espi_init_callback(&espi_taf_cb, espi_taf_event_handler, ESPI_BUS_TAF_NOTIFICATION);
|
||||
espi_add_callback(dev, &espi_taf_cb);
|
||||
|
||||
npcx_espi_taf_data.host_dev = dev;
|
||||
|
|
|
@ -140,7 +140,7 @@ enum espi_bus_event {
|
|||
* eSPI drivers should convey the peripheral type.
|
||||
*/
|
||||
ESPI_BUS_PERIPHERAL_NOTIFICATION = BIT(4),
|
||||
ESPI_BUS_SAF_NOTIFICATION = BIT(5),
|
||||
ESPI_BUS_TAF_NOTIFICATION = BIT(5),
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ CONFIG_LOG_PROCESS_THREAD_SLEEP_MS=100
|
|||
CONFIG_ESPI_AUTOMATIC_WARNING_ACKNOWLEDGE=n
|
||||
# Sample code doesn't handle ACPI host communication
|
||||
CONFIG_ESPI_PERIPHERAL_HOST_IO=n
|
||||
# Test SAF flash portal read/erase/write on EVB
|
||||
CONFIG_ESPI_SAF=y
|
||||
# Test TAF flash portal read/erase/write on EVB
|
||||
CONFIG_ESPI_TAF=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_XEC_QMSPI=y
|
||||
|
|
|
@ -7,7 +7,7 @@ CONFIG_LOG_PROCESS_THREAD_SLEEP_MS=100
|
|||
CONFIG_ESPI_AUTOMATIC_WARNING_ACKNOWLEDGE=n
|
||||
# Sample code doesn't handle ACPI host communication
|
||||
CONFIG_ESPI_PERIPHERAL_HOST_IO=n
|
||||
# Test SAF flash portal read/erase/write on EVB
|
||||
CONFIG_ESPI_SAF=y
|
||||
# Test TAF flash portal read/erase/write on EVB
|
||||
CONFIG_ESPI_TAF=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_XEC_QMSPI_LDMA=y
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
/* OOB operations will be attempted regardless of channel enabled or not */
|
||||
#include "espi_oob_handler.h"
|
||||
|
||||
#ifdef CONFIG_ESPI_SAF
|
||||
#ifdef CONFIG_ESPI_TAF
|
||||
#include <zephyr/drivers/espi_saf.h>
|
||||
#endif
|
||||
|
||||
|
@ -65,7 +65,7 @@ static uint8_t flash_write_buf[MAX_TEST_BUF_SIZE];
|
|||
static uint8_t flash_read_buf[MAX_TEST_BUF_SIZE];
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESPI_SAF
|
||||
#ifdef CONFIG_ESPI_TAF
|
||||
#define SAF_BASE_ADDR DT_REG_ADDR(DT_NODELABEL(espi_saf0))
|
||||
|
||||
#define SAF_TEST_FREQ_HZ 24000000U
|
||||
|
@ -128,7 +128,7 @@ static const struct espi_saf_flash_cfg flash_w25q128 = {
|
|||
* by QMSPI driver.
|
||||
* Use SAF hardware default TAG map.
|
||||
*/
|
||||
#ifdef CONFIG_ESPI_SAF_XEC_V2
|
||||
#ifdef CONFIG_ESPI_TAF_XEC_V2
|
||||
static const struct espi_saf_cfg saf_cfg1 = {
|
||||
.nflash_devices = 1U,
|
||||
.hwcfg = {.version = 2U, /* TODO */
|
||||
|
@ -757,7 +757,7 @@ int espi_saf_test1(uint32_t spi_addr)
|
|||
|
||||
return rc;
|
||||
}
|
||||
#endif /* CONFIG_ESPI_SAF */
|
||||
#endif /* CONFIG_ESPI_TAF */
|
||||
|
||||
static void host_warn_handler(uint32_t signal, uint32_t status)
|
||||
{
|
||||
|
@ -1187,7 +1187,7 @@ int espi_test(void)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ESPI_SAF
|
||||
#ifdef CONFIG_ESPI_TAF
|
||||
if (!device_is_ready(qspi_dev)) {
|
||||
LOG_ERR("%s: device not ready.", qspi_dev->name);
|
||||
return -ENODEV;
|
||||
|
@ -1223,7 +1223,7 @@ int espi_test(void)
|
|||
|
||||
espi_init();
|
||||
|
||||
#ifdef CONFIG_ESPI_SAF
|
||||
#ifdef CONFIG_ESPI_TAF
|
||||
/*
|
||||
* eSPI SAF configuration must be after eSPI configuration.
|
||||
* eSPI SAF EC portal flash tests before EC releases RSMRST# and
|
||||
|
|
|
@ -13,6 +13,6 @@ config CORTEX_M_SYSTICK
|
|||
|
||||
config ESPI_TAF_NPCX
|
||||
default y
|
||||
depends on ESPI_SAF
|
||||
depends on ESPI_TAF
|
||||
|
||||
endif # SOC_SERIES_NPCX4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue