Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * This file is part of the flashrom project. | 2 * This file is part of the flashrom project. |
| 3 * | 3 * |
| 4 * Copyright (C) 2000 Silicon Integrated System Corporation | 4 * Copyright (C) 2000 Silicon Integrated System Corporation |
| 5 * Copyright (C) 2004 Tyan Corp <yhlu@tyan.com> | 5 * Copyright (C) 2004 Tyan Corp <yhlu@tyan.com> |
| 6 * Copyright (C) 2005-2008 coresystems GmbH | 6 * Copyright (C) 2005-2008 coresystems GmbH |
| 7 * Copyright (C) 2008,2009 Carl-Daniel Hailfinger | 7 * Copyright (C) 2008,2009 Carl-Daniel Hailfinger |
| 8 * | 8 * |
| 9 * This program is free software; you can redistribute it and/or modify | 9 * This program is free software; you can redistribute it and/or modify |
| 10 * it under the terms of the GNU General Public License as published by | 10 * it under the terms of the GNU General Public License as published by |
| (...skipping 1880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1891 goto out_nofree; | 1891 goto out_nofree; |
| 1892 } | 1892 } |
| 1893 | 1893 |
| 1894 /* Given the existence of read locks, we want to unlock for read, | 1894 /* Given the existence of read locks, we want to unlock for read, |
| 1895 * erase and write. | 1895 * erase and write. |
| 1896 */ | 1896 */ |
| 1897 if (flash->unlock) | 1897 if (flash->unlock) |
| 1898 flash->unlock(flash); | 1898 flash->unlock(flash); |
| 1899 | 1899 |
| 1900 /* add entries for regions specified in flashmap */ | 1900 /* add entries for regions specified in flashmap */ |
| 1901 » if (add_fmap_entries(flash) < 0) { | 1901 » if (!erase_it) { |
|
Stefan Reinauer
2011/03/25 22:35:32
should this be if (read_it || write_it)
Does it m
dhendrix
2011/03/25 22:50:44
Yes, it makes sense to verify using fmap data. The
| |
| 1902 » » ret = 1; | 1902 » » if (add_fmap_entries(flash) < 0) { |
| 1903 » » goto out_nofree; | 1903 » » » ret = 1; |
| 1904 » » » goto out_nofree; | |
| 1905 » » } | |
| 1904 } | 1906 } |
| 1905 | 1907 |
| 1906 /* mark entries included using -i argument as "included" if they are | 1908 /* mark entries included using -i argument as "included" if they are |
| 1907 found in the master rom_entries list */ | 1909 found in the master rom_entries list */ |
| 1908 if (process_include_args() < 0) { | 1910 if (process_include_args() < 0) { |
| 1909 ret = 1; | 1911 ret = 1; |
| 1910 goto out_nofree; | 1912 goto out_nofree; |
| 1911 } | 1913 } |
| 1912 | 1914 |
| 1913 if (read_it) { | 1915 if (read_it) { |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2008 out_nofree: | 2010 out_nofree: |
| 2009 chip_restore(); /* must be done before programmer_shutdown() */ | 2011 chip_restore(); /* must be done before programmer_shutdown() */ |
| 2010 /* | 2012 /* |
| 2011 * programmer_shutdown() call is moved to cli_mfg() in chromium os | 2013 * programmer_shutdown() call is moved to cli_mfg() in chromium os |
| 2012 * tree. This is because some operations, such as write protection, | 2014 * tree. This is because some operations, such as write protection, |
| 2013 * requires programmer_shutdown() but does not call doit(). | 2015 * requires programmer_shutdown() but does not call doit(). |
| 2014 */ | 2016 */ |
| 2015 // programmer_shutdown(); | 2017 // programmer_shutdown(); |
| 2016 return ret; | 2018 return ret; |
| 2017 } | 2019 } |
| OLD | NEW |