From patchwork Thu Feb 27 20:26:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 324915 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 664B92C0096 for ; Fri, 28 Feb 2014 07:30:02 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3614F4B5A1; Thu, 27 Feb 2014 21:29:54 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DAFk5pQLcoz0; Thu, 27 Feb 2014 21:29:54 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AE0FA4B622; Thu, 27 Feb 2014 21:28:36 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 96DAD4B372 for ; Thu, 27 Feb 2014 21:28:28 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZJ1Shep5P0e7 for ; Thu, 27 Feb 2014 21:28:28 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ob0-f202.google.com (mail-ob0-f202.google.com [209.85.214.202]) by theia.denx.de (Postfix) with ESMTPS id C52324B59D for ; Thu, 27 Feb 2014 21:28:14 +0100 (CET) Received: by mail-ob0-f202.google.com with SMTP id wo20so133958obc.1 for ; Thu, 27 Feb 2014 12:28:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=teL1jiy3vkWdQqGJc1/N/slXZB3RS1T5Idmbb01et24=; b=hVFBV/r/am5MFDAUxGfqbVXM8BRDnFB7kCWbUOAgguQZVkMWuCCSDL3r3NED8ihRWb tTJ+y8sLJjMgqbcBQRRS8dQh+0YZiWCruUYwhXSnn25nX7KCOgBqh88prXmeWOGw5kCj 0V07bptW3bjh2IkjyJZLfFlJrYGZxQVwukeh2DZViZE5twlt4H+t9k8X7mM+zZjUA4Ln VBYAcY9kdtJVMrsqMcm9Adj9wIlTCL55rEE/Ig5bpk3bQG5XFVyC29ymcsjq4+S5BnyQ 22n0sTnM3qG+wSRB4BaF0nxzW2oT28tTpuU08BmItCCuyvYyW1O4kPf2DARBlUBbL+bl /s+g== X-Gm-Message-State: ALoCoQlnvfd3Av4aIVL3EJpp8VrOVN8dt4I7DC8EKKNvh3/aTs/QEMTV+zZx00I2xzptYdaUbX1cnRqhOnuJQtKGKHRXBtO7i+uKHzG1EoTHpEnJVGdRoZ7dukRm0zzKsx4VVMPGbOLfkrI2tadRWD40+ybgLKq0MkfWuVtCD1/oZDXqVX4yPqNk+8Z/tgR7xO/w2IZ0GM5I X-Received: by 10.182.55.102 with SMTP id r6mr5011874obp.7.1393532893676; Thu, 27 Feb 2014 12:28:13 -0800 (PST) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id e21si698514yhl.7.2014.02.27.12.28.13 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 27 Feb 2014 12:28:13 -0800 (PST) Received: from kaki.bld.corp.google.com (kaki.bld.corp.google.com [172.29.216.32]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 8A01731C1CD; Thu, 27 Feb 2014 12:28:13 -0800 (PST) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 3A7102221B0; Thu, 27 Feb 2014 13:28:13 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Thu, 27 Feb 2014 13:26:00 -0700 Message-Id: <1393532785-9020-7-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.9.0.279.gdc9e3eb In-Reply-To: <1393532785-9020-1-git-send-email-sjg@chromium.org> References: <1393532785-9020-1-git-send-email-sjg@chromium.org> Cc: u-boot-review@google.com Subject: [U-Boot] [PATCH v2 06/31] cros_ec: Add an enum for the number of flash regions X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Add an enum for the number of flash regions so we can keep track of all the possible regions. Reviewed-by: Randall Spangler Signed-off-by: Simon Glass --- Changes in v2: None include/ec_commands.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/ec_commands.h b/include/ec_commands.h index 12811cc..d9c8c1f 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 {