From: Simon Glass <sjg@chromium.org>
Date: Thu, 27 Feb 2014 20:26:00 +0000 (-0700)
Subject: cros_ec: Add an enum for the number of flash regions
X-Git-Tag: v2025.01-rc5-pxa1908~15423^2~41
X-Git-Url: http://git.dujemihanovic.xyz/%22bddb.css/static/git-logo.png?a=commitdiff_plain;h=cecb19c03f5a7abed2e8ff691bc849bdc3c4ed2c;p=u-boot.git

cros_ec: Add an enum for the number of flash regions

Add an enum for the number of flash regions so we can keep track of all
the possible regions.

Reviewed-by: Randall Spangler <rspangler@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
---

diff --git a/include/ec_commands.h b/include/ec_commands.h
index 12811cc070..d9c8c1f335 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -536,7 +536,7 @@ struct ec_response_flash_protect {
 
 enum ec_flash_region {
 	/* Region which holds read-only EC image */
-	EC_FLASH_REGION_RO,
+	EC_FLASH_REGION_RO = 0,
 	/* Region which holds rewritable EC image */
 	EC_FLASH_REGION_RW,
 	/*
@@ -544,6 +544,8 @@ enum ec_flash_region {
 	 * EC_FLASH_REGION_RO)
 	 */
 	EC_FLASH_REGION_WP_RO,
+	/* Number of regions */
+	EC_FLASH_REGION_COUNT,
 };
 
 struct ec_params_flash_region_info {