Lines Matching +full:host +full:- +full:slave
4 * SPDX-License-Identifier: Apache-2.0
33 *+----------------------------------------------------------------------+
35 *| eSPI host +-------------+ |
36 *| +-----------+ | Power | +----------+ |
38 *| ------------ |processor | | controller | | sources | |
39 *| +-----------+ +-------------+ +----------+ |
41 *| ------------ | | | |
42 *| +--------+ +---------------+ |
44 *| -----+ +--------+ +----------+ +----v-----+ |
47 *| | +--------+ +----------+ +----------+ |
49 *| | ------+ | | |
51 *| +------v-----+ +---v-------v-------------v----+ |
53 *| | access +--->+ | |
54 *| +------------+ +------------------------------+ |
56 *| ----------- | |
61 *+----------------------------------------------------------------------+
63 * +-----------------+
64 * --------- | | | | | |
66 * --------- | + + + + | eSPI bus
70 * +-----------------+
72 *+-----------------------------------------------------------------------+
73 *| eSPI slave |
77 *+-----------------------------------------------------------------------+
80 * +---------+ |
81 * | Flash | Slave Attached Flash |
82 * +---------+ |
177 * If this eSPI controller is acting as slave, the values set here
183 * eSPI slave then send via SET_CONFIGURATION command.
186 * +--------+ +---------+ +------+ +---------+ +---------+
188 * | slave | | driver | | bus | | driver | | host |
189 * +--------+ +---------+ +------+ +---------+ +---------+
192 * +--------------+ ctrl regs | cap ctrl reg| +-----------+
193 * | +-------+ | +--------+ |
194 * | |<------+ | +------->| |
198 * | | +<------------------+ |
199 * | |<-----------| | |
201 * | |----------->+ response | |
202 * | | |------------------>+ |
205 * | | +<------------------+ |
207 * | | +------------------>+ |
215 * @retval -EIO General input / output error, failed to configure device.
216 * @retval -EINVAL invalid capabilities, failed to configure device.
217 * @retval -ENOTSUP capability not supported by eSPI slave.
226 (const struct espi_saf_driver_api *)dev->api; in z_impl_espi_saf_config()
228 return api->config(dev, cfg); in z_impl_espi_saf_config()
241 * @retval -EIO General input / output error, failed to configure device.
242 * @retval -EINVAL invalid capabilities, failed to configure device.
243 * @retval -ENOTSUP capability not supported by eSPI slave.
254 (const struct espi_saf_driver_api *)dev->api; in z_impl_espi_saf_set_protection_regions()
256 return api->set_protection_regions(dev, pr); in z_impl_espi_saf_set_protection_regions()
269 * @retval -EINVAL if failed to activate SAF.
276 (const struct espi_saf_driver_api *)dev->api; in z_impl_espi_saf_activate()
278 return api->activate(dev); in z_impl_espi_saf_activate()
297 (const struct espi_saf_driver_api *)dev->api; in z_impl_espi_saf_get_channel_status()
299 return api->get_channel_status(dev); in z_impl_espi_saf_get_channel_status()
303 * @brief Sends a read request packet for slave attached flash.
311 * @retval -ENOTSUP eSPI flash logical channel transactions not supported.
312 * @retval -EBUSY eSPI flash channel is not ready or disabled by master.
313 * @retval -EIO General input / output error, failed request to master.
322 (const struct espi_saf_driver_api *)dev->api; in z_impl_espi_saf_flash_read()
324 if (!api->flash_read) { in z_impl_espi_saf_flash_read()
325 return -ENOTSUP; in z_impl_espi_saf_flash_read()
328 return api->flash_read(dev, pckt); in z_impl_espi_saf_flash_read()
332 * @brief Sends a write request packet for slave attached flash.
340 * @retval -ENOTSUP eSPI flash logical channel transactions not supported.
341 * @retval -EBUSY eSPI flash channel is not ready or disabled by master.
342 * @retval -EIO General input / output error, failed request to master.
351 (const struct espi_saf_driver_api *)dev->api; in z_impl_espi_saf_flash_write()
353 if (!api->flash_write) { in z_impl_espi_saf_flash_write()
354 return -ENOTSUP; in z_impl_espi_saf_flash_write()
357 return api->flash_write(dev, pckt); in z_impl_espi_saf_flash_write()
361 * @brief Sends a write request packet for slave attached flash.
369 * @retval -ENOTSUP eSPI flash logical channel transactions not supported.
370 * @retval -EBUSY eSPI flash channel is not ready or disabled by master.
371 * @retval -EIO General input / output error, failed request to master.
380 (const struct espi_saf_driver_api *)dev->api; in z_impl_espi_saf_flash_erase()
382 if (!api->flash_erase) { in z_impl_espi_saf_flash_erase()
383 return -ENOTSUP; in z_impl_espi_saf_flash_erase()
386 return api->flash_erase(dev, pckt); in z_impl_espi_saf_flash_erase()
390 * @brief Response unsuccessful completion for slave attached flash.
398 * @retval -ENOTSUP eSPI flash logical channel transactions not supported.
399 * @retval -EBUSY eSPI flash channel is not ready or disabled by master.
400 * @retval -EIO General input / output error, failed request to master.
409 (const struct espi_saf_driver_api *)dev->api; in z_impl_espi_saf_flash_unsuccess()
411 if (!api->flash_unsuccess) { in z_impl_espi_saf_flash_unsuccess()
412 return -ENOTSUP; in z_impl_espi_saf_flash_unsuccess()
415 return api->flash_unsuccess(dev, pckt); in z_impl_espi_saf_flash_unsuccess()
422 *+-------+ +-------------+ +------+ +---------+
423 *| App | | eSPI driver | | HW | |eSPI Host|
424 *+---+---+ +-------+-----+ +---+--+ +----+----+
427 * +----------------------------> | | |
429 * +----------------------------->+ |
430 * | | | eSPI reset | eSPI host
431 * | | IRQ +<------------+ resets the
432 * | | <-----------+ | bus
439 * | | | VW CH ready| eSPI host
440 * | | IRQ +<------------+ enables VW
441 * | | <-----------+ | channel
448 * | | <-------------+ event
449 * | +<------------+ |
450 * +<-----------------------------+ callback | |
454 * | | | SLP_S5 | eSPI host
455 * | | <-------------+ send VWire
456 * | +<------------+ |
457 * +<-----------------------------+ callback | |
462 * +------------------------------>------------>|------------>|
464 * | | | HOST_RST | eSPI host
465 * | | <-------------+ send VWire
466 * | +<------------+ |
467 * +<-----------------------------+ callback | |
468 * | App reset host-related | | |
471 * | | | C10 | eSPI host
472 * | | +<------------+ send VWire
473 * | <-------------+ |
474 * <------------------------------+ | |
495 callback->handler = handler; in espi_saf_init_callback()
496 callback->evt_type = evt_type; in espi_saf_init_callback()
515 (const struct espi_saf_driver_api *)dev->api; in espi_saf_add_callback()
517 if (!api->manage_callback) { in espi_saf_add_callback()
518 return -ENOTSUP; in espi_saf_add_callback()
521 return api->manage_callback(dev, callback, true); in espi_saf_add_callback()
544 (const struct espi_saf_driver_api *)dev->api; in espi_saf_remove_callback()
546 if (!api->manage_callback) { in espi_saf_remove_callback()
547 return -ENOTSUP; in espi_saf_remove_callback()
550 return api->manage_callback(dev, callback, false); in espi_saf_remove_callback()