allow minidrivers to implement inner loop of dcc memory writes
git-svn-id: svn://svn.berlios.de/openocd/trunk@879 b42882b7-edfa-0310-969c-e2dbd0fdcd60__archive__
parent
0f18744a87
commit
db7c3810c2
|
@ -2195,24 +2195,10 @@ int arm7_9_bulk_write_memory(target_t *target, u32 address, u32 count, u8 *buffe
|
|||
embeddedice_reg_t *ice_reg = arm7_9->eice_cache->reg_list[EICE_COMMS_DATA].arch_info;
|
||||
u8 reg_addr = ice_reg->addr & 0x1f;
|
||||
int chain_pos = ice_reg->jtag_info->chain_pos;
|
||||
/* we want the compiler to duplicate the code, which it does not
|
||||
* do automatically.
|
||||
*/
|
||||
if (little)
|
||||
{
|
||||
for (i = 1; i < count - 1; i++)
|
||||
{
|
||||
embeddedice_write_reg_inner(chain_pos, reg_addr, fast_target_buffer_get_u32(buffer, little));
|
||||
buffer += 4;
|
||||
}
|
||||
} else
|
||||
{
|
||||
for (i = 1; i < count - 1; i++)
|
||||
{
|
||||
embeddedice_write_reg_inner(chain_pos, reg_addr, fast_target_buffer_get_u32(buffer, little));
|
||||
buffer += 4;
|
||||
}
|
||||
}
|
||||
|
||||
embeddedice_write_dcc(chain_pos, reg_addr, buffer, little, count-2);
|
||||
buffer += (count-2)*4;
|
||||
|
||||
embeddedice_write_reg(&arm7_9->eice_cache->reg_list[EICE_COMMS_DATA], fast_target_buffer_get_u32(buffer, little));
|
||||
} else
|
||||
{
|
||||
|
|
|
@ -548,3 +548,14 @@ int embeddedice_handshake(arm_jtag_t *jtag_info, int hsbit, u32 timeout)
|
|||
|
||||
return ERROR_TARGET_TIMEOUT;
|
||||
}
|
||||
|
||||
/* this is the inner loop of the open loop DCC write of data to target */
|
||||
void MINIDRIVER(embeddedice_write_dcc)(int chain_pos, int reg_addr, u8 *buffer, int little, int count)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
embeddedice_write_reg_inner(chain_pos, reg_addr, fast_target_buffer_get_u32(buffer, little));
|
||||
buffer += 4;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -124,5 +124,7 @@ static __inline__ void embeddedice_write_reg_inner(int chain_pos, int reg_addr,
|
|||
-1);
|
||||
}
|
||||
|
||||
void embeddedice_write_dcc(int chain_pos, int reg_addr, u8 *buffer, int little, int count);
|
||||
|
||||
|
||||
#endif /* EMBEDDED_ICE_H */
|
||||
|
|
Loading…
Reference in New Issue