]> git.sur5r.net Git - u-boot/commitdiff
cros_ec: Add an enum for the number of flash regions
authorSimon Glass <sjg@chromium.org>
Thu, 27 Feb 2014 20:26:00 +0000 (13:26 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 18 Mar 2014 02:05:45 +0000 (20:05 -0600)
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>
include/ec_commands.h

index 12811cc070e5859b892e7aad42abb7076cf4de98..d9c8c1f3350207770fbd83ef2c04c5c90868e45e 100644 (file)
@@ -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 {