This is an automated email from Gerrit.

Vincent van der Locht ([email protected]) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/3836

-- gerrit

commit 40e38aee8ec56c82030ee107069059673eef876d
Author: Vincent van der Locht <[email protected]>
Date:   Tue Oct 25 23:13:07 2016 +0200

    at91sam4x: added simplistic info function for Atmel sam3 and sam4 flash 
driver
    
    simplistic info function for Atmel sam3 and sam4 chip definition
    
    Change-Id: I117e66fed92dfa7b709fb6917118b943f2e7c5c5
    Signed-off-by: [email protected]

diff --git a/src/flash/nor/at91sam3.c b/src/flash/nor/at91sam3.c
index 1536378..57a5f51 100644
--- a/src/flash/nor/at91sam3.c
+++ b/src/flash/nor/at91sam3.c
@@ -3314,6 +3314,16 @@ static int sam3_protect(struct flash_bank *bank, int 
set, int first, int last)
 
 }
 
+static int sam3_info(struct flash_bank *bank, char *buf, int buf_size)
+{
+       if (bank->target->state != TARGET_HALTED) {
+               LOG_ERROR("Target not halted");
+               return ERROR_TARGET_NOT_HALTED;
+       }
+       buf[0] = 0;
+       return ERROR_OK;
+}
+
 static int sam3_page_read(struct sam3_bank_private *pPrivate, unsigned 
pagenum, uint8_t *buf)
 {
        uint32_t adr;
@@ -3771,4 +3781,5 @@ struct flash_driver at91sam3_flash = {
        .auto_probe = sam3_auto_probe,
        .erase_check = sam3_erase_check,
        .protect_check = sam3_protect_check,
+       .info = sam3_info,
 };
diff --git a/src/flash/nor/at91sam4.c b/src/flash/nor/at91sam4.c
index dada79f..26e2eb5 100644
--- a/src/flash/nor/at91sam4.c
+++ b/src/flash/nor/at91sam4.c
@@ -2248,6 +2248,15 @@ static int sam4_protect(struct flash_bank *bank, int 
set, int first, int last)
        return r;
 
 }
+static int sam4_info(struct flash_bank *bank, char *buf, int buf_size)
+{
+       if (bank->target->state != TARGET_HALTED) {
+               LOG_ERROR("Target not halted");
+               return ERROR_TARGET_NOT_HALTED;
+       }
+       buf[0] = 0;
+       return ERROR_OK;
+}
 
 static int sam4_page_read(struct sam4_bank_private *pPrivate, unsigned 
pagenum, uint8_t *buf)
 {
@@ -2709,4 +2718,5 @@ struct flash_driver at91sam4_flash = {
        .auto_probe = sam4_auto_probe,
        .erase_check = default_flash_blank_check,
        .protect_check = sam4_protect_check,
+       .info = sam4_info
 };

-- 

------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to