Rework the Host Command support. It includes: -change API to backend -change a way of defining rx and tx buffers -fix synchronization between the handler and backend layer -simplify the HC handler Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
80 lines
2.4 KiB
Plaintext
80 lines
2.4 KiB
Plaintext
# Host command handler functionality
|
|
|
|
# Copyright (c) 2020 Google LLC
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
menu "Host command handler subsystem"
|
|
|
|
config EC_HOST_CMD
|
|
bool "Support Embedded Controller host command handler subsystem"
|
|
help
|
|
Enable host command processing for embedded controllers on notebook
|
|
computers.
|
|
|
|
if EC_HOST_CMD
|
|
|
|
module = EC_HC
|
|
module-str = ec-host-commands
|
|
source "subsys/logging/Kconfig.template.log_config"
|
|
|
|
config EC_HOST_CMD_HANDLER_STACK_SIZE
|
|
int "Stack size for the EC host command handler thread"
|
|
default 800
|
|
|
|
config EC_HOST_CMD_HANDLER_TX_BUFFER
|
|
int "Buffer size in bytes for TX buffer shared by all EC host commands"
|
|
default 0 if EC_HOST_CMD_BACKEND_ESPI
|
|
default 0 if EC_HOST_CMD_BACKEND_SHI
|
|
default 256
|
|
help
|
|
Buffer size in bytes for TX buffer defined by the host command handler.
|
|
Some backend layers can define their own buffer, so the size can be zero to
|
|
avoid duplicating buffers. If multiple backends are used, the size has to be
|
|
set by user to the largest one.
|
|
|
|
config EC_HOST_CMD_HANDLER_RX_BUFFER
|
|
int "Buffer size in bytes for RX buffer shared by all EC host commands"
|
|
default 256 if EC_HOST_CMD_BACKEND_ESPI
|
|
default 0 if EC_HOST_CMD_BACKEND_SHI
|
|
default 256
|
|
help
|
|
Buffer size in bytes for TX buffer defined by the host command handler.
|
|
Some backend layers can define their own buffer, so the size can be zero to
|
|
avoid duplicating buffers. If multiple backends are used, the size has to be
|
|
set by user to the largest one.
|
|
|
|
config EC_HOST_CMD_HANDLER_PRIO
|
|
int "Priority of host command task"
|
|
default 13
|
|
help
|
|
Priority of the kernel task that handles the host commands.
|
|
If the priority is too low (high in value), the host commands handler may be unable to
|
|
process the command on time and the AP will abort the waiting for response and be unable
|
|
to boot the system properly.
|
|
|
|
config EC_HOST_CMD_INIT_PRIORITY
|
|
int "Initialization priority"
|
|
default 60
|
|
range 0 99
|
|
help
|
|
Initialization priority for Host Command. It must be higher than the initialization
|
|
priority of the used backend device.
|
|
|
|
config EC_HOST_CMD_HANDLER_TX_BUFFER_DEF
|
|
bool
|
|
default y if EC_HOST_CMD_HANDLER_TX_BUFFER > 0
|
|
help
|
|
The handler defines common tx buffer
|
|
|
|
config EC_HOST_CMD_HANDLER_RX_BUFFER_DEF
|
|
bool
|
|
default y if EC_HOST_CMD_HANDLER_RX_BUFFER > 0
|
|
help
|
|
The handler defines common rx buffer
|
|
|
|
endif # EC_HOST_CMD
|
|
|
|
source "subsys/mgmt/ec_host_cmd/backends/Kconfig"
|
|
|
|
endmenu
|