Re-style drivers/jtaglib.{c,h} to match the rest of the code
Strictly style changes only. Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
This commit is contained in:
parent
91289a24a7
commit
55671036a6
1601
drivers/jtaglib.c
1601
drivers/jtaglib.c
File diff suppressed because it is too large
Load Diff
|
@ -26,44 +26,81 @@
|
||||||
#define JTAGLIB_H_
|
#define JTAGLIB_H_
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "jtdev.h"
|
#include "jtdev.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
/*===== public symbols ====================================================== */
|
/* Flash erasing modes */
|
||||||
|
|
||||||
/* flash erasing modes */
|
|
||||||
#define JTAG_ERASE_MASS 0xA506
|
#define JTAG_ERASE_MASS 0xA506
|
||||||
#define JTAG_ERASE_MAIN 0xA504
|
#define JTAG_ERASE_MAIN 0xA504
|
||||||
#define JTAG_ERASE_SGMT 0xA502
|
#define JTAG_ERASE_SGMT 0xA502
|
||||||
|
|
||||||
/*===== public functions =====================================================*/
|
/* Take target device under JTAG control. */
|
||||||
|
unsigned int jtag_init(struct jtdev *p);
|
||||||
|
|
||||||
unsigned int jtag_init (struct jtdev *p);
|
unsigned int jtag_get_device(struct jtdev *p);
|
||||||
unsigned int jtag_get_device (struct jtdev *p);
|
|
||||||
unsigned int jtag_chip_id (struct jtdev *p);
|
/* Read the target chip id. */
|
||||||
uint16_t jtag_read_mem (struct jtdev *p, unsigned int format,
|
unsigned int jtag_chip_id(struct jtdev *p);
|
||||||
address_t address);
|
|
||||||
void jtag_read_mem_quick (struct jtdev *p, address_t start_address,
|
/* Reads one byte/word from a given address */
|
||||||
unsigned int word_count, uint16_t *data);
|
uint16_t jtag_read_mem(struct jtdev *p,
|
||||||
void jtag_write_mem (struct jtdev *p, unsigned int format,
|
unsigned int format,
|
||||||
address_t address, uint16_t data);
|
address_t address);
|
||||||
void jtag_write_mem_quick(struct jtdev *p, address_t start_address,
|
|
||||||
unsigned int word_count,
|
/* Reads an array of words from target memory */
|
||||||
const uint16_t *data);
|
void jtag_read_mem_quick(struct jtdev *p,
|
||||||
int jtag_is_fuse_blown (struct jtdev *p);
|
address_t start_address,
|
||||||
unsigned int jtag_execute_puc (struct jtdev *p);
|
unsigned int word_count,
|
||||||
void jtag_release_device (struct jtdev *p, address_t address);
|
uint16_t *data);
|
||||||
int jtag_verify_mem (struct jtdev *p, address_t start_address,
|
|
||||||
unsigned int word_count,
|
/* Writes one byte/word at a given address */
|
||||||
const uint16_t *data);
|
void jtag_write_mem(struct jtdev *p,
|
||||||
int jtag_erase_check (struct jtdev *p, address_t start_address,
|
unsigned int format,
|
||||||
unsigned int word_count);
|
address_t address,
|
||||||
void jtag_write_flash (struct jtdev *p, address_t start_address,
|
uint16_t data);
|
||||||
unsigned int word_count,
|
|
||||||
const uint16_t *data);
|
/* Writes an array of words into target memory */
|
||||||
void jtag_erase_flash (struct jtdev *p, unsigned int erase_mode,
|
void jtag_write_mem_quick(struct jtdev *p,
|
||||||
address_t erase_address);
|
address_t start_address,
|
||||||
address_t jtag_read_reg (struct jtdev *p, int reg);
|
unsigned int word_count,
|
||||||
void jtag_write_reg (struct jtdev *p, int reg, address_t value);
|
const uint16_t *data);
|
||||||
|
|
||||||
|
/* This function checks if the JTAG access security fuse is blown */
|
||||||
|
int jtag_is_fuse_blown(struct jtdev *p);
|
||||||
|
|
||||||
|
/* Execute a Power-Up Clear (PUC) using JTAG CNTRL SIG register */
|
||||||
|
unsigned int jtag_execute_puc(struct jtdev *p);
|
||||||
|
|
||||||
|
/* Release the target device from JTAG control */
|
||||||
|
void jtag_release_device(struct jtdev *p, address_t address);
|
||||||
|
|
||||||
|
/* Performs a verification over the given memory range */
|
||||||
|
int jtag_verify_mem(struct jtdev *p,
|
||||||
|
address_t start_address,
|
||||||
|
unsigned int word_count,
|
||||||
|
const uint16_t *data);
|
||||||
|
|
||||||
|
/* Performs an erase check over the given memory range */
|
||||||
|
int jtag_erase_check(struct jtdev *p,
|
||||||
|
address_t start_address,
|
||||||
|
unsigned int word_count);
|
||||||
|
|
||||||
|
/* Programs/verifies an array of words into a FLASH */
|
||||||
|
void jtag_write_flash(struct jtdev *p,
|
||||||
|
address_t start_address,
|
||||||
|
unsigned int word_count,
|
||||||
|
const uint16_t *data);
|
||||||
|
|
||||||
|
/* Performs a mass erase or a segment erase of a FLASH module */
|
||||||
|
void jtag_erase_flash(struct jtdev *p,
|
||||||
|
unsigned int erase_mode,
|
||||||
|
address_t erase_address);
|
||||||
|
|
||||||
|
/* Reads a register from the target CPU */
|
||||||
|
address_t jtag_read_reg(struct jtdev *p, int reg);
|
||||||
|
|
||||||
|
/* Writes a value into a register of the target CPU */
|
||||||
|
void jtag_write_reg(struct jtdev *p, int reg, address_t value);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue