This is an automated email from Gerrit.

Andrey Smirnov ([email protected]) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/2024

-- gerrit

commit 5f4f6022720089a5a2d8ed5c61afd86803f83fb2
Author: Andrey Smirnov <[email protected]>
Date:   Sat Feb 8 11:51:40 2014 -0800

    at91samd: Remove 'first' and 'last' checks in 'samd_erase'
    
    Remove 'first' and 'last' checks in 'samd_protect' since those
    parameters are checked in 'handle_flash_erase_command'.
    
    Change-Id: I30e5598a9ab656d81055f26cc63e291377605300
    Signed-off-by: Andrey Smirnov <[email protected]>

diff --git a/src/flash/nor/at91samd.c b/src/flash/nor/at91samd.c
index 8b0f14d..d3fe2f3 100644
--- a/src/flash/nor/at91samd.c
+++ b/src/flash/nor/at91samd.c
@@ -352,13 +352,6 @@ static int samd_erase(struct flash_bank *bank, int first, 
int last)
                        return ERROR_FLASH_BANK_NOT_PROBED;
        }
 
-       /* Make sure the sectors make sense. */
-       if (first >= bank->num_sectors || last >= bank->num_sectors) {
-               LOG_ERROR("Erase range %d - %d not valid (%d sectors total)",
-                               first, last, bank->num_sectors);
-               return ERROR_FAIL;
-       }
-
        /* The SAMD NVM has row erase granularity.  There are four pages in a 
row
         * and the number of rows in a sector depends on the sector size, which 
in
         * turn depends on the Flash capacity as there is a fixed number of

-- 

------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to