summaryrefslogtreecommitdiff
path: root/cgpt/cgpt.h
diff options
context:
space:
mode:
authorAlbert Chaulk <achaulk@chromium.org>2013-03-29 15:02:38 -0700
committerChromeBot <chrome-bot@google.com>2013-06-21 11:50:39 -0700
commita75071c25295e392a21b8deddccaf2f3f0d0f041 (patch)
treebade7b91a1ce8a1fdf881fddab48f71b089cd3c9 /cgpt/cgpt.h
parent114d54a9e26aad6bfa4564152a3f1daed2e75a9b (diff)
downloadvboot-a75071c25295e392a21b8deddccaf2f3f0d0f041.tar.gz
Enables MTD mode via command line option.
Enables MTD mode with a command line option of -N=<write page bytes>,<write pages per erase block>, <erase block offset to fts partition>,<erase block size of fts partition> The problem is that we need to know exactly where the fts store partition is and what the layout of the flash chip is in order to be able to use it properly. This will vary per-device however, so for flexibility and testing purposes, this command line option allows specification of arbitrary layouts. BUG=chromium:221745 BRANCH=none TEST=verified during development via prints Original-Change-Id: I88640e777d5ccd4ffd3b39e1f131dc1d362c6b2c Reviewed-on: https://gerrit.chromium.org/gerrit/46920 Commit-Queue: Albert Chaulk <achaulk@chromium.org> Reviewed-by: Albert Chaulk <achaulk@chromium.org> Tested-by: Albert Chaulk <achaulk@chromium.org> (cherry picked from commit 2b768f99d246823f3711bbe4cf50ea9ab4588a06) Change-Id: I35591d4fbec13c3887beef11fdefc84fc90b8e05 Reviewed-on: https://gerrit.chromium.org/gerrit/49792 Reviewed-by: Albert Chaulk <achaulk@chromium.org> Tested-by: Albert Chaulk <achaulk@chromium.org> Commit-Queue: Albert Chaulk <achaulk@chromium.org>
Diffstat (limited to 'cgpt/cgpt.h')
-rw-r--r--cgpt/cgpt.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/cgpt/cgpt.h b/cgpt/cgpt.h
index 3cd6e8db..f6580868 100644
--- a/cgpt/cgpt.h
+++ b/cgpt/cgpt.h
@@ -52,6 +52,11 @@ struct drive {
struct pmbr pmbr;
};
+struct nand_layout {
+ int enabled;
+ int bytes_per_page, pages_per_block, fts_block_offset, fts_block_size;
+};
+
/* mode should be O_RDONLY or O_RDWR */
int DriveOpen(const char *drive_path, struct drive *drive, int mode);