cmd: cros_ec: Move crosec commands to cmd subdirectory
Subsystems (2)
PATCH v2 1/1 cmd: cros_ec: Move crosec commands to cmd subdirectory
Move crosec commands from drivers/misc/cros_ec.c to cmd/cros_ec.c
---
Changes from v1:
- Default to build CMD_CROS_EC in when CROS_EC is activated
- Get rid of leftover const ec_current_image_name[] artifact from moving stuff to separate file
- Added Simon's Acked-By:
--- cmd/Kconfig | 13 ++ cmd/Makefile | 1 + cmd/cros_ec.c | 366 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/misc/cros_ec.c | 351 ----------------------------------------------- include/cros_ec.h | 11 ++ 5 files changed, 391 insertions(+), 351 deletions(-) create mode 100644 cmd/cros_ec.c
cmd/Kconfig +13 -0
@@ -677,6 +677,19 @@ config CMD_TPM_TEST endmenu +menu "Firmware commands" +config CMD_CROS_EC + bool "Enable crosec command" + depends on CROS_EC + default y + help + Enable command-line access to the Chrome OS EC (Embedded + Controller). This provides the 'crosec' command which has + a number of sub-commands for performing EC tasks such as + updating its flash, accessing a small saved context area + and talking to the I2C bus behind the EC (if there is one). +endmenu + menu "Filesystem commands" config CMD_EXT2 bool "ext2 command support"
cmd/Makefile +1 -0
@@ -128,6 +128,7 @@ obj-$(CONFIG_CMD_TRACE) += trace.o obj-$(CONFIG_HUSH_PARSER) += test.o obj-$(CONFIG_CMD_TPM) += tpm.o obj-$(CONFIG_CMD_TPM_TEST) += tpm_test.o +obj-$(CONFIG_CMD_CROS_EC) += cros_ec.o obj-$(CONFIG_CMD_TSI148) += tsi148.o obj-$(CONFIG_CMD_UBI) += ubi.o obj-$(CONFIG_CMD_UBIFS) += ubifs.o
cmd/cros_ec.c new file +366 -0
366 lines not on this page · raw message
drivers/misc/cros_ec.c +0 -351
363 lines not on this page · raw message
include/cros_ec.h +11 -0
@@ -283,6 +283,17 @@ int cros_ec_flash_read(struct cros_ec_dev *dev, uint8_t *data, uint32_t offset, uint32_t size);/** +* Read back flash parameters +* +* This function reads back parameters of the flash as reported by the EC +* +* @param dev Pointer to device +* @param info Pointer to output flash info struct +*/ +int cros_ec_read_flashinfo (struct cros_ec_dev *dev, +struct ec_response_flash_info *info); + +/** * Write data to the flash * * Write an arbitrary amount of data to the EC flash, by repeatedly writing
Signature · 1 line
2.7.4
PATCH v2 1/1 cmd: cros_ec: Move crosec commands to cmd subdirectory
Quoted 24 lines · Moritz Fischer
Move crosec commands from
drivers/misc/cros_ec.ctocmd/cros_ec.cAcked-by Simon Glass <[email protected]>Signed-off-by Moritz Fischer <[email protected]>Cc Simon Glass <[email protected]>Cc Heiko Schocher <[email protected]>Cc Bin Meng <[email protected]>Cc Miao Yan <[email protected]>Cc Masahiro Yamada <[email protected]>Cc Stefan Roese <[email protected]>Cc Przemyslaw Marczak <[email protected]>Cc Maxime Ripard <[email protected]>Cc Nishanth Menon <[email protected]>Cc u-boot at lists.denx.de---
Changes from v1:- Default to build
CMD_CROS_ECin whenCROS_ECis activated
- Get rid of leftover const ec_current_image_name[] artifact from moving stuff to separate file
- Added Simon's Acked-By:
Quoted 8 lines
--- cmd/Kconfig | 13 ++ cmd/Makefile | 1 + cmd/cros_ec.c | 366 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/misc/cros_ec.c | 351 ----------------------------------------------- include/cros_ec.h | 11 ++ 5 files changed, 391 insertions(+), 351 deletions(-) create mode 100644 cmd/cros_ec.c
Applied to u-boot-dm, thanks!