mips: mips32_pracc_exec error propagation fixes
[fw/openocd] / src / target / target_type.h
index 10fcd4fd28592f2f430900bf34256c1562984cb5..15598b2f17f53f6014d55ab5442947f7dfaa413f 100644 (file)
@@ -27,6 +27,7 @@
 #define TARGET_TYPE_H
 
 #include <helper/types.h>
+#include <jim-nvp.h>
 
 struct target;
 
@@ -41,7 +42,7 @@ struct target_type
         * Name of this type of target.  Do @b not access this
         * field directly, use target_type_name() instead.
         */
-       char *name;
+       const char *name;
 
        /* poll current target status */
        int (*poll)(struct target *target);
@@ -118,6 +119,12 @@ struct target_type
         */
        int (*write_memory)(struct target *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer);
 
+       /* Default implementation will do some fancy alignment to improve performance, target can override */
+       int (*read_buffer)(struct target *target, uint32_t address, uint32_t size, uint8_t *buffer);
+
+       /* Default implementation will do some fancy alignment to improve performance, target can override */
+       int (*write_buffer)(struct target *target, uint32_t address, uint32_t size, uint8_t *buffer);
+
        /**
         * Write target memory in multiples of 4 bytes, optimized for
         * writing large quantities of data.  Do @b not call this