From 7ecd47c4740190bcac5b02542286e3abaaf3b52d Mon Sep 17 00:00:00 2001 From: Rutger Hofman Date: Tue, 21 Apr 2009 17:29:52 +0000 Subject: [PATCH] Do the indent again, but pass in -T for each typedef. I included FILE and uint32_t and friends, but who knows what system types I forgot git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1510 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- urjtag/ChangeLog | 2 +- urjtag/include/bsbit.h | 4 +- urjtag/include/bssignal.h | 6 +-- urjtag/include/bus.h | 4 +- urjtag/include/bus_driver.h | 22 ++++----- urjtag/include/cable.h | 54 ++++++++++---------- urjtag/include/chain.h | 26 +++++----- urjtag/include/cmd.h | 6 +-- urjtag/include/data_register.h | 2 +- urjtag/include/flash.h | 22 ++++----- urjtag/include/instruction.h | 2 +- urjtag/include/jim.h | 28 +++++------ urjtag/include/jim/some_cpu.h | 2 +- urjtag/include/jtag.h | 22 ++++----- urjtag/include/parport.h | 12 ++--- urjtag/include/part.h | 28 +++++------ urjtag/include/register.h | 24 ++++----- urjtag/include/svf.h | 2 +- urjtag/include/tap.h | 20 ++++---- urjtag/include/tap_state.h | 12 ++--- urjtag/include/usbconn.h | 10 ++-- urjtag/include/xpcu.h | 6 +-- urjtag/src/bsdl/bsdl.c | 6 +-- urjtag/src/bsdl/bsdl_sem.c | 24 ++++----- urjtag/src/bus/au1500.c | 22 ++++----- urjtag/src/bus/avr32.c | 63 ++++++++++++------------ urjtag/src/bus/bcm1250.c | 34 ++++++------- urjtag/src/bus/bf533_ezkit.c | 24 ++++----- urjtag/src/bus/bf533_stamp.c | 24 ++++----- urjtag/src/bus/bf537_stamp.c | 24 ++++----- urjtag/src/bus/bf548_ezkit.c | 24 ++++----- urjtag/src/bus/bf561_ezkit.c | 24 ++++----- urjtag/src/bus/bscoach.c | 24 ++++----- urjtag/src/bus/buses.c | 4 +- urjtag/src/bus/ejtag.c | 25 +++++----- urjtag/src/bus/ejtag_dma.c | 22 ++++----- urjtag/src/bus/fjmem.c | 34 ++++++------- urjtag/src/bus/generic_bus.c | 10 ++-- urjtag/src/bus/generic_bus.h | 10 ++-- urjtag/src/bus/h7202.c | 21 ++++---- urjtag/src/bus/ixp425.c | 24 ++++----- urjtag/src/bus/jopcyc.c | 27 +++++----- urjtag/src/bus/lh7a400.c | 20 ++++---- urjtag/src/bus/mpc5200.c | 22 ++++----- urjtag/src/bus/mpc824x.c | 22 ++++----- urjtag/src/bus/ppc405ep.c | 20 ++++---- urjtag/src/bus/ppc440gx_ebc8.c | 20 ++++---- urjtag/src/bus/prototype.c | 20 ++++---- urjtag/src/bus/pxa2x0.c | 24 ++++----- urjtag/src/bus/readmem.c | 2 +- urjtag/src/bus/s3c4510x.c | 24 ++++----- urjtag/src/bus/sa1110.c | 20 ++++---- urjtag/src/bus/sh7727.c | 20 ++++---- urjtag/src/bus/sh7750r.c | 20 ++++---- urjtag/src/bus/sh7751r.c | 20 ++++---- urjtag/src/bus/sharc21065l.c | 20 ++++---- urjtag/src/bus/slsup3.c | 28 ++++++----- urjtag/src/bus/tx4925.c | 24 ++++----- urjtag/src/bus/writemem.c | 2 +- urjtag/src/bus/zefant-xs3.c | 32 ++++++------ urjtag/src/cmd/addpart.c | 2 +- urjtag/src/cmd/bit.c | 2 +- urjtag/src/cmd/bsdl.c | 2 +- urjtag/src/cmd/bus.c | 2 +- urjtag/src/cmd/cable.c | 2 +- urjtag/src/cmd/cmd.c | 4 +- urjtag/src/cmd/debug.c | 2 +- urjtag/src/cmd/detect.c | 2 +- urjtag/src/cmd/detectflash.c | 2 +- urjtag/src/cmd/discovery.c | 2 +- urjtag/src/cmd/dr.c | 2 +- urjtag/src/cmd/endian.c | 2 +- urjtag/src/cmd/eraseflash.c | 2 +- urjtag/src/cmd/flashmem.c | 2 +- urjtag/src/cmd/frequency.c | 2 +- urjtag/src/cmd/get.c | 2 +- urjtag/src/cmd/help.c | 2 +- urjtag/src/cmd/idcode.c | 2 +- urjtag/src/cmd/include.c | 6 +-- urjtag/src/cmd/initbus.c | 2 +- urjtag/src/cmd/instruction.c | 2 +- urjtag/src/cmd/parse.c | 6 +-- urjtag/src/cmd/part.c | 2 +- urjtag/src/cmd/peekpoke.c | 4 +- urjtag/src/cmd/pod.c | 2 +- urjtag/src/cmd/print.c | 2 +- urjtag/src/cmd/quit.c | 2 +- urjtag/src/cmd/readmem.c | 2 +- urjtag/src/cmd/register.c | 2 +- urjtag/src/cmd/reset.c | 2 +- urjtag/src/cmd/salias.c | 2 +- urjtag/src/cmd/scan.c | 2 +- urjtag/src/cmd/set.c | 2 +- urjtag/src/cmd/shell.c | 2 +- urjtag/src/cmd/shift.c | 2 +- urjtag/src/cmd/signal.c | 2 +- urjtag/src/cmd/svf.c | 2 +- urjtag/src/cmd/test.c | 2 +- urjtag/src/cmd/usleep.c | 2 +- urjtag/src/cmd/writemem.c | 2 +- urjtag/src/flash/amd.c | 57 +++++++++++---------- urjtag/src/flash/amd_flash.c | 39 +++++++-------- urjtag/src/flash/cfi.c | 4 +- urjtag/src/flash/detectflash.c | 22 ++++----- urjtag/src/flash/flash.c | 8 +-- urjtag/src/flash/intel.c | 62 +++++++++++------------ urjtag/src/flash/jedec.c | 2 +- urjtag/src/flash/jedec_exp.c | 4 +- urjtag/src/jim/intel_28f800b3.c | 14 +++--- urjtag/src/jim/some_cpu.c | 10 ++-- urjtag/src/jim/tap.c | 16 +++--- urjtag/src/jtag.c | 10 ++-- urjtag/src/lib/getdelim.c | 2 +- urjtag/src/lib/getline.c | 4 +- urjtag/src/part/bsbit.c | 4 +- urjtag/src/part/data_register.c | 2 +- urjtag/src/part/instruction.c | 2 +- urjtag/src/part/part.c | 28 +++++------ urjtag/src/part/signal.c | 6 +-- urjtag/src/svf/svf.c | 26 +++++----- urjtag/src/tap/cable.c | 46 ++++++++--------- urjtag/src/tap/cable/arcom.c | 8 +-- urjtag/src/tap/cable/byteblaster.c | 8 +-- urjtag/src/tap/cable/cmd_xfer.c | 22 ++++----- urjtag/src/tap/cable/cmd_xfer.h | 20 ++++---- urjtag/src/tap/cable/dlc5.c | 8 +-- urjtag/src/tap/cable/ea253.c | 8 +-- urjtag/src/tap/cable/ei012.c | 8 +-- urjtag/src/tap/cable/ft2232.c | 68 +++++++++++++------------- urjtag/src/tap/cable/generic.c | 14 +++--- urjtag/src/tap/cable/generic.h | 12 ++--- urjtag/src/tap/cable/generic_parport.c | 6 +-- urjtag/src/tap/cable/generic_parport.h | 6 +-- urjtag/src/tap/cable/generic_usbconn.c | 6 +-- urjtag/src/tap/cable/generic_usbconn.h | 6 +-- urjtag/src/tap/cable/jim.c | 18 +++---- urjtag/src/tap/cable/jlink.c | 52 ++++++++++---------- urjtag/src/tap/cable/keithkoep.c | 8 +-- urjtag/src/tap/cable/lattice.c | 8 +-- urjtag/src/tap/cable/mpcbdm.c | 8 +-- urjtag/src/tap/cable/triton.c | 8 +-- urjtag/src/tap/cable/ts7800.c | 28 +++++------ urjtag/src/tap/cable/usbblaster.c | 28 +++++------ urjtag/src/tap/cable/vision_ep9307.c | 26 +++++----- urjtag/src/tap/cable/wiggler.c | 14 +++--- urjtag/src/tap/cable/wiggler2.c | 8 +-- urjtag/src/tap/cable/xpc.c | 36 +++++++------- urjtag/src/tap/chain.c | 26 +++++----- urjtag/src/tap/detect.c | 8 +-- urjtag/src/tap/discovery.c | 6 +-- urjtag/src/tap/idcode.c | 2 +- urjtag/src/tap/parport.c | 12 ++--- urjtag/src/tap/parport/direct.c | 14 +++--- urjtag/src/tap/parport/ppdev.c | 18 +++---- urjtag/src/tap/parport/ppi.c | 14 +++--- urjtag/src/tap/register.c | 24 ++++----- urjtag/src/tap/state.c | 12 ++--- urjtag/src/tap/tap.c | 20 ++++---- urjtag/src/tap/usbconn.c | 8 +-- urjtag/src/tap/usbconn/libftd2xx.c | 24 ++++----- urjtag/src/tap/usbconn/libftdi.c | 24 ++++----- urjtag/src/tap/usbconn/libusb.c | 8 +-- 162 files changed, 1130 insertions(+), 1138 deletions(-) diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index 2aa75132..8e5c8a83 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -2,7 +2,7 @@ Run indent over the code base: all '*.[ch]' files except evidently imported ones, like the libiberty imports in lib. - * xargs indent -npro -nut -bli0 -i4 < indent-files + * xargs indent -npro -nut -bli0 -i4 {-T typedef}* < indent-files where indent-files is `find . -name '*.[ch]' -print` except: src/lib/ansidecl.h src/lib/filenames.h diff --git a/urjtag/include/bsbit.h b/urjtag/include/bsbit.h index 16929fa0..46a2a3ce 100644 --- a/urjtag/include/bsbit.h +++ b/urjtag/include/bsbit.h @@ -49,8 +49,8 @@ struct bsbit int control_state; }; -bsbit_t *bsbit_alloc (int bit, const char *name, int type, signal_t * signal, +bsbit_t *bsbit_alloc (int bit, const char *name, int type, signal_t *signal, int safe); -void bsbit_free (bsbit_t * b); +void bsbit_free (bsbit_t *b); #endif /* BSBIT_H */ diff --git a/urjtag/include/bssignal.h b/urjtag/include/bssignal.h index 3b4f57f3..4505bb42 100644 --- a/urjtag/include/bssignal.h +++ b/urjtag/include/bssignal.h @@ -49,9 +49,9 @@ struct salias }; signal_t *signal_alloc (const char *name); -void signal_free (signal_t * s); +void signal_free (signal_t *s); -salias_t *salias_alloc (const char *name, const signal_t * signal); -void salias_free (salias_t * salias); +salias_t *salias_alloc (const char *name, const signal_t *signal); +void salias_free (salias_t *salias); #endif /* SIGNAL_H */ diff --git a/urjtag/include/bus.h b/urjtag/include/bus.h index 46d1c742..5eb4e1c1 100644 --- a/urjtag/include/bus.h +++ b/urjtag/include/bus.h @@ -40,7 +40,7 @@ extern buses_t buses; extern const bus_driver_t *bus_drivers[]; void buses_free (void); -void buses_add (bus_t * abus); -void buses_delete (bus_t * abus); +void buses_add (bus_t *abus); +void buses_delete (bus_t *abus); #endif /* BUS_H */ diff --git a/urjtag/include/bus_driver.h b/urjtag/include/bus_driver.h index 0e4e0e31..ac55cc86 100644 --- a/urjtag/include/bus_driver.h +++ b/urjtag/include/bus_driver.h @@ -54,18 +54,18 @@ struct bus_driver { const char *name; const char *description; - bus_t *(*new_bus) (chain_t * chain, const bus_driver_t * driver, + bus_t *(*new_bus) (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]); - void (*free_bus) (bus_t * bus); - void (*printinfo) (bus_t * bus); - void (*prepare) (bus_t * bus); - int (*area) (bus_t * bus, uint32_t adr, bus_area_t * area); - void (*read_start) (bus_t * bus, uint32_t adr); - uint32_t (*read_next) (bus_t * bus, uint32_t adr); - uint32_t (*read_end) (bus_t * bus); - uint32_t (*read) (bus_t * bus, uint32_t adr); - void (*write) (bus_t * bus, uint32_t adr, uint32_t data); - int (*init) (bus_t * bus); + void (*free_bus) (bus_t *bus); + void (*printinfo) (bus_t *bus); + void (*prepare) (bus_t *bus); + int (*area) (bus_t *bus, uint32_t adr, bus_area_t *area); + void (*read_start) (bus_t *bus, uint32_t adr); + uint32_t (*read_next) (bus_t *bus, uint32_t adr); + uint32_t (*read_end) (bus_t *bus); + uint32_t (*read) (bus_t *bus, uint32_t adr); + void (*write) (bus_t *bus, uint32_t adr, uint32_t data); + int (*init) (bus_t *bus); }; struct bus diff --git a/urjtag/include/cable.h b/urjtag/include/cable.h index 93b6efa1..d423fe11 100644 --- a/urjtag/include/cable.h +++ b/urjtag/include/cable.h @@ -49,9 +49,9 @@ struct cable_driver_t { const char *name; const char *description; - int (*connect) (char *params[], cable_t * cable); - void (*disconnect) (cable_t * cable); - void (*cable_free) (cable_t * cable); + int (*connect) (char *params[], cable_t *cable); + void (*disconnect) (cable_t *cable); + void (*cable_free) (cable_t *cable); int (*init) (cable_t *); void (*done) (cable_t *); void (*set_frequency) (cable_t *, uint32_t freq); @@ -132,30 +132,30 @@ struct cable_t uint32_t frequency; }; -void cable_free (cable_t * cable); -int cable_init (cable_t * cable); -void cable_done (cable_t * cable); -void cable_flush (cable_t * cable, cable_flush_amount_t); -void cable_clock (cable_t * cable, int tms, int tdi, int n); -int cable_defer_clock (cable_t * cable, int tms, int tdi, int n); -int cable_get_tdo (cable_t * cable); -int cable_get_tdo_late (cable_t * cable); -int cable_defer_get_tdo (cable_t * cable); -int cable_set_signal (cable_t * cable, int mask, int val); -int cable_defer_set_signal (cable_t * cable, int mask, int val); -int cable_get_signal (cable_t * cable, pod_sigsel_t sig); -int cable_get_signal_late (cable_t * cable, pod_sigsel_t sig); -int cable_defer_get_signal (cable_t * cable, pod_sigsel_t sig); -int cable_transfer (cable_t * cable, int len, char *in, char *out); -int cable_transfer_late (cable_t * cable, char *out); -int cable_defer_transfer (cable_t * cable, int len, char *in, char *out); - -void cable_set_frequency (cable_t * cable, uint32_t frequency); -uint32_t cable_get_frequency (cable_t * cable); -void cable_wait (cable_t * cable); -void cable_purge_queue (cable_queue_info_t * q, int io); -int cable_add_queue_item (cable_t * cable, cable_queue_info_t * q); -int cable_get_queue_item (cable_t * cable, cable_queue_info_t * q); +void cable_free (cable_t *cable); +int cable_init (cable_t *cable); +void cable_done (cable_t *cable); +void cable_flush (cable_t *cable, cable_flush_amount_t); +void cable_clock (cable_t *cable, int tms, int tdi, int n); +int cable_defer_clock (cable_t *cable, int tms, int tdi, int n); +int cable_get_tdo (cable_t *cable); +int cable_get_tdo_late (cable_t *cable); +int cable_defer_get_tdo (cable_t *cable); +int cable_set_signal (cable_t *cable, int mask, int val); +int cable_defer_set_signal (cable_t *cable, int mask, int val); +int cable_get_signal (cable_t *cable, pod_sigsel_t sig); +int cable_get_signal_late (cable_t *cable, pod_sigsel_t sig); +int cable_defer_get_signal (cable_t *cable, pod_sigsel_t sig); +int cable_transfer (cable_t *cable, int len, char *in, char *out); +int cable_transfer_late (cable_t *cable, char *out); +int cable_defer_transfer (cable_t *cable, int len, char *in, char *out); + +void cable_set_frequency (cable_t *cable, uint32_t frequency); +uint32_t cable_get_frequency (cable_t *cable); +void cable_wait (cable_t *cable); +void cable_purge_queue (cable_queue_info_t *q, int io); +int cable_add_queue_item (cable_t *cable, cable_queue_info_t *q); +int cable_get_queue_item (cable_t *cable, cable_queue_info_t *q); extern cable_driver_t *cable_drivers[]; diff --git a/urjtag/include/chain.h b/urjtag/include/chain.h index 77076a3f..ef8141ac 100644 --- a/urjtag/include/chain.h +++ b/urjtag/include/chain.h @@ -49,21 +49,21 @@ struct chain_t }; chain_t *chain_alloc (void); -void chain_free (chain_t * chain); -void chain_disconnect (chain_t * chain); -void chain_clock (chain_t * chain, int tms, int tdi, int n); -void chain_defer_clock (chain_t * chain, int tms, int tdi, int n); -int chain_set_trst (chain_t * chain, int trst); -int chain_get_trst (chain_t * chain); -void chain_shift_instructions (chain_t * chain); -void chain_shift_instructions_mode (chain_t * chain, int capture_output, +void chain_free (chain_t *chain); +void chain_disconnect (chain_t *chain); +void chain_clock (chain_t *chain, int tms, int tdi, int n); +void chain_defer_clock (chain_t *chain, int tms, int tdi, int n); +int chain_set_trst (chain_t *chain, int trst); +int chain_get_trst (chain_t *chain); +void chain_shift_instructions (chain_t *chain); +void chain_shift_instructions_mode (chain_t *chain, int capture_output, int capture, int chain_exit); -void chain_shift_data_registers (chain_t * chain, int capture_output); -void chain_shift_data_registers_mode (chain_t * chain, int capture_output, +void chain_shift_data_registers (chain_t *chain, int capture_output); +void chain_shift_data_registers_mode (chain_t *chain, int capture_output, int capture, int chain_exit); -void chain_flush (chain_t * chain); -int chain_set_pod_signal (chain_t * chain, int mask, int val); -int chain_get_pod_signal (chain_t * chain, pod_sigsel_t sig); +void chain_flush (chain_t *chain); +int chain_set_pod_signal (chain_t *chain, int mask, int val); +int chain_get_pod_signal (chain_t *chain, pod_sigsel_t sig); typedef struct { diff --git a/urjtag/include/cmd.h b/urjtag/include/cmd.h index 880d5133..9779abcc 100644 --- a/urjtag/include/cmd.h +++ b/urjtag/include/cmd.h @@ -41,15 +41,15 @@ typedef struct char *name; char *desc; void (*help) (void); - int (*run) (chain_t * chain, char *params[]); + int (*run) (chain_t *chain, char *params[]); } cmd_t; extern const cmd_t *cmds[]; char **cmd_completion (const char *text, int start, int end); -int cmd_run (chain_t * chain, char *params[]); +int cmd_run (chain_t *chain, char *params[]); int cmd_params (char *params[]); int cmd_get_number (char *s, unsigned int *i); -int cmd_test_cable (chain_t * chain); +int cmd_test_cable (chain_t *chain); #endif /* CMD_H */ diff --git a/urjtag/include/data_register.h b/urjtag/include/data_register.h index 343d993b..cf5ac6b9 100644 --- a/urjtag/include/data_register.h +++ b/urjtag/include/data_register.h @@ -40,6 +40,6 @@ struct data_register }; data_register *data_register_alloc (const char *name, int len); -void data_register_free (data_register * dr); +void data_register_free (data_register *dr); #endif /* DATA_REGISTER_H */ diff --git a/urjtag/include/flash.h b/urjtag/include/flash.h index a5425ea6..47e6adb2 100644 --- a/urjtag/include/flash.h +++ b/urjtag/include/flash.h @@ -57,8 +57,8 @@ typedef struct cfi_chip_t **cfi_chips; } cfi_array_t; -void cfi_array_free (cfi_array_t * cfi_array); -int cfi_detect (bus_t * bus, uint32_t adr, cfi_array_t ** cfi_array); +void cfi_array_free (cfi_array_t *cfi_array); +int cfi_detect (bus_t *bus, uint32_t adr, cfi_array_t **cfi_array); /* End of brux/cfi.h */ @@ -67,13 +67,13 @@ typedef struct unsigned int bus_width; /* 1 for 8 bits, 2 for 16 bits, 4 for 32 bits, etc. */ const char *name; const char *description; - int (*autodetect) (cfi_array_t * cfi_array); - void (*print_info) (cfi_array_t * cfi_array); - int (*erase_block) (cfi_array_t * cfi_array, uint32_t adr); - int (*unlock_block) (cfi_array_t * cfi_array, uint32_t adr); - int (*program) (cfi_array_t * cfi_array, uint32_t adr, uint32_t * buffer, + int (*autodetect) (cfi_array_t *cfi_array); + void (*print_info) (cfi_array_t *cfi_array); + int (*erase_block) (cfi_array_t *cfi_array, uint32_t adr); + int (*unlock_block) (cfi_array_t *cfi_array, uint32_t adr); + int (*program) (cfi_array_t *cfi_array, uint32_t adr, uint32_t *buffer, int count); - void (*readarray) (cfi_array_t * cfi_array); + void (*readarray) (cfi_array_t *cfi_array); } flash_driver_t; #define FLASH_ERROR_NOERROR 0 @@ -82,10 +82,10 @@ typedef struct #define FLASH_ERROR_BLOCK_LOCKED 3 #define FLASH_ERROR_UNKNOWN 99 -void detectflash (bus_t * bus, uint32_t adr); +void detectflash (bus_t *bus, uint32_t adr); -void flashmem (bus_t * bus, FILE * f, uint32_t addr, int); -void flashmsbin (bus_t * bus, FILE * f, int); +void flashmem (bus_t *bus, FILE *f, uint32_t addr, int); +void flashmsbin (bus_t *bus, FILE *f, int); /* end of original brux/flash.h */ diff --git a/urjtag/include/instruction.h b/urjtag/include/instruction.h index f2fe6a13..616657b4 100644 --- a/urjtag/include/instruction.h +++ b/urjtag/include/instruction.h @@ -42,6 +42,6 @@ struct instruction }; instruction *instruction_alloc (const char *name, int len, const char *val); -void instruction_free (instruction * i); +void instruction_free (instruction *i); #endif /* INSTRUCTION_H */ diff --git a/urjtag/include/jim.h b/urjtag/include/jim.h index 51536064..5a1b5a3b 100644 --- a/urjtag/include/jim.h +++ b/urjtag/include/jim.h @@ -70,8 +70,8 @@ typedef struct jim_device tap_state_t tap_state; void (*tck_rise) (struct jim_device * dev, int tms, int tdi, - uint8_t * shmem, size_t shmem_size); - void (*tck_fall) (struct jim_device * dev, uint8_t * shmem, + uint8_t *shmem, size_t shmem_size); + void (*tck_fall) (struct jim_device * dev, uint8_t *shmem, size_t shmem_size); void (*dev_free) (struct jim_device * dev); void *state; @@ -98,12 +98,12 @@ typedef struct jim_bus_device int size; /* words (each bytes) */ void *state; /* device-dependent */ void (*init) (struct jim_bus_device * x); - uint32_t (*capture) (struct jim_bus_device * x, - uint32_t address, uint32_t control, - uint8_t * shmem, size_t shmem_size); + uint32_t (*capture) (struct jim_bus_device * x, + uint32_t address, uint32_t control, + uint8_t *shmem, size_t shmem_size); void (*update) (struct jim_bus_device * x, uint32_t address, uint32_t data, uint32_t control, - uint8_t * shmem, size_t shmem_size); + uint8_t *shmem, size_t shmem_size); void (*free) (struct jim_bus_device * x); } jim_bus_device_t; @@ -117,15 +117,15 @@ typedef struct } jim_attached_part_t; -void jim_set_trst (jim_state_t * s, int trst); -int jim_get_trst (jim_state_t * s); -int jim_get_tdo (jim_state_t * s); -void jim_tck_rise (jim_state_t * s, int tms, int tdi); -void jim_tck_fall (jim_state_t * s); +void jim_set_trst (jim_state_t *s, int trst); +int jim_get_trst (jim_state_t *s); +int jim_get_tdo (jim_state_t *s); +void jim_tck_rise (jim_state_t *s, int tms, int tdi); +void jim_tck_fall (jim_state_t *s); jim_device_t *jim_alloc_device (int num_sregs, const int reg_size[]); jim_state_t *jim_init (void); -void jim_free (jim_state_t * s); -void jim_print_sreg (shift_reg_t * r); -void jim_print_tap_state (char *rof, jim_device_t * dev); +void jim_free (jim_state_t *s); +void jim_print_sreg (shift_reg_t *r); +void jim_print_tap_state (char *rof, jim_device_t *dev); #endif diff --git a/urjtag/include/jim/some_cpu.h b/urjtag/include/jim/some_cpu.h index a7b81ce2..ca96c9a8 100644 --- a/urjtag/include/jim/some_cpu.h +++ b/urjtag/include/jim/some_cpu.h @@ -24,5 +24,5 @@ #include -void some_cpu_tck_rise (jim_device_t * dev); +void some_cpu_tck_rise (jim_device_t *dev); jim_device_t *some_cpu (void); diff --git a/urjtag/include/jtag.h b/urjtag/include/jtag.h index fd5bd2f5..be3048c7 100644 --- a/urjtag/include/jtag.h +++ b/urjtag/include/jtag.h @@ -45,19 +45,19 @@ extern int debug_mode; const char *jtag_get_data_dir (void); -int jtag_parse_file (chain_t * chain, const char *filename); -int jtag_parse_line (chain_t * chain, char *line); -int jtag_parse_stream (chain_t * chain, FILE * f); +int jtag_parse_file (chain_t *chain, const char *filename); +int jtag_parse_line (chain_t *chain, char *line); +int jtag_parse_stream (chain_t *chain, FILE *f); -int detect_parts (chain_t * chain, const char *db_path); -int manual_add (chain_t * chain, int instr_len); -int detect_register_size (chain_t * chain); -void discovery (chain_t * chain); -void idcode (chain_t * chain, unsigned int bytes); +int detect_parts (chain_t *chain, const char *db_path); +int manual_add (chain_t *chain, int instr_len); +int detect_register_size (chain_t *chain); +void discovery (chain_t *chain); +void idcode (chain_t *chain, unsigned int bytes); -void readmem (bus_t * bus, FILE * f, uint32_t addr, uint32_t len); -void writemem (bus_t * bus, FILE * f, uint32_t addr, uint32_t len); +void readmem (bus_t *bus, FILE *f, uint32_t addr, uint32_t len); +void writemem (bus_t *bus, FILE *f, uint32_t addr, uint32_t len); -void flasherase (bus_t * bus, uint32_t addr, int number); +void flasherase (bus_t *bus, uint32_t addr, int number); #endif /* JTAG_H */ diff --git a/urjtag/include/parport.h b/urjtag/include/parport.h index 3bc6d767..93630da7 100644 --- a/urjtag/include/parport.h +++ b/urjtag/include/parport.h @@ -52,12 +52,12 @@ struct parport_t cable_t *cable; }; -int parport_open (parport_t * port); -int parport_close (parport_t * port); -int parport_set_data (parport_t * port, uint8_t data); -int parport_get_data (parport_t * port); -int parport_get_status (parport_t * port); -int parport_set_control (parport_t * port, uint8_t data); +int parport_open (parport_t *port); +int parport_close (parport_t *port); +int parport_set_data (parport_t *port, uint8_t data); +int parport_get_data (parport_t *port); +int parport_get_status (parport_t *port); +int parport_set_control (parport_t *port, uint8_t data); extern parport_driver_t *parport_drivers[]; diff --git a/urjtag/include/part.h b/urjtag/include/part.h index a2fd8543..9de6773f 100644 --- a/urjtag/include/part.h +++ b/urjtag/include/part.h @@ -55,16 +55,16 @@ struct part bsbit_t **bsbits; }; -part_t *part_alloc (const tap_register * id); -void part_free (part_t * p); -part_t *read_part (FILE * f, tap_register_t * idr); -instruction *part_find_instruction (part_t * p, const char *iname); -data_register *part_find_data_register (part_t * p, const char *drname); -signal_t *part_find_signal (part_t * p, const char *signalname); -void part_set_instruction (part_t * p, const char *iname); -void part_set_signal (part_t * p, signal_t * s, int out, int val); -int part_get_signal (part_t * p, signal_t * s); -void part_print (part_t * p); +part_t *part_alloc (const tap_register *id); +void part_free (part_t *p); +part_t *read_part (FILE *f, tap_register_t *idr); +instruction *part_find_instruction (part_t *p, const char *iname); +data_register *part_find_data_register (part_t *p, const char *drname); +signal_t *part_find_signal (part_t *p, const char *signalname); +void part_set_instruction (part_t *p, const char *iname); +void part_set_signal (part_t *p, signal_t *s, int out, int val); +int part_get_signal (part_t *p, signal_t *s); +void part_print (part_t *p); typedef struct parts parts_t; @@ -75,9 +75,9 @@ struct parts }; parts_t *parts_alloc (void); -void parts_free (parts_t * ps); -int parts_add_part (parts_t * ps, part_t * p); -void parts_set_instruction (parts_t * ps, const char *iname); -void parts_print (parts_t * ps); +void parts_free (parts_t *ps); +int parts_add_part (parts_t *ps, part_t *p); +void parts_set_instruction (parts_t *ps, const char *iname); +void parts_print (parts_t *ps); #endif /* PART_H */ diff --git a/urjtag/include/register.h b/urjtag/include/register.h index c6c442c8..02fe2122 100644 --- a/urjtag/include/register.h +++ b/urjtag/include/register.h @@ -34,17 +34,17 @@ typedef struct tap_register } tap_register_t; tap_register *register_alloc (int len); -tap_register *register_duplicate (const tap_register_t * tr); -void register_free (tap_register_t * tr); -tap_register *register_fill (tap_register_t * tr, int val); -const char *register_get_string (const tap_register_t * tr); -int register_all_bits_same_value (const tap_register_t * tr); -tap_register *register_init (tap_register_t * tr, const char *value); -int register_compare (const tap_register_t * tr, const tap_register_t * tr2); -int register_match (const tap_register_t * tr, const char *expr); -tap_register *register_inc (tap_register_t * tr); -tap_register *register_dec (tap_register_t * tr); -tap_register *register_shift_right (tap_register_t * tr, int shift); -tap_register *register_shift_left (tap_register_t * tr, int shift); +tap_register *register_duplicate (const tap_register_t *tr); +void register_free (tap_register_t *tr); +tap_register *register_fill (tap_register_t *tr, int val); +const char *register_get_string (const tap_register_t *tr); +int register_all_bits_same_value (const tap_register_t *tr); +tap_register *register_init (tap_register_t *tr, const char *value); +int register_compare (const tap_register_t *tr, const tap_register_t *tr2); +int register_match (const tap_register_t *tr, const char *expr); +tap_register *register_inc (tap_register_t *tr); +tap_register *register_dec (tap_register_t *tr); +tap_register *register_shift_right (tap_register_t *tr, int shift); +tap_register *register_shift_left (tap_register_t *tr, int shift); #endif /* REGISTER_H */ diff --git a/urjtag/include/svf.h b/urjtag/include/svf.h index b87d5b8e..8d75d65e 100644 --- a/urjtag/include/svf.h +++ b/urjtag/include/svf.h @@ -27,6 +27,6 @@ #include "chain.h" -void svf_run (chain_t * chain, FILE *, int, int, uint32_t); +void svf_run (chain_t *chain, FILE *, int, int, uint32_t); #endif /* SVF_H */ diff --git a/urjtag/include/tap.h b/urjtag/include/tap.h index f1b18f77..ef170771 100644 --- a/urjtag/include/tap.h +++ b/urjtag/include/tap.h @@ -28,15 +28,15 @@ #include "register.h" #include "chain.h" -void tap_reset (chain_t * chain); -void tap_reset_bypass (chain_t * chain); -void tap_capture_dr (chain_t * chain); -void tap_capture_ir (chain_t * chain); -void tap_defer_shift_register (chain_t * chain, const tap_register * in, - tap_register * out, int tap_exit); -void tap_shift_register_output (chain_t * chain, const tap_register * in, - tap_register * out, int tap_exit); -void tap_shift_register (chain_t * chain, const tap_register * in, - tap_register * out, int tap_exit); +void tap_reset (chain_t *chain); +void tap_reset_bypass (chain_t *chain); +void tap_capture_dr (chain_t *chain); +void tap_capture_ir (chain_t *chain); +void tap_defer_shift_register (chain_t *chain, const tap_register *in, + tap_register *out, int tap_exit); +void tap_shift_register_output (chain_t *chain, const tap_register *in, + tap_register *out, int tap_exit); +void tap_shift_register (chain_t *chain, const tap_register *in, + tap_register *out, int tap_exit); #endif /* TAP_H */ diff --git a/urjtag/include/tap_state.h b/urjtag/include/tap_state.h index 556e89a0..bd13f0b9 100644 --- a/urjtag/include/tap_state.h +++ b/urjtag/include/tap_state.h @@ -56,11 +56,11 @@ #define Exit2_IR (TAPSTAT_IR | TAPSTAT_SHIFT | TAPSTAT_UPDATE) #define Update_IR (TAPSTAT_IR | TAPSTAT_IDLE) -int tap_state (chain_t * chain); -int tap_state_init (chain_t * chain); -int tap_state_done (chain_t * chain); -int tap_state_reset (chain_t * chain); -int tap_state_set_trst (chain_t * chain, int old_trst, int new_trst); -int tap_state_clock (chain_t * chain, int tms); +int tap_state (chain_t *chain); +int tap_state_init (chain_t *chain); +int tap_state_done (chain_t *chain); +int tap_state_reset (chain_t *chain); +int tap_state_set_trst (chain_t *chain, int old_trst, int new_trst); +int tap_state_clock (chain_t *chain, int tms); #endif /* TAP_STATE_H */ diff --git a/urjtag/include/usbconn.h b/urjtag/include/usbconn.h index 9a2b24fe..24ad689c 100644 --- a/urjtag/include/usbconn.h +++ b/urjtag/include/usbconn.h @@ -61,11 +61,11 @@ struct usbconn_t }; usbconn_t *usbconn_connect (const char **, int, usbconn_cable_t *); -int usbconn_free (usbconn_t * conn); -int usbconn_open (usbconn_t * conn); -int usbconn_close (usbconn_t * conn); -int usbconn_read (usbconn_t * conn, uint8_t * buf, int len); -int usbconn_write (usbconn_t * conn, uint8_t * buf, int len, int recv); +int usbconn_free (usbconn_t *conn); +int usbconn_open (usbconn_t *conn); +int usbconn_close (usbconn_t *conn); +int usbconn_read (usbconn_t *conn, uint8_t *buf, int len); +int usbconn_write (usbconn_t *conn, uint8_t *buf, int len, int recv); extern usbconn_driver_t *usbconn_drivers[]; #endif /* USBCONN_H */ diff --git a/urjtag/include/xpcu.h b/urjtag/include/xpcu.h index f7e7423e..956f4d27 100644 --- a/urjtag/include/xpcu.h +++ b/urjtag/include/xpcu.h @@ -38,12 +38,12 @@ int xpcu_close (struct usb_dev_handle *xpcu); int xpcu_request_28 (struct usb_dev_handle *xpcu, int value); int xpcu_raise_ioa5 (struct usb_dev_handle *xpcu); int xpcu_write_gpio (struct usb_dev_handle *xpcu, uint8_t bits); -int xpcu_read_gpio (struct usb_dev_handle *xpcu, uint8_t * bits); +int xpcu_read_gpio (struct usb_dev_handle *xpcu, uint8_t *bits); int xpcu_bitrev_test (struct usb_dev_handle *xpcu); int xpcu_select_gpio (struct usb_dev_handle *xpcu, int select); int xpcu_open (struct usb_dev_handle **xpcu); -int xpcu_request_a6 (struct usb_dev_handle *xpcu, int nibbles, uint8_t * xmit, - int inlen, uint8_t * recv); +int xpcu_request_a6 (struct usb_dev_handle *xpcu, int nibbles, uint8_t *xmit, + int inlen, uint8_t *recv); #endif /* XPCU_H */ diff --git a/urjtag/src/bsdl/bsdl.c b/urjtag/src/bsdl/bsdl.c index d589fbff..0c94bd56 100644 --- a/urjtag/src/bsdl/bsdl.c +++ b/urjtag/src/bsdl/bsdl.c @@ -117,7 +117,7 @@ bsdl_msg (int proc_mode, int type, const char *format, ...) * ****************************************************************************/ int -bsdl_read_file (chain_t * chain, const char *BSDL_File_Name, int proc_mode, +bsdl_read_file (chain_t *chain, const char *BSDL_File_Name, int proc_mode, const char *idcode) { bsdl_globs_t *globs = &(chain->bsdl); @@ -228,7 +228,7 @@ bsdl_read_file (chain_t * chain, const char *BSDL_File_Name, int proc_mode, * void ****************************************************************************/ void -bsdl_set_path (chain_t * chain, const char *pathlist) +bsdl_set_path (chain_t *chain, const char *pathlist) { bsdl_globs_t *globs = &(chain->bsdl); char *delim; @@ -300,7 +300,7 @@ bsdl_set_path (chain_t * chain, const char *pathlist) * ****************************************************************************/ int -bsdl_scan_files (chain_t * chain, const char *idcode, int proc_mode) +bsdl_scan_files (chain_t *chain, const char *idcode, int proc_mode) { bsdl_globs_t *globs = &(chain->bsdl); int idx = 0; diff --git a/urjtag/src/bsdl/bsdl_sem.c b/urjtag/src/bsdl/bsdl_sem.c index a0eef55f..3160ae12 100644 --- a/urjtag/src/bsdl/bsdl_sem.c +++ b/urjtag/src/bsdl/bsdl_sem.c @@ -84,7 +84,7 @@ print_cmd (char **cmd) * 0 -> error occured ****************************************************************************/ static int -bsdl_set_instruction_length (jtag_ctrl_t * jc) +bsdl_set_instruction_length (jtag_ctrl_t *jc) { char lenstring[6]; char *cmd[] = { "instruction", @@ -124,7 +124,7 @@ bsdl_set_instruction_length (jtag_ctrl_t * jc) * 0 -> error occured ****************************************************************************/ static int -bsdl_emit_ports (jtag_ctrl_t * jc) +bsdl_emit_ports (jtag_ctrl_t *jc) { port_desc_t *pd = jc->port_desc; struct string_elem *name; @@ -203,7 +203,7 @@ bsdl_emit_ports (jtag_ctrl_t * jc) * 0 -> error occured ****************************************************************************/ static int -create_register (jtag_ctrl_t * jc, char *reg_name, size_t len) +create_register (jtag_ctrl_t *jc, char *reg_name, size_t len) { const size_t str_len = 10; char len_str[str_len + 1]; @@ -241,7 +241,7 @@ create_register (jtag_ctrl_t * jc, char *reg_name, size_t len) * 0 -> error occured ****************************************************************************/ static int -bsdl_process_idcode (jtag_ctrl_t * jc) +bsdl_process_idcode (jtag_ctrl_t *jc) { if (jc->idcode) create_register (jc, "DIR", strlen (jc->idcode)); @@ -267,7 +267,7 @@ bsdl_process_idcode (jtag_ctrl_t * jc) * 0 -> error occured ****************************************************************************/ static int -bsdl_process_usercode (jtag_ctrl_t * jc) +bsdl_process_usercode (jtag_ctrl_t *jc) { if (jc->usercode) create_register (jc, "USERCODE", strlen (jc->usercode)); @@ -291,7 +291,7 @@ bsdl_process_usercode (jtag_ctrl_t * jc) * 0 -> error occured ****************************************************************************/ static int -bsdl_set_bsr_length (jtag_ctrl_t * jc) +bsdl_set_bsr_length (jtag_ctrl_t *jc) { create_register (jc, "BSR", jc->bsr_len); @@ -314,7 +314,7 @@ bsdl_set_bsr_length (jtag_ctrl_t * jc) * 0 -> error occured ****************************************************************************/ static int -bsdl_process_cell_info (jtag_ctrl_t * jc) +bsdl_process_cell_info (jtag_ctrl_t *jc) { cell_info_t *ci = jc->cell_info_first; const size_t str_len = 10; @@ -427,7 +427,7 @@ bsdl_process_cell_info (jtag_ctrl_t * jc) * 0 -> error occured ****************************************************************************/ static int -bsdl_process_register_access (jtag_ctrl_t * jc) +bsdl_process_register_access (jtag_ctrl_t *jc) { ainfo_elem_t *ai; instr_elem_t *cinst; @@ -564,7 +564,7 @@ bsdl_process_register_access (jtag_ctrl_t * jc) * 0 -> error occured ****************************************************************************/ static int -parse_vhdl_elem (bsdl_parser_priv_t * priv, vhdl_elem_t * elem) +parse_vhdl_elem (bsdl_parser_priv_t *priv, vhdl_elem_t *elem) { char *buf; size_t buf_len; @@ -622,7 +622,7 @@ parse_vhdl_elem (bsdl_parser_priv_t * priv, vhdl_elem_t * elem) * telling if INSTR_EXEC or INSTR_PRINT succeeded ****************************************************************************/ static int -build_commands (bsdl_parser_priv_t * priv) +build_commands (bsdl_parser_priv_t *priv) { jtag_ctrl_t *jc = priv->jtag_ctrl; int result = 1; @@ -659,7 +659,7 @@ build_commands (bsdl_parser_priv_t * priv) * 0 -> idcodes don't match ****************************************************************************/ static int -compare_idcode (jtag_ctrl_t * jc, const char *idcode) +compare_idcode (jtag_ctrl_t *jc, const char *idcode) { int idcode_match = 0; @@ -709,7 +709,7 @@ compare_idcode (jtag_ctrl_t * jc, const char *idcode) * ****************************************************************************/ int -bsdl_process_elements (jtag_ctrl_t * jc, const char *idcode) +bsdl_process_elements (jtag_ctrl_t *jc, const char *idcode) { bsdl_parser_priv_t *priv; vhdl_elem_t *el = jc->vhdl_elem_first; diff --git a/urjtag/src/bus/au1500.c b/urjtag/src/bus/au1500.c index ca8500b7..bfeedcbc 100644 --- a/urjtag/src/bus/au1500.c +++ b/urjtag/src/bus/au1500.c @@ -61,7 +61,7 @@ typedef struct * */ static bus_t * -au1500_bus_new (chain_t * chain, const bus_driver_t * driver, +au1500_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -124,7 +124,7 @@ au1500_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -au1500_bus_printinfo (bus_t * bus) +au1500_bus_printinfo (bus_t *bus) { int i; @@ -140,7 +140,7 @@ au1500_bus_printinfo (bus_t * bus) * */ static int -au1500_bus_area (bus_t * bus, uint32_t addr, bus_area_t * area) +au1500_bus_area (bus_t *bus, uint32_t addr, bus_area_t *area) { area->description = NULL; area->start = UINT32_C (0x00000000); @@ -155,7 +155,7 @@ au1500_bus_area (bus_t * bus, uint32_t addr, bus_area_t * area) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -165,7 +165,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus) +set_data_in (bus_t *bus) { int i; part_t *p = PART; @@ -179,7 +179,7 @@ set_data_in (bus_t * bus) } static uint32_t -get_data_out (bus_t * bus) +get_data_out (bus_t *bus) { int i; part_t *p = PART; @@ -195,7 +195,7 @@ get_data_out (bus_t * bus) } static void -setup_data (bus_t * bus, uint32_t d) +setup_data (bus_t *bus, uint32_t d) { int i; part_t *p = PART; @@ -212,7 +212,7 @@ setup_data (bus_t * bus, uint32_t d) * */ static void -au1500_bus_read_start (bus_t * bus, uint32_t adr) +au1500_bus_read_start (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -235,7 +235,7 @@ au1500_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -au1500_bus_read_next (bus_t * bus, uint32_t adr) +au1500_bus_read_next (bus_t *bus, uint32_t adr) { chain_t *chain = CHAIN; @@ -250,7 +250,7 @@ au1500_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -au1500_bus_read_end (bus_t * bus) +au1500_bus_read_end (bus_t *bus) { part_t *p = PART; chain_t *chain = CHAIN; @@ -272,7 +272,7 @@ au1500_bus_read_end (bus_t * bus) * */ static void -au1500_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +au1500_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { part_t *p = PART; chain_t *chain = CHAIN; diff --git a/urjtag/src/bus/avr32.c b/urjtag/src/bus/avr32.c index 64b25a58..354714b2 100644 --- a/urjtag/src/bus/avr32.c +++ b/urjtag/src/bus/avr32.c @@ -130,19 +130,19 @@ typedef struct /* ------------------------------------------------------------------------- */ static inline void -register_set_bit (tap_register * tr, unsigned int bitno, unsigned int val) +register_set_bit (tap_register *tr, unsigned int bitno, unsigned int val) { tr->data[bitno] = (val) ? 1 : 0; } static inline int -register_get_bit (tap_register * tr, unsigned int bitno) +register_get_bit (tap_register *tr, unsigned int bitno) { return (tr->data[bitno] & 1) ? 1 : 0; } static inline void -shift_instr (bus_t * bus, unsigned int bit) +shift_instr (bus_t *bus, unsigned int bit) { tap_register *r = PART->active_instruction->out; @@ -159,7 +159,7 @@ shift_instr (bus_t * bus, unsigned int bit) } static inline void -shift_data (bus_t * bus, unsigned int bit) +shift_data (bus_t *bus, unsigned int bit) { data_register *dr = PART->active_instruction->data_register; @@ -178,13 +178,13 @@ shift_data (bus_t * bus, unsigned int bit) /* ------------------------------------------------------------------------- */ static void -mwa_scan_in_instr (bus_t * bus) +mwa_scan_in_instr (bus_t *bus) { shift_instr (bus, 2); } static void -mwa_scan_in_addr (bus_t * bus, unsigned int slave, uint32_t addr, int mode) +mwa_scan_in_addr (bus_t *bus, unsigned int slave, uint32_t addr, int mode) { tap_register *r = PART->active_instruction->data_register->in; int i; @@ -209,7 +209,7 @@ mwa_scan_in_addr (bus_t * bus, unsigned int slave, uint32_t addr, int mode) } static void -mwa_scan_in_data (bus_t * bus, uint32_t data) +mwa_scan_in_data (bus_t *bus, uint32_t data) { tap_register *r = PART->active_instruction->data_register->in; int i; @@ -227,7 +227,7 @@ mwa_scan_in_data (bus_t * bus, uint32_t data) } static void -mwa_scan_out_data (bus_t * bus, uint32_t * pdata) +mwa_scan_out_data (bus_t *bus, uint32_t *pdata) { tap_register *r = PART->active_instruction->data_register->out; uint32_t data; @@ -245,8 +245,7 @@ mwa_scan_out_data (bus_t * bus, uint32_t * pdata) } static inline void -mwa_read_word (bus_t * bus, unsigned int slave, uint32_t addr, - uint32_t * data) +mwa_read_word (bus_t *bus, unsigned int slave, uint32_t addr, uint32_t *data) { mwa_scan_in_instr (bus); mwa_scan_in_addr (bus, slave, addr, ACCESS_MODE_READ); @@ -254,7 +253,7 @@ mwa_read_word (bus_t * bus, unsigned int slave, uint32_t addr, } static inline void -mwa_write_word (bus_t * bus, unsigned int slave, uint32_t addr, uint32_t data) +mwa_write_word (bus_t *bus, unsigned int slave, uint32_t addr, uint32_t data) { mwa_scan_in_instr (bus); mwa_scan_in_addr (bus, slave, addr, ACCESS_MODE_WRITE); @@ -264,19 +263,19 @@ mwa_write_word (bus_t * bus, unsigned int slave, uint32_t addr, uint32_t data) /* ------------------------------------------------------------------------- */ static void -nexus_access_start (bus_t * bus) +nexus_access_start (bus_t *bus) { shift_instr (bus, 2); } static void -nexus_access_end (bus_t * bus) +nexus_access_end (bus_t *bus) { tap_reset_bypass (CHAIN); } static void -nexus_access_set_addr (bus_t * bus, uint32_t addr, int mode) +nexus_access_set_addr (bus_t *bus, uint32_t addr, int mode) { tap_register *r = PART->active_instruction->data_register->in; int i; @@ -298,7 +297,7 @@ nexus_access_set_addr (bus_t * bus, uint32_t addr, int mode) } static void -nexus_access_read_data (bus_t * bus, uint32_t * pdata) +nexus_access_read_data (bus_t *bus, uint32_t *pdata) { tap_register *r = PART->active_instruction->data_register->out; uint32_t data; @@ -316,7 +315,7 @@ nexus_access_read_data (bus_t * bus, uint32_t * pdata) } static void -nexus_access_write_data (bus_t * bus, uint32_t data) +nexus_access_write_data (bus_t *bus, uint32_t data) { tap_register *r = PART->active_instruction->data_register->in; int i; @@ -333,14 +332,14 @@ nexus_access_write_data (bus_t * bus, uint32_t data) } static inline void -nexus_reg_read (bus_t * bus, uint32_t reg, uint32_t * data) +nexus_reg_read (bus_t *bus, uint32_t reg, uint32_t *data) { nexus_access_set_addr (bus, reg, ACCESS_MODE_READ); nexus_access_read_data (bus, data); } static inline void -nexus_reg_write (bus_t * bus, uint32_t reg, uint32_t data) +nexus_reg_write (bus_t *bus, uint32_t reg, uint32_t data) { nexus_access_set_addr (bus, reg, ACCESS_MODE_WRITE); nexus_access_write_data (bus, data); @@ -349,14 +348,14 @@ nexus_reg_write (bus_t * bus, uint32_t reg, uint32_t data) /* ------------------------------------------------------------------------- */ static void -nexus_memacc_set_addr (bus_t * bus, uint32_t addr, uint32_t rwcs) +nexus_memacc_set_addr (bus_t *bus, uint32_t addr, uint32_t rwcs) { nexus_reg_write (bus, OCD_REG_RWA, addr); nexus_reg_write (bus, OCD_REG_RWCS, rwcs); } static int -nexus_memacc_read (bus_t * bus, uint32_t * data) +nexus_memacc_read (bus_t *bus, uint32_t *data) { uint32_t status; int ret; @@ -388,7 +387,7 @@ nexus_memacc_read (bus_t * bus, uint32_t * data) } static int -nexus_memacc_write (bus_t * bus, uint32_t addr, uint32_t data, uint32_t rwcs) +nexus_memacc_write (bus_t *bus, uint32_t addr, uint32_t data, uint32_t rwcs) { uint32_t status; int ret; @@ -415,8 +414,7 @@ nexus_memacc_write (bus_t * bus, uint32_t addr, uint32_t data, uint32_t rwcs) /* ------------------------------------------------------------------------- */ static void -avr32_bus_setup (bus_t * bus, chain_t * chain, part_t * part, - unsigned int mode) +avr32_bus_setup (bus_t *bus, chain_t *chain, part_t *part, unsigned int mode) { CHAIN = chain; PART = part; @@ -460,7 +458,7 @@ avr32_bus_setup (bus_t * bus, chain_t * chain, part_t * part, } static int -check_instruction (part_t * part, const char *instr) +check_instruction (part_t *part, const char *instr) { int ret; @@ -476,8 +474,7 @@ check_instruction (part_t * part, const char *instr) * */ static bus_t * -avr32_bus_new (chain_t * chain, const bus_driver_t * driver, - char *cmd_params[]) +avr32_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; part_t *part; @@ -561,7 +558,7 @@ avr32_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -avr32_bus_printinfo (bus_t * bus) +avr32_bus_printinfo (bus_t *bus) { int i; @@ -577,7 +574,7 @@ avr32_bus_printinfo (bus_t * bus) * */ static void -avr32_bus_prepare (bus_t * bus) +avr32_bus_prepare (bus_t *bus) { if (!INITIALIZED) bus_init (bus); @@ -588,7 +585,7 @@ avr32_bus_prepare (bus_t * bus) * */ static int -avr32_bus_area (bus_t * bus, uint32_t addr, bus_area_t * area) +avr32_bus_area (bus_t *bus, uint32_t addr, bus_area_t *area) { switch (MODE) { @@ -647,7 +644,7 @@ avr32_bus_area (bus_t * bus, uint32_t addr, bus_area_t * area) * */ static void -avr32_bus_read_start (bus_t * bus, uint32_t addr) +avr32_bus_read_start (bus_t *bus, uint32_t addr) { addr &= ADDR_MASK; @@ -678,7 +675,7 @@ avr32_bus_read_start (bus_t * bus, uint32_t addr) * */ static uint32_t -avr32_bus_read_end (bus_t * bus) +avr32_bus_read_end (bus_t *bus) { uint32_t data; @@ -705,7 +702,7 @@ avr32_bus_read_end (bus_t * bus) * */ static uint32_t -avr32_bus_read_next (bus_t * bus, uint32_t addr) +avr32_bus_read_next (bus_t *bus, uint32_t addr) { uint32_t data; @@ -735,7 +732,7 @@ avr32_bus_read_next (bus_t * bus, uint32_t addr) * */ static void -avr32_bus_write (bus_t * bus, uint32_t addr, uint32_t data) +avr32_bus_write (bus_t *bus, uint32_t addr, uint32_t data) { addr &= ADDR_MASK; diff --git a/urjtag/src/bus/bcm1250.c b/urjtag/src/bus/bcm1250.c index d2eb7ed5..92499042 100644 --- a/urjtag/src/bus/bcm1250.c +++ b/urjtag/src/bus/bcm1250.c @@ -59,7 +59,7 @@ typedef struct * */ static bus_t * -bcm1250_bus_new (chain_t * chain, const bus_driver_t * driver, +bcm1250_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -116,7 +116,7 @@ bcm1250_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -bcm1250_bus_printinfo (bus_t * bus) +bcm1250_bus_printinfo (bus_t *bus) { int i; @@ -133,7 +133,7 @@ bcm1250_bus_printinfo (bus_t * bus) * */ static int -bcm1250_bus_area (bus_t * bus, uint32_t addr, bus_area_t * area) +bcm1250_bus_area (bus_t *bus, uint32_t addr, bus_area_t *area) { area->description = NULL; area->start = UINT32_C (0x00000000); @@ -146,7 +146,7 @@ bcm1250_bus_area (bus_t * bus, uint32_t addr, bus_area_t * area) #ifndef USE_BCM_EJTAG static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -158,7 +158,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus) +set_data_in (bus_t *bus) { int i; part_t *p = PART; @@ -170,7 +170,7 @@ set_data_in (bus_t * bus) } static void -setup_data (bus_t * bus, uint32_t d) +setup_data (bus_t *bus, uint32_t d) { int i; part_t *p = PART; @@ -186,7 +186,7 @@ setup_data (bus_t * bus, uint32_t d) * */ static void -bcm1250_bus_read_start (bus_t * bus, uint32_t adr) +bcm1250_bus_read_start (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -214,7 +214,7 @@ bcm1250_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -bcm1250_bus_read_next (bus_t * bus, uint32_t adr) +bcm1250_bus_read_next (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -240,7 +240,7 @@ bcm1250_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -bcm1250_bus_read_end (bus_t * bus) +bcm1250_bus_read_end (bus_t *bus) { part_t *p = PART; chain_t *chain = CHAIN; @@ -267,7 +267,7 @@ bcm1250_bus_read_end (bus_t * bus) * */ static void -bcm1250_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +bcm1250_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { part_t *p = PART; chain_t *chain = CHAIN; @@ -302,7 +302,7 @@ int addr; uint64_t base = 0x1fc00000; static int -bcm1250_ejtag_do (bus_t * bus, uint64_t ad, uint64_t da, int read, int type, +bcm1250_ejtag_do (bus_t *bus, uint64_t ad, uint64_t da, int read, int type, unsigned char *buf, int verbose) { @@ -438,7 +438,7 @@ bcm1250_ejtag_do (bus_t * bus, uint64_t ad, uint64_t da, int read, int type, chain_shift_data_registers (chain, 1); while ((p->active_instruction->data_register->out->data[276 - 17] == - 0) && to--) + 0) &&to--) { chain_shift_data_registers (chain, 1); } @@ -482,7 +482,7 @@ bcm1250_ejtag_do (bus_t * bus, uint64_t ad, uint64_t da, int read, int type, * */ static void -bcm1250_bus_read_start (bus_t * bus, uint32_t adr) +bcm1250_bus_read_start (bus_t *bus, uint32_t adr) { addr = adr; } @@ -492,7 +492,7 @@ bcm1250_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -bcm1250_bus_read (bus_t * bus, uint32_t adr) +bcm1250_bus_read (bus_t *bus, uint32_t adr) { unsigned char buf[32]; bcm1250_ejtag_do (bus, adr + base, 0, 1, 0, buf, 0); @@ -505,7 +505,7 @@ bcm1250_bus_read (bus_t * bus, uint32_t adr) * */ static uint32_t -bcm1250_bus_read_next (bus_t * bus, uint32_t adr) +bcm1250_bus_read_next (bus_t *bus, uint32_t adr) { uint32_t t; t = bcm1250_bus_read (bus, addr); @@ -518,7 +518,7 @@ bcm1250_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -bcm1250_bus_read_end (bus_t * bus) +bcm1250_bus_read_end (bus_t *bus) { return bcm1250_bus_read (bus, addr); } @@ -528,7 +528,7 @@ bcm1250_bus_read_end (bus_t * bus) * */ static void -bcm1250_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +bcm1250_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { unsigned char buf[32]; bcm1250_ejtag_do (bus, adr + base, data, 0, 0, buf, 0); diff --git a/urjtag/src/bus/bf533_ezkit.c b/urjtag/src/bus/bf533_ezkit.c index 4843ae3d..78702a29 100644 --- a/urjtag/src/bus/bf533_ezkit.c +++ b/urjtag/src/bus/bf533_ezkit.c @@ -67,7 +67,7 @@ typedef struct * */ static bus_t * -bf533_ezkit_bus_new (chain_t * chain, const bus_driver_t * driver, +bf533_ezkit_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -140,7 +140,7 @@ bf533_ezkit_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -bf533_ezkit_bus_printinfo (bus_t * bus) +bf533_ezkit_bus_printinfo (bus_t *bus) { int i; @@ -157,7 +157,7 @@ bf533_ezkit_bus_printinfo (bus_t * bus) * */ static int -bf533_ezkit_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +bf533_ezkit_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { area->description = NULL; area->start = UINT32_C (0x00000000); @@ -168,7 +168,7 @@ bf533_ezkit_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -select_flash (bus_t * bus) +select_flash (bus_t *bus) { part_t *p = PART; @@ -187,7 +187,7 @@ select_flash (bus_t * bus) } static void -unselect_flash (bus_t * bus) +unselect_flash (bus_t *bus) { part_t *p = PART; @@ -206,7 +206,7 @@ unselect_flash (bus_t * bus) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -216,7 +216,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus) +set_data_in (bus_t *bus) { int i; part_t *p = PART; @@ -226,7 +226,7 @@ set_data_in (bus_t * bus) } static void -setup_data (bus_t * bus, uint32_t d) +setup_data (bus_t *bus, uint32_t d) { int i; part_t *p = PART; @@ -241,7 +241,7 @@ setup_data (bus_t * bus, uint32_t d) * */ static void -bf533_ezkit_bus_read_start (bus_t * bus, uint32_t adr) +bf533_ezkit_bus_read_start (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -261,7 +261,7 @@ bf533_ezkit_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -bf533_ezkit_bus_read_next (bus_t * bus, uint32_t adr) +bf533_ezkit_bus_read_next (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -282,7 +282,7 @@ bf533_ezkit_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -bf533_ezkit_bus_read_end (bus_t * bus) +bf533_ezkit_bus_read_end (bus_t *bus) { part_t *p = PART; chain_t *chain = CHAIN; @@ -306,7 +306,7 @@ bf533_ezkit_bus_read_end (bus_t * bus) * */ static void -bf533_ezkit_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +bf533_ezkit_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { part_t *p = PART; chain_t *chain = CHAIN; diff --git a/urjtag/src/bus/bf533_stamp.c b/urjtag/src/bus/bf533_stamp.c index 8a9228d3..2af42eb1 100644 --- a/urjtag/src/bus/bf533_stamp.c +++ b/urjtag/src/bus/bf533_stamp.c @@ -67,7 +67,7 @@ typedef struct * */ static bus_t * -bf533_stamp_bus_new (chain_t * chain, const bus_driver_t * driver, +bf533_stamp_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -142,7 +142,7 @@ bf533_stamp_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -bf533_stamp_bus_printinfo (bus_t * bus) +bf533_stamp_bus_printinfo (bus_t *bus) { int i; @@ -159,7 +159,7 @@ bf533_stamp_bus_printinfo (bus_t * bus) * */ static int -bf533_stamp_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +bf533_stamp_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { area->description = NULL; area->start = UINT32_C (0x00000000); @@ -170,7 +170,7 @@ bf533_stamp_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -select_flash (bus_t * bus) +select_flash (bus_t *bus) { part_t *p = PART; @@ -189,7 +189,7 @@ select_flash (bus_t * bus) } static void -unselect_flash (bus_t * bus) +unselect_flash (bus_t *bus) { part_t *p = PART; @@ -208,7 +208,7 @@ unselect_flash (bus_t * bus) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -218,7 +218,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus) +set_data_in (bus_t *bus) { int i; part_t *p = PART; @@ -228,7 +228,7 @@ set_data_in (bus_t * bus) } static void -setup_data (bus_t * bus, uint32_t d) +setup_data (bus_t *bus, uint32_t d) { int i; part_t *p = PART; @@ -243,7 +243,7 @@ setup_data (bus_t * bus, uint32_t d) * */ static void -bf533_stamp_bus_read_start (bus_t * bus, uint32_t adr) +bf533_stamp_bus_read_start (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -263,7 +263,7 @@ bf533_stamp_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -bf533_stamp_bus_read_next (bus_t * bus, uint32_t adr) +bf533_stamp_bus_read_next (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -284,7 +284,7 @@ bf533_stamp_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -bf533_stamp_bus_read_end (bus_t * bus) +bf533_stamp_bus_read_end (bus_t *bus) { part_t *p = PART; chain_t *chain = CHAIN; @@ -308,7 +308,7 @@ bf533_stamp_bus_read_end (bus_t * bus) * */ static void -bf533_stamp_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +bf533_stamp_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { part_t *p = PART; chain_t *chain = CHAIN; diff --git a/urjtag/src/bus/bf537_stamp.c b/urjtag/src/bus/bf537_stamp.c index 7c402289..d158d0e7 100644 --- a/urjtag/src/bus/bf537_stamp.c +++ b/urjtag/src/bus/bf537_stamp.c @@ -67,7 +67,7 @@ typedef struct * */ static bus_t * -bf537_stamp_bus_new (chain_t * chain, const bus_driver_t * driver, +bf537_stamp_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -140,7 +140,7 @@ bf537_stamp_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static int -bf537_stamp_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +bf537_stamp_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { area->description = NULL; area->start = UINT32_C (0x00000000); @@ -151,7 +151,7 @@ bf537_stamp_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -select_flash (bus_t * bus) +select_flash (bus_t *bus) { part_t *p = PART; @@ -170,7 +170,7 @@ select_flash (bus_t * bus) } static void -unselect_flash (bus_t * bus) +unselect_flash (bus_t *bus) { part_t *p = PART; @@ -189,7 +189,7 @@ unselect_flash (bus_t * bus) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -199,7 +199,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus) +set_data_in (bus_t *bus) { int i; part_t *p = PART; @@ -209,7 +209,7 @@ set_data_in (bus_t * bus) } static void -setup_data (bus_t * bus, uint32_t d) +setup_data (bus_t *bus, uint32_t d) { int i; part_t *p = PART; @@ -224,7 +224,7 @@ setup_data (bus_t * bus, uint32_t d) * */ static void -bf537_stamp_bus_read_start (bus_t * bus, uint32_t adr) +bf537_stamp_bus_read_start (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -244,7 +244,7 @@ bf537_stamp_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -bf537_stamp_bus_read_next (bus_t * bus, uint32_t adr) +bf537_stamp_bus_read_next (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -265,7 +265,7 @@ bf537_stamp_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -bf537_stamp_bus_read_end (bus_t * bus) +bf537_stamp_bus_read_end (bus_t *bus) { part_t *p = PART; chain_t *chain = CHAIN; @@ -289,7 +289,7 @@ bf537_stamp_bus_read_end (bus_t * bus) * */ static void -bf537_stamp_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +bf537_stamp_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { part_t *p = PART; chain_t *chain = CHAIN; @@ -314,7 +314,7 @@ bf537_stamp_bus_write (bus_t * bus, uint32_t adr, uint32_t data) * */ static void -bf537_stamp_bus_printinfo (bus_t * bus) +bf537_stamp_bus_printinfo (bus_t *bus) { int i; diff --git a/urjtag/src/bus/bf548_ezkit.c b/urjtag/src/bus/bf548_ezkit.c index 25a40bdd..7bc750a1 100644 --- a/urjtag/src/bus/bf548_ezkit.c +++ b/urjtag/src/bus/bf548_ezkit.c @@ -62,7 +62,7 @@ typedef struct * */ static bus_t * -bf548_ezkit_bus_new (chain_t * chain, const bus_driver_t * driver, +bf548_ezkit_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -141,7 +141,7 @@ bf548_ezkit_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -bf548_ezkit_bus_printinfo (bus_t * bus) +bf548_ezkit_bus_printinfo (bus_t *bus) { int i; @@ -158,7 +158,7 @@ bf548_ezkit_bus_printinfo (bus_t * bus) * */ static int -bf548_ezkit_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +bf548_ezkit_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { area->description = NULL; area->start = UINT32_C (0x00000000); @@ -169,7 +169,7 @@ bf548_ezkit_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -select_flash (bus_t * bus) +select_flash (bus_t *bus) { part_t *p = PART; @@ -182,7 +182,7 @@ select_flash (bus_t * bus) } static void -unselect_flash (bus_t * bus) +unselect_flash (bus_t *bus) { part_t *p = PART; @@ -195,7 +195,7 @@ unselect_flash (bus_t * bus) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -205,7 +205,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus) +set_data_in (bus_t *bus) { int i; part_t *p = PART; @@ -215,7 +215,7 @@ set_data_in (bus_t * bus) } static void -setup_data (bus_t * bus, uint32_t d) +setup_data (bus_t *bus, uint32_t d) { int i; part_t *p = PART; @@ -230,7 +230,7 @@ setup_data (bus_t * bus, uint32_t d) * */ static void -bf548_ezkit_bus_read_start (bus_t * bus, uint32_t adr) +bf548_ezkit_bus_read_start (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -251,7 +251,7 @@ bf548_ezkit_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -bf548_ezkit_bus_read_next (bus_t * bus, uint32_t adr) +bf548_ezkit_bus_read_next (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -272,7 +272,7 @@ bf548_ezkit_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -bf548_ezkit_bus_read_end (bus_t * bus) +bf548_ezkit_bus_read_end (bus_t *bus) { part_t *p = PART; chain_t *chain = CHAIN; @@ -297,7 +297,7 @@ bf548_ezkit_bus_read_end (bus_t * bus) * */ static void -bf548_ezkit_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +bf548_ezkit_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { part_t *p = PART; chain_t *chain = CHAIN; diff --git a/urjtag/src/bus/bf561_ezkit.c b/urjtag/src/bus/bf561_ezkit.c index dbfd80f0..068f21b3 100644 --- a/urjtag/src/bus/bf561_ezkit.c +++ b/urjtag/src/bus/bf561_ezkit.c @@ -67,7 +67,7 @@ typedef struct * */ static bus_t * -bf561_ezkit_bus_new (chain_t * chain, const bus_driver_t * driver, +bf561_ezkit_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -146,7 +146,7 @@ bf561_ezkit_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -bf561_ezkit_bus_printinfo (bus_t * bus) +bf561_ezkit_bus_printinfo (bus_t *bus) { int i; @@ -163,7 +163,7 @@ bf561_ezkit_bus_printinfo (bus_t * bus) * */ static int -bf561_ezkit_bus_area (bus_t * bus, uint32_t addr, bus_area_t * area) +bf561_ezkit_bus_area (bus_t *bus, uint32_t addr, bus_area_t *area) { area->description = NULL; area->start = UINT32_C (0x00000000); @@ -173,7 +173,7 @@ bf561_ezkit_bus_area (bus_t * bus, uint32_t addr, bus_area_t * area) } static void -select_flash (bus_t * bus) +select_flash (bus_t *bus) { part_t *p = PART; @@ -197,7 +197,7 @@ select_flash (bus_t * bus) } static void -unselect_flash (bus_t * bus) +unselect_flash (bus_t *bus) { part_t *p = PART; @@ -221,7 +221,7 @@ unselect_flash (bus_t * bus) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -232,7 +232,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus) +set_data_in (bus_t *bus) { int i; part_t *p = PART; @@ -242,7 +242,7 @@ set_data_in (bus_t * bus) } static void -setup_data (bus_t * bus, uint32_t d) +setup_data (bus_t *bus, uint32_t d) { int i; part_t *p = PART; @@ -257,7 +257,7 @@ setup_data (bus_t * bus, uint32_t d) * */ static void -bf561_ezkit_bus_read_start (bus_t * bus, uint32_t adr) +bf561_ezkit_bus_read_start (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -277,7 +277,7 @@ bf561_ezkit_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -bf561_ezkit_bus_read_next (bus_t * bus, uint32_t adr) +bf561_ezkit_bus_read_next (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -298,7 +298,7 @@ bf561_ezkit_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -bf561_ezkit_bus_read_end (bus_t * bus) +bf561_ezkit_bus_read_end (bus_t *bus) { part_t *p = PART; chain_t *chain = CHAIN; @@ -322,7 +322,7 @@ bf561_ezkit_bus_read_end (bus_t * bus) * */ static void -bf561_ezkit_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +bf561_ezkit_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { part_t *p = PART; chain_t *chain = CHAIN; diff --git a/urjtag/src/bus/bscoach.c b/urjtag/src/bus/bscoach.c index bd37486a..7af11f47 100644 --- a/urjtag/src/bus/bscoach.c +++ b/urjtag/src/bus/bscoach.c @@ -67,7 +67,7 @@ typedef struct * */ static bus_t * -flashbscoach_bus_new (chain_t * chain, const bus_driver_t * driver, +flashbscoach_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -140,7 +140,7 @@ flashbscoach_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -flashbscoach_bus_printinfo (bus_t * bus) +flashbscoach_bus_printinfo (bus_t *bus) { int i; @@ -163,7 +163,7 @@ flashbscoach_bus_printinfo (bus_t * bus) * */ static int -flashbscoach_bus_init (bus_t * bus) +flashbscoach_bus_init (bus_t *bus) { part_t *p = PART; chain_t *chain = CHAIN; @@ -213,7 +213,7 @@ flashbscoach_bus_init (bus_t * bus) * */ static int -flashbscoach_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +flashbscoach_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { area->description = NULL; area->start = UINT32_C (0x00000000); @@ -227,7 +227,7 @@ flashbscoach_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -setup_data (bus_t * bus, uint32_t d) +setup_data (bus_t *bus, uint32_t d) { int i; part_t *p = PART; @@ -242,7 +242,7 @@ setup_data (bus_t * bus, uint32_t d) } static void -set_data_in (bus_t * bus) +set_data_in (bus_t *bus) { part_t *p = PART; @@ -260,7 +260,7 @@ set_data_in (bus_t * bus) part_set_signal (p, D[7], 0, 0); } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -270,7 +270,7 @@ setup_address (bus_t * bus, uint32_t a) } static uint32_t -get_data_out (bus_t * bus) +get_data_out (bus_t *bus) { int i; part_t *p = PART; @@ -290,7 +290,7 @@ get_data_out (bus_t * bus) * */ static void -flashbscoach_bus_read_start (bus_t * bus, uint32_t adr) +flashbscoach_bus_read_start (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -315,7 +315,7 @@ flashbscoach_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -flashbscoach_bus_read_next (bus_t * bus, uint32_t adr) +flashbscoach_bus_read_next (bus_t *bus, uint32_t adr) { // part_t *p = PART; chain_t *chain = CHAIN; @@ -335,7 +335,7 @@ flashbscoach_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -flashbscoach_bus_read_end (bus_t * bus) +flashbscoach_bus_read_end (bus_t *bus) { part_t *p = PART; chain_t *chain = CHAIN; @@ -359,7 +359,7 @@ flashbscoach_bus_read_end (bus_t * bus) * */ static void -flashbscoach_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +flashbscoach_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { part_t *p = PART; chain_t *chain = CHAIN; diff --git a/urjtag/src/bus/buses.c b/urjtag/src/bus/buses.c index 0a79cb92..04ce9e5e 100644 --- a/urjtag/src/bus/buses.c +++ b/urjtag/src/bus/buses.c @@ -157,7 +157,7 @@ buses_free (void) } void -buses_add (bus_t * abus) +buses_add (bus_t *abus) { bus_t **b; @@ -177,7 +177,7 @@ buses_add (bus_t * abus) } void -buses_delete (bus_t * abus) +buses_delete (bus_t *abus) { int i; bus_t **b; diff --git a/urjtag/src/bus/ejtag.c b/urjtag/src/bus/ejtag.c index eae31439..53c1d47b 100644 --- a/urjtag/src/bus/ejtag.c +++ b/urjtag/src/bus/ejtag.c @@ -114,8 +114,7 @@ typedef struct * */ static bus_t * -ejtag_bus_new (chain_t * chain, const bus_driver_t * driver, - char *cmd_params[]) +ejtag_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -142,7 +141,7 @@ ejtag_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -ejtag_bus_printinfo (bus_t * bus) +ejtag_bus_printinfo (bus_t *bus) { int i; @@ -154,7 +153,7 @@ ejtag_bus_printinfo (bus_t * bus) } static uint32_t -reg_value (tap_register * reg) +reg_value (tap_register *reg) { uint32_t retval = 0; int i; @@ -168,7 +167,7 @@ reg_value (tap_register * reg) } static uint32_t -ejtag_run_pracc (bus_t * bus, const uint32_t * code, unsigned int len) +ejtag_run_pracc (bus_t *bus, const uint32_t *code, unsigned int len) { data_register *ejaddr, *ejdata, *ejctrl; int i, pass; @@ -280,7 +279,7 @@ ejtag_run_pracc (bus_t * bus, const uint32_t * code, unsigned int len) } static int -ejtag_bus_init (bus_t * bus) +ejtag_bus_init (bus_t *bus) { data_register *ejctrl, *ejimpl, *ejaddr, *ejdata, *ejall; uint32_t code[4] = { @@ -543,7 +542,7 @@ ejtag_bus_init (bus_t * bus) * */ static void -ejtag_bus_prepare (bus_t * bus) +ejtag_bus_prepare (bus_t *bus) { if (!INITIALIZED) bus_init (bus); @@ -554,7 +553,7 @@ ejtag_bus_prepare (bus_t * bus) * */ static int -ejtag_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +ejtag_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { if (adr < UINT32_C (0x20000000)) { @@ -588,7 +587,7 @@ ejtag_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static int -ejtag_gen_read (uint32_t * code, uint32_t adr) +ejtag_gen_read (uint32_t *code, uint32_t adr) { uint16_t adr_hi, adr_lo; uint32_t *p = code; @@ -630,7 +629,7 @@ ejtag_gen_read (uint32_t * code, uint32_t adr) * */ static void -ejtag_bus_read_start (bus_t * bus, uint32_t adr) +ejtag_bus_read_start (bus_t *bus, uint32_t adr) { uint32_t code[3]; @@ -643,7 +642,7 @@ ejtag_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -ejtag_bus_read_next (bus_t * bus, uint32_t adr) +ejtag_bus_read_next (bus_t *bus, uint32_t adr) { uint32_t d; uint32_t code[4], *p = code; @@ -662,7 +661,7 @@ ejtag_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -ejtag_bus_read_end (bus_t * bus) +ejtag_bus_read_end (bus_t *bus) { uint32_t d; static const uint32_t code[2] = { @@ -681,7 +680,7 @@ ejtag_bus_read_end (bus_t * bus) * */ static void -ejtag_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +ejtag_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { uint16_t adr_hi, adr_lo; uint32_t code[5], *p = code; diff --git a/urjtag/src/bus/ejtag_dma.c b/urjtag/src/bus/ejtag_dma.c index 247b5a64..7c6d1216 100644 --- a/urjtag/src/bus/ejtag_dma.c +++ b/urjtag/src/bus/ejtag_dma.c @@ -87,7 +87,7 @@ typedef struct * */ static bus_t * -ejtag_dma_bus_new (chain_t * chain, const bus_driver_t * driver, +ejtag_dma_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -115,7 +115,7 @@ ejtag_dma_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -ejtag_dma_bus_printinfo (bus_t * bus) +ejtag_dma_bus_printinfo (bus_t *bus) { int i; @@ -130,7 +130,7 @@ ejtag_dma_bus_printinfo (bus_t * bus) * */ static uint32_t -reg_value (tap_register * reg) +reg_value (tap_register *reg) { uint32_t retval = 0; int i; @@ -363,7 +363,7 @@ ejtag_dma_read (unsigned int addr, int sz) * */ int -ejtag_dma_bus_init (bus_t * bus) +ejtag_dma_bus_init (bus_t *bus) { data_register *ejctrl = NULL, *ejimpl = NULL, *ejaddr = NULL, *ejdata = NULL; @@ -517,7 +517,7 @@ ejtag_dma_bus_init (bus_t * bus) * */ void -ejtag_dma_bus_prepare (bus_t * bus) +ejtag_dma_bus_prepare (bus_t *bus) { if (!INITIALIZED) bus_init (bus); @@ -528,7 +528,7 @@ ejtag_dma_bus_prepare (bus_t * bus) * */ int -ejtag_dma_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +ejtag_dma_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { /* from MIPS.org datasheets */ @@ -612,7 +612,7 @@ get_sz (uint32_t adr) * */ void -ejtag_dma_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +ejtag_dma_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { //printf("%s:adr=0x%x,data=0x%x\n",__FUNCTION__,adr,data); ejtag_dma_write (adr, data, get_sz (adr)); @@ -623,7 +623,7 @@ ejtag_dma_bus_write (bus_t * bus, uint32_t adr, uint32_t data) * */ unsigned int -ejtag_dma_bus_read (bus_t * bus, uint32_t adr) +ejtag_dma_bus_read (bus_t *bus, uint32_t adr) { int data = ejtag_dma_read (adr, get_sz (adr)); //printf("%s:adr=0x%x,got=0x%x\n",__FUNCTION__,adr,data); @@ -636,7 +636,7 @@ static unsigned int _data_read; * */ void -ejtag_dma_bus_read_start (bus_t * bus, uint32_t adr) +ejtag_dma_bus_read_start (bus_t *bus, uint32_t adr) { _data_read = ejtag_dma_read (adr, get_sz (adr)); //printf("%s:adr=0x%x, got=0x%x\n",__FUNCTION__,adr,_data_read); @@ -648,7 +648,7 @@ ejtag_dma_bus_read_start (bus_t * bus, uint32_t adr) * */ unsigned int -ejtag_dma_bus_read_next (bus_t * bus, uint32_t adr) +ejtag_dma_bus_read_next (bus_t *bus, uint32_t adr) { unsigned int tmp_value = _data_read; _data_read = ejtag_dma_read (adr, get_sz (adr)); @@ -661,7 +661,7 @@ ejtag_dma_bus_read_next (bus_t * bus, uint32_t adr) * */ unsigned int -ejtag_dma_bus_read_end (bus_t * bus) +ejtag_dma_bus_read_end (bus_t *bus) { return _data_read; } diff --git a/urjtag/src/bus/fjmem.c b/urjtag/src/bus/fjmem.c index 31ea4227..5f3f23ce 100644 --- a/urjtag/src/bus/fjmem.c +++ b/urjtag/src/bus/fjmem.c @@ -81,7 +81,7 @@ typedef struct #define BLOCK_DESC ((bus_params_t *) bus->params)->block_desc static int -fjmem_detect_reg_len (chain_t * chain, part_t * part, char *opcode, int len) +fjmem_detect_reg_len (chain_t *chain, part_t *part, char *opcode, int len) { data_register *dr; instruction *i; @@ -171,7 +171,7 @@ fjmem_detect_reg_len (chain_t * chain, part_t * part, char *opcode, int len) } static int -fjmem_detect_fields (chain_t * chain, part_t * part, bus_t * bus) +fjmem_detect_fields (chain_t *chain, part_t *part, bus_t *bus) { block_desc_t *bd = &(BLOCK_DESC); data_register *dr = FJMEM_REG; @@ -251,7 +251,7 @@ fjmem_detect_fields (chain_t * chain, part_t * part, bus_t * bus) } static int -fjmem_query_blocks (chain_t * chain, part_t * part, bus_t * bus) +fjmem_query_blocks (chain_t *chain, part_t *part, bus_t *bus) { block_desc_t *bd = &(BLOCK_DESC); data_register *dr = FJMEM_REG; @@ -368,7 +368,7 @@ fjmem_query_blocks (chain_t * chain, part_t * part, bus_t * bus) * */ static bus_t * -fjmem_bus_new (chain_t * chain, const bus_driver_t * driver, char *params[]) +fjmem_bus_new (chain_t *chain, const bus_driver_t *driver, char *params[]) { bus_t *bus = NULL; int failed = 0; @@ -460,7 +460,7 @@ fjmem_bus_new (chain_t * chain, const bus_driver_t * driver, char *params[]) } static void -fjmem_free_blocks (block_param_t * bl) +fjmem_free_blocks (block_param_t *bl) { if (bl) { @@ -474,7 +474,7 @@ fjmem_free_blocks (block_param_t * bl) * */ static void -fjmem_bus_free (bus_t * bus) +fjmem_bus_free (bus_t *bus) { data_register *dr = FJMEM_REG; @@ -497,7 +497,7 @@ fjmem_bus_free (bus_t * bus) * */ static void -fjmem_bus_printinfo (bus_t * bus) +fjmem_bus_printinfo (bus_t *bus) { int i; @@ -513,7 +513,7 @@ fjmem_bus_printinfo (bus_t * bus) * */ static void -fjmem_bus_prepare (bus_t * bus) +fjmem_bus_prepare (bus_t *bus) { if (!INITIALIZED) bus_init (bus); @@ -524,8 +524,8 @@ fjmem_bus_prepare (bus_t * bus) } static int -block_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area, - block_param_t ** bl_match) +block_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area, + block_param_t **bl_match) { block_param_t *bl = BLOCK_DESC.blocks; uint32_t prev_start; @@ -573,7 +573,7 @@ block_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area, * */ static int -fjmem_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +fjmem_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { block_param_t *bl; @@ -581,7 +581,7 @@ fjmem_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -setup_address (bus_t * bus, uint32_t a, block_param_t * block) +setup_address (bus_t *bus, uint32_t a, block_param_t *block) { data_register *dr = FJMEM_REG; block_desc_t *bd = &(BLOCK_DESC); @@ -609,7 +609,7 @@ setup_address (bus_t * bus, uint32_t a, block_param_t * block) } static void -setup_data (bus_t * bus, uint32_t d, block_param_t * block) +setup_data (bus_t *bus, uint32_t d, block_param_t *block) { data_register *dr = FJMEM_REG; block_desc_t *bd = &(BLOCK_DESC); @@ -628,7 +628,7 @@ setup_data (bus_t * bus, uint32_t d, block_param_t * block) * */ static void -fjmem_bus_read_start (bus_t * bus, uint32_t adr) +fjmem_bus_read_start (bus_t *bus, uint32_t adr) { chain_t *chain = CHAIN; block_desc_t *bd = &(BLOCK_DESC); @@ -659,7 +659,7 @@ fjmem_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -fjmem_bus_read_next (bus_t * bus, uint32_t adr) +fjmem_bus_read_next (bus_t *bus, uint32_t adr) { chain_t *chain = CHAIN; block_desc_t *bd = &(BLOCK_DESC); @@ -694,7 +694,7 @@ fjmem_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -fjmem_bus_read_end (bus_t * bus) +fjmem_bus_read_end (bus_t *bus) { chain_t *chain = CHAIN; block_desc_t *bd = &(BLOCK_DESC); @@ -732,7 +732,7 @@ fjmem_bus_read_end (bus_t * bus) * */ static void -fjmem_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +fjmem_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { chain_t *chain = CHAIN; block_desc_t *bd = &(BLOCK_DESC); diff --git a/urjtag/src/bus/generic_bus.c b/urjtag/src/bus/generic_bus.c index 58e495ab..f3818ee0 100644 --- a/urjtag/src/bus/generic_bus.c +++ b/urjtag/src/bus/generic_bus.c @@ -31,7 +31,7 @@ #include "generic_bus.h" int -generic_bus_attach_sig (part_t * part, signal_t ** sig, char *id) +generic_bus_attach_sig (part_t *part, signal_t **sig, char *id) { int failed = URJTAG_STATUS_OK; @@ -50,7 +50,7 @@ generic_bus_attach_sig (part_t * part, signal_t ** sig, char *id) * */ void -generic_bus_free (bus_t * bus) +generic_bus_free (bus_t *bus) { free (bus->params); free (bus); @@ -61,7 +61,7 @@ generic_bus_free (bus_t * bus) * */ int -generic_bus_no_init (bus_t * bus) +generic_bus_no_init (bus_t *bus) { INITIALIZED = 1; @@ -73,7 +73,7 @@ generic_bus_no_init (bus_t * bus) * */ void -generic_bus_prepare_extest (bus_t * bus) +generic_bus_prepare_extest (bus_t *bus) { if (!INITIALIZED) bus_init (bus); @@ -87,7 +87,7 @@ generic_bus_prepare_extest (bus_t * bus) * */ uint32_t -generic_bus_read (bus_t * bus, uint32_t adr) +generic_bus_read (bus_t *bus, uint32_t adr) { bus_read_start (bus, adr); return bus_read_end (bus); diff --git a/urjtag/src/bus/generic_bus.h b/urjtag/src/bus/generic_bus.h index 7228b99e..aa7c7e9f 100644 --- a/urjtag/src/bus/generic_bus.h +++ b/urjtag/src/bus/generic_bus.h @@ -27,11 +27,11 @@ #include "bus.h" -int generic_bus_attach_sig (part_t * part, signal_t ** sig, char *id); +int generic_bus_attach_sig (part_t *part, signal_t **sig, char *id); -void generic_bus_free (bus_t * bus); -int generic_bus_no_init (bus_t * bus); -void generic_bus_prepare_extest (bus_t * bus); -uint32_t generic_bus_read (bus_t * bus, uint32_t adr); +void generic_bus_free (bus_t *bus); +int generic_bus_no_init (bus_t *bus); +void generic_bus_prepare_extest (bus_t *bus); +uint32_t generic_bus_read (bus_t *bus, uint32_t adr); #endif /* GENERIC_BUS_H */ diff --git a/urjtag/src/bus/h7202.c b/urjtag/src/bus/h7202.c index 7eb1fc0a..03a3fe5e 100644 --- a/urjtag/src/bus/h7202.c +++ b/urjtag/src/bus/h7202.c @@ -57,8 +57,7 @@ typedef struct * */ static bus_t * -h7202_bus_new (chain_t * chain, const bus_driver_t * driver, - char *cmd_params[]) +h7202_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; part_t *part; @@ -122,7 +121,7 @@ h7202_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -h7202_bus_printinfo (bus_t * bus) +h7202_bus_printinfo (bus_t *bus) { int i; @@ -137,7 +136,7 @@ h7202_bus_printinfo (bus_t * bus) * */ static int -h7202_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +h7202_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { area->description = NULL; area->start = UINT32_C (0x00000000); @@ -148,7 +147,7 @@ h7202_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -158,7 +157,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus) +set_data_in (bus_t *bus) { int i; part_t *p = PART; @@ -171,7 +170,7 @@ set_data_in (bus_t * bus) } static void -setup_data (bus_t * bus, uint32_t d) +setup_data (bus_t *bus, uint32_t d) { int i; part_t *p = PART; @@ -188,7 +187,7 @@ setup_data (bus_t * bus, uint32_t d) * */ static void -h7202_bus_read_start (bus_t * bus, uint32_t adr) +h7202_bus_read_start (bus_t *bus, uint32_t adr) { /* see Figure 10-12 in [1] */ part_t *p = PART; @@ -212,7 +211,7 @@ h7202_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -h7202_bus_read_next (bus_t * bus, uint32_t adr) +h7202_bus_read_next (bus_t *bus, uint32_t adr) { /* see Figure 10-12 in [1] */ part_t *p = PART; @@ -237,7 +236,7 @@ h7202_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -h7202_bus_read_end (bus_t * bus) +h7202_bus_read_end (bus_t *bus) { /* see Figure 10-12 in [1] */ part_t *p = PART; @@ -266,7 +265,7 @@ h7202_bus_read_end (bus_t * bus) * */ static void -h7202_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +h7202_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { /* see Figure 10-16 in [1] */ part_t *p = PART; diff --git a/urjtag/src/bus/ixp425.c b/urjtag/src/bus/ixp425.c index 3ceebcdb..daab4345 100644 --- a/urjtag/src/bus/ixp425.c +++ b/urjtag/src/bus/ixp425.c @@ -57,7 +57,7 @@ typedef struct * */ static bus_t * -ixp425_bus_new (chain_t * chain, const bus_driver_t * driver, +ixp425_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -118,7 +118,7 @@ ixp425_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -ixp425_bus_printinfo (bus_t * bus) +ixp425_bus_printinfo (bus_t *bus) { int i; @@ -135,7 +135,7 @@ ixp425_bus_printinfo (bus_t * bus) * */ static int -ixp425_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +ixp425_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { area->description = NULL; area->start = UINT32_C (0x00000000); @@ -146,7 +146,7 @@ ixp425_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -select_flash (bus_t * bus) +select_flash (bus_t *bus) { part_t *p = PART; @@ -161,7 +161,7 @@ select_flash (bus_t * bus) } static void -unselect_flash (bus_t * bus) +unselect_flash (bus_t *bus) { part_t *p = PART; @@ -176,7 +176,7 @@ unselect_flash (bus_t * bus) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -186,7 +186,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus) +set_data_in (bus_t *bus) { int i; part_t *p = PART; @@ -196,7 +196,7 @@ set_data_in (bus_t * bus) } static void -setup_data (bus_t * bus, uint32_t d) +setup_data (bus_t *bus, uint32_t d) { int i; part_t *p = PART; @@ -210,7 +210,7 @@ setup_data (bus_t * bus, uint32_t d) * */ static void -ixp425_bus_read_start (bus_t * bus, uint32_t adr) +ixp425_bus_read_start (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -230,7 +230,7 @@ ixp425_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -ixp425_bus_read_next (bus_t * bus, uint32_t adr) +ixp425_bus_read_next (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -251,7 +251,7 @@ ixp425_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -ixp425_bus_read_end (bus_t * bus) +ixp425_bus_read_end (bus_t *bus) { part_t *p = PART; chain_t *chain = CHAIN; @@ -275,7 +275,7 @@ ixp425_bus_read_end (bus_t * bus) * */ static void -ixp425_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +ixp425_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { part_t *p = PART; chain_t *chain = CHAIN; diff --git a/urjtag/src/bus/jopcyc.c b/urjtag/src/bus/jopcyc.c index ab81bd21..63d07e98 100644 --- a/urjtag/src/bus/jopcyc.c +++ b/urjtag/src/bus/jopcyc.c @@ -138,7 +138,7 @@ typedef struct * */ static bus_t * -jopcyc_bus_new (chain_t * chain, const bus_driver_t * driver, +jopcyc_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -345,7 +345,7 @@ jopcyc_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -jopcyc_bus_printinfo (bus_t * bus) +jopcyc_bus_printinfo (bus_t *bus) { int i; @@ -358,7 +358,7 @@ jopcyc_bus_printinfo (bus_t * bus) } static void -setup_address (bus_t * bus, uint32_t a, component_t * comp) +setup_address (bus_t *bus, uint32_t a, component_t *comp) { int i; part_t *p = PART; @@ -387,7 +387,7 @@ setup_address (bus_t * bus, uint32_t a, component_t * comp) } static int -detect_data_width (component_t * comp) +detect_data_width (component_t *comp) { int width; @@ -408,7 +408,7 @@ detect_data_width (component_t * comp) } static void -set_data_in (bus_t * bus, component_t * comp) +set_data_in (bus_t *bus, component_t *comp) { int i; part_t *p = PART; @@ -421,7 +421,7 @@ set_data_in (bus_t * bus, component_t * comp) } static void -setup_data (bus_t * bus, uint32_t d, component_t * comp) +setup_data (bus_t *bus, uint32_t d, component_t *comp) { int i; part_t *p = PART; @@ -438,7 +438,7 @@ setup_data (bus_t * bus, uint32_t d, component_t * comp) * */ static int -jopcyc_bus_init (bus_t * bus) +jopcyc_bus_init (bus_t *bus) { part_t *p = PART; chain_t *chain = CHAIN; @@ -500,8 +500,7 @@ jopcyc_bus_init (bus_t * bus) } static int -comp_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area, - component_t ** comp) +comp_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area, component_t **comp) { if (adr < RAMB_START) { @@ -544,7 +543,7 @@ comp_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area, * */ static int -jopcyc_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +jopcyc_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { component_t *comp; @@ -556,7 +555,7 @@ jopcyc_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) * */ static void -jopcyc_bus_read_start (bus_t * bus, uint32_t adr) +jopcyc_bus_read_start (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -591,7 +590,7 @@ jopcyc_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -jopcyc_bus_read_next (bus_t * bus, uint32_t adr) +jopcyc_bus_read_next (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -622,7 +621,7 @@ jopcyc_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -jopcyc_bus_read_end (bus_t * bus) +jopcyc_bus_read_end (bus_t *bus) { part_t *p = PART; chain_t *chain = CHAIN; @@ -659,7 +658,7 @@ jopcyc_bus_read_end (bus_t * bus) * */ static void -jopcyc_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +jopcyc_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { part_t *p = PART; chain_t *chain = CHAIN; diff --git a/urjtag/src/bus/lh7a400.c b/urjtag/src/bus/lh7a400.c index fe078a5e..4a385627 100644 --- a/urjtag/src/bus/lh7a400.c +++ b/urjtag/src/bus/lh7a400.c @@ -73,7 +73,7 @@ typedef struct * */ static bus_t * -lh7a400_bus_new (chain_t * chain, const const bus_driver_t * driver, +lh7a400_bus_new (chain_t *chain, const const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -140,7 +140,7 @@ lh7a400_bus_new (chain_t * chain, const const bus_driver_t * driver, * */ static void -lh7a400_bus_printinfo (bus_t * bus) +lh7a400_bus_printinfo (bus_t *bus) { int i; @@ -157,7 +157,7 @@ lh7a400_bus_printinfo (bus_t * bus) * */ static int -lh7a400_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +lh7a400_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { unsigned int width; @@ -189,7 +189,7 @@ lh7a400_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -199,7 +199,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus) +set_data_in (bus_t *bus) { int i; part_t *p = PART; @@ -213,7 +213,7 @@ set_data_in (bus_t * bus) } static void -setup_data (bus_t * bus, uint32_t d) +setup_data (bus_t *bus, uint32_t d) { int i; part_t *p = PART; @@ -230,7 +230,7 @@ setup_data (bus_t * bus, uint32_t d) * */ static void -lh7a400_bus_read_start (bus_t * bus, uint32_t adr) +lh7a400_bus_read_start (bus_t *bus, uint32_t adr) { /* see Figure 3-3 in [1] */ part_t *p = PART; @@ -251,7 +251,7 @@ lh7a400_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -lh7a400_bus_read_next (bus_t * bus, uint32_t adr) +lh7a400_bus_read_next (bus_t *bus, uint32_t adr) { /* see Figure 3-3 in [1] */ part_t *p = PART; @@ -276,7 +276,7 @@ lh7a400_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -lh7a400_bus_read_end (bus_t * bus) +lh7a400_bus_read_end (bus_t *bus) { /* see Figure 3-3 in [1] */ part_t *p = PART; @@ -303,7 +303,7 @@ lh7a400_bus_read_end (bus_t * bus) * */ static void -lh7a400_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +lh7a400_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { /* see Figure 3-3 in [1] */ part_t *p = PART; diff --git a/urjtag/src/bus/mpc5200.c b/urjtag/src/bus/mpc5200.c index 3bf2b53b..7d2d8929 100644 --- a/urjtag/src/bus/mpc5200.c +++ b/urjtag/src/bus/mpc5200.c @@ -72,7 +72,7 @@ typedef struct * */ static bus_t * -mpc5200_bus_new (chain_t * chain, const bus_driver_t * driver, +mpc5200_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -145,7 +145,7 @@ mpc5200_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -mpc5200_bus_printinfo (bus_t * bus) +mpc5200_bus_printinfo (bus_t *bus) { int i; @@ -162,7 +162,7 @@ mpc5200_bus_printinfo (bus_t * bus) * */ static int -mpc5200_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +mpc5200_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { bus_params_t *bp = (bus_params_t *) bus->params; @@ -183,7 +183,7 @@ mpc5200_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { bus_params_t *bp = (bus_params_t *) bus->params; part_t *p = PART; @@ -194,7 +194,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus, uint32_t adr) +set_data_in (bus_t *bus, uint32_t adr) { bus_params_t *bp = (bus_params_t *) bus->params; part_t *p = PART; @@ -210,7 +210,7 @@ set_data_in (bus_t * bus, uint32_t adr) } static void -setup_data (bus_t * bus, uint32_t adr, uint32_t d) +setup_data (bus_t *bus, uint32_t adr, uint32_t d) { bus_params_t *bp = (bus_params_t *) bus->params; part_t *p = PART; @@ -227,7 +227,7 @@ setup_data (bus_t * bus, uint32_t adr, uint32_t d) } static uint32_t -get_data (bus_t * bus, uint32_t adr) +get_data (bus_t *bus, uint32_t adr) { bus_params_t *bp = (bus_params_t *) bus->params; bus_area_t area; @@ -252,7 +252,7 @@ get_data (bus_t * bus, uint32_t adr) * */ static void -mpc5200_bus_read_start (bus_t * bus, uint32_t adr) +mpc5200_bus_read_start (bus_t *bus, uint32_t adr) { bus_params_t *bp = (bus_params_t *) bus->params; part_t *p = PART; @@ -290,7 +290,7 @@ mpc5200_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -mpc5200_bus_read_next (bus_t * bus, uint32_t adr) +mpc5200_bus_read_next (bus_t *bus, uint32_t adr) { bus_params_t *bp = (bus_params_t *) bus->params; part_t *p = PART; @@ -328,7 +328,7 @@ mpc5200_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -mpc5200_bus_read_end (bus_t * bus) +mpc5200_bus_read_end (bus_t *bus) { bus_params_t *bp = (bus_params_t *) bus->params; part_t *p = PART; @@ -355,7 +355,7 @@ mpc5200_bus_read_end (bus_t * bus) * */ static void -mpc5200_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +mpc5200_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { bus_params_t *bp = (bus_params_t *) bus->params; /* see Figure 6-47 in [1] */ diff --git a/urjtag/src/bus/mpc824x.c b/urjtag/src/bus/mpc824x.c index 6d2cdded..6e9ab3dc 100644 --- a/urjtag/src/bus/mpc824x.c +++ b/urjtag/src/bus/mpc824x.c @@ -72,7 +72,7 @@ char dbgData = 0; * */ static bus_t * -mpc824x_bus_new (chain_t * chain, const bus_driver_t * driver, +mpc824x_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -246,7 +246,7 @@ mpc824x_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -mpc824x_bus_printinfo (bus_t * bus) +mpc824x_bus_printinfo (bus_t *bus) { int i; @@ -263,7 +263,7 @@ mpc824x_bus_printinfo (bus_t * bus) * */ static int -mpc824x_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +mpc824x_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { if (adr < UINT32_C (0xFF000000)) @@ -316,7 +316,7 @@ mpc824x_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -375,7 +375,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus, uint32_t adr) +set_data_in (bus_t *bus, uint32_t adr) { int i; part_t *p = PART; @@ -390,7 +390,7 @@ set_data_in (bus_t * bus, uint32_t adr) } static void -setup_data (bus_t * bus, uint32_t adr, uint32_t d) +setup_data (bus_t *bus, uint32_t adr, uint32_t d) { int i; part_t *p = PART; @@ -432,7 +432,7 @@ setup_data (bus_t * bus, uint32_t adr, uint32_t d) } static uint32_t -get_data (bus_t * bus, uint32_t adr) +get_data (bus_t *bus, uint32_t adr) { bus_area_t area; int i; @@ -480,7 +480,7 @@ get_data (bus_t * bus, uint32_t adr) * */ static void -mpc824x_bus_read_start (bus_t * bus, uint32_t adr) +mpc824x_bus_read_start (bus_t *bus, uint32_t adr) { part_t *p = PART; @@ -502,7 +502,7 @@ mpc824x_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -mpc824x_bus_read_next (bus_t * bus, uint32_t adr) +mpc824x_bus_read_next (bus_t *bus, uint32_t adr) { uint32_t d; @@ -519,7 +519,7 @@ mpc824x_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -mpc824x_bus_read_end (bus_t * bus) +mpc824x_bus_read_end (bus_t *bus) { part_t *p = PART; @@ -536,7 +536,7 @@ mpc824x_bus_read_end (bus_t * bus) * */ static void -mpc824x_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +mpc824x_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { part_t *p = PART; diff --git a/urjtag/src/bus/ppc405ep.c b/urjtag/src/bus/ppc405ep.c index 1df559bc..d22b3f13 100644 --- a/urjtag/src/bus/ppc405ep.c +++ b/urjtag/src/bus/ppc405ep.c @@ -55,7 +55,7 @@ typedef struct * */ static bus_t * -ppc405ep_bus_new (chain_t * chain, const bus_driver_t * driver, +ppc405ep_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -112,7 +112,7 @@ ppc405ep_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -ppc405ep_bus_printinfo (bus_t * bus) +ppc405ep_bus_printinfo (bus_t *bus) { int i; @@ -129,7 +129,7 @@ ppc405ep_bus_printinfo (bus_t * bus) * */ static int -ppc405ep_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +ppc405ep_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { area->description = NULL; area->start = UINT32_C (0x00000000); @@ -140,7 +140,7 @@ ppc405ep_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -150,7 +150,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus) +set_data_in (bus_t *bus) { int i; part_t *p = PART; @@ -163,7 +163,7 @@ set_data_in (bus_t * bus) } static void -setup_data (bus_t * bus, uint32_t d) +setup_data (bus_t *bus, uint32_t d) { int i; part_t *p = PART; @@ -180,7 +180,7 @@ setup_data (bus_t * bus, uint32_t d) * */ static void -ppc405ep_bus_read_start (bus_t * bus, uint32_t adr) +ppc405ep_bus_read_start (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -200,7 +200,7 @@ ppc405ep_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -ppc405ep_bus_read_next (bus_t * bus, uint32_t adr) +ppc405ep_bus_read_next (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -224,7 +224,7 @@ ppc405ep_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -ppc405ep_bus_read_end (bus_t * bus) +ppc405ep_bus_read_end (bus_t *bus) { part_t *p = PART; chain_t *chain = CHAIN; @@ -249,7 +249,7 @@ ppc405ep_bus_read_end (bus_t * bus) * */ static void -ppc405ep_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +ppc405ep_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { part_t *p = PART; chain_t *chain = CHAIN; diff --git a/urjtag/src/bus/ppc440gx_ebc8.c b/urjtag/src/bus/ppc440gx_ebc8.c index ba180076..c0e3653e 100644 --- a/urjtag/src/bus/ppc440gx_ebc8.c +++ b/urjtag/src/bus/ppc440gx_ebc8.c @@ -57,7 +57,7 @@ typedef struct * */ static bus_t * -ppc440gx_ebc8_bus_new (chain_t * chain, const bus_driver_t * driver, +ppc440gx_ebc8_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -114,7 +114,7 @@ ppc440gx_ebc8_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -ppc440gx_ebc8_bus_printinfo (bus_t * bus) +ppc440gx_ebc8_bus_printinfo (bus_t *bus) { int i; @@ -131,7 +131,7 @@ ppc440gx_ebc8_bus_printinfo (bus_t * bus) * */ static int -ppc440gx_ebc8_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +ppc440gx_ebc8_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { area->description = NULL; area->start = UINT32_C (0x00000000); @@ -142,7 +142,7 @@ ppc440gx_ebc8_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -153,7 +153,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus) +set_data_in (bus_t *bus) { int i; part_t *p = PART; @@ -166,7 +166,7 @@ set_data_in (bus_t * bus) } static void -setup_data (bus_t * bus, uint32_t d) +setup_data (bus_t *bus, uint32_t d) { int i; part_t *p = PART; @@ -183,7 +183,7 @@ setup_data (bus_t * bus, uint32_t d) * */ static void -ppc440gx_ebc8_bus_read_start (bus_t * bus, uint32_t adr) +ppc440gx_ebc8_bus_read_start (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -203,7 +203,7 @@ ppc440gx_ebc8_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -ppc440gx_ebc8_bus_read_next (bus_t * bus, uint32_t adr) +ppc440gx_ebc8_bus_read_next (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -228,7 +228,7 @@ ppc440gx_ebc8_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -ppc440gx_ebc8_bus_read_end (bus_t * bus) +ppc440gx_ebc8_bus_read_end (bus_t *bus) { part_t *p = PART; chain_t *chain = CHAIN; @@ -254,7 +254,7 @@ ppc440gx_ebc8_bus_read_end (bus_t * bus) * */ static void -ppc440gx_ebc8_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +ppc440gx_ebc8_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { part_t *p = PART; chain_t *chain = CHAIN; diff --git a/urjtag/src/bus/prototype.c b/urjtag/src/bus/prototype.c index 17ae82e7..bfe8517f 100644 --- a/urjtag/src/bus/prototype.c +++ b/urjtag/src/bus/prototype.c @@ -91,7 +91,7 @@ prototype_bus_signal_parse (char *str, char *fmt, int *inst) * */ static bus_t * -prototype_bus_new (chain_t * chain, const bus_driver_t * driver, +prototype_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -325,7 +325,7 @@ prototype_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -prototype_bus_printinfo (bus_t * bus) +prototype_bus_printinfo (bus_t *bus) { int i; @@ -342,7 +342,7 @@ prototype_bus_printinfo (bus_t * bus) * */ static int -prototype_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +prototype_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { area->description = NULL; area->start = UINT32_C (0x00000000); @@ -353,7 +353,7 @@ prototype_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i, j; part_t *p = PART; @@ -365,7 +365,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus) +set_data_in (bus_t *bus) { int i, j; part_t *p = PART; @@ -378,7 +378,7 @@ set_data_in (bus_t * bus) } static void -setup_data (bus_t * bus, uint32_t d) +setup_data (bus_t *bus, uint32_t d) { int i, j; part_t *p = PART; @@ -395,7 +395,7 @@ setup_data (bus_t * bus, uint32_t d) * */ static void -prototype_bus_read_start (bus_t * bus, uint32_t adr) +prototype_bus_read_start (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -415,7 +415,7 @@ prototype_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -prototype_bus_read_next (bus_t * bus, uint32_t adr) +prototype_bus_read_next (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -439,7 +439,7 @@ prototype_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -prototype_bus_read_end (bus_t * bus) +prototype_bus_read_end (bus_t *bus) { part_t *p = PART; chain_t *chain = CHAIN; @@ -464,7 +464,7 @@ prototype_bus_read_end (bus_t * bus) * */ static void -prototype_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +prototype_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { part_t *p = PART; chain_t *chain = CHAIN; diff --git a/urjtag/src/bus/pxa2x0.c b/urjtag/src/bus/pxa2x0.c index 692c2eae..71de674a 100644 --- a/urjtag/src/bus/pxa2x0.c +++ b/urjtag/src/bus/pxa2x0.c @@ -141,7 +141,7 @@ typedef struct * */ static bus_t * -pxa2xx_bus_new (chain_t * chain, const bus_driver_t * driver, +pxa2xx_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { part_t *part; @@ -248,7 +248,7 @@ pxa2xx_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -pxa2xx_bus_printinfo (bus_t * bus) +pxa2xx_bus_printinfo (bus_t *bus) { int i; @@ -263,7 +263,7 @@ pxa2xx_bus_printinfo (bus_t * bus) * */ static int -pxa2xx_bus_init (bus_t * bus) +pxa2xx_bus_init (bus_t *bus) { chain_t *chain = CHAIN; part_t *p = PART; @@ -317,7 +317,7 @@ pxa2xx_bus_init (bus_t * bus) * */ static int -pxa2xx_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +pxa2xx_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { uint32_t tmp_addr; int ncs_index; @@ -416,7 +416,7 @@ pxa2xx_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) * */ static int -pxa27x_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +pxa27x_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { uint32_t tmp_addr; int ncs_index; @@ -534,7 +534,7 @@ pxa27x_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -544,7 +544,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus, uint32_t adr) +set_data_in (bus_t *bus, uint32_t adr) { int i; part_t *p = PART; @@ -557,7 +557,7 @@ set_data_in (bus_t * bus, uint32_t adr) } static void -setup_data (bus_t * bus, uint32_t adr, uint32_t d) +setup_data (bus_t *bus, uint32_t adr, uint32_t d) { int i; part_t *p = PART; @@ -574,7 +574,7 @@ setup_data (bus_t * bus, uint32_t adr, uint32_t d) * */ static void -pxa2xx_bus_read_start (bus_t * bus, uint32_t adr) +pxa2xx_bus_read_start (bus_t *bus, uint32_t adr) { int cs_index = 0; @@ -611,7 +611,7 @@ pxa2xx_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -pxa2xx_bus_read_next (bus_t * bus, uint32_t adr) +pxa2xx_bus_read_next (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -661,7 +661,7 @@ pxa2xx_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -pxa2xx_bus_read_end (bus_t * bus) +pxa2xx_bus_read_end (bus_t *bus) { part_t *p = PART; chain_t *chain = CHAIN; @@ -710,7 +710,7 @@ pxa2xx_bus_read_end (bus_t * bus) * */ static void -pxa2xx_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +pxa2xx_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { int cs_index = 0; diff --git a/urjtag/src/bus/readmem.c b/urjtag/src/bus/readmem.c index c9f211ce..8671a4d9 100644 --- a/urjtag/src/bus/readmem.c +++ b/urjtag/src/bus/readmem.c @@ -41,7 +41,7 @@ #include "jtag.h" void -readmem (bus_t * bus, FILE * f, uint32_t addr, uint32_t len) +readmem (bus_t *bus, FILE *f, uint32_t addr, uint32_t len) { uint32_t step; uint32_t a; diff --git a/urjtag/src/bus/s3c4510x.c b/urjtag/src/bus/s3c4510x.c index 8b9f53ab..9cd9d38f 100644 --- a/urjtag/src/bus/s3c4510x.c +++ b/urjtag/src/bus/s3c4510x.c @@ -103,7 +103,7 @@ typedef struct * */ static bus_t * -s3c4510_bus_new (chain_t * chain, const bus_driver_t * driver, +s3c4510_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -182,7 +182,7 @@ s3c4510_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -s3c4510_bus_printinfo (bus_t * bus) +s3c4510_bus_printinfo (bus_t *bus) { int i; @@ -199,7 +199,7 @@ s3c4510_bus_printinfo (bus_t * bus) * */ static int -s3c4510_bus_init (bus_t * bus) +s3c4510_bus_init (bus_t *bus) { part_t *p = PART; chain_t *chain = CHAIN; @@ -227,7 +227,7 @@ s3c4510_bus_init (bus_t * bus) * */ static int -s3c4510_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +s3c4510_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { int b0size0, b0size1; // , endian; @@ -258,7 +258,7 @@ s3c4510_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -s3c4510_bus_setup_ctrl (bus_t * bus, int mode) +s3c4510_bus_setup_ctrl (bus_t *bus, int mode) { int k; part_t *p = PART; @@ -279,7 +279,7 @@ s3c4510_bus_setup_ctrl (bus_t * bus, int mode) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i, so; part_t *p = PART; @@ -302,7 +302,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus) +set_data_in (bus_t *bus) { int i; part_t *p = PART; @@ -312,7 +312,7 @@ set_data_in (bus_t * bus) } static void -setup_data (bus_t * bus, uint32_t d) +setup_data (bus_t *bus, uint32_t d) { int i; part_t *p = PART; @@ -329,7 +329,7 @@ setup_data (bus_t * bus, uint32_t d) * */ static void -s3c4510_bus_read_start (bus_t * bus, uint32_t adr) +s3c4510_bus_read_start (bus_t *bus, uint32_t adr) { /* see Figure 4-19 in [1] */ chain_t *chain = CHAIN; @@ -345,7 +345,7 @@ s3c4510_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -s3c4510_bus_read_next (bus_t * bus, uint32_t adr) +s3c4510_bus_read_next (bus_t *bus, uint32_t adr) { /* see Figure 4-20 in [1] */ part_t *p = PART; @@ -369,7 +369,7 @@ s3c4510_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -s3c4510_bus_read_end (bus_t * bus) +s3c4510_bus_read_end (bus_t *bus) { /* see Figure 4-19 in [1] */ part_t *p = PART; @@ -393,7 +393,7 @@ s3c4510_bus_read_end (bus_t * bus) * ROM/SRAM/FlashPage Write Access Timing */ static void -s3c4510_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +s3c4510_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { /* see Figure 4-21 in [1] */ chain_t *chain = CHAIN; diff --git a/urjtag/src/bus/sa1110.c b/urjtag/src/bus/sa1110.c index 72586ece..4f45b5f1 100644 --- a/urjtag/src/bus/sa1110.c +++ b/urjtag/src/bus/sa1110.c @@ -62,7 +62,7 @@ typedef struct * */ static bus_t * -sa1110_bus_new (chain_t * chain, const bus_driver_t * driver, +sa1110_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -125,7 +125,7 @@ sa1110_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -sa1110_bus_printinfo (bus_t * bus) +sa1110_bus_printinfo (bus_t *bus) { int i; @@ -142,7 +142,7 @@ sa1110_bus_printinfo (bus_t * bus) * */ static int -sa1110_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +sa1110_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { area->description = NULL; area->start = UINT32_C (0x00000000); @@ -154,7 +154,7 @@ sa1110_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -164,7 +164,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus) +set_data_in (bus_t *bus) { int i; part_t *p = PART; @@ -177,7 +177,7 @@ set_data_in (bus_t * bus) } static void -setup_data (bus_t * bus, uint32_t d) +setup_data (bus_t *bus, uint32_t d) { int i; part_t *p = PART; @@ -194,7 +194,7 @@ setup_data (bus_t * bus, uint32_t d) * */ static void -sa1110_bus_read_start (bus_t * bus, uint32_t adr) +sa1110_bus_read_start (bus_t *bus, uint32_t adr) { /* see Figure 10-12 in [1] */ part_t *p = PART; @@ -221,7 +221,7 @@ sa1110_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -sa1110_bus_read_next (bus_t * bus, uint32_t adr) +sa1110_bus_read_next (bus_t *bus, uint32_t adr) { /* see Figure 10-12 in [1] */ part_t *p = PART; @@ -246,7 +246,7 @@ sa1110_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -sa1110_bus_read_end (bus_t * bus) +sa1110_bus_read_end (bus_t *bus) { /* see Figure 10-12 in [1] */ part_t *p = PART; @@ -277,7 +277,7 @@ sa1110_bus_read_end (bus_t * bus) * */ static void -sa1110_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +sa1110_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { /* see Figure 10-16 in [1] */ part_t *p = PART; diff --git a/urjtag/src/bus/sh7727.c b/urjtag/src/bus/sh7727.c index 2b1aab39..42cb43f4 100644 --- a/urjtag/src/bus/sh7727.c +++ b/urjtag/src/bus/sh7727.c @@ -63,7 +63,7 @@ typedef struct * */ static bus_t * -sh7727_bus_new (chain_t * chain, const bus_driver_t * driver, +sh7727_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -136,7 +136,7 @@ sh7727_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -sh7727_bus_printinfo (bus_t * bus) +sh7727_bus_printinfo (bus_t *bus) { int i; @@ -153,7 +153,7 @@ sh7727_bus_printinfo (bus_t * bus) * */ static int -sh7727_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +sh7727_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { part_t *p = PART; @@ -180,7 +180,7 @@ sh7727_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -190,7 +190,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus) +set_data_in (bus_t *bus) { int i; part_t *p = PART; @@ -203,7 +203,7 @@ set_data_in (bus_t * bus) } static void -setup_data (bus_t * bus, uint32_t d) +setup_data (bus_t *bus, uint32_t d) { int i; part_t *p = PART; @@ -220,7 +220,7 @@ setup_data (bus_t * bus, uint32_t d) * */ static void -sh7727_bus_read_start (bus_t * bus, uint32_t adr) +sh7727_bus_read_start (bus_t *bus, uint32_t adr) { part_t *p = PART; int cs[8]; @@ -254,7 +254,7 @@ sh7727_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -sh7727_bus_read_next (bus_t * bus, uint32_t adr) +sh7727_bus_read_next (bus_t *bus, uint32_t adr) { part_t *p = PART; int i; @@ -277,7 +277,7 @@ sh7727_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -sh7727_bus_read_end (bus_t * bus) +sh7727_bus_read_end (bus_t *bus) { part_t *p = PART; int i; @@ -307,7 +307,7 @@ sh7727_bus_read_end (bus_t * bus) * */ static void -sh7727_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +sh7727_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { chain_t *chain = CHAIN; part_t *p = PART; diff --git a/urjtag/src/bus/sh7750r.c b/urjtag/src/bus/sh7750r.c index 37b12b60..eb0e7b3e 100644 --- a/urjtag/src/bus/sh7750r.c +++ b/urjtag/src/bus/sh7750r.c @@ -63,7 +63,7 @@ typedef struct * */ static bus_t * -sh7750r_bus_new (chain_t * chain, const bus_driver_t * driver, +sh7750r_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -134,7 +134,7 @@ sh7750r_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -sh7750r_bus_printinfo (bus_t * bus) +sh7750r_bus_printinfo (bus_t *bus) { int i; @@ -151,7 +151,7 @@ sh7750r_bus_printinfo (bus_t * bus) * */ static int -sh7750r_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +sh7750r_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { area->description = NULL; area->start = UINT32_C (0x00000000); @@ -162,7 +162,7 @@ sh7750r_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -172,7 +172,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus) +set_data_in (bus_t *bus) { int i; part_t *p = PART; @@ -182,7 +182,7 @@ set_data_in (bus_t * bus) } static void -setup_data (bus_t * bus, uint32_t d) +setup_data (bus_t *bus, uint32_t d) { int i; part_t *p = PART; @@ -196,7 +196,7 @@ setup_data (bus_t * bus, uint32_t d) * */ static void -sh7750r_bus_read_start (bus_t * bus, uint32_t adr) +sh7750r_bus_read_start (bus_t *bus, uint32_t adr) { part_t *p = PART; int cs[8]; @@ -232,7 +232,7 @@ sh7750r_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -sh7750r_bus_read_next (bus_t * bus, uint32_t adr) +sh7750r_bus_read_next (bus_t *bus, uint32_t adr) { part_t *p = PART; int i; @@ -252,7 +252,7 @@ sh7750r_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -sh7750r_bus_read_end (bus_t * bus) +sh7750r_bus_read_end (bus_t *bus) { part_t *p = PART; int cs[8]; @@ -285,7 +285,7 @@ sh7750r_bus_read_end (bus_t * bus) * */ static void -sh7750r_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +sh7750r_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { chain_t *chain = CHAIN; part_t *p = PART; diff --git a/urjtag/src/bus/sh7751r.c b/urjtag/src/bus/sh7751r.c index 62a5c8b9..b852a219 100644 --- a/urjtag/src/bus/sh7751r.c +++ b/urjtag/src/bus/sh7751r.c @@ -61,7 +61,7 @@ typedef struct * */ static bus_t * -sh7751r_bus_new (chain_t * chain, const bus_driver_t * driver, +sh7751r_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -128,7 +128,7 @@ sh7751r_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -sh7751r_bus_printinfo (bus_t * bus) +sh7751r_bus_printinfo (bus_t *bus) { int i; @@ -145,7 +145,7 @@ sh7751r_bus_printinfo (bus_t * bus) * */ static int -sh7751r_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +sh7751r_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { area->description = NULL; area->start = UINT32_C (0x00000000); @@ -156,7 +156,7 @@ sh7751r_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -166,7 +166,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus) +set_data_in (bus_t *bus) { int i; part_t *p = PART; @@ -176,7 +176,7 @@ set_data_in (bus_t * bus) } static void -setup_data (bus_t * bus, uint32_t d) +setup_data (bus_t *bus, uint32_t d) { int i; part_t *p = PART; @@ -190,7 +190,7 @@ setup_data (bus_t * bus, uint32_t d) * */ static void -sh7751r_bus_read_start (bus_t * bus, uint32_t adr) +sh7751r_bus_read_start (bus_t *bus, uint32_t adr) { part_t *p = PART; int cs[8]; @@ -224,7 +224,7 @@ sh7751r_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -sh7751r_bus_read_next (bus_t * bus, uint32_t adr) +sh7751r_bus_read_next (bus_t *bus, uint32_t adr) { part_t *p = PART; int i; @@ -244,7 +244,7 @@ sh7751r_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -sh7751r_bus_read_end (bus_t * bus) +sh7751r_bus_read_end (bus_t *bus) { part_t *p = PART; int cs[8]; @@ -276,7 +276,7 @@ sh7751r_bus_read_end (bus_t * bus) * */ static void -sh7751r_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +sh7751r_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { chain_t *chain = CHAIN; part_t *p = PART; diff --git a/urjtag/src/bus/sharc21065l.c b/urjtag/src/bus/sharc21065l.c index a325f5d4..9dc4687b 100644 --- a/urjtag/src/bus/sharc21065l.c +++ b/urjtag/src/bus/sharc21065l.c @@ -64,7 +64,7 @@ typedef struct * */ static bus_t * -sharc_21065L_bus_new (chain_t * chain, const bus_driver_t * driver, +sharc_21065L_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -121,7 +121,7 @@ sharc_21065L_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -sharc_21065L_bus_printinfo (bus_t * bus) +sharc_21065L_bus_printinfo (bus_t *bus) { int i; @@ -138,7 +138,7 @@ sharc_21065L_bus_printinfo (bus_t * bus) * */ static int -sharc_21065L_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +sharc_21065L_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { /* BMS (512 KB) */ if (adr < UINT32_C (0x080000)) @@ -159,7 +159,7 @@ sharc_21065L_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -169,7 +169,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus, uint32_t adr) +set_data_in (bus_t *bus, uint32_t adr) { int i; part_t *p = PART; @@ -183,7 +183,7 @@ set_data_in (bus_t * bus, uint32_t adr) static void -setup_data (bus_t * bus, uint32_t adr, uint32_t d) +setup_data (bus_t *bus, uint32_t adr, uint32_t d) { int i; part_t *p = PART; @@ -200,7 +200,7 @@ setup_data (bus_t * bus, uint32_t adr, uint32_t d) * */ static void -sharc_21065L_bus_read_start (bus_t * bus, uint32_t adr) +sharc_21065L_bus_read_start (bus_t *bus, uint32_t adr) { chain_t *chain = CHAIN; part_t *p = PART; @@ -225,7 +225,7 @@ sharc_21065L_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -sharc_21065L_bus_read_next (bus_t * bus, uint32_t adr) +sharc_21065L_bus_read_next (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -259,7 +259,7 @@ sharc_21065L_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -sharc_21065L_bus_read_end (bus_t * bus) +sharc_21065L_bus_read_end (bus_t *bus) { part_t *p = PART; chain_t *chain = CHAIN; @@ -293,7 +293,7 @@ sharc_21065L_bus_read_end (bus_t * bus) * */ static void -sharc_21065L_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +sharc_21065L_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { part_t *p = PART; chain_t *chain = CHAIN; diff --git a/urjtag/src/bus/slsup3.c b/urjtag/src/bus/slsup3.c index 142038bc..2c4c7689 100644 --- a/urjtag/src/bus/slsup3.c +++ b/urjtag/src/bus/slsup3.c @@ -41,10 +41,12 @@ int databusio[16] = { 94, 96, 98, 100, 102, 104, 106, 113, 95, 97, 99, 101, 103, 105, 107, -114 }; + 114 +}; int addrbusio[20] = { 93, 88, 87, 86, 85, 84, 83, 63, 64, 65, 66, 67, 68, 74, 75, 76, 77, 82, -81, 78 }; + 81, 78 +}; typedef struct { @@ -94,7 +96,7 @@ typedef struct * */ static bus_t * -slsup3_bus_new (chain_t * chain, const bus_driver_t * driver, +slsup3_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -167,7 +169,7 @@ slsup3_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -slsup3_bus_printinfo (bus_t * bus) +slsup3_bus_printinfo (bus_t *bus) { int i; @@ -182,7 +184,7 @@ slsup3_bus_printinfo (bus_t * bus) * */ static int -slsup3_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +slsup3_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { if ((adr >= FLASHSTART) && (adr < (FLASHSTART + FLASHSIZE))) { @@ -223,7 +225,7 @@ slsup3_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -261,7 +263,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus, uint32_t adr) +set_data_in (bus_t *bus, uint32_t adr) { int i; part_t *p = PART; @@ -276,7 +278,7 @@ set_data_in (bus_t * bus, uint32_t adr) } static void -setup_data (bus_t * bus, uint32_t adr, uint32_t d) +setup_data (bus_t *bus, uint32_t adr, uint32_t d) { int i; part_t *p = PART; @@ -291,7 +293,7 @@ setup_data (bus_t * bus, uint32_t adr, uint32_t d) } static uint32_t -get_data (bus_t * bus, uint32_t adr) +get_data (bus_t *bus, uint32_t adr) { bus_area_t area; int i; @@ -313,7 +315,7 @@ get_data (bus_t * bus, uint32_t adr) * */ static void -slsup3_bus_read_start (bus_t * bus, uint32_t adr) +slsup3_bus_read_start (bus_t *bus, uint32_t adr) { part_t *p = PART; @@ -349,7 +351,7 @@ slsup3_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -slsup3_bus_read_next (bus_t * bus, uint32_t adr) +slsup3_bus_read_next (bus_t *bus, uint32_t adr) { uint32_t d; @@ -378,7 +380,7 @@ slsup3_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -slsup3_bus_read_end (bus_t * bus) +slsup3_bus_read_end (bus_t *bus) { part_t *p = PART; uint32_t d; @@ -404,7 +406,7 @@ slsup3_bus_read_end (bus_t * bus) * */ static void -slsup3_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +slsup3_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { part_t *p = PART; chain_t *chain = CHAIN; diff --git a/urjtag/src/bus/tx4925.c b/urjtag/src/bus/tx4925.c index c19efeb6..f7190ae1 100644 --- a/urjtag/src/bus/tx4925.c +++ b/urjtag/src/bus/tx4925.c @@ -71,7 +71,7 @@ typedef struct * */ static bus_t * -tx4925_bus_new (chain_t * chain, const bus_driver_t * driver, +tx4925_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -138,7 +138,7 @@ tx4925_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -tx4925_bus_printinfo (bus_t * bus) +tx4925_bus_printinfo (bus_t *bus) { int i; @@ -155,7 +155,7 @@ tx4925_bus_printinfo (bus_t * bus) * */ static int -tx4925_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +tx4925_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { area->description = NULL; area->start = UINT32_C (0x00000000); @@ -166,7 +166,7 @@ tx4925_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) } static void -select_flash (bus_t * bus) +select_flash (bus_t *bus) { part_t *p = PART; @@ -181,7 +181,7 @@ select_flash (bus_t * bus) } static void -unselect_flash (bus_t * bus) +unselect_flash (bus_t *bus) { part_t *p = PART; @@ -196,7 +196,7 @@ unselect_flash (bus_t * bus) } static void -setup_address (bus_t * bus, uint32_t a) +setup_address (bus_t *bus, uint32_t a) { int i; part_t *p = PART; @@ -207,7 +207,7 @@ setup_address (bus_t * bus, uint32_t a) } static void -set_data_in (bus_t * bus) +set_data_in (bus_t *bus) { int i; part_t *p = PART; @@ -217,7 +217,7 @@ set_data_in (bus_t * bus) } static void -setup_data (bus_t * bus, uint32_t d) +setup_data (bus_t *bus, uint32_t d) { int i; part_t *p = PART; @@ -231,7 +231,7 @@ setup_data (bus_t * bus, uint32_t d) * */ static void -tx4925_bus_read_start (bus_t * bus, uint32_t adr) +tx4925_bus_read_start (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -251,7 +251,7 @@ tx4925_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -tx4925_bus_read_next (bus_t * bus, uint32_t adr) +tx4925_bus_read_next (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -272,7 +272,7 @@ tx4925_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -tx4925_bus_read_end (bus_t * bus) +tx4925_bus_read_end (bus_t *bus) { part_t *p = PART; chain_t *chain = CHAIN; @@ -296,7 +296,7 @@ tx4925_bus_read_end (bus_t * bus) * */ static void -tx4925_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +tx4925_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { part_t *p = PART; chain_t *chain = CHAIN; diff --git a/urjtag/src/bus/writemem.c b/urjtag/src/bus/writemem.c index fa87b7fb..402a99d6 100644 --- a/urjtag/src/bus/writemem.c +++ b/urjtag/src/bus/writemem.c @@ -34,7 +34,7 @@ #include "jtag.h" void -writemem (bus_t * bus, FILE * f, uint32_t addr, uint32_t len) +writemem (bus_t *bus, FILE *f, uint32_t addr, uint32_t len) { uint32_t step; uint32_t a; diff --git a/urjtag/src/bus/zefant-xs3.c b/urjtag/src/bus/zefant-xs3.c index 312438b1..ed49f210 100644 --- a/urjtag/src/bus/zefant-xs3.c +++ b/urjtag/src/bus/zefant-xs3.c @@ -156,7 +156,7 @@ typedef struct * */ static bus_t * -zefant_xs3_bus_new (chain_t * chain, const bus_driver_t * driver, +zefant_xs3_bus_new (chain_t *chain, const bus_driver_t *driver, char *cmd_params[]) { bus_t *bus; @@ -420,7 +420,7 @@ zefant_xs3_bus_new (chain_t * chain, const bus_driver_t * driver, * */ static void -zefant_xs3_bus_printinfo (bus_t * bus) +zefant_xs3_bus_printinfo (bus_t *bus) { int i; @@ -433,7 +433,7 @@ zefant_xs3_bus_printinfo (bus_t * bus) } static void -setup_address (bus_t * bus, uint32_t a, component_t * comp) +setup_address (bus_t *bus, uint32_t a, component_t *comp) { int i; part_t *p = PART; @@ -468,7 +468,7 @@ setup_address (bus_t * bus, uint32_t a, component_t * comp) } static int -detect_data_width (component_t * comp) +detect_data_width (component_t *comp) { int width; @@ -493,7 +493,7 @@ detect_data_width (component_t * comp) } static void -set_data_in (bus_t * bus, component_t * comp) +set_data_in (bus_t *bus, component_t *comp) { int i; part_t *p = PART; @@ -506,7 +506,7 @@ set_data_in (bus_t * bus, component_t * comp) } static void -setup_data (bus_t * bus, uint32_t d, component_t * comp) +setup_data (bus_t *bus, uint32_t d, component_t *comp) { int i; part_t *p = PART; @@ -519,8 +519,7 @@ setup_data (bus_t * bus, uint32_t d, component_t * comp) } static uint8_t -eeprom_shift_byte (chain_t * chain, part_t * p, component_t * comp, - uint8_t byte) +eeprom_shift_byte (chain_t *chain, part_t *p, component_t *comp, uint8_t byte) { int pos; uint8_t so_data = 0x00; @@ -547,7 +546,7 @@ eeprom_shift_byte (chain_t * chain, part_t * p, component_t * comp, } static void -eeprom_disable_device (chain_t * chain, part_t * p, component_t * comp) +eeprom_disable_device (chain_t *chain, part_t *p, component_t *comp) { /* ensure that SCK is low before disabling device */ part_set_signal (p, SCK, 1, 0); @@ -563,7 +562,7 @@ eeprom_disable_device (chain_t * chain, part_t * p, component_t * comp) * */ static int -zefant_xs3_bus_init (bus_t * bus) +zefant_xs3_bus_init (bus_t *bus) { part_t *p = PART; chain_t *chain = CHAIN; @@ -633,8 +632,7 @@ zefant_xs3_bus_init (bus_t * bus) } static int -comp_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area, - component_t ** comp) +comp_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area, component_t **comp) { if (adr < RAM0_START) { @@ -693,7 +691,7 @@ comp_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area, * */ static int -zefant_xs3_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) +zefant_xs3_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area) { component_t *comp; @@ -705,7 +703,7 @@ zefant_xs3_bus_area (bus_t * bus, uint32_t adr, bus_area_t * area) * */ static void -zefant_xs3_bus_read_start (bus_t * bus, uint32_t adr) +zefant_xs3_bus_read_start (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -775,7 +773,7 @@ zefant_xs3_bus_read_start (bus_t * bus, uint32_t adr) * */ static uint32_t -zefant_xs3_bus_read_next (bus_t * bus, uint32_t adr) +zefant_xs3_bus_read_next (bus_t *bus, uint32_t adr) { part_t *p = PART; chain_t *chain = CHAIN; @@ -824,7 +822,7 @@ zefant_xs3_bus_read_next (bus_t * bus, uint32_t adr) * */ static uint32_t -zefant_xs3_bus_read_end (bus_t * bus) +zefant_xs3_bus_read_end (bus_t *bus) { part_t *p = PART; chain_t *chain = CHAIN; @@ -881,7 +879,7 @@ zefant_xs3_bus_read_end (bus_t * bus) * */ static void -zefant_xs3_bus_write (bus_t * bus, uint32_t adr, uint32_t data) +zefant_xs3_bus_write (bus_t *bus, uint32_t adr, uint32_t data) { part_t *p = PART; chain_t *chain = CHAIN; diff --git a/urjtag/src/cmd/addpart.c b/urjtag/src/cmd/addpart.c index f068016c..db1fc727 100644 --- a/urjtag/src/cmd/addpart.c +++ b/urjtag/src/cmd/addpart.c @@ -32,7 +32,7 @@ #include "cmd.h" static int -cmd_addpart_run (chain_t * chain, char *params[]) +cmd_addpart_run (chain_t *chain, char *params[]) { unsigned int len; diff --git a/urjtag/src/cmd/bit.c b/urjtag/src/cmd/bit.c index 0dba5fcc..241f7097 100644 --- a/urjtag/src/cmd/bit.c +++ b/urjtag/src/cmd/bit.c @@ -45,7 +45,7 @@ cmd_bit_print_params (char *params[], unsigned int parameters, char *command) } static int -cmd_bit_run (chain_t * chain, char *params[]) +cmd_bit_run (chain_t *chain, char *params[]) { part_t *part; data_register *bsr; diff --git a/urjtag/src/cmd/bsdl.c b/urjtag/src/cmd/bsdl.c index 98db4a8e..1446073d 100644 --- a/urjtag/src/cmd/bsdl.c +++ b/urjtag/src/cmd/bsdl.c @@ -33,7 +33,7 @@ #include "cmd.h" static int -cmd_bsdl_run (chain_t * chain, char *params[]) +cmd_bsdl_run (chain_t *chain, char *params[]) { int num_params, result = -1; bsdl_globs_t *globs = &(chain->bsdl); diff --git a/urjtag/src/cmd/bus.c b/urjtag/src/cmd/bus.c index bc706163..e17e9ab2 100644 --- a/urjtag/src/cmd/bus.c +++ b/urjtag/src/cmd/bus.c @@ -32,7 +32,7 @@ #include "cmd.h" static int -cmd_bus_run (chain_t * chain, char *params[]) +cmd_bus_run (chain_t *chain, char *params[]) { unsigned int n; diff --git a/urjtag/src/cmd/cable.c b/urjtag/src/cmd/cable.c index be17d3c2..bf68222c 100644 --- a/urjtag/src/cmd/cable.c +++ b/urjtag/src/cmd/cable.c @@ -38,7 +38,7 @@ #include "cmd.h" static int -cmd_cable_run (chain_t * chain, char *params[]) +cmd_cable_run (chain_t *chain, char *params[]) { cable_t *cable; int i; diff --git a/urjtag/src/cmd/cmd.c b/urjtag/src/cmd/cmd.c index 76445745..bda482f2 100644 --- a/urjtag/src/cmd/cmd.c +++ b/urjtag/src/cmd/cmd.c @@ -164,7 +164,7 @@ cmd_completion (const char *text, int start, int end) #endif int -cmd_test_cable (chain_t * chain) +cmd_test_cable (chain_t *chain) { if (chain->cable) return 1; @@ -178,7 +178,7 @@ cmd_test_cable (chain_t * chain) /* Remainder copied from libbrux/cmd/cmd.c */ int -cmd_run (chain_t * chain, char *params[]) +cmd_run (chain_t *chain, char *params[]) { int i, pidx; size_t len; diff --git a/urjtag/src/cmd/debug.c b/urjtag/src/cmd/debug.c index ad347679..62b549ad 100644 --- a/urjtag/src/cmd/debug.c +++ b/urjtag/src/cmd/debug.c @@ -35,7 +35,7 @@ #include "cmd.h" static int -cmd_debug_run (chain_t * chain, char *params[]) +cmd_debug_run (chain_t *chain, char *params[]) { unsigned int i; diff --git a/urjtag/src/cmd/detect.c b/urjtag/src/cmd/detect.c index 41f0f3dd..b91a63e0 100644 --- a/urjtag/src/cmd/detect.c +++ b/urjtag/src/cmd/detect.c @@ -34,7 +34,7 @@ #include "cmd.h" static int -cmd_detect_run (chain_t * chain, char *params[]) +cmd_detect_run (chain_t *chain, char *params[]) { int i; bus_t *abus; diff --git a/urjtag/src/cmd/detectflash.c b/urjtag/src/cmd/detectflash.c index c8665532..01bf6dac 100644 --- a/urjtag/src/cmd/detectflash.c +++ b/urjtag/src/cmd/detectflash.c @@ -30,7 +30,7 @@ #include static int -cmd_detectflash_run (chain_t * chain, char *params[]) +cmd_detectflash_run (chain_t *chain, char *params[]) { uint32_t adr; diff --git a/urjtag/src/cmd/discovery.c b/urjtag/src/cmd/discovery.c index dbb25e9d..ab1db5a6 100644 --- a/urjtag/src/cmd/discovery.c +++ b/urjtag/src/cmd/discovery.c @@ -31,7 +31,7 @@ #include "cmd.h" static int -cmd_discovery_run (chain_t * chain, char *params[]) +cmd_discovery_run (chain_t *chain, char *params[]) { if (cmd_params (params) != 1) return -1; diff --git a/urjtag/src/cmd/dr.c b/urjtag/src/cmd/dr.c index f0c0a202..aa26a639 100644 --- a/urjtag/src/cmd/dr.c +++ b/urjtag/src/cmd/dr.c @@ -33,7 +33,7 @@ #include "cmd.h" static int -cmd_dr_run (chain_t * chain, char *params[]) +cmd_dr_run (chain_t *chain, char *params[]) { int dir = 1; tap_register *r; diff --git a/urjtag/src/cmd/endian.c b/urjtag/src/cmd/endian.c index 1cfe2385..97aa9a79 100644 --- a/urjtag/src/cmd/endian.c +++ b/urjtag/src/cmd/endian.c @@ -32,7 +32,7 @@ #include "cmd.h" static int -cmd_endian_run (chain_t * chain, char *params[]) +cmd_endian_run (chain_t *chain, char *params[]) { if (cmd_params (params) > 2) return -1; diff --git a/urjtag/src/cmd/eraseflash.c b/urjtag/src/cmd/eraseflash.c index d326f8cb..8adb12b3 100644 --- a/urjtag/src/cmd/eraseflash.c +++ b/urjtag/src/cmd/eraseflash.c @@ -34,7 +34,7 @@ #include "cmd.h" static int -cmd_eraseflash_run (chain_t * chain, char *params[]) +cmd_eraseflash_run (chain_t *chain, char *params[]) { uint32_t adr = 0; unsigned int number = 0; diff --git a/urjtag/src/cmd/flashmem.c b/urjtag/src/cmd/flashmem.c index fdc84315..850584ec 100644 --- a/urjtag/src/cmd/flashmem.c +++ b/urjtag/src/cmd/flashmem.c @@ -34,7 +34,7 @@ #include "cmd.h" static int -cmd_flashmem_run (chain_t * chain, char *params[]) +cmd_flashmem_run (chain_t *chain, char *params[]) { int msbin; int noverify = 0; diff --git a/urjtag/src/cmd/frequency.c b/urjtag/src/cmd/frequency.c index 94a8e224..113805f0 100644 --- a/urjtag/src/cmd/frequency.c +++ b/urjtag/src/cmd/frequency.c @@ -32,7 +32,7 @@ #include "cmd.h" static int -cmd_frequency_run (chain_t * chain, char *params[]) +cmd_frequency_run (chain_t *chain, char *params[]) { unsigned int freq; diff --git a/urjtag/src/cmd/get.c b/urjtag/src/cmd/get.c index 20f94821..d3ffd021 100644 --- a/urjtag/src/cmd/get.c +++ b/urjtag/src/cmd/get.c @@ -34,7 +34,7 @@ #include "cmd.h" static int -cmd_get_run (chain_t * chain, char *params[]) +cmd_get_run (chain_t *chain, char *params[]) { int data; signal_t *s; diff --git a/urjtag/src/cmd/help.c b/urjtag/src/cmd/help.c index 1dd871de..2c9f1f99 100644 --- a/urjtag/src/cmd/help.c +++ b/urjtag/src/cmd/help.c @@ -30,7 +30,7 @@ #include static int -cmd_help_run (chain_t * chain, char *params[]) +cmd_help_run (chain_t *chain, char *params[]) { int i; diff --git a/urjtag/src/cmd/idcode.c b/urjtag/src/cmd/idcode.c index e6ab9c52..b9ee9710 100644 --- a/urjtag/src/cmd/idcode.c +++ b/urjtag/src/cmd/idcode.c @@ -30,7 +30,7 @@ #include "cmd.h" static int -cmd_idcode_run (chain_t * chain, char *params[]) +cmd_idcode_run (chain_t *chain, char *params[]) { unsigned int bytes = 0; diff --git a/urjtag/src/cmd/include.c b/urjtag/src/cmd/include.c index 27447b4f..d27a5b1c 100644 --- a/urjtag/src/cmd/include.c +++ b/urjtag/src/cmd/include.c @@ -35,7 +35,7 @@ #include "bsdl.h" static int -cmd_include_or_script_run (chain_t * chain, int is_include, char *params[]) +cmd_include_or_script_run (chain_t *chain, int is_include, char *params[]) { int go = 0, i, j = 1; char *path; @@ -121,7 +121,7 @@ cmd_include_or_script_help (char *cmd) } static int -cmd_include_run (chain_t * chain, char *params[]) +cmd_include_run (chain_t *chain, char *params[]) { return cmd_include_or_script_run (chain, 1, params); } @@ -140,7 +140,7 @@ cmd_t cmd_include = { }; static int -cmd_script_run (chain_t * chain, char *params[]) +cmd_script_run (chain_t *chain, char *params[]) { return cmd_include_or_script_run (chain, 0, params); } diff --git a/urjtag/src/cmd/initbus.c b/urjtag/src/cmd/initbus.c index e0a48e3f..227cfd98 100644 --- a/urjtag/src/cmd/initbus.c +++ b/urjtag/src/cmd/initbus.c @@ -32,7 +32,7 @@ #include "jtag.h" static int -cmd_initbus_run (chain_t * chain, char *params[]) +cmd_initbus_run (chain_t *chain, char *params[]) { int i; diff --git a/urjtag/src/cmd/instruction.c b/urjtag/src/cmd/instruction.c index fa96ebac..5573018d 100644 --- a/urjtag/src/cmd/instruction.c +++ b/urjtag/src/cmd/instruction.c @@ -33,7 +33,7 @@ #include "cmd.h" static int -cmd_instruction_run (chain_t * chain, char *params[]) +cmd_instruction_run (chain_t *chain, char *params[]) { part_t *part; diff --git a/urjtag/src/cmd/parse.c b/urjtag/src/cmd/parse.c index 4ac7247e..a7b33cab 100644 --- a/urjtag/src/cmd/parse.c +++ b/urjtag/src/cmd/parse.c @@ -40,7 +40,7 @@ int -jtag_parse_line (chain_t * chain, char *line) +jtag_parse_line (chain_t *chain, char *line) { int l, i, r, tcnt; char **a; @@ -119,7 +119,7 @@ jtag_parse_line (chain_t * chain, char *line) int -jtag_parse_stream (chain_t * chain, FILE * f) +jtag_parse_stream (chain_t *chain, FILE *f) { char inputline[MAXINPUTLINE + 1]; int go = 1, i, c, lnr, clip, found_comment; @@ -160,7 +160,7 @@ jtag_parse_stream (chain_t * chain, FILE * f) } int -jtag_parse_file (chain_t * chain, const char *filename) +jtag_parse_file (chain_t *chain, const char *filename) { FILE *f; int go; diff --git a/urjtag/src/cmd/part.c b/urjtag/src/cmd/part.c index eceba8ee..782d5fae 100644 --- a/urjtag/src/cmd/part.c +++ b/urjtag/src/cmd/part.c @@ -33,7 +33,7 @@ #include "cmd.h" static int -cmd_part_run (chain_t * chain, char *params[]) +cmd_part_run (chain_t *chain, char *params[]) { unsigned int n; diff --git a/urjtag/src/cmd/peekpoke.c b/urjtag/src/cmd/peekpoke.c index 243aa28d..b825367e 100644 --- a/urjtag/src/cmd/peekpoke.c +++ b/urjtag/src/cmd/peekpoke.c @@ -32,7 +32,7 @@ #include "cmd.h" static int -cmd_peek_run (chain_t * chain, char *params[]) +cmd_peek_run (chain_t *chain, char *params[]) { uint32_t adr, val; int pars, j = 1; @@ -96,7 +96,7 @@ cmd_t cmd_peek = { }; static int -cmd_poke_run (chain_t * chain, char *params[]) +cmd_poke_run (chain_t *chain, char *params[]) { uint32_t adr, val; bus_area_t area; diff --git a/urjtag/src/cmd/pod.c b/urjtag/src/cmd/pod.c index cf83b673..f07723e1 100644 --- a/urjtag/src/cmd/pod.c +++ b/urjtag/src/cmd/pod.c @@ -36,7 +36,7 @@ #include "cmd.h" static int -cmd_pod_run (chain_t * chain, char *params[]) +cmd_pod_run (chain_t *chain, char *params[]) { int i, j; int mask = 0; diff --git a/urjtag/src/cmd/print.c b/urjtag/src/cmd/print.c index e0c80d3f..90b026c2 100644 --- a/urjtag/src/cmd/print.c +++ b/urjtag/src/cmd/print.c @@ -44,7 +44,7 @@ typedef char wchar_t; #include "cmd.h" static int -cmd_print_run (chain_t * chain, char *params[]) +cmd_print_run (chain_t *chain, char *params[]) { char format[128]; #if HAVE_SWPRINTF diff --git a/urjtag/src/cmd/quit.c b/urjtag/src/cmd/quit.c index 90716ff3..ce81e281 100644 --- a/urjtag/src/cmd/quit.c +++ b/urjtag/src/cmd/quit.c @@ -29,7 +29,7 @@ #include static int -cmd_quit_run (chain_t * chain, char *params[]) +cmd_quit_run (chain_t *chain, char *params[]) { if (params[1]) return -1; diff --git a/urjtag/src/cmd/readmem.c b/urjtag/src/cmd/readmem.c index 7165773e..c7263521 100644 --- a/urjtag/src/cmd/readmem.c +++ b/urjtag/src/cmd/readmem.c @@ -32,7 +32,7 @@ #include "cmd.h" static int -cmd_readmem_run (chain_t * chain, char *params[]) +cmd_readmem_run (chain_t *chain, char *params[]) { uint32_t adr; uint32_t len; diff --git a/urjtag/src/cmd/register.c b/urjtag/src/cmd/register.c index 29f38ee0..3f378f5a 100644 --- a/urjtag/src/cmd/register.c +++ b/urjtag/src/cmd/register.c @@ -33,7 +33,7 @@ #include "cmd.h" static int -cmd_register_run (chain_t * chain, char *params[]) +cmd_register_run (chain_t *chain, char *params[]) { part_t *part; unsigned int len; diff --git a/urjtag/src/cmd/reset.c b/urjtag/src/cmd/reset.c index e3ea9abc..7fa0ed22 100644 --- a/urjtag/src/cmd/reset.c +++ b/urjtag/src/cmd/reset.c @@ -33,7 +33,7 @@ #include "cmd.h" static int -cmd_reset_run (chain_t * chain, char *params[]) +cmd_reset_run (chain_t *chain, char *params[]) { if (cmd_params (params) > 1) return -1; diff --git a/urjtag/src/cmd/salias.c b/urjtag/src/cmd/salias.c index 0a631bae..0ca654b5 100644 --- a/urjtag/src/cmd/salias.c +++ b/urjtag/src/cmd/salias.c @@ -33,7 +33,7 @@ #include "cmd.h" static int -cmd_salias_run (chain_t * chain, char *params[]) +cmd_salias_run (chain_t *chain, char *params[]) { part_t *part; signal_t *s; diff --git a/urjtag/src/cmd/scan.c b/urjtag/src/cmd/scan.c index 0fa3b4bc..c739c3f3 100644 --- a/urjtag/src/cmd/scan.c +++ b/urjtag/src/cmd/scan.c @@ -33,7 +33,7 @@ #include "cmd.h" static int -cmd_scan_run (chain_t * chain, char *params[]) +cmd_scan_run (chain_t *chain, char *params[]) { part_t *part; data_register *bsr; diff --git a/urjtag/src/cmd/set.c b/urjtag/src/cmd/set.c index 82e4202c..6837dfaf 100644 --- a/urjtag/src/cmd/set.c +++ b/urjtag/src/cmd/set.c @@ -34,7 +34,7 @@ #include "cmd.h" static int -cmd_set_run (chain_t * chain, char *params[]) +cmd_set_run (chain_t *chain, char *params[]) { int dir; unsigned int data = 0; diff --git a/urjtag/src/cmd/shell.c b/urjtag/src/cmd/shell.c index c55f551f..0bc689d7 100644 --- a/urjtag/src/cmd/shell.c +++ b/urjtag/src/cmd/shell.c @@ -37,7 +37,7 @@ #include "cmd.h" static int -cmd_shell_run (chain_t * chain, char *params[]) +cmd_shell_run (chain_t *chain, char *params[]) { int i, len, n = cmd_params (params); char *shell_cmd; diff --git a/urjtag/src/cmd/shift.c b/urjtag/src/cmd/shift.c index 5adcd09f..89cfefaf 100644 --- a/urjtag/src/cmd/shift.c +++ b/urjtag/src/cmd/shift.c @@ -33,7 +33,7 @@ #include "cmd.h" static int -cmd_shift_run (chain_t * chain, char *params[]) +cmd_shift_run (chain_t *chain, char *params[]) { if (cmd_params (params) != 2) return -1; diff --git a/urjtag/src/cmd/signal.c b/urjtag/src/cmd/signal.c index e4c4a320..e1008cd8 100644 --- a/urjtag/src/cmd/signal.c +++ b/urjtag/src/cmd/signal.c @@ -33,7 +33,7 @@ #include "cmd.h" static int -cmd_signal_run (chain_t * chain, char *params[]) +cmd_signal_run (chain_t *chain, char *params[]) { part_t *part; signal_t *s; diff --git a/urjtag/src/cmd/svf.c b/urjtag/src/cmd/svf.c index 812bea47..3a4de343 100644 --- a/urjtag/src/cmd/svf.c +++ b/urjtag/src/cmd/svf.c @@ -33,7 +33,7 @@ #include static int -cmd_svf_run (chain_t * chain, char *params[]) +cmd_svf_run (chain_t *chain, char *params[]) { FILE *SVF_FILE; int num_params, i, result = -1; diff --git a/urjtag/src/cmd/test.c b/urjtag/src/cmd/test.c index f7bd03ce..e26ccd23 100644 --- a/urjtag/src/cmd/test.c +++ b/urjtag/src/cmd/test.c @@ -35,7 +35,7 @@ #include "cmd.h" static int -cmd_test_run (chain_t * chain, char *params[]) +cmd_test_run (chain_t *chain, char *params[]) { int data; unsigned int i; diff --git a/urjtag/src/cmd/usleep.c b/urjtag/src/cmd/usleep.c index f6b951c9..c4b9ae19 100644 --- a/urjtag/src/cmd/usleep.c +++ b/urjtag/src/cmd/usleep.c @@ -33,7 +33,7 @@ #include "cmd.h" static int -cmd_usleep_run (chain_t * chain, char *params[]) +cmd_usleep_run (chain_t *chain, char *params[]) { unsigned int usecs; diff --git a/urjtag/src/cmd/writemem.c b/urjtag/src/cmd/writemem.c index 7e62f09b..43234b0e 100644 --- a/urjtag/src/cmd/writemem.c +++ b/urjtag/src/cmd/writemem.c @@ -30,7 +30,7 @@ #include "cmd.h" static int -cmd_writemem_run (chain_t * chain, char *params[]) +cmd_writemem_run (chain_t *chain, char *params[]) { uint32_t adr; uint32_t len; diff --git a/urjtag/src/flash/amd.c b/urjtag/src/flash/amd.c index 3899733d..902da158 100644 --- a/urjtag/src/flash/amd.c +++ b/urjtag/src/flash/amd.c @@ -47,17 +47,17 @@ static int dbg = 0; -static int amd_flash_erase_block (cfi_array_t * cfi_array, uint32_t adr); -static int amd_flash_unlock_block (cfi_array_t * cfi_array, uint32_t adr); -static int amd_flash_program_single (cfi_array_t * cfi_array, uint32_t adr, +static int amd_flash_erase_block (cfi_array_t *cfi_array, uint32_t adr); +static int amd_flash_unlock_block (cfi_array_t *cfi_array, uint32_t adr); +static int amd_flash_program_single (cfi_array_t *cfi_array, uint32_t adr, uint32_t data); -static int amd_flash_program_buffer (cfi_array_t * cfi_array, uint32_t adr, - uint32_t * buffer, int count); -static int amd_flash_program (cfi_array_t * cfi_array, uint32_t adr, - uint32_t * buffer, int count); -static int amd_flash_program32 (cfi_array_t * cfi_array, uint32_t adr, - uint32_t * buffer, int count); -static void amd_flash_read_array (cfi_array_t * cfi_array); +static int amd_flash_program_buffer (cfi_array_t *cfi_array, uint32_t adr, + uint32_t *buffer, int count); +static int amd_flash_program (cfi_array_t *cfi_array, uint32_t adr, + uint32_t *buffer, int count); +static int amd_flash_program32 (cfi_array_t *cfi_array, uint32_t adr, + uint32_t *buffer, int count); +static void amd_flash_read_array (cfi_array_t *cfi_array); /* The code below assumes a connection of the flash chip address LSB (A0) * to A0, A1 or A2 of the byte-addressed CPU bus dependent on the bus width. @@ -77,7 +77,7 @@ static void amd_flash_read_array (cfi_array_t * cfi_array); * driver has to deal with this. - kawk 2008-01 */ static int -amd_flash_address_shift (cfi_array_t * cfi_array) +amd_flash_address_shift (cfi_array_t *cfi_array) { if (cfi_array->bus_width == 4) return 2; @@ -106,7 +106,7 @@ amd_flash_address_shift (cfi_array_t * cfi_array) /* autodetect, we can handle this chip */ static int -amd_flash_autodetect32 (cfi_array_t * cfi_array) +amd_flash_autodetect32 (cfi_array_t *cfi_array) { if (cfi_array->bus_width != 4) return 0; @@ -115,7 +115,7 @@ amd_flash_autodetect32 (cfi_array_t * cfi_array) } static int -amd_flash_autodetect16 (cfi_array_t * cfi_array) +amd_flash_autodetect16 (cfi_array_t *cfi_array) { if (cfi_array->bus_width != 2) return 0; @@ -124,7 +124,7 @@ amd_flash_autodetect16 (cfi_array_t * cfi_array) } static int -amd_flash_autodetect8 (cfi_array_t * cfi_array) +amd_flash_autodetect8 (cfi_array_t *cfi_array) { if (cfi_array->bus_width != 1) return 0; @@ -142,7 +142,7 @@ amd_flash_autodetect8 (cfi_array_t * cfi_array) */ #if 0 static int -amdstatus29 (cfi_array_t * cfi_array, uint32_t adr, int data) +amdstatus29 (cfi_array_t *cfi_array, uint32_t adr, int data) { bus_t *bus = cfi_array->bus; int o = amd_flash_address_shift (cfi_array); @@ -181,7 +181,7 @@ amdstatus29 (cfi_array_t * cfi_array, uint32_t adr, int data) * second implementation: see [1], page 30 */ static int -amdstatus (cfi_array_t * cfi_array, uint32_t adr, int data) +amdstatus (cfi_array_t *cfi_array, uint32_t adr, int data) { bus_t *bus = cfi_array->bus; @@ -218,7 +218,7 @@ amdstatus (cfi_array_t * cfi_array, uint32_t adr, int data) * second implementation: see [1], page 30 */ static int -amdstatus (cfi_array_t * cfi_array, uint32_t adr, int data) +amdstatus (cfi_array_t *cfi_array, uint32_t adr, int data) { bus_t *bus = cfi_array->bus; int o = amd_flash_address_shift (cfi_array); @@ -263,7 +263,7 @@ amdstatus (cfi_array_t * cfi_array, uint32_t adr, int data) #if 0 static int -amdisprotected (parts * ps, cfi_array_t * cfi_array, uint32_t adr) +amdisprotected (parts * ps, cfi_array_t *cfi_array, uint32_t adr) { uint32_t data; int o = amd_flash_address_shift (cfi_array); @@ -281,7 +281,7 @@ amdisprotected (parts * ps, cfi_array_t * cfi_array, uint32_t adr) #endif /* 0 */ static void -amd_flash_print_info (cfi_array_t * cfi_array) +amd_flash_print_info (cfi_array_t *cfi_array) { int mid, cid, prot; bus_t *bus = cfi_array->bus; @@ -389,7 +389,7 @@ amd_flash_print_info (cfi_array_t * cfi_array) } static int -amd_flash_erase_block (cfi_array_t * cfi_array, uint32_t adr) +amd_flash_erase_block (cfi_array_t *cfi_array, uint32_t adr) { bus_t *bus = cfi_array->bus; int o = amd_flash_address_shift (cfi_array); @@ -419,15 +419,14 @@ amd_flash_erase_block (cfi_array_t * cfi_array, uint32_t adr) } static int -amd_flash_unlock_block (cfi_array_t * cfi_array, uint32_t adr) +amd_flash_unlock_block (cfi_array_t *cfi_array, uint32_t adr) { printf ("flash_unlock_block 0x%08X IGNORE\n", adr); return 0; } static int -amd_flash_program_single (cfi_array_t * cfi_array, uint32_t adr, - uint32_t data) +amd_flash_program_single (cfi_array_t *cfi_array, uint32_t adr, uint32_t data) { int status; bus_t *bus = cfi_array->bus; @@ -448,7 +447,7 @@ amd_flash_program_single (cfi_array_t * cfi_array, uint32_t adr, } static int -amd_program_buffer_status (cfi_array_t * cfi_array, uint32_t adr, +amd_program_buffer_status (cfi_array_t *cfi_array, uint32_t adr, uint32_t data) { /* NOTE: Status polling according to [3], Figure 1. @@ -483,8 +482,8 @@ amd_program_buffer_status (cfi_array_t * cfi_array, uint32_t adr, } static int -amd_flash_program_buffer (cfi_array_t * cfi_array, uint32_t adr, - uint32_t * buffer, int count) +amd_flash_program_buffer (cfi_array_t *cfi_array, uint32_t adr, + uint32_t *buffer, int count) { /* NOTE: Write buffer programming operation according to [3], Figure 1. */ int status; @@ -539,7 +538,7 @@ amd_flash_program_buffer (cfi_array_t * cfi_array, uint32_t adr, } static int -amd_flash_program (cfi_array_t * cfi_array, uint32_t adr, uint32_t * buffer, +amd_flash_program (cfi_array_t *cfi_array, uint32_t adr, uint32_t *buffer, int count) { cfi_query_structure_t *cfi = &(cfi_array->cfi_chips[0]->cfi); @@ -572,7 +571,7 @@ amd_flash_program (cfi_array_t * cfi_array, uint32_t adr, uint32_t * buffer, } static int -amd_flash_program32 (cfi_array_t * cfi_array, uint32_t adr, uint32_t * buffer, +amd_flash_program32 (cfi_array_t *cfi_array, uint32_t adr, uint32_t *buffer, int count) { /* Single byte programming is forced for 32 bit (2x16) flash configuration. @@ -595,7 +594,7 @@ amd_flash_program32 (cfi_array_t * cfi_array, uint32_t adr, uint32_t * buffer, } static void -amd_flash_read_array (cfi_array_t * cfi_array) +amd_flash_read_array (cfi_array_t *cfi_array) { /* Read Array */ bus_write (cfi_array->bus, cfi_array->address, 0x00F000F0); /* AMD reset */ diff --git a/urjtag/src/flash/amd_flash.c b/urjtag/src/flash/amd_flash.c index dfa05035..bf8793f9 100644 --- a/urjtag/src/flash/amd_flash.c +++ b/urjtag/src/flash/amd_flash.c @@ -74,21 +74,20 @@ struct } var_forced_detection; -int amd_detect (bus_t * bus, uint32_t adr, cfi_array_t ** cfi_array); -static int amd_29xx040_autodetect (cfi_array_t * cfi_array); -static int amd_29xx040_status (bus_t * bus, uint32_t adr, - unsigned short data); -static void amd_29xx040_print_info (cfi_array_t * cfi_array); -static void amd_29xx040_read_array (cfi_array_t * cfi_array); -static int amd_29xx040_erase_block (cfi_array_t * cfi_array, uint32_t adr); -static int amd_29xx040_program_single (cfi_array_t * cfi_array, uint32_t adr, +int amd_detect (bus_t *bus, uint32_t adr, cfi_array_t **cfi_array); +static int amd_29xx040_autodetect (cfi_array_t *cfi_array); +static int amd_29xx040_status (bus_t *bus, uint32_t adr, unsigned short data); +static void amd_29xx040_print_info (cfi_array_t *cfi_array); +static void amd_29xx040_read_array (cfi_array_t *cfi_array); +static int amd_29xx040_erase_block (cfi_array_t *cfi_array, uint32_t adr); +static int amd_29xx040_program_single (cfi_array_t *cfi_array, uint32_t adr, uint32_t data); -static int amd_29xx040_program (cfi_array_t * cfi_array, uint32_t adr, - uint32_t * buffer, int count); -static int amd_29xx040_unlock_block (cfi_array_t * cfi_array, uint32_t adr); +static int amd_29xx040_program (cfi_array_t *cfi_array, uint32_t adr, + uint32_t *buffer, int count); +static int amd_29xx040_unlock_block (cfi_array_t *cfi_array, uint32_t adr); int -amd_detect (bus_t * bus, uint32_t adr, cfi_array_t ** cfi_array) +amd_detect (bus_t *bus, uint32_t adr, cfi_array_t **cfi_array) { int mid; int did; @@ -173,13 +172,13 @@ amd_detect (bus_t * bus, uint32_t adr, cfi_array_t ** cfi_array) static int -amd_29xx040_autodetect (cfi_array_t * cfi_array) +amd_29xx040_autodetect (cfi_array_t *cfi_array) { return (var_forced_detection.flash == AMD_29xx040B); //Non-CFI Am29xx040B flash } static int -amd_29xx040_status (bus_t * bus, uint32_t adr, unsigned short data) +amd_29xx040_status (bus_t *bus, uint32_t adr, unsigned short data) { short timeout; unsigned short dq7bit, dq7mask, dq5mask; @@ -216,7 +215,7 @@ amd_29xx040_status (bus_t * bus, uint32_t adr, unsigned short data) static void -amd_29xx040_print_info (cfi_array_t * cfi_array) +amd_29xx040_print_info (cfi_array_t *cfi_array) { int mid, did, prot; bus_t *bus = cfi_array->bus; @@ -262,7 +261,7 @@ amd_29xx040_print_info (cfi_array_t * cfi_array) } static void -amd_29xx040_read_array (cfi_array_t * cfi_array) +amd_29xx040_read_array (cfi_array_t *cfi_array) { /* Read Array */ if (var_forced_detection.unlock_bypass == AMD_BYPASS_UNLOCK_MODE) @@ -278,7 +277,7 @@ amd_29xx040_read_array (cfi_array_t * cfi_array) static int -amd_29xx040_erase_block (cfi_array_t * cfi_array, uint32_t adr) +amd_29xx040_erase_block (cfi_array_t *cfi_array, uint32_t adr) { bus_t *bus = cfi_array->bus; @@ -318,7 +317,7 @@ amd_29xx040_erase_block (cfi_array_t * cfi_array, uint32_t adr) } static int -amd_29xx040_program_single (cfi_array_t * cfi_array, uint32_t adr, +amd_29xx040_program_single (cfi_array_t *cfi_array, uint32_t adr, uint32_t data) { int status; @@ -352,7 +351,7 @@ amd_29xx040_program_single (cfi_array_t * cfi_array, uint32_t adr, } static int -amd_29xx040_program (cfi_array_t * cfi_array, uint32_t adr, uint32_t * buffer, +amd_29xx040_program (cfi_array_t *cfi_array, uint32_t adr, uint32_t *buffer, int count) { int idx; @@ -370,7 +369,7 @@ amd_29xx040_program (cfi_array_t * cfi_array, uint32_t adr, uint32_t * buffer, } static int -amd_29xx040_unlock_block (cfi_array_t * cfi_array, uint32_t adr) +amd_29xx040_unlock_block (cfi_array_t *cfi_array, uint32_t adr) { printf ("flash_unlock_block 0x%08X IGNORE\n", adr); return 0; diff --git a/urjtag/src/flash/cfi.c b/urjtag/src/flash/cfi.c index 8b0afc29..ae15c05c 100644 --- a/urjtag/src/flash/cfi.c +++ b/urjtag/src/flash/cfi.c @@ -39,7 +39,7 @@ #include void -cfi_array_free (cfi_array_t * cfi_array) +cfi_array_free (cfi_array_t *cfi_array) { if (!cfi_array) return; @@ -68,7 +68,7 @@ cfi_array_free (cfi_array_t * cfi_array) } int -cfi_detect (bus_t * bus, uint32_t adr, cfi_array_t ** cfi_array) +cfi_detect (bus_t *bus, uint32_t adr, cfi_array_t **cfi_array) { unsigned int bw; /* bus width */ unsigned int d; /* data offset */ diff --git a/urjtag/src/flash/detectflash.c b/urjtag/src/flash/detectflash.c index e59ba4de..dae35e93 100644 --- a/urjtag/src/flash/detectflash.c +++ b/urjtag/src/flash/detectflash.c @@ -41,14 +41,14 @@ cfi_array_t *cfi_array = NULL; -extern int jedec_exp_detect (bus_t * bus, uint32_t adr, - cfi_array_t ** cfi_array); -extern int jedec_detect (bus_t * bus, uint32_t adr, cfi_array_t ** cfi_array); +extern int jedec_exp_detect (bus_t *bus, uint32_t adr, + cfi_array_t **cfi_array); +extern int jedec_detect (bus_t *bus, uint32_t adr, cfi_array_t **cfi_array); -extern int amd_detect (bus_t * bus, uint32_t adr, cfi_array_t ** cfi_array); //Ajith +extern int amd_detect (bus_t *bus, uint32_t adr, cfi_array_t **cfi_array); //Ajith void -detectflash (bus_t * bus, uint32_t adr) +detectflash (bus_t *bus, uint32_t adr) { cfi_query_structure_t *cfi; const char *s; @@ -266,11 +266,11 @@ detectflash (bus_t * bus, uint32_t adr) }; const char *process_technology[6] = { N_("170-nm Floating Gate technology"), - N_("230-nm MirrorBit(tm) technology"), + N_("230-nm MirrorBit(tm) technology"), N_("130-nm Floating Gate technology"), - N_("110-nm MirrorBit(tm) technology"), + N_("110-nm MirrorBit(tm) technology"), N_("90-nm Floating Gate technology"), - N_("90-nm MirrorBit(tm) technology") + N_("90-nm MirrorBit(tm) technology") }; const char *process_technology_13[3] = { N_("CS49"), N_("CS59"), N_("CS99") @@ -281,19 +281,19 @@ detectflash (bus_t * bus, uint32_t adr) const char *sector_protect_scheme[8] = { N_("29F040 mode"), N_("29F016 mode"), N_("29F400 mode"), N_("29LV800 mode"), - N_("29BDS640 mode (Software Command Locking)"), + N_("29BDS640 mode (Software Command Locking)"), N_("29BDD160 mode (New Sector Protect)"), N_("29PDL128 mode (New Sector Protect + 29LV800)"), N_("Advanced Sector Protect") }; const char *page_mode_type[4] = { N_("Not supported"), N_("4 word Page"), N_("8 word Page"), - N_("16 word Page") + N_("16 word Page") }; const char *top_bottom[6] = { N_("No boot"), - N_("8x8kb sectors at top and bottom with WP control"), + N_("8x8kb sectors at top and bottom with WP control"), N_("Bottom boot device"), N_("Top boot device"), N_("Uniform bottom boot device"), N_("Uniform top boot device") }; diff --git a/urjtag/src/flash/flash.c b/urjtag/src/flash/flash.c index dca21d91..6b90b85b 100644 --- a/urjtag/src/flash/flash.c +++ b/urjtag/src/flash/flash.c @@ -95,7 +95,7 @@ set_flash_driver (void) } void -flashmsbin (bus_t * bus, FILE * f, int noverify) +flashmsbin (bus_t *bus, FILE *f, int noverify) { uint32_t adr; cfi_query_structure_t *cfi; @@ -251,7 +251,7 @@ flashmsbin (bus_t * bus, FILE * f, int noverify) } static int -find_block (cfi_query_structure_t * cfi, int adr, int bus_width, +find_block (cfi_query_structure_t *cfi, int adr, int bus_width, int chip_width, int *bytes_until_next_block) { int i; @@ -283,7 +283,7 @@ find_block (cfi_query_structure_t * cfi, int adr, int bus_width, } void -flashmem (bus_t * bus, FILE * f, uint32_t addr, int noverify) +flashmem (bus_t *bus, FILE *f, uint32_t addr, int noverify) { uint32_t adr; cfi_query_structure_t *cfi; @@ -439,7 +439,7 @@ flashmem (bus_t * bus, FILE * f, uint32_t addr, int noverify) } void -flasherase (bus_t * bus, uint32_t addr, int number) +flasherase (bus_t *bus, uint32_t addr, int number) { cfi_query_structure_t *cfi; int i; diff --git a/urjtag/src/flash/intel.c b/urjtag/src/flash/intel.c index e9d8171e..c95b69bf 100644 --- a/urjtag/src/flash/intel.c +++ b/urjtag/src/flash/intel.c @@ -48,24 +48,24 @@ #include #include -static int intel_flash_erase_block (cfi_array_t * cfi_array, uint32_t adr); -static int intel_flash_unlock_block (cfi_array_t * cfi_array, uint32_t adr); -static int intel_flash_program_single (cfi_array_t * cfi_array, uint32_t adr, +static int intel_flash_erase_block (cfi_array_t *cfi_array, uint32_t adr); +static int intel_flash_unlock_block (cfi_array_t *cfi_array, uint32_t adr); +static int intel_flash_program_single (cfi_array_t *cfi_array, uint32_t adr, uint32_t data); -static int intel_flash_program_buffer (cfi_array_t * cfi_array, uint32_t adr, - uint32_t * buffer, int count); -static int intel_flash_program (cfi_array_t * cfi_array, uint32_t adr, - uint32_t * buffer, int count); -static int intel_flash_erase_block32 (cfi_array_t * cfi_array, uint32_t adr); -static int intel_flash_unlock_block32 (cfi_array_t * cfi_array, uint32_t adr); -static int intel_flash_program32_single (cfi_array_t * cfi_array, +static int intel_flash_program_buffer (cfi_array_t *cfi_array, uint32_t adr, + uint32_t *buffer, int count); +static int intel_flash_program (cfi_array_t *cfi_array, uint32_t adr, + uint32_t *buffer, int count); +static int intel_flash_erase_block32 (cfi_array_t *cfi_array, uint32_t adr); +static int intel_flash_unlock_block32 (cfi_array_t *cfi_array, uint32_t adr); +static int intel_flash_program32_single (cfi_array_t *cfi_array, uint32_t adr, uint32_t data); -static int intel_flash_program32 (cfi_array_t * cfi_array, uint32_t adr, - uint32_t * buffer, int count); +static int intel_flash_program32 (cfi_array_t *cfi_array, uint32_t adr, + uint32_t *buffer, int count); /* autodetect, we can handle this chip */ static int -intel_flash_autodetect32 (cfi_array_t * cfi_array) +intel_flash_autodetect32 (cfi_array_t *cfi_array) { bus_area_t area; @@ -84,7 +84,7 @@ intel_flash_autodetect32 (cfi_array_t * cfi_array) } static int -intel_flash_autodetect (cfi_array_t * cfi_array) +intel_flash_autodetect (cfi_array_t *cfi_array) { bus_area_t area; @@ -103,7 +103,7 @@ intel_flash_autodetect (cfi_array_t * cfi_array) } static int -intel_flash_autodetect8 (cfi_array_t * cfi_array) +intel_flash_autodetect8 (cfi_array_t *cfi_array) { bus_area_t area; @@ -122,7 +122,7 @@ intel_flash_autodetect8 (cfi_array_t * cfi_array) } static void -_intel_flash_print_info (cfi_array_t * cfi_array, int o) +_intel_flash_print_info (cfi_array_t *cfi_array, int o) { uint32_t mid, cid; bus_t *bus = cfi_array->bus; @@ -206,7 +206,7 @@ _intel_flash_print_info (cfi_array_t * cfi_array, int o) } static void -intel_flash_print_info (cfi_array_t * cfi_array) +intel_flash_print_info (cfi_array_t *cfi_array) { int o = 1; bus_t *bus = cfi_array->bus; @@ -224,7 +224,7 @@ intel_flash_print_info (cfi_array_t * cfi_array) } static void -intel_flash_print_info32 (cfi_array_t * cfi_array) +intel_flash_print_info32 (cfi_array_t *cfi_array) { int o = 2; bus_t *bus = cfi_array->bus; @@ -241,7 +241,7 @@ intel_flash_print_info32 (cfi_array_t * cfi_array) } static int -intel_flash_erase_block (cfi_array_t * cfi_array, uint32_t adr) +intel_flash_erase_block (cfi_array_t *cfi_array, uint32_t adr) { uint16_t sr; bus_t *bus = cfi_array->bus; @@ -273,7 +273,7 @@ intel_flash_erase_block (cfi_array_t * cfi_array, uint32_t adr) } static int -intel_flash_unlock_block (cfi_array_t * cfi_array, uint32_t adr) +intel_flash_unlock_block (cfi_array_t *cfi_array, uint32_t adr) { uint16_t sr; bus_t *bus = cfi_array->bus; @@ -294,7 +294,7 @@ intel_flash_unlock_block (cfi_array_t * cfi_array, uint32_t adr) } static int -intel_flash_program_single (cfi_array_t * cfi_array, uint32_t adr, +intel_flash_program_single (cfi_array_t *cfi_array, uint32_t adr, uint32_t data) { uint16_t sr; @@ -316,8 +316,8 @@ intel_flash_program_single (cfi_array_t * cfi_array, uint32_t adr, } static int -intel_flash_program_buffer (cfi_array_t * cfi_array, uint32_t adr, - uint32_t * buffer, int count) +intel_flash_program_buffer (cfi_array_t *cfi_array, uint32_t adr, + uint32_t *buffer, int count) { /* NOTE: Write-to-buffer programming operation according to [5], Figure 9 */ uint16_t sr; @@ -374,7 +374,7 @@ intel_flash_program_buffer (cfi_array_t * cfi_array, uint32_t adr, } static int -intel_flash_program (cfi_array_t * cfi_array, uint32_t adr, uint32_t * buffer, +intel_flash_program (cfi_array_t *cfi_array, uint32_t adr, uint32_t *buffer, int count) { cfi_query_structure_t *cfi = &(cfi_array->cfi_chips[0]->cfi); @@ -407,7 +407,7 @@ intel_flash_program (cfi_array_t * cfi_array, uint32_t adr, uint32_t * buffer, } static int -intel_flash_erase_block32 (cfi_array_t * cfi_array, uint32_t adr) +intel_flash_erase_block32 (cfi_array_t *cfi_array, uint32_t adr) { uint32_t sr; bus_t *bus = cfi_array->bus; @@ -432,7 +432,7 @@ intel_flash_erase_block32 (cfi_array_t * cfi_array, uint32_t adr) } static int -intel_flash_unlock_block32 (cfi_array_t * cfi_array, uint32_t adr) +intel_flash_unlock_block32 (cfi_array_t *cfi_array, uint32_t adr) { uint32_t sr; bus_t *bus = cfi_array->bus; @@ -458,7 +458,7 @@ intel_flash_unlock_block32 (cfi_array_t * cfi_array, uint32_t adr) } static int -intel_flash_program32_single (cfi_array_t * cfi_array, uint32_t adr, +intel_flash_program32_single (cfi_array_t *cfi_array, uint32_t adr, uint32_t data) { uint32_t sr; @@ -483,8 +483,8 @@ intel_flash_program32_single (cfi_array_t * cfi_array, uint32_t adr, } static int -intel_flash_program32 (cfi_array_t * cfi_array, uint32_t adr, - uint32_t * buffer, int count) +intel_flash_program32 (cfi_array_t *cfi_array, uint32_t adr, + uint32_t *buffer, int count) { /* Single byte programming is forced for 32 bit (2x16) flash configuration. a) lack of testing capbilities for 2x16 multi-byte write operation @@ -506,14 +506,14 @@ intel_flash_program32 (cfi_array_t * cfi_array, uint32_t adr, } static void -intel_flash_readarray32 (cfi_array_t * cfi_array) +intel_flash_readarray32 (cfi_array_t *cfi_array) { /* Read Array */ bus_write (cfi_array->bus, cfi_array->address, 0x00FF00FF); } static void -intel_flash_readarray (cfi_array_t * cfi_array) +intel_flash_readarray (cfi_array_t *cfi_array) { /* Read Array */ bus_write (cfi_array->bus, cfi_array->address, 0x00FF00FF); diff --git a/urjtag/src/flash/jedec.c b/urjtag/src/flash/jedec.c index a15a2af8..2a4193f2 100644 --- a/urjtag/src/flash/jedec.c +++ b/urjtag/src/flash/jedec.c @@ -706,7 +706,7 @@ static const struct amd_flash_info table[] = { }; int -jedec_detect (bus_t * bus, uint32_t adr, cfi_array_t ** cfi_array) +jedec_detect (bus_t *bus, uint32_t adr, cfi_array_t **cfi_array) { /* Temporary containers for manufacturer and device id while probing with different Autoselect methods. */ diff --git a/urjtag/src/flash/jedec_exp.c b/urjtag/src/flash/jedec_exp.c index e90c2257..9078e30f 100644 --- a/urjtag/src/flash/jedec_exp.c +++ b/urjtag/src/flash/jedec_exp.c @@ -36,7 +36,7 @@ #include void -jedec_exp_read_id (bus_t * bus, uint32_t adr, uint32_t dmask, +jedec_exp_read_id (bus_t *bus, uint32_t adr, uint32_t dmask, uint32_t pata, uint32_t patb, uint32_t dcmd, int det_addroffset, int det_dataoffset, uint32_t det_addrpat) @@ -60,7 +60,7 @@ jedec_exp_read_id (bus_t * bus, uint32_t adr, uint32_t dmask, } int -jedec_exp_detect (bus_t * bus, uint32_t adr, cfi_array_t ** cfi_array) +jedec_exp_detect (bus_t *bus, uint32_t adr, cfi_array_t **cfi_array) { /* Temporary containers for manufacturer and device id while probing with different Autoselect methods. */ diff --git a/urjtag/src/jim/intel_28f800b3.c b/urjtag/src/jim/intel_28f800b3.c index f9470f18..44b82dea 100644 --- a/urjtag/src/jim/intel_28f800b3.c +++ b/urjtag/src/jim/intel_28f800b3.c @@ -106,7 +106,7 @@ typedef struct intel_f28xxxb3_state_t; void -intel_28fxxxb3_init (jim_bus_device_t * d, uint16_t id, b3_boot_type_t bt) +intel_28fxxxb3_init (jim_bus_device_t *d, uint16_t id, b3_boot_type_t bt) { d->state = malloc (sizeof (intel_f28xxxb3_state_t)); if (d->state != NULL) @@ -122,22 +122,22 @@ intel_28fxxxb3_init (jim_bus_device_t * d, uint16_t id, b3_boot_type_t bt) } void -intel_28f800b3b_init (jim_bus_device_t * d) +intel_28f800b3b_init (jim_bus_device_t *d) { intel_28fxxxb3_init (d, 0x8893, BOTTOM); } void -intel_28fxxxb3_free (jim_bus_device_t * d) +intel_28fxxxb3_free (jim_bus_device_t *d) { if (d->state != NULL) free (d->state); } uint32_t -intel_28fxxxb3_capture (jim_bus_device_t * d, +intel_28fxxxb3_capture (jim_bus_device_t *d, uint32_t address, uint32_t control, - uint8_t * shmem, size_t shmem_size) + uint8_t *shmem, size_t shmem_size) { uint32_t data = 0; @@ -191,9 +191,9 @@ intel_28fxxxb3_capture (jim_bus_device_t * d, } void -intel_28fxxxb3_update (jim_bus_device_t * d, +intel_28fxxxb3_update (jim_bus_device_t *d, uint32_t address, uint32_t data, uint32_t control, - uint8_t * shmem, size_t shmem_size) + uint8_t *shmem, size_t shmem_size) { #if 0 printf ("update A=%08X, D=%08X%s%s%s\n", address, data, diff --git a/urjtag/src/jim/some_cpu.c b/urjtag/src/jim/some_cpu.c index dae98459..289b2f95 100644 --- a/urjtag/src/jim/some_cpu.c +++ b/urjtag/src/jim/some_cpu.c @@ -46,7 +46,7 @@ jim_attached_part_t some_cpu_attached[] = { #define BSR_LEN 202 void -some_cpu_report_idcode (jim_device_t * dev) +some_cpu_report_idcode (jim_device_t *dev) { dev->sreg[0].reg[0] = 0x1; /* IDCODE instruction b0001 */ dev->sreg[1].reg[0] = 0x87654321; /* Load IDR (fake) */ @@ -54,8 +54,8 @@ some_cpu_report_idcode (jim_device_t * dev) } void -some_cpu_tck_rise (jim_device_t * dev, - int tms, int tdi, uint8_t * shmem, size_t shmem_size) +some_cpu_tck_rise (jim_device_t *dev, + int tms, int tdi, uint8_t *shmem, size_t shmem_size) { int i; @@ -143,7 +143,7 @@ some_cpu_tck_rise (jim_device_t * dev, } void -some_cpu_tck_fall (jim_device_t * dev, uint8_t * shmem, size_t shmem_size) +some_cpu_tck_fall (jim_device_t *dev, uint8_t *shmem, size_t shmem_size) { int i; @@ -187,7 +187,7 @@ some_cpu_tck_fall (jim_device_t * dev, uint8_t * shmem, size_t shmem_size) } void -some_cpu_free (jim_device_t * dev) +some_cpu_free (jim_device_t *dev) { int i; diff --git a/urjtag/src/jim/tap.c b/urjtag/src/jim/tap.c index ec60d9fb..b7e5ce4d 100644 --- a/urjtag/src/jim/tap.c +++ b/urjtag/src/jim/tap.c @@ -52,7 +52,7 @@ const tap_state_t next_tap_state[16][2] = { }; void -jim_print_sreg (shift_reg_t * r) +jim_print_sreg (shift_reg_t *r) { int i; for (i = (r->len + 31) / 32; i >= 0; i--) @@ -60,7 +60,7 @@ jim_print_sreg (shift_reg_t * r) } void -jim_print_tap_state (char *rof, jim_device_t * dev) +jim_print_tap_state (char *rof, jim_device_t *dev) { printf (" tck %s, state=", rof); switch (dev->tap_state & 7) @@ -112,19 +112,19 @@ jim_print_tap_state (char *rof, jim_device_t * dev) void -jim_set_trst (jim_state_t * s, int trst) +jim_set_trst (jim_state_t *s, int trst) { s->trst = trst; } int -jim_get_trst (jim_state_t * s) +jim_get_trst (jim_state_t *s) { return s->trst; } int -jim_get_tdo (jim_state_t * s) +jim_get_tdo (jim_state_t *s) { if (s->last_device_in_chain == NULL) return 0; @@ -132,7 +132,7 @@ jim_get_tdo (jim_state_t * s) } void -jim_tck_rise (jim_state_t * s, int tms, int tdi) +jim_tck_rise (jim_state_t *s, int tms, int tdi) { jim_device_t *dev; @@ -209,7 +209,7 @@ jim_tck_rise (jim_state_t * s, int tms, int tdi) } void -jim_tck_fall (jim_state_t * s) +jim_tck_fall (jim_state_t *s) { jim_device_t *dev; @@ -326,7 +326,7 @@ jim_init (void) } void -jim_free (jim_state_t * s) +jim_free (jim_state_t *s) { jim_device_t *dev, *pre; diff --git a/urjtag/src/jtag.c b/urjtag/src/jtag.c index ef9891db..bd155efa 100644 --- a/urjtag/src/jtag.c +++ b/urjtag/src/jtag.c @@ -52,7 +52,7 @@ #include "jtag.h" #ifndef HAVE_GETLINE -ssize_t getline (char **lineptr, size_t * n, FILE * stream); +ssize_t getline (char **lineptr, size_t * n, FILE *stream); #endif int debug_mode = 0; @@ -148,7 +148,7 @@ jtag_save_history (void) #endif static int -jtag_readline_multiple_commands_support (chain_t * chain, char *line) /* multiple commands should be separated with '::' */ +jtag_readline_multiple_commands_support (chain_t *chain, char *line) /* multiple commands should be separated with '::' */ { int r; char *nextcmd = line; @@ -181,7 +181,7 @@ jtag_readline_multiple_commands_support (chain_t * chain, char *line) /* multi } static void -jtag_readline_loop (chain_t * chain, const char *prompt) +jtag_readline_loop (chain_t *chain, const char *prompt) { #ifdef HAVE_LIBREADLINE char *line = NULL; @@ -245,7 +245,7 @@ jtag_readline_loop (chain_t * chain, const char *prompt) } static int -jtag_parse_rc (chain_t * chain) +jtag_parse_rc (chain_t *chain) { char *home = getenv ("HOME"); char *file; @@ -272,7 +272,7 @@ jtag_parse_rc (chain_t * chain) } static void -cleanup (chain_t * chain) +cleanup (chain_t *chain) { cfi_array_free (cfi_array); cfi_array = NULL; diff --git a/urjtag/src/lib/getdelim.c b/urjtag/src/lib/getdelim.c index 04d9efe2..15e13ec7 100644 --- a/urjtag/src/lib/getdelim.c +++ b/urjtag/src/lib/getdelim.c @@ -33,7 +33,7 @@ #define GETDELIM_BUFFER 128 ssize_t -getdelim (char **lineptr, size_t * n, int delimiter, FILE * stream) +getdelim (char **lineptr, size_t * n, int delimiter, FILE *stream) { char *p; int c; diff --git a/urjtag/src/lib/getline.c b/urjtag/src/lib/getline.c index eb236706..62fb2691 100644 --- a/urjtag/src/lib/getline.c +++ b/urjtag/src/lib/getline.c @@ -30,11 +30,11 @@ #ifndef HAVE_GETLINE #ifndef HAVE_GETDELIM -ssize_t getdelim (char **lineptr, size_t * n, int delimiter, FILE * stream); +ssize_t getdelim (char **lineptr, size_t * n, int delimiter, FILE *stream); #endif /* HAVE_GETDELIM */ ssize_t -getline (char **lineptr, size_t * n, FILE * stream) +getline (char **lineptr, size_t * n, FILE *stream) { return getdelim (lineptr, n, '\n', stream); } diff --git a/urjtag/src/part/bsbit.c b/urjtag/src/part/bsbit.c index c2062b76..5e5636a6 100644 --- a/urjtag/src/part/bsbit.c +++ b/urjtag/src/part/bsbit.c @@ -28,7 +28,7 @@ #include "bsbit.h" bsbit_t * -bsbit_alloc (int bit, const char *name, int type, signal_t * signal, int safe) +bsbit_alloc (int bit, const char *name, int type, signal_t *signal, int safe) { bsbit_t *b = malloc (sizeof *b); if (!b) @@ -69,7 +69,7 @@ bsbit_alloc (int bit, const char *name, int type, signal_t * signal, int safe) } void -bsbit_free (bsbit_t * b) +bsbit_free (bsbit_t *b) { if (!b) return; diff --git a/urjtag/src/part/data_register.c b/urjtag/src/part/data_register.c index 07c0ffd3..cdcec7a5 100644 --- a/urjtag/src/part/data_register.c +++ b/urjtag/src/part/data_register.c @@ -72,7 +72,7 @@ data_register_alloc (const char *name, int len) } void -data_register_free (data_register * dr) +data_register_free (data_register *dr) { if (!dr) return; diff --git a/urjtag/src/part/instruction.c b/urjtag/src/part/instruction.c index 5c951acb..01d43357 100644 --- a/urjtag/src/part/instruction.c +++ b/urjtag/src/part/instruction.c @@ -69,7 +69,7 @@ instruction_alloc (const char *name, int len, const char *val) } void -instruction_free (instruction * i) +instruction_free (instruction *i) { if (!i) return; diff --git a/urjtag/src/part/part.c b/urjtag/src/part/part.c index 5680b54f..874426f0 100644 --- a/urjtag/src/part/part.c +++ b/urjtag/src/part/part.c @@ -32,7 +32,7 @@ /* part */ part_t * -part_alloc (const tap_register * id) +part_alloc (const tap_register *id) { part_t *p = malloc (sizeof *p); if (!p) @@ -55,7 +55,7 @@ part_alloc (const tap_register * id) } void -part_free (part_t * p) +part_free (part_t *p) { int i; @@ -109,7 +109,7 @@ part_free (part_t * p) } instruction * -part_find_instruction (part_t * p, const char *iname) +part_find_instruction (part_t *p, const char *iname) { instruction *i; @@ -128,7 +128,7 @@ part_find_instruction (part_t * p, const char *iname) } data_register * -part_find_data_register (part_t * p, const char *drname) +part_find_data_register (part_t *p, const char *drname) { data_register *dr; @@ -147,7 +147,7 @@ part_find_data_register (part_t * p, const char *drname) } signal_t * -part_find_signal (part_t * p, const char *signalname) +part_find_signal (part_t *p, const char *signalname) { signal_t *s; salias_t *sa; @@ -175,14 +175,14 @@ part_find_signal (part_t * p, const char *signalname) } void -part_set_instruction (part_t * p, const char *iname) +part_set_instruction (part_t *p, const char *iname) { if (p) p->active_instruction = part_find_instruction (p, iname); } void -part_set_signal (part_t * p, signal_t * s, int out, int val) +part_set_signal (part_t *p, signal_t *s, int out, int val) { data_register *bsr; @@ -228,7 +228,7 @@ part_set_signal (part_t * p, signal_t * s, int out, int val) } int -part_get_signal (part_t * p, signal_t * s) +part_get_signal (part_t *p, signal_t *s) { data_register *bsr; @@ -254,7 +254,7 @@ part_get_signal (part_t * p, signal_t * s) } void -part_print (part_t * p) +part_print (part_t *p) { const char *instruction = NULL; const char *dr = NULL; @@ -270,7 +270,7 @@ part_print (part_t * p) if (p->active_instruction) { instruction = p->active_instruction->name; - if (p->active_instruction->data_register != NULL) + if (p->active_instruction->data_register !=NULL) dr = p->active_instruction->data_register->name; } if (instruction == NULL) @@ -296,7 +296,7 @@ parts_alloc (void) } void -parts_free (parts_t * ps) +parts_free (parts_t *ps) { int i; @@ -311,7 +311,7 @@ parts_free (parts_t * ps) } int -parts_add_part (parts_t * ps, part_t * p) +parts_add_part (parts_t *ps, part_t *p) { part_t **np = realloc (ps->parts, (ps->len + 1) * sizeof *ps->parts); @@ -325,7 +325,7 @@ parts_add_part (parts_t * ps, part_t * p) } void -parts_set_instruction (parts_t * ps, const char *iname) +parts_set_instruction (parts_t *ps, const char *iname) { int i; @@ -338,7 +338,7 @@ parts_set_instruction (parts_t * ps, const char *iname) } void -parts_print (parts_t * ps) +parts_print (parts_t *ps) { int i; diff --git a/urjtag/src/part/signal.c b/urjtag/src/part/signal.c index 27400c78..440dc05e 100644 --- a/urjtag/src/part/signal.c +++ b/urjtag/src/part/signal.c @@ -49,7 +49,7 @@ signal_alloc (const char *name) } void -signal_free (signal_t * s) +signal_free (signal_t *s) { if (!s) return; @@ -58,7 +58,7 @@ signal_free (signal_t * s) } salias_t * -salias_alloc (const char *name, const signal_t * signal) +salias_alloc (const char *name, const signal_t *signal) { salias_t *sa = malloc (sizeof *sa); if (sa == NULL) @@ -77,7 +77,7 @@ salias_alloc (const char *name, const signal_t * signal) } void -salias_free (salias_t * salias) +salias_free (salias_t *salias) { if (salias == NULL) return; diff --git a/urjtag/src/svf/svf.c b/urjtag/src/svf/svf.c index 1b473f9b..231b3d36 100644 --- a/urjtag/src/svf/svf.c +++ b/urjtag/src/svf/svf.c @@ -59,7 +59,7 @@ #undef DEBUG -int svfparse (parser_priv_t * priv_data, chain_t * chain); +int svfparse (parser_priv_t *priv_data, chain_t *chain); /* @@ -68,7 +68,7 @@ int svfparse (parser_priv_t * priv_data, chain_t * chain); * Puts TAP controller into reset state by clocking 5 times with TMS = 1. */ static void -svf_force_reset_state (chain_t * chain) +svf_force_reset_state (chain_t *chain) { chain_clock (chain, 1, 0, 5); tap_state_reset (chain); @@ -88,7 +88,7 @@ svf_force_reset_state (chain_t * chain) * state : new TAP controller state */ static void -svf_goto_state (chain_t * chain, int new_state) +svf_goto_state (chain_t *chain, int new_state) { int current_state; @@ -400,7 +400,7 @@ svf_build_bit_string (char *hex_string, int len) * 0 : error occurred */ static int -svf_copy_hex_to_register (char *hex_string, tap_register * reg) +svf_copy_hex_to_register (char *hex_string, tap_register *reg) { char *bit_string; @@ -435,8 +435,8 @@ svf_copy_hex_to_register (char *hex_string, tap_register * reg) * 0 : tdo and reg do not match or error occurred */ static int -svf_compare_tdo (parser_priv_t * priv, char *tdo, char *mask, - tap_register * reg, YYLTYPE * loc) +svf_compare_tdo (parser_priv_t *priv, char *tdo, char *mask, + tap_register *reg, YYLTYPE * loc) { char *tdo_bit, *mask_bit; int pos, mismatch, result = 1; @@ -566,7 +566,7 @@ svf_all_care (char **string, double number) * state : required end state (SVF parser encoding) * ***************************************************************************/ void -svf_endxr (parser_priv_t * priv, enum generic_irdr_coding ir_dr, int state) +svf_endxr (parser_priv_t *priv, enum generic_irdr_coding ir_dr, int state) { switch (ir_dr) { @@ -589,7 +589,7 @@ svf_endxr (parser_priv_t * priv, enum generic_irdr_coding ir_dr, int state) * freq : frequency in HZ * ***************************************************************************/ void -svf_frequency (chain_t * chain, double freq) +svf_frequency (chain_t *chain, double freq) { cable_set_frequency (chain->cable, freq); } @@ -643,7 +643,7 @@ sigalrm_handler (int signal) * 0 : error occurred * ***************************************************************************/ int -svf_runtest (chain_t * chain, parser_priv_t * priv, struct runtest *params) +svf_runtest (chain_t *chain, parser_priv_t *priv, struct runtest *params) { uint32_t run_count, frequency; @@ -792,7 +792,7 @@ svf_runtest (chain_t * chain, parser_priv_t * priv, struct runtest *params) * 0 : error occurred * ***************************************************************************/ int -svf_state (chain_t * chain, parser_priv_t * priv, +svf_state (chain_t *chain, parser_priv_t *priv, struct path_states *path_states, int stable_state) { int i; @@ -823,7 +823,7 @@ svf_state (chain_t * chain, parser_priv_t * priv, * 0 : error occurred * ***************************************************************************/ int -svf_sxr (chain_t * chain, parser_priv_t * priv, +svf_sxr (chain_t *chain, parser_priv_t *priv, enum generic_irdr_coding ir_dr, struct ths_params *params, YYLTYPE * loc) { @@ -992,7 +992,7 @@ svf_sxr (chain_t * chain, parser_priv_t * priv, * 0 : error occurred * ***************************************************************************/ int -svf_trst (chain_t * chain, parser_priv_t * priv, int trst_mode) +svf_trst (chain_t *chain, parser_priv_t *priv, int trst_mode) { int trst_cable = -1; char *unimplemented_mode; @@ -1100,7 +1100,7 @@ svf_txr (enum generic_irdr_coding ir_dr, struct ths_params *params) * 0 : error occurred * ***************************************************************************/ void -svf_run (chain_t * chain, FILE * SVF_FILE, int stop_on_mismatch, +svf_run (chain_t *chain, FILE *SVF_FILE, int stop_on_mismatch, int print_progress, uint32_t ref_freq) { const sxr_t sxr_default = { {0.0, NULL, NULL, NULL, NULL}, diff --git a/urjtag/src/tap/cable.c b/urjtag/src/tap/cable.c index 93cd4284..017bcfbb 100644 --- a/urjtag/src/tap/cable.c +++ b/urjtag/src/tap/cable.c @@ -147,13 +147,13 @@ cable_driver_t *cable_drivers[] = { }; void -cable_free (cable_t * cable) +cable_free (cable_t *cable) { cable->driver->cable_free (cable); } int -cable_init (cable_t * cable) +cable_init (cable_t *cable) { cable->delay = 0; cable->frequency = 0; @@ -186,13 +186,13 @@ cable_init (cable_t * cable) } void -cable_flush (cable_t * cable, cable_flush_amount_t how_much) +cable_flush (cable_t *cable, cable_flush_amount_t how_much) { cable->driver->flush (cable, how_much); } void -cable_done (cable_t * cable) +cable_done (cable_t *cable) { cable_flush (cable, COMPLETELY); if (cable->todo.data != NULL) @@ -204,7 +204,7 @@ cable_done (cable_t * cable) } int -cable_add_queue_item (cable_t * cable, cable_queue_info_t * q) +cable_add_queue_item (cable_t *cable, cable_queue_info_t *q) { int i, j; if (q->num_items >= q->max_items) /* queue full? */ @@ -333,7 +333,7 @@ cable_add_queue_item (cable_t * cable, cable_queue_info_t * q) } int -cable_get_queue_item (cable_t * cable, cable_queue_info_t * q) +cable_get_queue_item (cable_t *cable, cable_queue_info_t *q) { if (q->num_items > 0) { @@ -352,7 +352,7 @@ cable_get_queue_item (cable_t * cable, cable_queue_info_t * q) } void -cable_purge_queue (cable_queue_info_t * q, int io) +cable_purge_queue (cable_queue_info_t *q, int io) { while (q->num_items > 0) { @@ -385,14 +385,14 @@ cable_purge_queue (cable_queue_info_t * q, int io) } void -cable_clock (cable_t * cable, int tms, int tdi, int n) +cable_clock (cable_t *cable, int tms, int tdi, int n) { cable_flush (cable, COMPLETELY); cable->driver->clock (cable, tms, tdi, n); } int -cable_defer_clock (cable_t * cable, int tms, int tdi, int n) +cable_defer_clock (cable_t *cable, int tms, int tdi, int n) { int i = cable_add_queue_item (cable, &(cable->todo)); if (i < 0) @@ -406,14 +406,14 @@ cable_defer_clock (cable_t * cable, int tms, int tdi, int n) } int -cable_get_tdo (cable_t * cable) +cable_get_tdo (cable_t *cable) { cable_flush (cable, COMPLETELY); return cable->driver->get_tdo (cable); } int -cable_get_tdo_late (cable_t * cable) +cable_get_tdo_late (cable_t *cable) { int i; cable_flush (cable, TO_OUTPUT); @@ -436,7 +436,7 @@ cable_get_tdo_late (cable_t * cable) } int -cable_defer_get_tdo (cable_t * cable) +cable_defer_get_tdo (cable_t *cable) { int i = cable_add_queue_item (cable, &(cable->todo)); if (i < 0) @@ -447,14 +447,14 @@ cable_defer_get_tdo (cable_t * cable) } int -cable_set_signal (cable_t * cable, int mask, int val) +cable_set_signal (cable_t *cable, int mask, int val) { cable_flush (cable, COMPLETELY); return cable->driver->set_signal (cable, mask, val); } int -cable_defer_set_signal (cable_t * cable, int mask, int val) +cable_defer_set_signal (cable_t *cable, int mask, int val) { int i = cable_add_queue_item (cable, &(cable->todo)); if (i < 0) @@ -467,14 +467,14 @@ cable_defer_set_signal (cable_t * cable, int mask, int val) } int -cable_get_signal (cable_t * cable, pod_sigsel_t sig) +cable_get_signal (cable_t *cable, pod_sigsel_t sig) { cable_flush (cable, COMPLETELY); return cable->driver->get_signal (cable, sig); } int -cable_get_signal_late (cable_t * cable, pod_sigsel_t sig) +cable_get_signal_late (cable_t *cable, pod_sigsel_t sig) { int i; cable_flush (cable, TO_OUTPUT); @@ -504,7 +504,7 @@ cable_get_signal_late (cable_t * cable, pod_sigsel_t sig) } int -cable_defer_get_signal (cable_t * cable, pod_sigsel_t sig) +cable_defer_get_signal (cable_t *cable, pod_sigsel_t sig) { int i = cable_add_queue_item (cable, &(cable->todo)); if (i < 0) @@ -516,14 +516,14 @@ cable_defer_get_signal (cable_t * cable, pod_sigsel_t sig) } int -cable_transfer (cable_t * cable, int len, char *in, char *out) +cable_transfer (cable_t *cable, int len, char *in, char *out) { cable_flush (cable, COMPLETELY); return cable->driver->transfer (cable, len, in, out); } int -cable_transfer_late (cable_t * cable, char *out) +cable_transfer_late (cable_t *cable, char *out) { int i; cable_flush (cable, TO_OUTPUT); @@ -561,7 +561,7 @@ cable_transfer_late (cable_t * cable, char *out) } int -cable_defer_transfer (cable_t * cable, int len, char *in, char *out) +cable_defer_transfer (cable_t *cable, int len, char *in, char *out) { char *ibuf, *obuf = NULL; int i; @@ -600,20 +600,20 @@ cable_defer_transfer (cable_t * cable, int len, char *in, char *out) } void -cable_set_frequency (cable_t * cable, uint32_t new_frequency) +cable_set_frequency (cable_t *cable, uint32_t new_frequency) { cable_flush (cable, COMPLETELY); cable->driver->set_frequency (cable, new_frequency); } uint32_t -cable_get_frequency (cable_t * cable) +cable_get_frequency (cable_t *cable) { return cable->frequency; } void -cable_wait (cable_t * cable) +cable_wait (cable_t *cable) { int i; volatile int j; diff --git a/urjtag/src/tap/cable/arcom.c b/urjtag/src/tap/cable/arcom.c index eb76b4ff..687004f4 100644 --- a/urjtag/src/tap/cable/arcom.c +++ b/urjtag/src/tap/cable/arcom.c @@ -50,7 +50,7 @@ #define TDO 7 static int -arcom_init (cable_t * cable) +arcom_init (cable_t *cable) { int data; @@ -70,7 +70,7 @@ arcom_init (cable_t * cable) } static void -arcom_clock (cable_t * cable, int tms, int tdi, int n) +arcom_clock (cable_t *cable, int tms, int tdi, int n) { int i; int trst = (PARAM_SIGNALS (cable) & CS_TRST) ? 1 : 0; @@ -97,7 +97,7 @@ arcom_clock (cable_t * cable, int tms, int tdi, int n) } static int -arcom_get_tdo (cable_t * cable) +arcom_get_tdo (cable_t *cable) { int trst = (PARAM_SIGNALS (cable) & CS_TRST) ? 1 : 0; @@ -110,7 +110,7 @@ arcom_get_tdo (cable_t * cable) } static int -arcom_set_signal (cable_t * cable, int mask, int val) +arcom_set_signal (cable_t *cable, int mask, int val) { int prev_sigs = PARAM_SIGNALS (cable); diff --git a/urjtag/src/tap/cable/byteblaster.c b/urjtag/src/tap/cable/byteblaster.c index bc83adcf..9db81b20 100644 --- a/urjtag/src/tap/cable/byteblaster.c +++ b/urjtag/src/tap/cable/byteblaster.c @@ -68,7 +68,7 @@ #define BB_ENABLE 0xC static int -byteblaster_init (cable_t * cable) +byteblaster_init (cable_t *cable) { int BB_II = 0; @@ -97,7 +97,7 @@ byteblaster_init (cable_t * cable) } static void -byteblaster_clock (cable_t * cable, int tms, int tdi, int n) +byteblaster_clock (cable_t *cable, int tms, int tdi, int n) { int i; @@ -121,7 +121,7 @@ byteblaster_clock (cable_t * cable, int tms, int tdi, int n) } static int -byteblaster_get_tdo (cable_t * cable) +byteblaster_get_tdo (cable_t *cable) { parport_set_data (cable->link.port, 0 << TCK); PARAM_SIGNALS (cable) &= ~(CS_TDI | CS_TCK | CS_TMS); @@ -132,7 +132,7 @@ byteblaster_get_tdo (cable_t * cable) } static int -byteblaster_set_signal (cable_t * cable, int mask, int val) +byteblaster_set_signal (cable_t *cable, int mask, int val) { int prev_sigs = PARAM_SIGNALS (cable); diff --git a/urjtag/src/tap/cable/cmd_xfer.c b/urjtag/src/tap/cable/cmd_xfer.c index 051ff7c5..3e98a832 100644 --- a/urjtag/src/tap/cable/cmd_xfer.c +++ b/urjtag/src/tap/cable/cmd_xfer.c @@ -47,7 +47,7 @@ * ****************************************************************************/ static int -extend_cmd_buffer (cx_cmd_t * cmd) +extend_cmd_buffer (cx_cmd_t *cmd) { /* check size of cmd buffer and increase it if not sufficient */ if (cmd->buf_pos >= cmd->buf_len) @@ -77,7 +77,7 @@ extend_cmd_buffer (cx_cmd_t * cmd) * ****************************************************************************/ int -cx_cmd_space (cx_cmd_root_t * cmd_root, int max_len) +cx_cmd_space (cx_cmd_root_t *cmd_root, int max_len) { int n; cx_cmd_t *cmd = cmd_root->last; @@ -107,7 +107,7 @@ cx_cmd_space (cx_cmd_root_t * cmd_root, int max_len) * ****************************************************************************/ int -cx_cmd_push (cx_cmd_root_t * cmd_root, uint8_t d) +cx_cmd_push (cx_cmd_root_t *cmd_root, uint8_t d) { cx_cmd_t *cmd = cmd_root->last; @@ -136,7 +136,7 @@ cx_cmd_push (cx_cmd_root_t * cmd_root, uint8_t d) * ****************************************************************************/ cx_cmd_t * -cx_cmd_dequeue (cx_cmd_root_t * cmd_root) +cx_cmd_dequeue (cx_cmd_root_t *cmd_root) { cx_cmd_t *cmd = cmd_root->first; @@ -163,7 +163,7 @@ cx_cmd_dequeue (cx_cmd_root_t * cmd_root) * ****************************************************************************/ void -cx_cmd_free (cx_cmd_t * cmd) +cx_cmd_free (cx_cmd_t *cmd) { if (cmd) { @@ -190,7 +190,7 @@ cx_cmd_free (cx_cmd_t * cmd) * ****************************************************************************/ cx_cmd_t * -cx_cmd_queue (cx_cmd_root_t * cmd_root, uint32_t to_recv) +cx_cmd_queue (cx_cmd_root_t *cmd_root, uint32_t to_recv) { cx_cmd_t *cmd = (cx_cmd_t *) malloc (sizeof (cx_cmd_t)); @@ -231,7 +231,7 @@ cx_cmd_queue (cx_cmd_root_t * cmd_root, uint32_t to_recv) * ****************************************************************************/ void -cx_cmd_init (cx_cmd_root_t * cmd_root) +cx_cmd_init (cx_cmd_root_t *cmd_root) { cmd_root->first = NULL; cmd_root->last = NULL; @@ -250,7 +250,7 @@ cx_cmd_init (cx_cmd_root_t * cmd_root) * ****************************************************************************/ void -cx_cmd_deinit (cx_cmd_root_t * cmd_root) +cx_cmd_deinit (cx_cmd_root_t *cmd_root) { cx_cmd_t *cmd; while (cmd_root->first) @@ -283,8 +283,8 @@ cx_cmd_deinit (cx_cmd_root_t * cmd_root) * ****************************************************************************/ void -cx_xfer (cx_cmd_root_t * cmd_root, const cx_cmd_t * out_cmd, - cable_t * cable, cable_flush_amount_t how_much) +cx_xfer (cx_cmd_root_t *cmd_root, const cx_cmd_t *out_cmd, + cable_t *cable, cable_flush_amount_t how_much) { cx_cmd_t *cmd = cx_cmd_dequeue (cmd_root); uint32_t bytes_to_recv; @@ -334,7 +334,7 @@ cx_xfer (cx_cmd_root_t * cmd_root, const cx_cmd_t * out_cmd, * ****************************************************************************/ uint8_t -cx_xfer_recv (cable_t * cable) +cx_xfer_recv (cable_t *cable) { uint8_t buf; diff --git a/urjtag/src/tap/cable/cmd_xfer.h b/urjtag/src/tap/cable/cmd_xfer.h index 499cf87e..87e981d1 100644 --- a/urjtag/src/tap/cable/cmd_xfer.h +++ b/urjtag/src/tap/cable/cmd_xfer.h @@ -49,16 +49,16 @@ struct cx_cmd_root }; typedef struct cx_cmd_root cx_cmd_root_t; -int cx_cmd_space (cx_cmd_root_t * cmd_root, int max_len); -int cx_cmd_push (cx_cmd_root_t * cmd_root, uint8_t d); -cx_cmd_t *cx_cmd_dequeue (cx_cmd_root_t * cmd_root); -void cx_cmd_free (cx_cmd_t * cmd); -cx_cmd_t *cx_cmd_queue (cx_cmd_root_t * cmd_root, uint32_t to_recv); -void cx_cmd_init (cx_cmd_root_t * cmd_root); -void cx_cmd_deinit (cx_cmd_root_t * cmd_root); +int cx_cmd_space (cx_cmd_root_t *cmd_root, int max_len); +int cx_cmd_push (cx_cmd_root_t *cmd_root, uint8_t d); +cx_cmd_t *cx_cmd_dequeue (cx_cmd_root_t *cmd_root); +void cx_cmd_free (cx_cmd_t *cmd); +cx_cmd_t *cx_cmd_queue (cx_cmd_root_t *cmd_root, uint32_t to_recv); +void cx_cmd_init (cx_cmd_root_t *cmd_root); +void cx_cmd_deinit (cx_cmd_root_t *cmd_root); -void cx_xfer (cx_cmd_root_t * cmd_root, const cx_cmd_t * out_cmd, - cable_t * cable, cable_flush_amount_t how_much); -uint8_t cx_xfer_recv (cable_t * cable); +void cx_xfer (cx_cmd_root_t *cmd_root, const cx_cmd_t *out_cmd, + cable_t *cable, cable_flush_amount_t how_much); +uint8_t cx_xfer_recv (cable_t *cable); #endif /* CMD_XFER_H */ diff --git a/urjtag/src/tap/cable/dlc5.c b/urjtag/src/tap/cable/dlc5.c index 5876dd8e..acc314c9 100644 --- a/urjtag/src/tap/cable/dlc5.c +++ b/urjtag/src/tap/cable/dlc5.c @@ -57,7 +57,7 @@ #define TDO 4 static int -dlc5_init (cable_t * cable) +dlc5_init (cable_t *cable) { if (parport_open (cable->link.port)) return -1; @@ -68,7 +68,7 @@ dlc5_init (cable_t * cable) } static void -dlc5_clock (cable_t * cable, int tms, int tdi, int n) +dlc5_clock (cable_t *cable, int tms, int tdi, int n) { int i; @@ -94,7 +94,7 @@ dlc5_clock (cable_t * cable, int tms, int tdi, int n) } static int -dlc5_get_tdo (cable_t * cable) +dlc5_get_tdo (cable_t *cable) { parport_set_data (cable->link.port, (1 << PROG) | (0 << TCK)); PARAM_SIGNALS (cable) &= ~(CS_TDI | CS_TCK | CS_TMS); @@ -105,7 +105,7 @@ dlc5_get_tdo (cable_t * cable) } static int -dlc5_set_signal (cable_t * cable, int mask, int val) +dlc5_set_signal (cable_t *cable, int mask, int val) { int prev_sigs = PARAM_SIGNALS (cable); diff --git a/urjtag/src/tap/cable/ea253.c b/urjtag/src/tap/cable/ea253.c index 07ef4708..b41a8331 100644 --- a/urjtag/src/tap/cable/ea253.c +++ b/urjtag/src/tap/cable/ea253.c @@ -50,7 +50,7 @@ #define TDO 4 static int -ea253_init (cable_t * cable) +ea253_init (cable_t *cable) { int data; @@ -70,7 +70,7 @@ ea253_init (cable_t * cable) } static void -ea253_clock (cable_t * cable, int tms, int tdi, int n) +ea253_clock (cable_t *cable, int tms, int tdi, int n) { int i; int trst = (PARAM_SIGNALS (cable) & CS_TRST) ? 1 : 0; @@ -97,7 +97,7 @@ ea253_clock (cable_t * cable, int tms, int tdi, int n) } static int -ea253_get_tdo (cable_t * cable) +ea253_get_tdo (cable_t *cable) { int trst = (PARAM_SIGNALS (cable) & CS_TRST) ? 1 : 0; @@ -110,7 +110,7 @@ ea253_get_tdo (cable_t * cable) } static int -ea253_set_signal (cable_t * cable, int mask, int val) +ea253_set_signal (cable_t *cable, int mask, int val) { int prev_sigs = PARAM_SIGNALS (cable); diff --git a/urjtag/src/tap/cable/ei012.c b/urjtag/src/tap/cable/ei012.c index ce559e9c..ef8f7f82 100644 --- a/urjtag/src/tap/cable/ei012.c +++ b/urjtag/src/tap/cable/ei012.c @@ -52,7 +52,7 @@ #define TDO 7 static int -ei012_init (cable_t * cable) +ei012_init (cable_t *cable) { int data; @@ -72,7 +72,7 @@ ei012_init (cable_t * cable) } static void -ei012_clock (cable_t * cable, int tms, int tdi, int n) +ei012_clock (cable_t *cable, int tms, int tdi, int n) { int i; int trst = (PARAM_SIGNALS (cable) & CS_TRST) ? 1 : 0; @@ -99,7 +99,7 @@ ei012_clock (cable_t * cable, int tms, int tdi, int n) } static int -ei012_get_tdo (cable_t * cable) +ei012_get_tdo (cable_t *cable) { int trst = (PARAM_SIGNALS (cable) & CS_TRST) ? 1 : 0; @@ -112,7 +112,7 @@ ei012_get_tdo (cable_t * cable) } static int -ei012_set_signal (cable_t * cable, int mask, int val) +ei012_set_signal (cable_t *cable, int mask, int val) { int prev_sigs = PARAM_SIGNALS (cable); diff --git a/urjtag/src/tap/cable/ft2232.c b/urjtag/src/tap/cable/ft2232.c index 4d3817f8..a024101c 100644 --- a/urjtag/src/tap/cable/ft2232.c +++ b/urjtag/src/tap/cable/ft2232.c @@ -226,7 +226,7 @@ static const cx_cmd_t imm_cmd = { NULL, 1, 1, (uint8_t *) imm_buf, 0 }; static void -ft2232_set_frequency (cable_t * cable, uint32_t new_frequency) +ft2232_set_frequency (cable_t *cable, uint32_t new_frequency) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -267,7 +267,7 @@ ft2232_set_frequency (cable_t * cable, uint32_t new_frequency) static int -ft2232_generic_init (cable_t * cable) +ft2232_generic_init (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -308,7 +308,7 @@ ft2232_generic_init (cable_t * cable) } static int -ft2232_jtagkey_init (cable_t * cable) +ft2232_jtagkey_init (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -361,7 +361,7 @@ ft2232_jtagkey_init (cable_t * cable) static int -ft2232_armusbocd_init (cable_t * cable) +ft2232_armusbocd_init (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -414,7 +414,7 @@ ft2232_armusbocd_init (cable_t * cable) static int -ft2232_gnice_init (cable_t * cable) +ft2232_gnice_init (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -458,7 +458,7 @@ ft2232_gnice_init (cable_t * cable) static int -ft2232_oocdlinks_init (cable_t * cable) +ft2232_oocdlinks_init (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -510,7 +510,7 @@ ft2232_oocdlinks_init (cable_t * cable) static int -ft2232_turtelizer2_init (cable_t * cable) +ft2232_turtelizer2_init (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -558,7 +558,7 @@ ft2232_turtelizer2_init (cable_t * cable) static int -ft2232_usbtojtagif_init (cable_t * cable) +ft2232_usbtojtagif_init (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -610,7 +610,7 @@ ft2232_usbtojtagif_init (cable_t * cable) static int -ft2232_signalyzer_init (cable_t * cable) +ft2232_signalyzer_init (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -654,7 +654,7 @@ ft2232_signalyzer_init (cable_t * cable) static int -ft2232_flyswatter_init (cable_t * cable) +ft2232_flyswatter_init (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -699,7 +699,7 @@ ft2232_flyswatter_init (cable_t * cable) } static int -ft2232_usbscarab2_init (cable_t * cable) +ft2232_usbscarab2_init (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -755,7 +755,7 @@ ft2232_usbscarab2_init (cable_t * cable) static void -ft2232_generic_done (cable_t * cable) +ft2232_generic_done (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -779,7 +779,7 @@ ft2232_generic_done (cable_t * cable) static void -ft2232_jtagkey_done (cable_t * cable) +ft2232_jtagkey_done (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -824,7 +824,7 @@ ft2232_jtagkey_done (cable_t * cable) static void -ft2232_armusbocd_done (cable_t * cable) +ft2232_armusbocd_done (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -866,7 +866,7 @@ ft2232_armusbocd_done (cable_t * cable) } static void -ft2232_gnice_done (cable_t * cable) +ft2232_gnice_done (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -895,7 +895,7 @@ ft2232_gnice_done (cable_t * cable) } static void -ft2232_oocdlinks_done (cable_t * cable) +ft2232_oocdlinks_done (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -934,7 +934,7 @@ ft2232_oocdlinks_done (cable_t * cable) static void -ft2232_turtelizer2_done (cable_t * cable) +ft2232_turtelizer2_done (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -972,7 +972,7 @@ ft2232_turtelizer2_done (cable_t * cable) static void -ft2232_usbtojtagif_done (cable_t * cable) +ft2232_usbtojtagif_done (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -1006,7 +1006,7 @@ ft2232_usbtojtagif_done (cable_t * cable) static void -ft2232_signalyzer_done (cable_t * cable) +ft2232_signalyzer_done (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -1039,7 +1039,7 @@ ft2232_signalyzer_done (cable_t * cable) static void -ft2232_flyswatter_done (cable_t * cable) +ft2232_flyswatter_done (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -1068,7 +1068,7 @@ ft2232_flyswatter_done (cable_t * cable) } static void -ft2232_usbscarab2_done (cable_t * cable) +ft2232_usbscarab2_done (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -1093,7 +1093,7 @@ ft2232_usbscarab2_done (cable_t * cable) static void -ft2232_clock_schedule (cable_t * cable, int tms, int tdi, int n) +ft2232_clock_schedule (cable_t *cable, int tms, int tdi, int n) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -1139,7 +1139,7 @@ ft2232_clock_schedule (cable_t * cable, int tms, int tdi, int n) static void -ft2232_clock (cable_t * cable, int tms, int tdi, int n) +ft2232_clock (cable_t *cable, int tms, int tdi, int n) { params_t *params = (params_t *) cable->params; @@ -1150,7 +1150,7 @@ ft2232_clock (cable_t * cable, int tms, int tdi, int n) static void -ft2232_get_tdo_schedule (cable_t * cable) +ft2232_get_tdo_schedule (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -1162,7 +1162,7 @@ ft2232_get_tdo_schedule (cable_t * cable) static int -ft2232_get_tdo_finish (cable_t * cable) +ft2232_get_tdo_finish (cable_t *cable) { params_t *params = (params_t *) cable->params; int value; @@ -1177,7 +1177,7 @@ ft2232_get_tdo_finish (cable_t * cable) static int -ft2232_get_tdo (cable_t * cable) +ft2232_get_tdo (cable_t *cable) { params_t *params = (params_t *) cable->params; @@ -1188,7 +1188,7 @@ ft2232_get_tdo (cable_t * cable) static void -ft2232_set_signal_schedule (params_t * params, int mask, int val, +ft2232_set_signal_schedule (params_t *params, int mask, int val, int set_low, int set_high) { cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -1262,7 +1262,7 @@ ft2232_set_signal_schedule (params_t * params, int mask, int val, static int -ft2232_set_signal (cable_t * cable, int mask, int val) +ft2232_set_signal (cable_t *cable, int mask, int val) { params_t *params = (params_t *) cable->params; @@ -1277,7 +1277,7 @@ ft2232_set_signal (cable_t * cable, int mask, int val) static void -ft2232_transfer_schedule (cable_t * cable, int len, char *in, char *out) +ft2232_transfer_schedule (cable_t *cable, int len, char *in, char *out) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -1406,7 +1406,7 @@ ft2232_transfer_schedule (cable_t * cable, int len, char *in, char *out) static int -ft2232_transfer_finish (cable_t * cable, int len, char *out) +ft2232_transfer_finish (cable_t *cable, int len, char *out) { params_t *params = (params_t *) cable->params; int bitwise_len; @@ -1466,7 +1466,7 @@ ft2232_transfer_finish (cable_t * cable, int len, char *out) static int -ft2232_transfer (cable_t * cable, int len, char *in, char *out) +ft2232_transfer (cable_t *cable, int len, char *in, char *out) { params_t *params = (params_t *) cable->params; @@ -1477,7 +1477,7 @@ ft2232_transfer (cable_t * cable, int len, char *in, char *out) static void -ft2232_flush (cable_t * cable, cable_flush_amount_t how_much) +ft2232_flush (cable_t *cable, cable_flush_amount_t how_much) { params_t *params = (params_t *) cable->params; @@ -1638,7 +1638,7 @@ ft2232_flush (cable_t * cable, cable_flush_amount_t how_much) static int -ft2232_connect (char *params[], cable_t * cable) +ft2232_connect (char *params[], cable_t *cable) { params_t *cable_params; int result; @@ -1674,7 +1674,7 @@ ft2232_connect (char *params[], cable_t * cable) static void -ft2232_cable_free (cable_t * cable) +ft2232_cable_free (cable_t *cable) { params_t *params = (params_t *) cable->params; diff --git a/urjtag/src/tap/cable/generic.c b/urjtag/src/tap/cable/generic.c index 2dcb0ba1..2972be04 100644 --- a/urjtag/src/tap/cable/generic.c +++ b/urjtag/src/tap/cable/generic.c @@ -59,14 +59,14 @@ print_vector (int len, char *vec) #endif void -generic_disconnect (cable_t * cable) +generic_disconnect (cable_t *cable) { cable_done (cable); chain_disconnect (cable->chain); } int -generic_transfer (cable_t * cable, int len, char *in, char *out) +generic_transfer (cable_t *cable, int len, char *in, char *out) { int i; @@ -86,13 +86,13 @@ generic_transfer (cable_t * cable, int len, char *in, char *out) } int -generic_get_signal (cable_t * cable, pod_sigsel_t sig) +generic_get_signal (cable_t *cable, pod_sigsel_t sig) { return (((PARAM_SIGNALS (cable)) & sig) != 0) ? 1 : 0; } int -do_one_queued_action (cable_t * cable) +do_one_queued_action (cable_t *cable) { int i; @@ -193,7 +193,7 @@ do_one_queued_action (cable_t * cable) } void -generic_flush_one_by_one (cable_t * cable, cable_flush_amount_t how_much) +generic_flush_one_by_one (cable_t *cable, cable_flush_amount_t how_much) { /* This will flush always, even if how_much == OPTIONALLY, * because there is no reason to let the queue grow */ @@ -202,7 +202,7 @@ generic_flush_one_by_one (cable_t * cable, cable_flush_amount_t how_much) } void -generic_flush_using_transfer (cable_t * cable, cable_flush_amount_t how_much) +generic_flush_using_transfer (cable_t *cable, cable_flush_amount_t how_much) { int i, j, n; char *in, *out; @@ -392,7 +392,7 @@ generic_flush_using_transfer (cable_t * cable, cable_flush_amount_t how_much) } void -generic_set_frequency (cable_t * cable, uint32_t new_frequency) +generic_set_frequency (cable_t *cable, uint32_t new_frequency) { if (new_frequency == 0) { diff --git a/urjtag/src/tap/cable/generic.h b/urjtag/src/tap/cable/generic.h index 89c7e7cf..0d03253d 100644 --- a/urjtag/src/tap/cable/generic.h +++ b/urjtag/src/tap/cable/generic.h @@ -35,11 +35,11 @@ typedef struct #define PARAM_SIGNALS(cable) ((generic_params_t *) cable->params)->signals -void generic_disconnect (cable_t * cable); -void generic_set_frequency (cable_t * cable, uint32_t new_freq); -int generic_transfer (cable_t * cable, int len, char *in, char *out); -int generic_get_signal (cable_t * cable, pod_sigsel_t sig); -void generic_flush_one_by_one (cable_t * cable, cable_flush_amount_t hm); -void generic_flush_using_transfer (cable_t * cable, cable_flush_amount_t hm); +void generic_disconnect (cable_t *cable); +void generic_set_frequency (cable_t *cable, uint32_t new_freq); +int generic_transfer (cable_t *cable, int len, char *in, char *out); +int generic_get_signal (cable_t *cable, pod_sigsel_t sig); +void generic_flush_one_by_one (cable_t *cable, cable_flush_amount_t hm); +void generic_flush_using_transfer (cable_t *cable, cable_flush_amount_t hm); #endif /* GENERIC_H */ diff --git a/urjtag/src/tap/cable/generic_parport.c b/urjtag/src/tap/cable/generic_parport.c index 29574f4b..9b1b337c 100644 --- a/urjtag/src/tap/cable/generic_parport.c +++ b/urjtag/src/tap/cable/generic_parport.c @@ -49,7 +49,7 @@ print_vector (int len, char *vec) #endif int -generic_parport_connect (char *params[], cable_t * cable) +generic_parport_connect (char *params[], cable_t *cable) { generic_params_t *cable_params; parport_t *port; @@ -97,7 +97,7 @@ generic_parport_connect (char *params[], cable_t * cable) } void -generic_parport_free (cable_t * cable) +generic_parport_free (cable_t *cable) { cable->link.port->driver->parport_free (cable->link.port); free (cable->params); @@ -105,7 +105,7 @@ generic_parport_free (cable_t * cable) } void -generic_parport_done (cable_t * cable) +generic_parport_done (cable_t *cable) { parport_close (cable->link.port); } diff --git a/urjtag/src/tap/cable/generic_parport.h b/urjtag/src/tap/cable/generic_parport.h index 6cd0e4df..97231457 100644 --- a/urjtag/src/tap/cable/generic_parport.h +++ b/urjtag/src/tap/cable/generic_parport.h @@ -28,9 +28,9 @@ #include "cable.h" #include "parport.h" -int generic_parport_connect (char *params[], cable_t * cable); -void generic_parport_free (cable_t * cable); -void generic_parport_done (cable_t * cable); +int generic_parport_connect (char *params[], cable_t *cable); +void generic_parport_free (cable_t *cable); +void generic_parport_done (cable_t *cable); void generic_parport_help (const char *name); #endif /* GENERIC_H */ diff --git a/urjtag/src/tap/cable/generic_usbconn.c b/urjtag/src/tap/cable/generic_usbconn.c index 90e7a0c2..589d5c66 100644 --- a/urjtag/src/tap/cable/generic_usbconn.c +++ b/urjtag/src/tap/cable/generic_usbconn.c @@ -141,7 +141,7 @@ usbconn_cable_t *usbconn_cables[] = { }; int -generic_usbconn_connect (char *params[], cable_t * cable) +generic_usbconn_connect (char *params[], cable_t *cable) { usbconn_cable_t user_specified = { NULL, /* no name */ @@ -244,7 +244,7 @@ generic_usbconn_connect (char *params[], cable_t * cable) } void -generic_usbconn_free (cable_t * cable) +generic_usbconn_free (cable_t *cable) { cable->link.usb->driver->free (cable->link.usb); free (cable->params); @@ -252,7 +252,7 @@ generic_usbconn_free (cable_t * cable) } void -generic_usbconn_done (cable_t * cable) +generic_usbconn_done (cable_t *cable) { usbconn_close (cable->link.usb); } diff --git a/urjtag/src/tap/cable/generic_usbconn.h b/urjtag/src/tap/cable/generic_usbconn.h index 4fda44a8..9ee0a644 100644 --- a/urjtag/src/tap/cable/generic_usbconn.h +++ b/urjtag/src/tap/cable/generic_usbconn.h @@ -28,9 +28,9 @@ #include "cable.h" #include "usbconn.h" -int generic_usbconn_connect (char *params[], cable_t * cable); -void generic_usbconn_done (cable_t * cable); +int generic_usbconn_connect (char *params[], cable_t *cable); +void generic_usbconn_done (cable_t *cable); void generic_usbconn_help (const char *name); -void generic_usbconn_free (cable_t * cable); +void generic_usbconn_free (cable_t *cable); #endif /* GENERIC_H */ diff --git a/urjtag/src/tap/cable/jim.c b/urjtag/src/tap/cable/jim.c index b770e896..8076ee9e 100644 --- a/urjtag/src/tap/cable/jim.c +++ b/urjtag/src/tap/cable/jim.c @@ -45,7 +45,7 @@ typedef struct jim_cable_params_t; int -jim_cable_connect (char *params[], cable_t * cable) +jim_cable_connect (char *params[], cable_t *cable) { jim_cable_params_t *cable_params; jim_state_t *s; @@ -81,14 +81,14 @@ jim_cable_connect (char *params[], cable_t * cable) } void -jim_cable_disconnect (cable_t * cable) +jim_cable_disconnect (cable_t *cable) { cable_done (cable); chain_disconnect (cable->chain); } void -jim_cable_free (cable_t * cable) +jim_cable_free (cable_t *cable) { if (cable->params != NULL) { @@ -99,18 +99,18 @@ jim_cable_free (cable_t * cable) } void -jim_cable_done (cable_t * cable) +jim_cable_done (cable_t *cable) { } static int -jim_cable_init (cable_t * cable) +jim_cable_init (cable_t *cable) { return 0; } static void -jim_cable_clock (cable_t * cable, int tms, int tdi, int n) +jim_cable_clock (cable_t *cable, int tms, int tdi, int n) { int i; jim_cable_params_t *jcp = (jim_cable_params_t *) (cable->params); @@ -123,7 +123,7 @@ jim_cable_clock (cable_t * cable, int tms, int tdi, int n) } static int -jim_cable_get_tdo (cable_t * cable) +jim_cable_get_tdo (cable_t *cable) { jim_cable_params_t *jcp = (jim_cable_params_t *) (cable->params); @@ -131,7 +131,7 @@ jim_cable_get_tdo (cable_t * cable) } static int -jim_cable_get_trst (cable_t * cable) +jim_cable_get_trst (cable_t *cable) { jim_cable_params_t *jcp = (jim_cable_params_t *) (cable->params); @@ -139,7 +139,7 @@ jim_cable_get_trst (cable_t * cable) } static int -jim_cable_set_trst (cable_t * cable, int trst) +jim_cable_set_trst (cable_t *cable, int trst) { jim_cable_params_t *jcp = (jim_cable_params_t *) (cable->params); diff --git a/urjtag/src/tap/cable/jlink.c b/urjtag/src/tap/cable/jlink.c index 1374f587..42b017b5 100644 --- a/urjtag/src/tap/cable/jlink.c +++ b/urjtag/src/tap/cable/jlink.c @@ -96,31 +96,31 @@ jlink_usbconn_data_t; #define JLINK_MAX_SPEED 12000 /* Queue command functions */ -static void jlink_reset (libusb_param_t * params, int trst, int srst); -static void jlink_simple_command (libusb_param_t * params, uint8_t command); +static void jlink_reset (libusb_param_t *params, int trst, int srst); +static void jlink_simple_command (libusb_param_t *params, uint8_t command); /* J-Link tap buffer functions */ -static void jlink_tap_init (jlink_usbconn_data_t * data); -static int jlink_tap_execute (libusb_param_t * params); -static void jlink_tap_append_step (jlink_usbconn_data_t * data, int, int); +static void jlink_tap_init (jlink_usbconn_data_t *data); +static int jlink_tap_execute (libusb_param_t *params); +static void jlink_tap_append_step (jlink_usbconn_data_t *data, int, int); /* Jlink lowlevel functions */ -static int jlink_usb_message (libusb_param_t * params, int, int); -static int jlink_usb_write (libusb_param_t * params, unsigned int); -static int jlink_usb_read (libusb_param_t * params); +static int jlink_usb_message (libusb_param_t *params, int, int); +static int jlink_usb_write (libusb_param_t *params, unsigned int); +static int jlink_usb_read (libusb_param_t *params); static void jlink_debug_buffer (char *buffer, int length); /* API functions */ -void jlink_set_frequency (cable_t * cable, uint32_t frequency); +void jlink_set_frequency (cable_t *cable, uint32_t frequency); /***************************************************************************/ /* J-Link tap functions */ void -jlink_reset (libusb_param_t * params, int trst, int srst) +jlink_reset (libusb_param_t *params, int trst, int srst) { DEBUG ("trst: %i, srst: %i\n", trst, srst); @@ -146,7 +146,7 @@ jlink_reset (libusb_param_t * params, int trst, int srst) static void -jlink_simple_command (libusb_param_t * params, uint8_t command) +jlink_simple_command (libusb_param_t *params, uint8_t command) { int result; jlink_usbconn_data_t *data = params->data; @@ -163,7 +163,7 @@ jlink_simple_command (libusb_param_t * params, uint8_t command) } static int -jlink_get_status (libusb_param_t * params) +jlink_get_status (libusb_param_t *params) { int result; jlink_usbconn_data_t *data = params->data; @@ -201,13 +201,13 @@ jlink_get_status (libusb_param_t * params) /***************************************************************************/ static void -jlink_tap_init (jlink_usbconn_data_t * data) +jlink_tap_init (jlink_usbconn_data_t *data) { data->tap_length = 0; } static void -jlink_tap_append_step (jlink_usbconn_data_t * data, int tms, int tdi) +jlink_tap_append_step (jlink_usbconn_data_t *data, int tms, int tdi) { int index = data->tap_length >> 3; @@ -238,7 +238,7 @@ jlink_tap_append_step (jlink_usbconn_data_t * data, int tms, int tdi) /* Send a tap sequence to the device, and receive the answer */ static int -jlink_tap_execute (libusb_param_t * params) +jlink_tap_execute (libusb_param_t *params) { jlink_usbconn_data_t *data = params->data; int byte_length; @@ -293,7 +293,7 @@ jlink_tap_execute (libusb_param_t * params) /* Send a message and receive the reply. */ static int -jlink_usb_message (libusb_param_t * params, int out_length, int in_length) +jlink_usb_message (libusb_param_t *params, int out_length, int in_length) { int result; @@ -326,7 +326,7 @@ jlink_usb_message (libusb_param_t * params, int out_length, int in_length) /* Write data from out_buffer to USB. */ static int -jlink_usb_write (libusb_param_t * params, unsigned int out_length) +jlink_usb_write (libusb_param_t *params, unsigned int out_length) { int result; jlink_usbconn_data_t *data; @@ -356,7 +356,7 @@ jlink_usb_write (libusb_param_t * params, unsigned int out_length) /* Read data from USB into in_buffer. */ static int -jlink_usb_read (libusb_param_t * params) +jlink_usb_read (libusb_param_t *params) { jlink_usbconn_data_t *data = params->data; @@ -399,7 +399,7 @@ jlink_debug_buffer (char *buffer, int length) /* ---------------------------------------------------------------------- */ static int -jlink_init (cable_t * cable) +jlink_init (cable_t *cable) { int result; libusb_param_t *params; @@ -447,7 +447,7 @@ jlink_init (cable_t * cable) /* ---------------------------------------------------------------------- */ static void -jlink_free (cable_t * cable) +jlink_free (cable_t *cable) { jlink_usbconn_data_t *data; data = ((libusb_param_t *) (cable->link.usb->params))->data; @@ -459,7 +459,7 @@ jlink_free (cable_t * cable) /* ---------------------------------------------------------------------- */ void -jlink_set_frequency (cable_t * cable, uint32_t frequency) +jlink_set_frequency (cable_t *cable, uint32_t frequency) { int result; int speed = frequency / 1E3; @@ -490,7 +490,7 @@ jlink_set_frequency (cable_t * cable, uint32_t frequency) /* ---------------------------------------------------------------------- */ static void -jlink_clock (cable_t * cable, int tms, int tdi, int n) +jlink_clock (cable_t *cable, int tms, int tdi, int n) { int i; libusb_param_t *params = cable->link.usb->params; @@ -506,7 +506,7 @@ jlink_clock (cable_t * cable, int tms, int tdi, int n) /* ---------------------------------------------------------------------- */ static int -jlink_get_tdo (cable_t * cable) +jlink_get_tdo (cable_t *cable) { libusb_param_t *params = cable->link.usb->params; jlink_usbconn_data_t *data = params->data; @@ -520,7 +520,7 @@ jlink_get_tdo (cable_t * cable) /* ---------------------------------------------------------------------- */ void -jlink_copy_out_data (jlink_usbconn_data_t * data, int len, int offset, +jlink_copy_out_data (jlink_usbconn_data_t *data, int len, int offset, char *buf) { int i; @@ -533,7 +533,7 @@ jlink_copy_out_data (jlink_usbconn_data_t * data, int len, int offset, } int -jlink_transfer (cable_t * cable, int len, char *in, char *out) +jlink_transfer (cable_t *cable, int len, char *in, char *out) { int i, j; libusb_param_t *params = cable->link.usb->params; @@ -564,7 +564,7 @@ jlink_transfer (cable_t * cable, int len, char *in, char *out) /* ---------------------------------------------------------------------- */ static int -jlink_set_signal (cable_t * cable, int mask, int val) +jlink_set_signal (cable_t *cable, int mask, int val) { return 1; } diff --git a/urjtag/src/tap/cable/keithkoep.c b/urjtag/src/tap/cable/keithkoep.c index e59ee7c7..1cdb6475 100644 --- a/urjtag/src/tap/cable/keithkoep.c +++ b/urjtag/src/tap/cable/keithkoep.c @@ -64,7 +64,7 @@ #define TRST 0 static int -keithkoep_init (cable_t * cable) +keithkoep_init (cable_t *cable) { if (parport_open (cable->link.port)) return -1; @@ -76,7 +76,7 @@ keithkoep_init (cable_t * cable) } static void -keithkoep_clock (cable_t * cable, int tms, int tdi, int n) +keithkoep_clock (cable_t *cable, int tms, int tdi, int n) { int i; @@ -100,7 +100,7 @@ keithkoep_clock (cable_t * cable, int tms, int tdi, int n) } static int -keithkoep_get_tdo (cable_t * cable) +keithkoep_get_tdo (cable_t *cable) { parport_set_data (cable->link.port, 0 << TCK); PARAM_SIGNALS (cable) &= ~(CS_TDI | CS_TCK | CS_TMS); @@ -111,7 +111,7 @@ keithkoep_get_tdo (cable_t * cable) } static int -keithkoep_set_signal (cable_t * cable, int mask, int val) +keithkoep_set_signal (cable_t *cable, int mask, int val) { int prev_sigs = PARAM_SIGNALS (cable); diff --git a/urjtag/src/tap/cable/lattice.c b/urjtag/src/tap/cable/lattice.c index 317ac35c..df05dfe6 100644 --- a/urjtag/src/tap/cable/lattice.c +++ b/urjtag/src/tap/cable/lattice.c @@ -52,7 +52,7 @@ static int -lattice_init (cable_t * cable) +lattice_init (cable_t *cable) { int data; @@ -72,7 +72,7 @@ lattice_init (cable_t * cable) } static void -lattice_clock (cable_t * cable, int tms, int tdi, int n) +lattice_clock (cable_t *cable, int tms, int tdi, int n) { int i; int trst = (PARAM_SIGNALS (cable) & CS_TRST) ? 1 : 0; @@ -99,7 +99,7 @@ lattice_clock (cable_t * cable, int tms, int tdi, int n) } static int -lattice_get_tdo (cable_t * cable) +lattice_get_tdo (cable_t *cable) { int trst = (PARAM_SIGNALS (cable) & CS_TRST) ? 1 : 0; @@ -112,7 +112,7 @@ lattice_get_tdo (cable_t * cable) } static int -lattice_set_signal (cable_t * cable, int mask, int val) +lattice_set_signal (cable_t *cable, int mask, int val) { int prev_sigs = PARAM_SIGNALS (cable); diff --git a/urjtag/src/tap/cable/mpcbdm.c b/urjtag/src/tap/cable/mpcbdm.c index 34fe2a6f..227972ea 100644 --- a/urjtag/src/tap/cable/mpcbdm.c +++ b/urjtag/src/tap/cable/mpcbdm.c @@ -62,7 +62,7 @@ #define TDO 5 static int -mpcbdm_init (cable_t * cable) +mpcbdm_init (cable_t *cable) { if (parport_open (cable->link.port)) return -1; @@ -74,7 +74,7 @@ mpcbdm_init (cable_t * cable) } static void -mpcbdm_clock (cable_t * cable, int tms, int tdi, int n) +mpcbdm_clock (cable_t *cable, int tms, int tdi, int n) { int i; @@ -98,7 +98,7 @@ mpcbdm_clock (cable_t * cable, int tms, int tdi, int n) } static int -mpcbdm_get_tdo (cable_t * cable) +mpcbdm_get_tdo (cable_t *cable) { parport_set_data (cable->link.port, 0 << TCK); PARAM_SIGNALS (cable) &= ~(CS_TDI | CS_TCK | CS_TMS); @@ -109,7 +109,7 @@ mpcbdm_get_tdo (cable_t * cable) } static int -mpcbdm_set_signal (cable_t * cable, int mask, int val) +mpcbdm_set_signal (cable_t *cable, int mask, int val) { int prev_sigs = PARAM_SIGNALS (cable); diff --git a/urjtag/src/tap/cable/triton.c b/urjtag/src/tap/cable/triton.c index 0e2f2dd3..29f425d6 100644 --- a/urjtag/src/tap/cable/triton.c +++ b/urjtag/src/tap/cable/triton.c @@ -67,7 +67,7 @@ #define TDO 7 static int -triton_init (cable_t * cable) +triton_init (cable_t *cable) { if (parport_open (cable->link.port)) return -1; @@ -79,7 +79,7 @@ triton_init (cable_t * cable) } static void -triton_clock (cable_t * cable, int tms, int tdi, int n) +triton_clock (cable_t *cable, int tms, int tdi, int n) { int i; int trst = (PARAM_SIGNALS (cable) & CS_TRST) ? 1 : 0; @@ -107,7 +107,7 @@ triton_clock (cable_t * cable, int tms, int tdi, int n) } static int -triton_get_tdo (cable_t * cable) +triton_get_tdo (cable_t *cable) { int trst = (PARAM_SIGNALS (cable) & CS_TRST) ? 1 : 0; int sreset = (PARAM_SIGNALS (cable) & CS_RESET) ? 1 : 0; @@ -122,7 +122,7 @@ triton_get_tdo (cable_t * cable) } static int -triton_set_signal (cable_t * cable, int mask, int val) +triton_set_signal (cable_t *cable, int mask, int val) { int prev_sigs = PARAM_SIGNALS (cable); diff --git a/urjtag/src/tap/cable/ts7800.c b/urjtag/src/tap/cable/ts7800.c index e5da3bd5..f7476068 100644 --- a/urjtag/src/tap/cable/ts7800.c +++ b/urjtag/src/tap/cable/ts7800.c @@ -77,7 +77,7 @@ typedef struct } ts7800_params_t; static int -ts7800_gpio_open (cable_t * cable) +ts7800_gpio_open (cable_t *cable) { ts7800_params_t *p = cable->params; off_t map_mask; @@ -117,7 +117,7 @@ ts7800_gpio_open (cable_t * cable) } static int -ts7800_gpio_close (cable_t * cable) +ts7800_gpio_close (cable_t *cable) { ts7800_params_t *p = cable->params; @@ -131,7 +131,7 @@ ts7800_gpio_close (cable_t * cable) } static int -ts7800_gpio_write (cable_t * cable, uint8_t data) +ts7800_gpio_write (cable_t *cable, uint8_t data) { int sigs; ts7800_params_t *p = cable->params; @@ -143,7 +143,7 @@ ts7800_gpio_write (cable_t * cable, uint8_t data) } static int -ts7800_gpio_read (cable_t * cable) +ts7800_gpio_read (cable_t *cable) { ts7800_params_t *p = cable->params; @@ -151,7 +151,7 @@ ts7800_gpio_read (cable_t * cable) } static int -ts7800_connect (char *params[], cable_t * cable) +ts7800_connect (char *params[], cable_t *cable) { ts7800_params_t *cable_params; @@ -179,21 +179,21 @@ ts7800_connect (char *params[], cable_t * cable) } static void -ts7800_disconnect (cable_t * cable) +ts7800_disconnect (cable_t *cable) { ts7800_gpio_close (cable); chain_disconnect (cable->chain); } static void -ts7800_cable_free (cable_t * cable) +ts7800_cable_free (cable_t *cable) { free (cable->params); free (cable); } static int -ts7800_init (cable_t * cable) +ts7800_init (cable_t *cable) { ts7800_params_t *p = cable->params; @@ -206,13 +206,13 @@ ts7800_init (cable_t * cable) } static void -ts7800_done (cable_t * cable) +ts7800_done (cable_t *cable) { ts7800_gpio_close (cable); } static void -ts7800_clock (cable_t * cable, int tms, int tdi, int n) +ts7800_clock (cable_t *cable, int tms, int tdi, int n) { int bit_mask; int i; @@ -234,7 +234,7 @@ ts7800_clock (cable_t * cable, int tms, int tdi, int n) * NOTE: This also lowers the TDI and TMS lines; is this intended? */ static int -ts7800_get_tdo (cable_t * cable) +ts7800_get_tdo (cable_t *cable) { ts7800_params_t *p = cable->params; ts7800_gpio_write (cable, p->lastout & ~(0 << TCK)); @@ -243,7 +243,7 @@ ts7800_get_tdo (cable_t * cable) } static int -ts7800_current_signals (cable_t * cable) +ts7800_current_signals (cable_t *cable) { ts7800_params_t *p = cable->params; @@ -259,7 +259,7 @@ ts7800_current_signals (cable_t * cable) } static int -ts7800_set_signal (cable_t * cable, int mask, int val) +ts7800_set_signal (cable_t *cable, int mask, int val) { ts7800_params_t *p = cable->params; @@ -280,7 +280,7 @@ ts7800_set_signal (cable_t * cable, int mask, int val) } static int -ts7800_get_signal (cable_t * cable, pod_sigsel_t sig) +ts7800_get_signal (cable_t *cable, pod_sigsel_t sig) { ts7800_params_t *p = cable->params; diff --git a/urjtag/src/tap/cable/usbblaster.c b/urjtag/src/tap/cable/usbblaster.c index 17bac301..3b3e4b09 100644 --- a/urjtag/src/tap/cable/usbblaster.c +++ b/urjtag/src/tap/cable/usbblaster.c @@ -65,7 +65,7 @@ typedef struct } params_t; static int -usbblaster_connect (char *params[], cable_t * cable) +usbblaster_connect (char *params[], cable_t *cable) { params_t *cable_params; int result; @@ -97,7 +97,7 @@ usbblaster_connect (char *params[], cable_t * cable) } void -usbblaster_set_frequency (cable_t * cable, uint32_t new_frequency) +usbblaster_set_frequency (cable_t *cable, uint32_t new_frequency) { if (new_frequency != FIXED_FREQUENCY) printf (_("Warning: USB-Blaster frequency is fixed to %ld Hz\n"), @@ -107,7 +107,7 @@ usbblaster_set_frequency (cable_t * cable, uint32_t new_frequency) } static int -usbblaster_init (cable_t * cable) +usbblaster_init (cable_t *cable) { int i; params_t *params = (params_t *) cable->params; @@ -128,7 +128,7 @@ usbblaster_init (cable_t * cable) } static void -usbblaster_cable_free (cable_t * cable) +usbblaster_cable_free (cable_t *cable) { params_t *params = (params_t *) cable->params; @@ -138,7 +138,7 @@ usbblaster_cable_free (cable_t * cable) } static void -usbblaster_clock_schedule (cable_t * cable, int tms, int tdi, int n) +usbblaster_clock_schedule (cable_t *cable, int tms, int tdi, int n) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -192,7 +192,7 @@ usbblaster_clock_schedule (cable_t * cable, int tms, int tdi, int n) } static void -usbblaster_clock (cable_t * cable, int tms, int tdi, int n) +usbblaster_clock (cable_t *cable, int tms, int tdi, int n) { params_t *params = (params_t *) cable->params; @@ -201,7 +201,7 @@ usbblaster_clock (cable_t * cable, int tms, int tdi, int n) } static void -usbblaster_get_tdo_schedule (cable_t * cable) +usbblaster_get_tdo_schedule (cable_t *cable) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -212,7 +212,7 @@ usbblaster_get_tdo_schedule (cable_t * cable) } static int -usbblaster_get_tdo_finish (cable_t * cable) +usbblaster_get_tdo_finish (cable_t *cable) { #if 0 char x = (cx_xfer_recv (cable) & (1 << TDO)) ? 1 : 0; @@ -224,7 +224,7 @@ usbblaster_get_tdo_finish (cable_t * cable) } static int -usbblaster_get_tdo (cable_t * cable) +usbblaster_get_tdo (cable_t *cable) { params_t *params = (params_t *) cable->params; @@ -234,13 +234,13 @@ usbblaster_get_tdo (cable_t * cable) } static int -usbblaster_set_signal (cable_t * cable, int mask, int val) +usbblaster_set_signal (cable_t *cable, int mask, int val) { return 1; } static void -usbblaster_transfer_schedule (cable_t * cable, int len, char *in, char *out) +usbblaster_transfer_schedule (cable_t *cable, int len, char *in, char *out) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -301,7 +301,7 @@ usbblaster_transfer_schedule (cable_t * cable, int len, char *in, char *out) } static int -usbblaster_transfer_finish (cable_t * cable, int len, char *out) +usbblaster_transfer_finish (cable_t *cable, int len, char *out) { params_t *params = (params_t *) cable->params; cx_cmd_root_t *cmd_root = &(params->cmd_root); @@ -352,7 +352,7 @@ usbblaster_transfer_finish (cable_t * cable, int len, char *out) } static int -usbblaster_transfer (cable_t * cable, int len, char *in, char *out) +usbblaster_transfer (cable_t *cable, int len, char *in, char *out) { params_t *params = (params_t *) cable->params; @@ -362,7 +362,7 @@ usbblaster_transfer (cable_t * cable, int len, char *in, char *out) } static void -usbblaster_flush (cable_t * cable, cable_flush_amount_t how_much) +usbblaster_flush (cable_t *cable, cable_flush_amount_t how_much) { params_t *params = (params_t *) cable->params; diff --git a/urjtag/src/tap/cable/vision_ep9307.c b/urjtag/src/tap/cable/vision_ep9307.c index 1d7bca87..7c4de10d 100644 --- a/urjtag/src/tap/cable/vision_ep9307.c +++ b/urjtag/src/tap/cable/vision_ep9307.c @@ -79,7 +79,7 @@ typedef struct } ep9307_params_t; static int -ep9307_gpio_open (cable_t * cable) +ep9307_gpio_open (cable_t *cable) { ep9307_params_t *p = cable->params; off_t map_mask; @@ -156,7 +156,7 @@ ep9307_gpio_open (cable_t * cable) } static int -ep9307_gpio_close (cable_t * cable) +ep9307_gpio_close (cable_t *cable) { ep9307_params_t *p = cable->params; @@ -170,7 +170,7 @@ ep9307_gpio_close (cable_t * cable) } static int -ep9307_gpio_write (cable_t * cable, uint8_t data) +ep9307_gpio_write (cable_t *cable, uint8_t data) { ep9307_params_t *p = cable->params; uint32_t tmp; @@ -185,7 +185,7 @@ ep9307_gpio_write (cable_t * cable, uint8_t data) } static int -ep9307_gpio_read (cable_t * cable) +ep9307_gpio_read (cable_t *cable) { ep9307_params_t *p = cable->params; uint32_t tmp; @@ -196,7 +196,7 @@ ep9307_gpio_read (cable_t * cable) } static int -ep9307_connect (char *params[], cable_t * cable) +ep9307_connect (char *params[], cable_t *cable) { ep9307_params_t *cable_params; @@ -223,14 +223,14 @@ ep9307_connect (char *params[], cable_t * cable) } static void -ep9307_cable_free (cable_t * cable) +ep9307_cable_free (cable_t *cable) { free (cable->params); free (cable); } static int -ep9307_init (cable_t * cable) +ep9307_init (cable_t *cable) { ep9307_params_t *p = cable->params; @@ -245,13 +245,13 @@ ep9307_init (cable_t * cable) } static void -ep9307_done (cable_t * cable) +ep9307_done (cable_t *cable) { ep9307_gpio_close (cable); } static void -ep9307_clock (cable_t * cable, int tms, int tdi, int n) +ep9307_clock (cable_t *cable, int tms, int tdi, int n) { ep9307_params_t *p = cable->params; int bit_mask; @@ -275,7 +275,7 @@ ep9307_clock (cable_t * cable, int tms, int tdi, int n) * NOTE: This also lowers the TDI and TMS lines; is this intended? */ static int -ep9307_get_tdo (cable_t * cable) +ep9307_get_tdo (cable_t *cable) { ep9307_params_t *p = cable->params; @@ -286,7 +286,7 @@ ep9307_get_tdo (cable_t * cable) } static int -ep9307_current_signals (cable_t * cable) +ep9307_current_signals (cable_t *cable) { ep9307_params_t *p = cable->params; @@ -304,7 +304,7 @@ ep9307_current_signals (cable_t * cable) } static int -ep9307_set_signal (cable_t * cable, int mask, int val) +ep9307_set_signal (cable_t *cable, int mask, int val) { ep9307_params_t *p = cable->params; @@ -326,7 +326,7 @@ ep9307_set_signal (cable_t * cable, int mask, int val) } static int -ep9307_get_signal (cable_t * cable, pod_sigsel_t sig) +ep9307_get_signal (cable_t *cable, pod_sigsel_t sig) { return (ep9307_current_signals (cable) & sig) ? 1 : 0; } diff --git a/urjtag/src/tap/cable/wiggler.c b/urjtag/src/tap/cable/wiggler.c index 261b270a..51e8bb7e 100644 --- a/urjtag/src/tap/cable/wiggler.c +++ b/urjtag/src/tap/cable/wiggler.c @@ -139,7 +139,7 @@ static const char *std_wgl_map = xstr (TDO) "," static int -set_mapping (char *bitmap, cable_t * cable) +set_mapping (char *bitmap, cable_t *cable) { const char delim = ','; int syntax = 0; @@ -192,7 +192,7 @@ set_mapping (char *bitmap, cable_t * cable) static int -wiggler_connect (char *params[], cable_t * cable) +wiggler_connect (char *params[], cable_t *cable) { int result; char *param_bitmap = NULL; @@ -257,7 +257,7 @@ wiggler_connect (char *params[], cable_t * cable) } static int -wiggler_init (cable_t * cable) +wiggler_init (cable_t *cable) { int data; @@ -284,7 +284,7 @@ wiggler_init (cable_t * cable) } static void -wiggler_clock (cable_t * cable, int tms, int tdi, int n) +wiggler_clock (cable_t *cable, int tms, int tdi, int n) { int i; @@ -317,7 +317,7 @@ wiggler_clock (cable_t * cable, int tms, int tdi, int n) } static int -wiggler_get_tdo (cable_t * cable) +wiggler_get_tdo (cable_t *cable) { parport_set_data (cable->link.port, PRM_TRST_LVL (cable) | PRM_TCK_INACT (cable) | PRM_UNUSED_BITS (cable)); @@ -329,7 +329,7 @@ wiggler_get_tdo (cable_t * cable) } static int -wiggler_set_signal (cable_t * cable, int mask, int val) +wiggler_set_signal (cable_t *cable, int mask, int val) { int prev_sigs = PRM_SIGNALS (cable); @@ -356,7 +356,7 @@ wiggler_set_signal (cable_t * cable, int mask, int val) } static int -wiggler_get_signal (cable_t * cable, pod_sigsel_t sig) +wiggler_get_signal (cable_t *cable, pod_sigsel_t sig) { return (PRM_SIGNALS (cable) & sig) ? 1 : 0; } diff --git a/urjtag/src/tap/cable/wiggler2.c b/urjtag/src/tap/cable/wiggler2.c index 05fb03b0..f70ff276 100644 --- a/urjtag/src/tap/cable/wiggler2.c +++ b/urjtag/src/tap/cable/wiggler2.c @@ -66,7 +66,7 @@ #define TDO 7 static int -wiggler2_init (cable_t * cable) +wiggler2_init (cable_t *cable) { int data; @@ -89,7 +89,7 @@ wiggler2_init (cable_t * cable) } static void -wiggler2_clock (cable_t * cable, int tms, int tdi, int n) +wiggler2_clock (cable_t *cable, int tms, int tdi, int n) { int i; int trst = (PARAM_SIGNALS (cable) & CS_TRST) ? 1 : 0; @@ -118,7 +118,7 @@ wiggler2_clock (cable_t * cable, int tms, int tdi, int n) } static int -wiggler2_get_tdo (cable_t * cable) +wiggler2_get_tdo (cable_t *cable) { int trst = (PARAM_SIGNALS (cable) & CS_TRST) ? 1 : 0; @@ -132,7 +132,7 @@ wiggler2_get_tdo (cable_t * cable) } static int -wiggler2_set_signal (cable_t * cable, int mask, int val) +wiggler2_set_signal (cable_t *cable, int mask, int val) { int prev_sigs = PARAM_SIGNALS (cable); diff --git a/urjtag/src/tap/cable/xpc.c b/urjtag/src/tap/cable/xpc.c index 19a4d7a8..495d511e 100644 --- a/urjtag/src/tap/cable/xpc.c +++ b/urjtag/src/tap/cable/xpc.c @@ -92,7 +92,7 @@ xpcu_output_enable (struct usb_dev_handle *xpcu, int enable) int xpcu_bit_reverse (struct usb_dev_handle *xpcu, uint8_t bits_in, - uint8_t * bits_out) + uint8_t *bits_out) { if (usb_control_msg (xpcu, 0xC0, 0xB0, 0x0020, bits_in, (char *) bits_out, 1, 1000) < 0) @@ -137,7 +137,7 @@ xpcu_write_gpio (struct usb_dev_handle *xpcu, uint8_t bits) /* ---------------------------------------------------------------------- */ int -xpcu_read_gpio (struct usb_dev_handle *xpcu, uint8_t * bits) +xpcu_read_gpio (struct usb_dev_handle *xpcu, uint8_t *bits) { if (usb_control_msg (xpcu, 0xC0, 0xB0, 0x0038, 0, (char *) bits, 1, 1000) < 0) @@ -153,7 +153,7 @@ xpcu_read_gpio (struct usb_dev_handle *xpcu, uint8_t * bits) int -xpcu_read_cpld_version (struct usb_dev_handle *xpcu, uint16_t * buf) +xpcu_read_cpld_version (struct usb_dev_handle *xpcu, uint16_t *buf) { if (usb_control_msg (xpcu, 0xC0, 0xB0, 0x0050, 0x0001, (char *) buf, 2, 1000) < 0) @@ -167,7 +167,7 @@ xpcu_read_cpld_version (struct usb_dev_handle *xpcu, uint16_t * buf) /* ---------------------------------------------------------------------- */ int -xpcu_read_firmware_version (struct usb_dev_handle *xpcu, uint16_t * buf) +xpcu_read_firmware_version (struct usb_dev_handle *xpcu, uint16_t *buf) { if (usb_control_msg (xpcu, 0xC0, 0xB0, 0x0050, 0x0000, (char *) buf, 2, 1000) < 0) @@ -239,7 +239,7 @@ xpcu_select_gpio (struct usb_dev_handle *xpcu, int int_or_ext) static int xpcu_shift (struct usb_dev_handle *xpcu, int reqno, int bits, int in_len, - uint8_t * in, int out_len, uint8_t * out) + uint8_t *in, int out_len, uint8_t *out) { if (usb_control_msg (xpcu, 0x40, 0xB0, reqno, bits, NULL, 0, 1000) < 0) { @@ -294,7 +294,7 @@ xpcu_shift (struct usb_dev_handle *xpcu, int reqno, int bits, int in_len, /* ---------------------------------------------------------------------- */ static int -xpcu_common_init (cable_t * cable) +xpcu_common_init (cable_t *cable) { int r; uint16_t buf; @@ -342,7 +342,7 @@ xpcu_common_init (cable_t * cable) } static int -xpc_int_init (cable_t * cable) +xpc_int_init (cable_t *cable) { struct usb_dev_handle *xpcu; @@ -357,7 +357,7 @@ xpc_int_init (cable_t * cable) } static int -xpc_ext_init (cable_t * cable) +xpc_ext_init (cable_t *cable) { struct usb_dev_handle *xpcu; uint8_t zero[2] = { 0, 0 }; @@ -400,7 +400,7 @@ xpc_ext_init (cable_t * cable) /* ---------------------------------------------------------------------- */ static void -xpc_ext_done (cable_t * cable) +xpc_ext_done (cable_t *cable) { struct usb_dev_handle *xpcu; xpcu = ((libusb_param_t *) (cable->link.usb->params))->handle; @@ -411,7 +411,7 @@ xpc_ext_done (cable_t * cable) /* ---------------------------------------------------------------------- */ static void -xpc_ext_free (cable_t * cable) +xpc_ext_free (cable_t *cable) { if (cable->params) { @@ -430,7 +430,7 @@ xpc_ext_free (cable_t * cable) #define TDO 0 static void -xpc_clock (cable_t * cable, int tms, int tdi, int n) +xpc_clock (cable_t *cable, int tms, int tdi, int n) { int i; struct usb_dev_handle *xpcu; @@ -455,7 +455,7 @@ xpc_clock (cable_t * cable, int tms, int tdi, int n) /* ---------------------------------------------------------------------- */ static int -xpc_get_tdo (cable_t * cable) +xpc_get_tdo (cable_t *cable) { unsigned char d; struct usb_dev_handle *xpcu; @@ -468,7 +468,7 @@ xpc_get_tdo (cable_t * cable) /* ---------------------------------------------------------------------- */ static int -xpc_set_signal (cable_t * cable, int mask, int val) +xpc_set_signal (cable_t *cable, int mask, int val) { return 1; } @@ -476,7 +476,7 @@ xpc_set_signal (cable_t * cable, int mask, int val) /* ---------------------------------------------------------------------- */ static void -xpc_ext_clock (cable_t * cable, int tms, int tdi, int n) +xpc_ext_clock (cable_t *cable, int tms, int tdi, int n) { int i; uint8_t tdo[2]; @@ -498,7 +498,7 @@ xpc_ext_clock (cable_t * cable, int tms, int tdi, int n) /* ---------------------------------------------------------------------- */ static int -xpc_ext_get_tdo (cable_t * cable) +xpc_ext_get_tdo (cable_t *cable) { return last_tdo; // return ((xpc_cable_params_t*)(cable->params))->last_tdo; @@ -524,7 +524,7 @@ xpc_ext_transfer_state_t; /* ---------------------------------------------------------------------- */ static int -xpcu_do_ext_transfer (xpc_ext_transfer_state_t * xts) +xpcu_do_ext_transfer (xpc_ext_transfer_state_t *xts) { int r; int in_len, out_len; @@ -588,7 +588,7 @@ xpcu_do_ext_transfer (xpc_ext_transfer_state_t * xts) /* ---------------------------------------------------------------------- */ static void -xpcu_add_bit_for_ext_transfer (xpc_ext_transfer_state_t * xts, char in, +xpcu_add_bit_for_ext_transfer (xpc_ext_transfer_state_t *xts, char in, char is_real) { int bit_idx = (xts->in_bits & 3); @@ -622,7 +622,7 @@ xpcu_add_bit_for_ext_transfer (xpc_ext_transfer_state_t * xts, char in, /* ---------------------------------------------------------------------- */ static int -xpc_ext_transfer (cable_t * cable, int len, char *in, char *out) +xpc_ext_transfer (cable_t *cable, int len, char *in, char *out) { int i, j; xpc_ext_transfer_state_t xts; diff --git a/urjtag/src/tap/chain.c b/urjtag/src/tap/chain.c index a544b9f9..f56caaab 100644 --- a/urjtag/src/tap/chain.c +++ b/urjtag/src/tap/chain.c @@ -51,7 +51,7 @@ chain_alloc (void) } void -chain_free (chain_t * chain) +chain_free (chain_t *chain) { if (!chain) return; @@ -63,7 +63,7 @@ chain_free (chain_t * chain) } void -chain_disconnect (chain_t * chain) +chain_disconnect (chain_t *chain) { if (!chain->cable) return; @@ -75,7 +75,7 @@ chain_disconnect (chain_t * chain) } void -chain_clock (chain_t * chain, int tms, int tdi, int n) +chain_clock (chain_t *chain, int tms, int tdi, int n) { int i; @@ -89,7 +89,7 @@ chain_clock (chain_t * chain, int tms, int tdi, int n) } void -chain_defer_clock (chain_t * chain, int tms, int tdi, int n) +chain_defer_clock (chain_t *chain, int tms, int tdi, int n) { int i; @@ -103,7 +103,7 @@ chain_defer_clock (chain_t * chain, int tms, int tdi, int n) } int -chain_set_trst (chain_t * chain, int trst) +chain_set_trst (chain_t *chain, int trst) { int old_val = cable_set_signal (chain->cable, CS_TRST, trst ? CS_TRST : 0); @@ -113,13 +113,13 @@ chain_set_trst (chain_t * chain, int trst) } int -chain_get_trst (chain_t * chain) +chain_get_trst (chain_t *chain) { return (cable_get_signal (chain->cable, CS_TRST)); } int -chain_set_pod_signal (chain_t * chain, int mask, int val) +chain_set_pod_signal (chain_t *chain, int mask, int val) { int old_val = cable_set_signal (chain->cable, mask, val); int old_trst = (old_val & CS_TRST) ? 1 : 0; @@ -129,13 +129,13 @@ chain_set_pod_signal (chain_t * chain, int mask, int val) } int -chain_get_pod_signal (chain_t * chain, pod_sigsel_t sig) +chain_get_pod_signal (chain_t *chain, pod_sigsel_t sig) { return (cable_get_signal (chain->cable, sig)); } void -chain_shift_instructions_mode (chain_t * chain, int capture_output, +chain_shift_instructions_mode (chain_t *chain, int capture_output, int capture, int chain_exit) { int i; @@ -192,13 +192,13 @@ chain_shift_instructions_mode (chain_t * chain, int capture_output, } void -chain_shift_instructions (chain_t * chain) +chain_shift_instructions (chain_t *chain) { chain_shift_instructions_mode (chain, 0, 1, EXITMODE_IDLE); } void -chain_shift_data_registers_mode (chain_t * chain, int capture_output, +chain_shift_data_registers_mode (chain_t *chain, int capture_output, int capture, int chain_exit) { int i; @@ -264,13 +264,13 @@ chain_shift_data_registers_mode (chain_t * chain, int capture_output, } void -chain_shift_data_registers (chain_t * chain, int capture_output) +chain_shift_data_registers (chain_t *chain, int capture_output) { chain_shift_data_registers_mode (chain, capture_output, 1, EXITMODE_IDLE); } void -chain_flush (chain_t * chain) +chain_flush (chain_t *chain) { if (chain->cable != NULL) cable_flush (chain->cable, COMPLETELY); diff --git a/urjtag/src/tap/detect.c b/urjtag/src/tap/detect.c index b4cafd4c..e941eaa4 100644 --- a/urjtag/src/tap/detect.c +++ b/urjtag/src/tap/detect.c @@ -49,7 +49,7 @@ struct id_record }; static int -find_record (char *filename, tap_register * key, struct id_record *idr) +find_record (char *filename, tap_register *key, struct id_record *idr) { FILE *file; tap_register *tr; @@ -168,7 +168,7 @@ find_record (char *filename, tap_register * key, struct id_record *idr) } uint64_t -bits_to_uint64 (tap_register * t) +bits_to_uint64 (tap_register *t) { int i; uint64_t l, b; @@ -186,7 +186,7 @@ bits_to_uint64 (tap_register * t) int -detect_parts (chain_t * chain, const char *db_path) +detect_parts (chain_t *chain, const char *db_path) { int irlen; tap_register *ir; @@ -419,7 +419,7 @@ detect_parts (chain_t * chain, const char *db_path) /* In case we do not want to detect, we can add parts manually */ int -manual_add (chain_t * chain, int instr_len) +manual_add (chain_t *chain, int instr_len) { tap_register *id; part_t *part; diff --git a/urjtag/src/tap/discovery.c b/urjtag/src/tap/discovery.c index 9b7858b3..17b9d499 100644 --- a/urjtag/src/tap/discovery.c +++ b/urjtag/src/tap/discovery.c @@ -41,7 +41,7 @@ #undef VERY_LOW_LEVEL_DEBUG int -detect_register_size (chain_t * chain) +detect_register_size (chain_t *chain) { int len; tap_register *rz; @@ -120,7 +120,7 @@ detect_register_size (chain_t * chain) } void -jtag_reset (chain_t * chain) +jtag_reset (chain_t *chain) { chain_set_trst (chain, 0); chain_set_trst (chain, 1); @@ -129,7 +129,7 @@ jtag_reset (chain_t * chain) } void -discovery (chain_t * chain) +discovery (chain_t *chain) { int irlen; tap_register *ir; diff --git a/urjtag/src/tap/idcode.c b/urjtag/src/tap/idcode.c index 5932b6f7..249512ec 100644 --- a/urjtag/src/tap/idcode.c +++ b/urjtag/src/tap/idcode.c @@ -33,7 +33,7 @@ #include "jtag.h" void -idcode (chain_t * chain, unsigned int bytes) +idcode (chain_t *chain, unsigned int bytes) { int i; int hit = 0; diff --git a/urjtag/src/tap/parport.c b/urjtag/src/tap/parport.c index 2d6be7e5..16abecdb 100644 --- a/urjtag/src/tap/parport.c +++ b/urjtag/src/tap/parport.c @@ -47,37 +47,37 @@ parport_driver_t *parport_drivers[] = { int -parport_open (parport_t * port) +parport_open (parport_t *port) { return port->driver->open (port); } int -parport_close (parport_t * port) +parport_close (parport_t *port) { return port->driver->close (port); } int -parport_set_data (parport_t * port, uint8_t data) +parport_set_data (parport_t *port, uint8_t data) { return port->driver->set_data (port, data); } int -parport_get_data (parport_t * port) +parport_get_data (parport_t *port) { return port->driver->get_data (port); } int -parport_get_status (parport_t * port) +parport_get_status (parport_t *port) { return port->driver->get_status (port); } int -parport_set_control (parport_t * port, uint8_t data) +parport_set_control (parport_t *port, uint8_t data) { return port->driver->set_control (port, data); } diff --git a/urjtag/src/tap/parport/direct.c b/urjtag/src/tap/parport/direct.c index 694cb6ff..914d3b8d 100644 --- a/urjtag/src/tap/parport/direct.c +++ b/urjtag/src/tap/parport/direct.c @@ -174,7 +174,7 @@ direct_parport_alloc (unsigned int port) } static void -direct_parport_free (parport_t * port) +direct_parport_free (parport_t *port) { port_node_t **prev; @@ -250,7 +250,7 @@ direct_connect (const char **par, int parnum) } static int -direct_open (parport_t * parport) +direct_open (parport_t *parport) { #ifdef HAVE_INPOUTXX return 0; @@ -262,7 +262,7 @@ direct_open (parport_t * parport) } static int -direct_close (parport_t * parport) +direct_close (parport_t *parport) { #if defined(HAVE_INPOUTXX) return 0; @@ -273,7 +273,7 @@ direct_close (parport_t * parport) } static int -direct_set_data (parport_t * parport, uint8_t data) +direct_set_data (parport_t *parport, uint8_t data) { unsigned int port = ((direct_params_t *) parport->params)->port; outb (data, port); @@ -281,21 +281,21 @@ direct_set_data (parport_t * parport, uint8_t data) } static int -direct_get_data (parport_t * parport) +direct_get_data (parport_t *parport) { unsigned int port = ((direct_params_t *) parport->params)->port; return inb (port); } static int -direct_get_status (parport_t * parport) +direct_get_status (parport_t *parport) { unsigned int port = ((direct_params_t *) parport->params)->port; return inb (port + 1) ^ 0x80; /* BUSY is inverted */ } static int -direct_set_control (parport_t * parport, uint8_t data) +direct_set_control (parport_t *parport, uint8_t data) { unsigned int port = ((direct_params_t *) parport->params)->port; outb (data ^ 0x0B, port + 2); /* SELECT, AUTOFD, and STROBE are inverted */ diff --git a/urjtag/src/tap/parport/ppdev.c b/urjtag/src/tap/parport/ppdev.c index ea7474ae..72ed33c0 100644 --- a/urjtag/src/tap/parport/ppdev.c +++ b/urjtag/src/tap/parport/ppdev.c @@ -93,7 +93,7 @@ ppdev_parport_alloc (const char *port) } static void -ppdev_parport_free (parport_t * port) +ppdev_parport_free (parport_t *port) { port_node_t **prev; @@ -147,7 +147,7 @@ ppdev_connect (const char **par, int parnum) } static int -ppdev_open (parport_t * parport) +ppdev_open (parport_t *parport) { ppdev_params_t *p = parport->params; @@ -159,8 +159,8 @@ ppdev_open (parport_t * parport) return -1; } - if ( /*(ioctl( p->fd, PPEXCL ) == -1) || */ - (ioctl (p->fd, PPCLAIM) == -1)) + if ( /*(ioctl( p->fd, PPEXCL ) == -1) || */ + (ioctl (p->fd, PPCLAIM) == -1)) { printf (_("Could not claim ppdev device: %s\n"), strerror (errno)); close (p->fd); @@ -172,7 +172,7 @@ ppdev_open (parport_t * parport) } static int -ppdev_close (parport_t * parport) +ppdev_close (parport_t *parport) { int r = 0; ppdev_params_t *p = parport->params; @@ -188,7 +188,7 @@ ppdev_close (parport_t * parport) } static int -ppdev_set_data (parport_t * parport, uint8_t data) +ppdev_set_data (parport_t *parport, uint8_t data) { ppdev_params_t *p = parport->params; @@ -199,7 +199,7 @@ ppdev_set_data (parport_t * parport, uint8_t data) } static int -ppdev_get_data (parport_t * parport) +ppdev_get_data (parport_t *parport) { unsigned char d; ppdev_params_t *p = parport->params; @@ -211,7 +211,7 @@ ppdev_get_data (parport_t * parport) } static int -ppdev_get_status (parport_t * parport) +ppdev_get_status (parport_t *parport) { unsigned char d; ppdev_params_t *p = parport->params; @@ -223,7 +223,7 @@ ppdev_get_status (parport_t * parport) } static int -ppdev_set_control (parport_t * parport, uint8_t data) +ppdev_set_control (parport_t *parport, uint8_t data) { ppdev_params_t *p = parport->params; diff --git a/urjtag/src/tap/parport/ppi.c b/urjtag/src/tap/parport/ppi.c index df15503d..f9d966bc 100644 --- a/urjtag/src/tap/parport/ppi.c +++ b/urjtag/src/tap/parport/ppi.c @@ -89,7 +89,7 @@ ppi_parport_alloc (const char *port) } static void -ppi_parport_free (parport_t * port) +ppi_parport_free (parport_t *port) { port_node_t **prev; @@ -143,7 +143,7 @@ ppi_connect (const char **par, int parnum) } static int -ppi_open (parport_t * parport) +ppi_open (parport_t *parport) { ppi_params_t *p = parport->params; @@ -155,7 +155,7 @@ ppi_open (parport_t * parport) } static int -ppi_close (parport_t * parport) +ppi_close (parport_t *parport) { int r = 0; ppi_params_t *p = parport->params; @@ -168,7 +168,7 @@ ppi_close (parport_t * parport) } static int -ppi_set_data (parport_t * parport, uint8_t data) +ppi_set_data (parport_t *parport, uint8_t data) { ppi_params_t *p = parport->params; @@ -179,7 +179,7 @@ ppi_set_data (parport_t * parport, uint8_t data) } static int -ppi_get_data (parport_t * parport) +ppi_get_data (parport_t *parport) { unsigned char d; ppi_params_t *p = parport->params; @@ -191,7 +191,7 @@ ppi_get_data (parport_t * parport) } static int -ppi_get_status (parport_t * parport) +ppi_get_status (parport_t *parport) { unsigned char d; ppi_params_t *p = parport->params; @@ -203,7 +203,7 @@ ppi_get_status (parport_t * parport) } static int -ppi_set_control (parport_t * parport, uint8_t data) +ppi_set_control (parport_t *parport, uint8_t data) { ppi_params_t *p = parport->params; diff --git a/urjtag/src/tap/register.c b/urjtag/src/tap/register.c index 79099006..b238de3b 100644 --- a/urjtag/src/tap/register.c +++ b/urjtag/src/tap/register.c @@ -63,7 +63,7 @@ register_alloc (int len) } tap_register * -register_duplicate (const tap_register * tr) +register_duplicate (const tap_register *tr) { if (!tr) return NULL; @@ -72,7 +72,7 @@ register_duplicate (const tap_register * tr) } void -register_free (tap_register * tr) +register_free (tap_register *tr) { if (tr) { @@ -83,7 +83,7 @@ register_free (tap_register * tr) } tap_register * -register_fill (tap_register * tr, int val) +register_fill (tap_register *tr, int val) { if (tr) memset (tr->data, val & 1, tr->len); @@ -92,7 +92,7 @@ register_fill (tap_register * tr, int val) } const char * -register_get_string (const tap_register * tr) +register_get_string (const tap_register *tr) { int i; @@ -106,7 +106,7 @@ register_get_string (const tap_register * tr) } int -register_all_bits_same_value (const tap_register * tr) +register_all_bits_same_value (const tap_register *tr) { int i, value; if (!tr) @@ -128,7 +128,7 @@ register_all_bits_same_value (const tap_register * tr) } tap_register * -register_init (tap_register * tr, const char *value) +register_init (tap_register *tr, const char *value) { int i; @@ -154,7 +154,7 @@ register_init (tap_register * tr, const char *value) } int -register_compare (const tap_register * tr, const tap_register * tr2) +register_compare (const tap_register *tr, const tap_register *tr2) { int i; @@ -175,7 +175,7 @@ register_compare (const tap_register * tr, const tap_register * tr2) } int -register_match (const tap_register * tr, const char *expr) +register_match (const tap_register *tr, const char *expr) { int i; const char *s; @@ -193,7 +193,7 @@ register_match (const tap_register * tr, const char *expr) } tap_register * -register_inc (tap_register * tr) +register_inc (tap_register *tr) { int i; @@ -212,7 +212,7 @@ register_inc (tap_register * tr) } tap_register * -register_dec (tap_register * tr) +register_dec (tap_register *tr) { int i; @@ -231,7 +231,7 @@ register_dec (tap_register * tr) } tap_register * -register_shift_right (tap_register * tr, int shift) +register_shift_right (tap_register *tr, int shift) { int i; @@ -253,7 +253,7 @@ register_shift_right (tap_register * tr, int shift) } tap_register * -register_shift_left (tap_register * tr, int shift) +register_shift_left (tap_register *tr, int shift) { int i; diff --git a/urjtag/src/tap/state.c b/urjtag/src/tap/state.c index 49b1ca4c..4d8bb1ce 100644 --- a/urjtag/src/tap/state.c +++ b/urjtag/src/tap/state.c @@ -27,31 +27,31 @@ #include "chain.h" int -tap_state (chain_t * chain) +tap_state (chain_t *chain) { return chain->state; } int -tap_state_init (chain_t * chain) +tap_state_init (chain_t *chain) { return chain->state = Unknown_State; } int -tap_state_done (chain_t * chain) +tap_state_done (chain_t *chain) { return chain->state = Unknown_State; } int -tap_state_reset (chain_t * chain) +tap_state_reset (chain_t *chain) { return chain->state = Test_Logic_Reset; } int -tap_state_set_trst (chain_t * chain, int old_trst, int new_trst) +tap_state_set_trst (chain_t *chain, int old_trst, int new_trst) { old_trst = old_trst ? 1 : 0; new_trst = new_trst ? 1 : 0; @@ -68,7 +68,7 @@ tap_state_set_trst (chain_t * chain, int old_trst, int new_trst) } int -tap_state_clock (chain_t * chain, int tms) +tap_state_clock (chain_t *chain, int tms) { if (tms) { diff --git a/urjtag/src/tap/tap.c b/urjtag/src/tap/tap.c index 6a2cf9ca..1cda3eb1 100644 --- a/urjtag/src/tap/tap.c +++ b/urjtag/src/tap/tap.c @@ -32,7 +32,7 @@ #include "chain.h" void -tap_reset (chain_t * chain) +tap_reset (chain_t *chain) { tap_state_reset (chain); @@ -41,7 +41,7 @@ tap_reset (chain_t * chain) } void -tap_reset_bypass (chain_t * chain) +tap_reset_bypass (chain_t *chain) { tap_reset (chain); @@ -66,8 +66,8 @@ tap_reset_bypass (chain_t * chain) } void -tap_defer_shift_register (chain_t * chain, const tap_register * in, - tap_register * out, int tap_exit) +tap_defer_shift_register (chain_t *chain, const tap_register *in, + tap_register *out, int tap_exit) { int i; @@ -108,8 +108,8 @@ tap_defer_shift_register (chain_t * chain, const tap_register * in, } void -tap_shift_register_output (chain_t * chain, const tap_register * in, - tap_register * out, int tap_exit) +tap_shift_register_output (chain_t *chain, const tap_register *in, + tap_register *out, int tap_exit) { if (out != NULL) { @@ -131,15 +131,15 @@ tap_shift_register_output (chain_t * chain, const tap_register * in, } void -tap_shift_register (chain_t * chain, const tap_register * in, - tap_register * out, int tap_exit) +tap_shift_register (chain_t *chain, const tap_register *in, + tap_register *out, int tap_exit) { tap_defer_shift_register (chain, in, out, tap_exit); tap_shift_register_output (chain, in, out, tap_exit); } void -tap_capture_dr (chain_t * chain) +tap_capture_dr (chain_t *chain) { if ((tap_state (chain) & (TAPSTAT_RESET | TAPSTAT_IDLE)) != TAPSTAT_IDLE) printf (_("%s: Invalid state: %2X\n"), "tap_capture_dr", @@ -151,7 +151,7 @@ tap_capture_dr (chain_t * chain) } void -tap_capture_ir (chain_t * chain) +tap_capture_ir (chain_t *chain) { if ((tap_state (chain) & (TAPSTAT_RESET | TAPSTAT_IDLE)) != TAPSTAT_IDLE) printf (_("%s: Invalid state: %2X\n"), "tap_capture_ir", diff --git a/urjtag/src/tap/usbconn.c b/urjtag/src/tap/usbconn.c index fe15b59b..aab61d70 100644 --- a/urjtag/src/tap/usbconn.c +++ b/urjtag/src/tap/usbconn.c @@ -56,19 +56,19 @@ usbconn_driver_t *usbconn_drivers[] = { }; int -usbconn_open (usbconn_t * conn) +usbconn_open (usbconn_t *conn) { return conn->driver->open (conn); } int -usbconn_close (usbconn_t * conn) +usbconn_close (usbconn_t *conn) { return conn->driver->close (conn); } int -usbconn_read (usbconn_t * conn, uint8_t * buf, int len) +usbconn_read (usbconn_t *conn, uint8_t *buf, int len) { if (conn->driver->read) return conn->driver->read (conn, buf, len); @@ -77,7 +77,7 @@ usbconn_read (usbconn_t * conn, uint8_t * buf, int len) } int -usbconn_write (usbconn_t * conn, uint8_t * buf, int len, int recv) +usbconn_write (usbconn_t *conn, uint8_t *buf, int len, int recv) { if (conn->driver->write) return conn->driver->write (conn, buf, len, recv); diff --git a/urjtag/src/tap/usbconn/libftd2xx.c b/urjtag/src/tap/usbconn/libftd2xx.c index 57904995..6334b0c9 100644 --- a/urjtag/src/tap/usbconn/libftd2xx.c +++ b/urjtag/src/tap/usbconn/libftd2xx.c @@ -72,13 +72,13 @@ typedef struct usbconn_driver_t usbconn_ftd2xx_driver; usbconn_driver_t usbconn_ftd2xx_mpsse_driver; -static int usbconn_ftd2xx_common_open (usbconn_t * conn, int printerr); -static void usbconn_ftd2xx_free (usbconn_t * conn); +static int usbconn_ftd2xx_common_open (usbconn_t *conn, int printerr); +static void usbconn_ftd2xx_free (usbconn_t *conn); /* ---------------------------------------------------------------------- */ static int -usbconn_ftd2xx_flush (ftd2xx_param_t * p) +usbconn_ftd2xx_flush (ftd2xx_param_t *p) { FT_STATUS status; DWORD xferred; @@ -155,7 +155,7 @@ usbconn_ftd2xx_flush (ftd2xx_param_t * p) /* ---------------------------------------------------------------------- */ static int -usbconn_ftd2xx_read (usbconn_t * conn, uint8_t * buf, int len) +usbconn_ftd2xx_read (usbconn_t *conn, uint8_t *buf, int len) { ftd2xx_param_t *p = conn->params; int cpy_len; @@ -211,7 +211,7 @@ usbconn_ftd2xx_read (usbconn_t * conn, uint8_t * buf, int len) /* ---------------------------------------------------------------------- */ static int -usbconn_ftd2xx_write (usbconn_t * conn, uint8_t * buf, int len, int recv) +usbconn_ftd2xx_write (usbconn_t *conn, uint8_t *buf, int len, int recv) { ftd2xx_param_t *p = conn->params; int xferred = 0; @@ -273,7 +273,7 @@ usbconn_ftd2xx_write (usbconn_t * conn, uint8_t * buf, int len, int recv) usbconn_t * usbconn_ftd2xx_connect (const char **param, int paramc, - usbconn_cable_t * template) + usbconn_cable_t *template) { usbconn_t *c = malloc (sizeof (usbconn_t)); ftd2xx_param_t *p = malloc (sizeof (ftd2xx_param_t)); @@ -331,7 +331,7 @@ usbconn_ftd2xx_connect (const char **param, int paramc, usbconn_t * usbconn_ftd2xx_mpsse_connect (const char **param, int paramc, - usbconn_cable_t * template) + usbconn_cable_t *template) { usbconn_t *conn = usbconn_ftd2xx_connect (param, paramc, template); @@ -345,7 +345,7 @@ usbconn_ftd2xx_mpsse_connect (const char **param, int paramc, /* ---------------------------------------------------------------------- */ static int -usbconn_ftd2xx_common_open (usbconn_t * conn, int printerr) +usbconn_ftd2xx_common_open (usbconn_t *conn, int printerr) { ftd2xx_param_t *p = conn->params; FT_STATUS status; @@ -387,7 +387,7 @@ usbconn_ftd2xx_common_open (usbconn_t * conn, int printerr) /* ---------------------------------------------------------------------- */ static int -usbconn_ftd2xx_open (usbconn_t * conn) +usbconn_ftd2xx_open (usbconn_t *conn) { ftd2xx_param_t *p = conn->params; FT_HANDLE fc; @@ -425,7 +425,7 @@ usbconn_ftd2xx_open (usbconn_t * conn) /* ---------------------------------------------------------------------- */ static int -usbconn_ftd2xx_mpsse_open (usbconn_t * conn) +usbconn_ftd2xx_mpsse_open (usbconn_t *conn) { ftd2xx_param_t *p = conn->params; FT_HANDLE fc; @@ -514,7 +514,7 @@ usbconn_ftd2xx_mpsse_open (usbconn_t * conn) /* ---------------------------------------------------------------------- */ static int -usbconn_ftd2xx_close (usbconn_t * conn) +usbconn_ftd2xx_close (usbconn_t *conn) { ftd2xx_param_t *p = conn->params; @@ -530,7 +530,7 @@ usbconn_ftd2xx_close (usbconn_t * conn) /* ---------------------------------------------------------------------- */ static void -usbconn_ftd2xx_free (usbconn_t * conn) +usbconn_ftd2xx_free (usbconn_t *conn) { ftd2xx_param_t *p = conn->params; diff --git a/urjtag/src/tap/usbconn/libftdi.c b/urjtag/src/tap/usbconn/libftdi.c index 822346d9..1c584274 100644 --- a/urjtag/src/tap/usbconn/libftdi.c +++ b/urjtag/src/tap/usbconn/libftdi.c @@ -64,13 +64,13 @@ typedef struct usbconn_driver_t usbconn_ftdi_driver; usbconn_driver_t usbconn_ftdi_mpsse_driver; -static int usbconn_ftdi_common_open (usbconn_t * conn, int printerr); -static void usbconn_ftdi_free (usbconn_t * conn); +static int usbconn_ftdi_common_open (usbconn_t *conn, int printerr); +static void usbconn_ftdi_free (usbconn_t *conn); /* ---------------------------------------------------------------------- */ static int -usbconn_ftdi_flush (ftdi_param_t * p) +usbconn_ftdi_flush (ftdi_param_t *p) { int xferred; int recvd = 0; @@ -135,7 +135,7 @@ usbconn_ftdi_flush (ftdi_param_t * p) /* ---------------------------------------------------------------------- */ static int -usbconn_ftdi_read (usbconn_t * conn, uint8_t * buf, int len) +usbconn_ftdi_read (usbconn_t *conn, uint8_t *buf, int len) { ftdi_param_t *p = conn->params; int cpy_len; @@ -181,7 +181,7 @@ usbconn_ftdi_read (usbconn_t * conn, uint8_t * buf, int len) /* ---------------------------------------------------------------------- */ static int -usbconn_ftdi_write (usbconn_t * conn, uint8_t * buf, int len, int recv) +usbconn_ftdi_write (usbconn_t *conn, uint8_t *buf, int len, int recv) { ftdi_param_t *p = conn->params; int xferred = 0; @@ -236,7 +236,7 @@ usbconn_ftdi_write (usbconn_t * conn, uint8_t * buf, int len, int recv) usbconn_t * usbconn_ftdi_connect (const char **param, int paramc, - usbconn_cable_t * template) + usbconn_cable_t *template) { usbconn_t *c = malloc (sizeof (usbconn_t)); ftdi_param_t *p = malloc (sizeof (ftdi_param_t)); @@ -298,7 +298,7 @@ usbconn_ftdi_connect (const char **param, int paramc, usbconn_t * usbconn_ftdi_mpsse_connect (const char **param, int paramc, - usbconn_cable_t * template) + usbconn_cable_t *template) { usbconn_t *conn = usbconn_ftdi_connect (param, paramc, template); @@ -312,7 +312,7 @@ usbconn_ftdi_mpsse_connect (const char **param, int paramc, /* ---------------------------------------------------------------------- */ static int -usbconn_ftdi_common_open (usbconn_t * conn, int printerr) +usbconn_ftdi_common_open (usbconn_t *conn, int printerr) { ftdi_param_t *p = conn->params; struct ftdi_context *fc = p->fc; @@ -412,7 +412,7 @@ seq_reset (struct ftdi_context *fc) /* ---------------------------------------------------------------------- */ static int -usbconn_ftdi_open (usbconn_t * conn) +usbconn_ftdi_open (usbconn_t *conn) { ftdi_param_t *p = conn->params; struct ftdi_context *fc = p->fc; @@ -461,7 +461,7 @@ usbconn_ftdi_open (usbconn_t * conn) /* ---------------------------------------------------------------------- */ static int -usbconn_ftdi_mpsse_open (usbconn_t * conn) +usbconn_ftdi_mpsse_open (usbconn_t *conn) { ftdi_param_t *p = conn->params; struct ftdi_context *fc = p->fc; @@ -550,7 +550,7 @@ usbconn_ftdi_mpsse_open (usbconn_t * conn) /* ---------------------------------------------------------------------- */ static int -usbconn_ftdi_close (usbconn_t * conn) +usbconn_ftdi_close (usbconn_t *conn) { ftdi_param_t *p = conn->params; @@ -567,7 +567,7 @@ usbconn_ftdi_close (usbconn_t * conn) /* ---------------------------------------------------------------------- */ static void -usbconn_ftdi_free (usbconn_t * conn) +usbconn_ftdi_free (usbconn_t *conn) { ftdi_param_t *p = conn->params; diff --git a/urjtag/src/tap/usbconn/libusb.c b/urjtag/src/tap/usbconn/libusb.c index 3fadac95..5d955d5d 100644 --- a/urjtag/src/tap/usbconn/libusb.c +++ b/urjtag/src/tap/usbconn/libusb.c @@ -111,7 +111,7 @@ libusb_match_desc (struct usb_device *dev, char *desc) usbconn_t * usbconn_libusb_connect (const char **param, int paramc, - usbconn_cable_t * template) + usbconn_cable_t *template) { struct usb_bus *bus; struct usb_device *found_dev = NULL; @@ -179,7 +179,7 @@ usbconn_libusb_connect (const char **param, int paramc, /* ---------------------------------------------------------------------- */ static int -usbconn_libusb_open (usbconn_t * conn) +usbconn_libusb_open (usbconn_t *conn) { libusb_param_t *p = conn->params; @@ -220,7 +220,7 @@ usbconn_libusb_open (usbconn_t * conn) /* ---------------------------------------------------------------------- */ static int -usbconn_libusb_close (usbconn_t * conn) +usbconn_libusb_close (usbconn_t *conn) { libusb_param_t *p = conn->params; if (p->handle != NULL) @@ -235,7 +235,7 @@ usbconn_libusb_close (usbconn_t * conn) /* ---------------------------------------------------------------------- */ static void -usbconn_libusb_free (usbconn_t * conn) +usbconn_libusb_free (usbconn_t *conn) { free (conn->params); free (conn);