flash/nor: update cc3220sf for issue found in code review 88/4788/2
authorEdward Fewell <efewell@ti.com>
Wed, 5 Dec 2018 23:10:45 +0000 (17:10 -0600)
committerSpencer Oliver <spen@spen-soft.co.uk>
Tue, 11 Dec 2018 13:27:29 +0000 (13:27 +0000)
Remove inappropriate use of bank_number.

Change-Id: I11be1f2540cb09a3ccede35312f90bc8276af338
Signed-off-by: Edward Fewell <efewell@ti.com>
Reviewed-on: http://openocd.zylin.com/4788
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
src/flash/nor/cc3220sf.c

index 5ccb428a89b8e9ebf7f6c059c5e502a088128f93..244112467a0204efa8c77cfb88c446aa20a59305 100644 (file)
@@ -430,18 +430,10 @@ static int cc3220sf_probe(struct flash_bank *bank)
        uint32_t base;
        uint32_t size;
        int num_sectors;
        uint32_t base;
        uint32_t size;
        int num_sectors;
-       int bank_id;
 
 
-       bank_id = bank->bank_number;
-
-       if (0 == bank_id) {
-               base = FLASH_BASE_ADDR;
-               size = FLASH_NUM_SECTORS * FLASH_SECTOR_SIZE;
-               num_sectors = FLASH_NUM_SECTORS;
-       } else {
-               /* Invalid bank number somehow */
-               return ERROR_FAIL;
-       }
+       base = FLASH_BASE_ADDR;
+       size = FLASH_NUM_SECTORS * FLASH_SECTOR_SIZE;
+       num_sectors = FLASH_NUM_SECTORS;
 
        if (NULL != bank->sectors) {
                free(bank->sectors);
 
        if (NULL != bank->sectors) {
                free(bank->sectors);
@@ -479,11 +471,6 @@ static int cc3220sf_auto_probe(struct flash_bank *bank)
 
        int retval = ERROR_OK;
 
 
        int retval = ERROR_OK;
 
-       if (0 != bank->bank_number) {
-               /* Invalid bank number somehow */
-               return ERROR_FAIL;
-       }
-
        if (!cc3220sf_bank->probed)
                retval = cc3220sf_probe(bank);
 
        if (!cc3220sf_bank->probed)
                retval = cc3220sf_probe(bank);
 

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)