diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index 101b1f83..35a040d0 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -11,6 +11,8 @@ * src/bus/pxa2x0.c: Constify default map info, and then push writable global map data into the bus-specific params data. + * include/urjtag/bfin.h: Unify bfin_part_data casts into a single macro. + 2011-07-01 Jie Zhang * src/lib/ansidecl.h: Move to include. diff --git a/urjtag/include/urjtag/bfin.h b/urjtag/include/urjtag/bfin.h index a659df7e..99571b2f 100644 --- a/urjtag/include/urjtag/bfin.h +++ b/urjtag/include/urjtag/bfin.h @@ -141,19 +141,20 @@ struct bfin_part_data uint32_t emupc_orig; }; -#define BFIN_PART_BYPASS(part) (((struct bfin_part_data *)((part)->params->data))->bypass) -#define EMU_OAB(part) (((struct bfin_part_data *)((part)->params->data))->emu_oab) - -#define BFIN_PART_SCAN(part) (((struct bfin_part_data *)((part)->params->data))->scan) -#define BFIN_PART_WPSTAT(part) (((struct bfin_part_data *)((part)->params->data))->wpstat) -#define BFIN_PART_DBGCTL(part) (((struct bfin_part_data *)((part)->params->data))->dbgctl) -#define BFIN_PART_DBGSTAT(part) (((struct bfin_part_data *)((part)->params->data))->dbgstat) -#define BFIN_PART_EMUIR_A(part) (((struct bfin_part_data *)((part)->params->data))->emuir_a) -#define BFIN_PART_EMUIR_B(part) (((struct bfin_part_data *)((part)->params->data))->emuir_b) -#define BFIN_PART_EMUDAT_OUT(part) (((struct bfin_part_data *)((part)->params->data))->emudat_out) -#define BFIN_PART_EMUDAT_IN(part) (((struct bfin_part_data *)((part)->params->data))->emudat_in) -#define BFIN_PART_EMUPC(part) (((struct bfin_part_data *)((part)->params->data))->emupc) -#define BFIN_PART_EMUPC_ORIG(part) (((struct bfin_part_data *)((part)->params->data))->emupc_orig) +#define BFIN_PART_DATA(part) ((struct bfin_part_data *)((part)->params->data)) +#define BFIN_PART_BYPASS(part) (BFIN_PART_DATA (part)->bypass) +#define EMU_OAB(part) (BFIN_PART_DATA (part)->emu_oab) + +#define BFIN_PART_SCAN(part) (BFIN_PART_DATA (part)->scan) +#define BFIN_PART_WPSTAT(part) (BFIN_PART_DATA (part)->wpstat) +#define BFIN_PART_DBGCTL(part) (BFIN_PART_DATA (part)->dbgctl) +#define BFIN_PART_DBGSTAT(part) (BFIN_PART_DATA (part)->dbgstat) +#define BFIN_PART_EMUIR_A(part) (BFIN_PART_DATA (part)->emuir_a) +#define BFIN_PART_EMUIR_B(part) (BFIN_PART_DATA (part)->emuir_b) +#define BFIN_PART_EMUDAT_OUT(part) (BFIN_PART_DATA (part)->emudat_out) +#define BFIN_PART_EMUDAT_IN(part) (BFIN_PART_DATA (part)->emudat_in) +#define BFIN_PART_EMUPC(part) (BFIN_PART_DATA (part)->emupc) +#define BFIN_PART_EMUPC_ORIG(part) (BFIN_PART_DATA (part)->emupc_orig) #define IDCODE_SCAN 0 #define DBGSTAT_SCAN 1