File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed
Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ int Jtag::detectChain(int max_dev)
200200 * GateMate and Efinix Trion T4/T8 devices
201201 */
202202 if (tmp != 0x20000001 )
203- found = search_and_insert_device_with_idcode (tmp & 0x0fffffff );
203+ found = search_and_insert_device_with_idcode (tmp);
204204 if (!found) /* if masked not found -> search for full */
205205 found = search_and_insert_device_with_idcode (tmp);
206206
@@ -231,7 +231,7 @@ bool Jtag::search_and_insert_device_with_idcode(uint32_t idcode)
231231 if (dev != fpga_list.end ())
232232 irlength = dev->second .irlength ;
233233 if (irlength == -1 ) {
234- auto misc = misc_dev_list.find (idcode);
234+ auto misc = misc_dev_list.find (idcode & MISC_DEV_MASK );
235235 if (misc != misc_dev_list.end ())
236236 irlength = misc->second .irlength ;
237237 }
Original file line number Diff line number Diff line change @@ -470,11 +470,11 @@ int main(int argc, char **argv)
470470 fpga_list[t].family .c_str (),
471471 fpga_list[t].model .c_str ());
472472 printf (" \t irlength %d\n " , fpga_list[t].irlength );
473- } else if (misc_dev_list.find (t) != misc_dev_list.end ()) {
473+ } else if (misc_dev_list.find (t & MISC_DEV_MASK ) != misc_dev_list.end ()) {
474474 printf (" \t idcode 0x%x\n\t type %s\n\t irlength %d\n " ,
475475 t,
476- misc_dev_list[t].name .c_str (),
477- misc_dev_list[t].irlength );
476+ misc_dev_list[t & MISC_DEV_MASK ].name .c_str (),
477+ misc_dev_list[t & MISC_DEV_MASK ].irlength );
478478 }
479479 }
480480 if (args.detect == true ) {
Original file line number Diff line number Diff line change @@ -177,10 +177,11 @@ typedef struct {
177177 int irlength;
178178} misc_device;
179179
180+ #define MISC_DEV_MASK 0x0ff00fffU
180181static std::map <uint32_t , misc_device> misc_dev_list = {
181- {0x4ba00477 , {" ARM cortex A9 " , 4 }},
182- {0x5ba00477 , {" ARM cortex A53 " , 4 }},
183- {0xfffffffe , {" ZynqMP dummy device" , 12 }},
182+ {0x0ba00477 , {" ADIv5 JTAG-DP port " , 4 }},
183+ {0x06400041 , {" STM32 Device " , 4 }},
184+ {0x0ff00ffe , {" ZynqMP dummy device" , 12 }},
184185};
185186
186187/* list of JTAG manufacturer ID */
You can’t perform that action at this time.
0 commit comments