From: Antonio Borneo Date: Sat, 10 Apr 2010 17:11:11 +0000 (+0800) Subject: TARGET/MIPS32_PRACC: review scope of functions X-Git-Tag: v0.5.0-rc1~753 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=689fa8ad8c9bf40a98bd09303c80b67f72b7ac1f;p=openocd TARGET/MIPS32_PRACC: review scope of functions Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo --- diff --git a/src/target/mips32_pracc.c b/src/target/mips32_pracc.c index 19ba886c..d96867aa 100644 --- a/src/target/mips32_pracc.c +++ b/src/target/mips32_pracc.c @@ -90,6 +90,24 @@ struct mips32_pracc_context struct mips_ejtag *ejtag_info; }; +static int mips32_pracc_read_mem8(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint8_t *buf); +static int mips32_pracc_read_mem16(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint16_t *buf); +static int mips32_pracc_read_mem32(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint32_t *buf); +static int mips32_pracc_read_u32(struct mips_ejtag *ejtag_info, + uint32_t addr, uint32_t *buf); + +static int mips32_pracc_write_mem8(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint8_t *buf); +static int mips32_pracc_write_mem16(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint16_t *buf); +static int mips32_pracc_write_mem32(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint32_t *buf); +static int mips32_pracc_write_u32(struct mips_ejtag *ejtag_info, + uint32_t addr, uint32_t *buf); + static int wait_for_pracc_rw(struct mips_ejtag *ejtag_info, uint32_t *ctrl) { uint32_t ejtag_ctrl; @@ -284,7 +302,7 @@ int mips32_pracc_read_mem(struct mips_ejtag *ejtag_info, uint32_t addr, int size return ERROR_OK; } -int mips32_pracc_read_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf) +static int mips32_pracc_read_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf) { static const uint32_t code[] = { /* start: */ @@ -354,7 +372,7 @@ int mips32_pracc_read_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int co return retval; } -int mips32_pracc_read_u32(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t *buf) +static int mips32_pracc_read_u32(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t *buf) { static const uint32_t code[] = { /* start: */ @@ -387,7 +405,7 @@ int mips32_pracc_read_u32(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t return retval; } -int mips32_pracc_read_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf) +static int mips32_pracc_read_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf) { static const uint32_t code[] = { /* start: */ @@ -464,7 +482,7 @@ int mips32_pracc_read_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int co return ERROR_OK; } -int mips32_pracc_read_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf) +static int mips32_pracc_read_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf) { static const uint32_t code[] = { /* start: */ @@ -559,7 +577,7 @@ int mips32_pracc_write_mem(struct mips_ejtag *ejtag_info, uint32_t addr, int siz return ERROR_OK; } -int mips32_pracc_write_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf) +static int mips32_pracc_write_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf) { static const uint32_t code[] = { /* start: */ @@ -608,7 +626,7 @@ int mips32_pracc_write_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int c return ERROR_OK; } -int mips32_pracc_write_u32(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t *buf) +static int mips32_pracc_write_u32(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t *buf) { static const uint32_t code[] = { /* start: */ @@ -640,7 +658,7 @@ int mips32_pracc_write_u32(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_ return ERROR_OK; } -int mips32_pracc_write_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf) +static int mips32_pracc_write_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf) { static const uint32_t code[] = { /* start: */ @@ -698,7 +716,7 @@ int mips32_pracc_write_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int c return ERROR_OK; } -int mips32_pracc_write_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf) +static int mips32_pracc_write_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf) { static const uint32_t code[] = { /* start: */ diff --git a/src/target/mips32_pracc.h b/src/target/mips32_pracc.h index f8b00d0b..f2c26800 100644 --- a/src/target/mips32_pracc.h +++ b/src/target/mips32_pracc.h @@ -47,24 +47,6 @@ int mips32_pracc_write_mem(struct mips_ejtag *ejtag_info, int mips32_pracc_fastdata_xfer(struct mips_ejtag *ejtag_info, struct working_area *source, int write, uint32_t addr, int count, uint32_t *buf); -int mips32_pracc_read_mem8(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint8_t *buf); -int mips32_pracc_read_mem16(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint16_t *buf); -int mips32_pracc_read_mem32(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint32_t *buf); -int mips32_pracc_read_u32(struct mips_ejtag *ejtag_info, - uint32_t addr, uint32_t *buf); - -int mips32_pracc_write_mem8(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint8_t *buf); -int mips32_pracc_write_mem16(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint16_t *buf); -int mips32_pracc_write_mem32(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint32_t *buf); -int mips32_pracc_write_u32(struct mips_ejtag *ejtag_info, - uint32_t addr, uint32_t *buf); - int mips32_pracc_read_regs(struct mips_ejtag *ejtag_info, uint32_t *regs); int mips32_pracc_write_regs(struct mips_ejtag *ejtag_info, uint32_t *regs);