flash/nor: consolidate flash protect/protect_check
[openocd.git] / src / flash / nor / aducm360.c
index 3e446f53901b89caa652fde9c646b8b8495b8d38..7663783478f522472112ffac5529e973e3c392de 100644 (file)
@@ -12,6 +12,8 @@
  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
  *   GNU General Public License for more details.                          *
  *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
  ***************************************************************************/
 
 /***************************************************************************
@@ -100,13 +102,6 @@ static int aducm360_build_sector_list(struct flash_bank *bank)
        return ERROR_OK;
 }
 
-/* ----------------------------------------------------------------------- */
-static int aducm360_protect_check(struct flash_bank *bank)
-{
-       LOG_WARNING("aducm360_protect_check not implemented.");
-       return ERROR_OK;
-}
-
 /* ----------------------------------------------------------------------- */
 static int aducm360_mass_erase(struct target *target)
 {
@@ -192,13 +187,6 @@ static int aducm360_erase(struct flash_bank *bank, int first, int last)
        return res;
 }
 
-/* ----------------------------------------------------------------------- */
-static int aducm360_protect(struct flash_bank *bank, int set, int first, int last)
-{
-       LOG_ERROR("aducm360_protect not implemented.");
-       return ERROR_FLASH_OPERATION_FAILED;
-}
-
 /* ----------------------------------------------------------------------- */
 static int aducm360_write_block_sync(
                struct flash_bank *bank,
@@ -549,7 +537,7 @@ static int aducm360_check_flash_completion(struct target *target, unsigned int t
 {
        uint32_t v = 1;
 
-       long long endtime = timeval_ms() + timeout_ms;
+       int64_t endtime = timeval_ms() + timeout_ms;
        while (1) {
                target_read_u32(target, ADUCM360_FLASH_BASE+ADUCM360_FLASH_FEESTA, &v);
                if ((v & 0x00000001) == 0)
@@ -570,11 +558,9 @@ struct flash_driver aducm360_flash = {
        .name = "aducm360",
        .flash_bank_command = aducm360_flash_bank_command,
        .erase = aducm360_erase,
-       .protect = aducm360_protect,
        .write = aducm360_write,
        .read = default_flash_read,
        .probe = aducm360_probe,
        .auto_probe = aducm360_probe,
        .erase_check = default_flash_blank_check,
-       .protect_check = aducm360_protect_check,
 };

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)