]> git.sur5r.net Git - openocd/blobdiff - src/target/arm7_9_common.c
nds32: refine nds32_v2 implement
[openocd] / src / target / arm7_9_common.c
index 07beef51d4dd46d1c9405f501ae83be04e60e8fa..6eade96a16a66f9bfbc8cc2809e7cd9579ac4958 100644 (file)
@@ -26,7 +26,7 @@
  *   You should have received a copy of the GNU General Public License     *
  *   along with this program; if not, write to the                         *
  *   Free Software Foundation, Inc.,                                       *
- *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.           *
  ***************************************************************************/
 
 #ifdef HAVE_CONFIG_H
@@ -2469,6 +2469,20 @@ int arm7_9_write_memory(struct target *target,
        return ERROR_OK;
 }
 
+int arm7_9_write_memory_opt(struct target *target,
+       uint32_t address,
+       uint32_t size,
+       uint32_t count,
+       const uint8_t *buffer)
+{
+       struct arm7_9_common *arm7_9 = target_to_arm7_9(target);
+
+       if (size == 4 && count > 32 && arm7_9->bulk_write_memory)
+               return arm7_9->bulk_write_memory(target, address, count, buffer);
+       else
+               return arm7_9_write_memory(target, address, size, count, buffer);
+}
+
 static int dcc_count;
 static const uint8_t *dcc_buffer;