From b21efba26afaa1a8c5e7e7e8a71f31a51cbc230c Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Wed, 8 Jul 2015 21:40:18 -0700 Subject: Reserve host command range for experiments This adds a range of (proto v3) host commands to use for experimental/one-off feature development without constantly updating include/ec_commands.h BUG=none BRANCH=none TEST=make buildall This doesn't implement any new commands. It just adds some new constants. Change-Id: I1d7b829dec9fa847e16f92d35c78446cc5f34cc5 Signed-off-by: Bill Richardson Reviewed-on: https://chromium-review.googlesource.com/284408 Reviewed-by: Randall Spangler --- include/ec_commands.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/ec_commands.h b/include/ec_commands.h index c0b1c3cecd..0e0275ec23 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -3382,6 +3382,23 @@ struct ec_params_pd_write_log_entry { */ #define EC_CMD_BLOB 0x200 +/*****************************************************************************/ +/* + * Reserve a range of host commands for board-specific, experimental, or + * special purpose features. These can be (re)used without updating this file. + * + * CAUTION: Don't go nuts with this. Shipping products should document ALL + * their EC commands for easier development, testing, debugging, and support. + * + * In your experimental code, you may want to do something like this: + * + * #define EC_CMD_MAGIC_FOO (EC_CMD_BOARD_SPECIFIC_BASE + 0x000) + * #define EC_CMD_MAGIC_BAR (EC_CMD_BOARD_SPECIFIC_BASE + 0x001) + * #define EC_CMD_MAGIC_HEY (EC_CMD_BOARD_SPECIFIC_BASE + 0x002) + */ +#define EC_CMD_BOARD_SPECIFIC_BASE 0x3E00 +#define EC_CMD_BOARD_SPECIFIC_LAST 0x3FFF + /*****************************************************************************/ /* * Passthru commands -- cgit v1.2.1