<p>Patrick Georgi has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/20945">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ec/google: update ec_commands.h<br><br>Copy from chrome-ec codebase, except for keeping the long-form license<br>header.<br><br>BUG=b:64468585<br>BRANCH=none<br>TEST=with the other sku-id related patches applied, coreboot obtains the<br>right SKU ID from EC<br><br>Change-Id: I513123547f3854945e827d2f7f6c0df6591886eb<br>Signed-off-by: Patrick Georgi <pgeorgi@google.com><br>---<br>M src/ec/google/chromeec/ec_commands.h<br>1 file changed, 30 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/20945/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/ec/google/chromeec/ec_commands.h b/src/ec/google/chromeec/ec_commands.h<br>index 3e093f6..25ef584 100644<br>--- a/src/ec/google/chromeec/ec_commands.h<br>+++ b/src/ec/google/chromeec/ec_commands.h<br>@@ -31,7 +31,7 @@<br> #ifndef __CROS_EC_EC_COMMANDS_H<br> #define __CROS_EC_EC_COMMANDS_H<br> <br>-#ifndef __ACPI__<br>+#if !defined(__ACPI__) && !defined(__KERNEL__)<br> #include <stdint.h><br> #endif<br> <br>@@ -1121,6 +1121,14 @@<br> };<br> <br> /*****************************************************************************/<br>+/* Get the board's SKU ID from EC */<br>+#define EC_CMD_GET_SKU_ID 0x000E<br>+<br>+struct __ec_align4 ec_response_sku_id {<br>+    uint32_t sku_id;<br>+};<br>+<br>+/*****************************************************************************/<br> /* Flash commands */<br> <br> /* Get flash info */<br>@@ -1151,6 +1159,13 @@<br> /* Flags for version 1+ flash info command */<br> /* EC flash erases bits to 0 instead of 1 */<br> #define EC_FLASH_INFO_ERASE_TO_0 (1 << 0)<br>+<br>+/* Flash must be selected for read/write/erase operations to succeed.  This may<br>+ * be necessary on a chip where write/erase can be corrupted by other board<br>+ * activity, or where the chip needs to enable some sort of programming voltage,<br>+ * or where the read/write/erase operations require cleanly suspending other<br>+ * chip functionality. */<br>+#define EC_FLASH_INFO_SELECT_REQUIRED (1 << 1)<br> <br> /*<br>  * Version 1 returns the same initial fields as version 0, with additional<br>@@ -1421,6 +1436,16 @@<br>     /* Status registers from command 0x05 and 0x35 */<br>     uint8_t sr1, sr2;<br> };<br>+<br>+<br>+/* Select flash during flash operations */<br>+#define EC_CMD_FLASH_SELECT 0x0019<br>+<br>+struct __ec_align4 ec_params_flash_select {<br>+      /* 1 to select flash, 0 to deselect flash */<br>+ uint8_t select;<br>+};<br>+<br> <br> /*****************************************************************************/<br> /* PWM commands */<br>@@ -2980,6 +3005,7 @@<br> #define EC_MKBP_POWER_BUTTON 0<br> #define EC_MKBP_VOL_UP              1<br> #define EC_MKBP_VOL_DOWN    2<br>+#define EC_MKBP_RECOVERY    3<br> <br> /* Switches */<br> #define EC_MKBP_LID_OPEN        0<br>@@ -3935,6 +3961,9 @@<br> <br> #define EC_CMD_USB_PD_PORTS 0x0102<br> <br>+/* Maximum number of PD ports on a device, num_ports will be <= this */<br>+#define EC_USB_PD_MAX_PORTS 8<br>+<br> struct __ec_align1 ec_response_usb_pd_ports {<br>   uint8_t num_ports;<br> };<br></pre><p>To view, visit <a href="https://review.coreboot.org/20945">change 20945</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/20945"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I513123547f3854945e827d2f7f6c0df6591886eb </div>
<div style="display:none"> Gerrit-Change-Number: 20945 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Patrick Georgi <pgeorgi@google.com> </div>