)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"47af21c7c34401cddf3e1f98ab2c8609efd30f43","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"ce5f7b00_dd215caf","updated":"2023-04-06 22:11:12.000000000","message":"I\u0027m questioning myself it it could make sense to split\nuint64_t dap-\u003eselect\nin\nuint32_t dap-\u003eselect\nuint32_t dap-\u003eselect1\nand avoid all the shift, update only half of 64 bit variable.\nMaybe in a separate patch","commit_id":"90c146f6bf3eeb543632ce1cad6fac7d75397355"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"36c41ce2f5b1ab55182af5861b0e89194d48a0b1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"622929f2_daaffad9","in_reply_to":"ce5f7b00_dd215caf","updated":"2023-05-28 06:34:34.000000000","message":"Yes, I had exactly same feeling.","commit_id":"90c146f6bf3eeb543632ce1cad6fac7d75397355"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"25cc27f1e2c0cc7f2f934ccbdb60a6c1b82ba956","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"21db0583_92514bd9","updated":"2023-09-17 15:10:08.000000000","message":"Ok, thanks.\nOnly the typo to be fixed","commit_id":"cf315b3f675f1747cb7a56419a5b96a13c27de43"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"02ba193fcf699cb9d8b5c39c4e09a49413e52055","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"dba77699_a9dcebc6","updated":"2023-11-07 12:01:19.000000000","message":"Antonio, I would appreciate if you can re-review and eventually put some score.\nI addressed your last comment 2 months ago...","commit_id":"74895aa24da7c5c0c8af662c8d11be5c8693a42c"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"5e11a86fd5079c6e4e69239d231915da45103f99","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"7e172863_a696cdf6","updated":"2023-10-04 15:31:14.000000000","message":"Antonio?","commit_id":"74895aa24da7c5c0c8af662c8d11be5c8693a42c"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"8a642fe0221d18f9f29c94a52ac24ee7add470b0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"4e09235a_9db1b5eb","updated":"2023-12-29 13:10:59.000000000","message":"Sorry for the long delay to review this again","commit_id":"74895aa24da7c5c0c8af662c8d11be5c8693a42c"}],"src/target/adi_v5_jtag.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"47af21c7c34401cddf3e1f98ab2c8609efd30f43","unresolved":false,"context_lines":[{"line_number":357,"context_line":"\t\t\t\u0026\u0026 (!dap-\u003eselect_valid || sel !\u003d (dap-\u003eselect \u0026 DP_SELECT_DPBANK))) {"},{"line_number":358,"context_line":"\t\tsel |\u003d dap-\u003eselect \u0026 SELECT_AP_MASK;"},{"line_number":359,"context_line":"\t\tLOG_DEBUG_IO(\"DP BANKSEL: %\" PRIx32, (uint32_t)sel);"},{"line_number":360,"context_line":"\t\tbuf_set_u32(out_value_buf, 0, 32, (uint32_t)sel);"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"\t\tretval \u003d adi_jtag_dp_scan(dap, JTAG_DP_DPACC,"},{"line_number":363,"context_line":"\t\t\t\tDP_SELECT, DPAP_WRITE, out_value_buf, NULL, 0, NULL);"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"9589cd78_223502c4","line":360,"updated":"2023-04-06 22:11:12.000000000","message":"Hummm, possible minor optimization .... why to zero the address part of SELECT?\n if (dap-\u003eselect_valid)\n   sel |\u003d sel \u0026 SELECT_AP_MASK;\n buf_set_u32(...);\n\nBut eventually in a separate patch","commit_id":"90c146f6bf3eeb543632ce1cad6fac7d75397355"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"47af21c7c34401cddf3e1f98ab2c8609efd30f43","unresolved":true,"context_lines":[{"line_number":775,"context_line":"\t\t/* Prepare DP bank for DP_SELECT1 now to save one write */"},{"line_number":776,"context_line":"\t\tsel |\u003d (DP_SELECT1 \u003e\u003e 4) \u0026 DP_SELECT_DPBANK;"},{"line_number":777,"context_line":"\t} else {"},{"line_number":778,"context_line":"\t\tsel |\u003d dap-\u003eselect \u0026 DP_SELECT_DPBANK;"},{"line_number":779,"context_line":"\t}"},{"line_number":780,"context_line":""},{"line_number":781,"context_line":"\tif (set_select) {"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"f21fdd72_510911eb","line":778,"updated":"2023-04-06 22:11:12.000000000","message":"if dap-\u003eselect_valid\u003d\u003dfalse, then we are adding a \u0027random\u0027 DPBANK\nDoes it make more sense to left it to zero?","commit_id":"90c146f6bf3eeb543632ce1cad6fac7d75397355"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"25cc27f1e2c0cc7f2f934ccbdb60a6c1b82ba956","unresolved":false,"context_lines":[{"line_number":775,"context_line":"\t\t/* Prepare DP bank for DP_SELECT1 now to save one write */"},{"line_number":776,"context_line":"\t\tsel |\u003d (DP_SELECT1 \u003e\u003e 4) \u0026 DP_SELECT_DPBANK;"},{"line_number":777,"context_line":"\t} else {"},{"line_number":778,"context_line":"\t\tsel |\u003d dap-\u003eselect \u0026 DP_SELECT_DPBANK;"},{"line_number":779,"context_line":"\t}"},{"line_number":780,"context_line":""},{"line_number":781,"context_line":"\tif (set_select) {"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"908b051b_bce103f0","line":778,"in_reply_to":"3d2f7424_e94e279e","updated":"2023-09-17 15:10:08.000000000","message":"Ack","commit_id":"90c146f6bf3eeb543632ce1cad6fac7d75397355"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"5e748c68a0060bfd111ca2aa9832373117ec1cf0","unresolved":true,"context_lines":[{"line_number":775,"context_line":"\t\t/* Prepare DP bank for DP_SELECT1 now to save one write */"},{"line_number":776,"context_line":"\t\tsel |\u003d (DP_SELECT1 \u003e\u003e 4) \u0026 DP_SELECT_DPBANK;"},{"line_number":777,"context_line":"\t} else {"},{"line_number":778,"context_line":"\t\tsel |\u003d dap-\u003eselect \u0026 DP_SELECT_DPBANK;"},{"line_number":779,"context_line":"\t}"},{"line_number":780,"context_line":""},{"line_number":781,"context_line":"\tif (set_select) {"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"3d2f7424_e94e279e","line":778,"in_reply_to":"f21fdd72_510911eb","updated":"2023-09-10 15:04:54.000000000","message":"Yes, for me this should be:\nif (set_select \u0026\u0026 set_select1) {\n/\\* Prepare DP bank for DP_SELECT1 now to save one write \\*/\nsel |\u003d (DP_SELECT1 \u003e\u003e 4) \u0026 DP_SELECT_DPBANK;\n} else if (dap-\u003eselect_valid) {\nsel |\u003d dap-\u003eselect \u0026 DP_SELECT_DPBANK;\n}","commit_id":"90c146f6bf3eeb543632ce1cad6fac7d75397355"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"5e748c68a0060bfd111ca2aa9832373117ec1cf0","unresolved":true,"context_lines":[{"line_number":752,"context_line":"\treturn retval;"},{"line_number":753,"context_line":"}"},{"line_number":754,"context_line":""},{"line_number":755,"context_line":"/** Select the AP register bank matching bits 7:4 of reg. */"},{"line_number":756,"context_line":"static int jtag_ap_q_bankselect(struct adiv5_ap *ap, unsigned reg)"},{"line_number":757,"context_line":"{"},{"line_number":758,"context_line":"\tint retval;"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"035d5bd6_744fe74c","line":755,"updated":"2023-09-10 15:04:54.000000000","message":"this comment is valid for ADIv5 only.\nFor ADIv6 it should be \"bits 11:4 of reg\"","commit_id":"3f86181f747ca33350b74953c26825d635965ebf"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"c30a3458ba927f0735fd1cf20e38cc674d52e36f","unresolved":false,"context_lines":[{"line_number":752,"context_line":"\treturn retval;"},{"line_number":753,"context_line":"}"},{"line_number":754,"context_line":""},{"line_number":755,"context_line":"/** Select the AP register bank matching bits 7:4 of reg. */"},{"line_number":756,"context_line":"static int jtag_ap_q_bankselect(struct adiv5_ap *ap, unsigned reg)"},{"line_number":757,"context_line":"{"},{"line_number":758,"context_line":"\tint retval;"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"d5ff22e7_87b654f2","line":755,"in_reply_to":"035d5bd6_744fe74c","updated":"2023-09-11 13:56:57.000000000","message":"Done","commit_id":"3f86181f747ca33350b74953c26825d635965ebf"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"5e748c68a0060bfd111ca2aa9832373117ec1cf0","unresolved":true,"context_lines":[{"line_number":779,"context_line":"\t}"},{"line_number":780,"context_line":""},{"line_number":781,"context_line":"\tif (set_select) {"},{"line_number":782,"context_line":"\t\tLOG_DEBUG_IO(\"AP BANKSEL: %\" PRIx64, sel);"},{"line_number":783,"context_line":""},{"line_number":784,"context_line":"\t\tretval \u003d jtag_dp_q_write(dap, DP_SELECT, (uint32_t)sel);"},{"line_number":785,"context_line":"\t\tif (retval !\u003d ERROR_OK) {"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"604f2b23_c1020f97","line":782,"updated":"2023-09-10 15:04:54.000000000","message":"and this LOG_ should be outside of this test, under a separate:\nif (set_select || set_select1)","commit_id":"3f86181f747ca33350b74953c26825d635965ebf"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"c30a3458ba927f0735fd1cf20e38cc674d52e36f","unresolved":false,"context_lines":[{"line_number":779,"context_line":"\t}"},{"line_number":780,"context_line":""},{"line_number":781,"context_line":"\tif (set_select) {"},{"line_number":782,"context_line":"\t\tLOG_DEBUG_IO(\"AP BANKSEL: %\" PRIx64, sel);"},{"line_number":783,"context_line":""},{"line_number":784,"context_line":"\t\tretval \u003d jtag_dp_q_write(dap, DP_SELECT, (uint32_t)sel);"},{"line_number":785,"context_line":"\t\tif (retval !\u003d ERROR_OK) {"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"7288b867_e9dd8d93","line":782,"in_reply_to":"604f2b23_c1020f97","updated":"2023-09-11 13:56:57.000000000","message":"Added separate LOG_DEBUG_IO for both SELECT and SELECT1 writes to keep track of implementation efficiency.","commit_id":"3f86181f747ca33350b74953c26825d635965ebf"}],"src/target/adi_v5_swd.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"47af21c7c34401cddf3e1f98ab2c8609efd30f43","unresolved":true,"context_lines":[{"line_number":102,"context_line":"/** Select the DP register bank matching bits 7:4 of reg. */"},{"line_number":103,"context_line":"static int swd_queue_dp_bankselect(struct adiv5_dap *dap, unsigned int reg)"},{"line_number":104,"context_line":"{"},{"line_number":105,"context_line":"\t/* Only register address 0 (ADIv6 olny) and 4 are banked. */"},{"line_number":106,"context_line":"\tif ((reg \u0026 0xf) \u003e 4)"},{"line_number":107,"context_line":"\t\treturn ERROR_OK;"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"119ce49a_19d58741","line":105,"updated":"2023-04-06 22:11:12.000000000","message":"typo s/olny/only/","commit_id":"90c146f6bf3eeb543632ce1cad6fac7d75397355"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"25cc27f1e2c0cc7f2f934ccbdb60a6c1b82ba956","unresolved":true,"context_lines":[{"line_number":102,"context_line":"/** Select the DP register bank matching bits 7:4 of reg. */"},{"line_number":103,"context_line":"static int swd_queue_dp_bankselect(struct adiv5_dap *dap, unsigned int reg)"},{"line_number":104,"context_line":"{"},{"line_number":105,"context_line":"\t/* Only register address 0 (ADIv6 olny) and 4 are banked. */"},{"line_number":106,"context_line":"\tif ((reg \u0026 0xf) \u003e 4)"},{"line_number":107,"context_line":"\t\treturn ERROR_OK;"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"efe71604_cc218ec3","line":105,"in_reply_to":"119ce49a_19d58741","updated":"2023-09-17 15:10:08.000000000","message":"Typo still present.\nYou can try to fix it with the \"EDIT\" button on top-right of the page that show the delta on this file","commit_id":"90c146f6bf3eeb543632ce1cad6fac7d75397355"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"bb681fb6a34ebed183806ae6992ad7eb9dadf54a","unresolved":false,"context_lines":[{"line_number":102,"context_line":"/** Select the DP register bank matching bits 7:4 of reg. */"},{"line_number":103,"context_line":"static int swd_queue_dp_bankselect(struct adiv5_dap *dap, unsigned int reg)"},{"line_number":104,"context_line":"{"},{"line_number":105,"context_line":"\t/* Only register address 0 (ADIv6 olny) and 4 are banked. */"},{"line_number":106,"context_line":"\tif ((reg \u0026 0xf) \u003e 4)"},{"line_number":107,"context_line":"\t\treturn ERROR_OK;"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"822ea7eb_ad79f420","line":105,"in_reply_to":"efe71604_cc218ec3","updated":"2023-09-19 05:04:54.000000000","message":"Done","commit_id":"90c146f6bf3eeb543632ce1cad6fac7d75397355"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"47af21c7c34401cddf3e1f98ab2c8609efd30f43","unresolved":true,"context_lines":[{"line_number":114,"context_line":"\t\t\t\u0026\u0026 (sel \u003d\u003d (dap-\u003eselect \u0026 DP_SELECT_DPBANK)))"},{"line_number":115,"context_line":"\t\treturn ERROR_OK;"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"\tsel |\u003d (uint32_t)(dap-\u003eselect \u0026 SELECT_AP_MASK);"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"\tLOG_DEBUG_IO(\"DP BANKSEL: %\" PRIx32, sel);"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"da88271f_dfda0bb2","line":117,"updated":"2023-04-06 22:11:12.000000000","message":"only if dap-\u003eselect_valid","commit_id":"90c146f6bf3eeb543632ce1cad6fac7d75397355"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"5e748c68a0060bfd111ca2aa9832373117ec1cf0","unresolved":true,"context_lines":[{"line_number":114,"context_line":"\t\t\t\u0026\u0026 (sel \u003d\u003d (dap-\u003eselect \u0026 DP_SELECT_DPBANK)))"},{"line_number":115,"context_line":"\t\treturn ERROR_OK;"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"\tsel |\u003d (uint32_t)(dap-\u003eselect \u0026 SELECT_AP_MASK);"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"\tLOG_DEBUG_IO(\"DP BANKSEL: %\" PRIx32, sel);"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"ab630702_ac28c95b","line":117,"in_reply_to":"3a0d4c7f_e1fb738e","updated":"2023-09-10 15:04:54.000000000","message":"I did not checked all the possible cases and I don\u0027t think it really matters.\nHere we are going to write something in DP_SELECT because we want set DP_SELECT_DPBANK; we don\u0027t really care about the \u0027other bits\u0027.\nIf dap-\u003eselect_valid\u003d\u003dtrue we keep the old \u0027other bits\u0027, while if false we put some unknown value that is probably correct. Anyway it will work because next time we will check again the cached value of dap-\u003eselect.\n\nI only highlight that we are not respecting dap-\u003eselect*_valid, and next time someone review this code we will over and over this same question.\nAdding a comment? Or simply respect dap-\u003eselect_valid with?\nif (dap-\u003eselect_valid) sel |\u003d (uint32_t)(dap-\u003eselect \u0026 SELECT_AP_MASK);\n\nSame for all the other places where I suggest to test dap-\u003eselect*_valid","commit_id":"90c146f6bf3eeb543632ce1cad6fac7d75397355"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"c30a3458ba927f0735fd1cf20e38cc674d52e36f","unresolved":false,"context_lines":[{"line_number":114,"context_line":"\t\t\t\u0026\u0026 (sel \u003d\u003d (dap-\u003eselect \u0026 DP_SELECT_DPBANK)))"},{"line_number":115,"context_line":"\t\treturn ERROR_OK;"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"\tsel |\u003d (uint32_t)(dap-\u003eselect \u0026 SELECT_AP_MASK);"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"\tLOG_DEBUG_IO(\"DP BANKSEL: %\" PRIx32, sel);"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"1b8c0f97_c083501e","line":117,"in_reply_to":"ab630702_ac28c95b","updated":"2023-09-11 13:56:57.000000000","message":"Extensively commented without changing the code. HTH","commit_id":"90c146f6bf3eeb543632ce1cad6fac7d75397355"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"36c41ce2f5b1ab55182af5861b0e89194d48a0b1","unresolved":true,"context_lines":[{"line_number":114,"context_line":"\t\t\t\u0026\u0026 (sel \u003d\u003d (dap-\u003eselect \u0026 DP_SELECT_DPBANK)))"},{"line_number":115,"context_line":"\t\treturn ERROR_OK;"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"\tsel |\u003d (uint32_t)(dap-\u003eselect \u0026 SELECT_AP_MASK);"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"\tLOG_DEBUG_IO(\"DP BANKSEL: %\" PRIx32, sel);"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"3a0d4c7f_e1fb738e","line":117,"in_reply_to":"da88271f_dfda0bb2","updated":"2023-05-28 06:34:34.000000000","message":"We should keep in mind that select\\*_valid \u003d\u003d false means that the hardware DP SELECT\\* register is possibly unknown. On the other hand its local cache, dap-\u003eselect* is fairly well defined: zero after dap_init() and the last requested value in the case of marking select invalid after an error. Just now we don\u0027t know what AP is going to be requested, so we could speculate that the continuation after error recovery will use the same AP as we used lately. If the AP part is non-zero and the speculation succeeds, we save a DP SELECT write in following swd_queue_ap_bankselect(). Does it make sense?\n\nI implemented also the DPBANKSEL part handling in the similar way, i.e. the last used value is preferred over a forced re-init to zero on valid \u003d\u003d false. I admit I didn\u0027t analysed the possible impact: it seems me that DPBANKSEL gets always initialized before the AP part in real usage so there is no difference between using the last value and re-init on valid \u003d\u003d false because valid is always true when selecting the AP part. Do you agree?","commit_id":"90c146f6bf3eeb543632ce1cad6fac7d75397355"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"47af21c7c34401cddf3e1f98ab2c8609efd30f43","unresolved":true,"context_lines":[{"line_number":147,"context_line":"\tswd_finish_read(dap);"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"\tif (reg \u003d\u003d DP_SELECT) {"},{"line_number":150,"context_line":"\t\tdap-\u003eselect \u003d data | (dap-\u003eselect \u0026 (0xffffffffull \u003c\u003c 32));"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"\t\tswd-\u003ewrite_reg(swd_cmd(false, false, reg), data, 0);"},{"line_number":153,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"34d735ac_1a6b3fed","line":150,"updated":"2023-04-06 22:11:12.000000000","message":"or we guarantee that dap-\u003eselect(H/L)\u003d0 every time we put it invalid, or we should\n if (dap-\u003eselect1_valid)\n   dap-\u003eselect \u003d data | (dap-\u003eselect \u0026 (0xffffffffull \u003c\u003c 32));\n else\n   dap-\u003eselect \u003d data;","commit_id":"90c146f6bf3eeb543632ce1cad6fac7d75397355"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"5e748c68a0060bfd111ca2aa9832373117ec1cf0","unresolved":false,"context_lines":[{"line_number":147,"context_line":"\tswd_finish_read(dap);"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"\tif (reg \u003d\u003d DP_SELECT) {"},{"line_number":150,"context_line":"\t\tdap-\u003eselect \u003d data | (dap-\u003eselect \u0026 (0xffffffffull \u003c\u003c 32));"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"\t\tswd-\u003ewrite_reg(swd_cmd(false, false, reg), data, 0);"},{"line_number":153,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"a1bacb8f_ecf22e34","line":150,"in_reply_to":"34d735ac_1a6b3fed","updated":"2023-09-10 15:04:54.000000000","message":"this comment can be dropped. We simply update the L part, ignoring if H part is valid","commit_id":"90c146f6bf3eeb543632ce1cad6fac7d75397355"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"47af21c7c34401cddf3e1f98ab2c8609efd30f43","unresolved":true,"context_lines":[{"line_number":159,"context_line":"\t}"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"\tif (reg \u003d\u003d DP_SELECT1)"},{"line_number":162,"context_line":"\t\tdap-\u003eselect \u003d ((uint64_t)data \u003c\u003c 32) | (dap-\u003eselect \u0026 0xffffffffull);"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"\tretval \u003d swd_queue_dp_bankselect(dap, reg);"},{"line_number":165,"context_line":"\tif (retval \u003d\u003d ERROR_OK) {"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"db25c131_4f16c6aa","line":162,"updated":"2023-04-06 22:11:12.000000000","message":"similar here","commit_id":"90c146f6bf3eeb543632ce1cad6fac7d75397355"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"5e748c68a0060bfd111ca2aa9832373117ec1cf0","unresolved":false,"context_lines":[{"line_number":159,"context_line":"\t}"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"\tif (reg \u003d\u003d DP_SELECT1)"},{"line_number":162,"context_line":"\t\tdap-\u003eselect \u003d ((uint64_t)data \u003c\u003c 32) | (dap-\u003eselect \u0026 0xffffffffull);"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"\tretval \u003d swd_queue_dp_bankselect(dap, reg);"},{"line_number":165,"context_line":"\tif (retval \u003d\u003d ERROR_OK) {"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"676b3f37_26e94532","line":162,"in_reply_to":"db25c131_4f16c6aa","updated":"2023-09-10 15:04:54.000000000","message":"same here, ca be dropped","commit_id":"90c146f6bf3eeb543632ce1cad6fac7d75397355"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"47af21c7c34401cddf3e1f98ab2c8609efd30f43","unresolved":true,"context_lines":[{"line_number":519,"context_line":"\t\t/* Prepare DP bank for DP_SELECT1 now to save one write */"},{"line_number":520,"context_line":"\t\tsel |\u003d (DP_SELECT1 \u0026 0x000000f0) \u003e\u003e 4;"},{"line_number":521,"context_line":"\t} else {"},{"line_number":522,"context_line":"\t\tsel |\u003d dap-\u003eselect \u0026 DP_SELECT_DPBANK;"},{"line_number":523,"context_line":"\t}"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"\tif (set_select) {"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"ab0b3080_638427b8","line":522,"updated":"2023-04-06 22:11:12.000000000","message":"ditto","commit_id":"90c146f6bf3eeb543632ce1cad6fac7d75397355"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"25cc27f1e2c0cc7f2f934ccbdb60a6c1b82ba956","unresolved":false,"context_lines":[{"line_number":519,"context_line":"\t\t/* Prepare DP bank for DP_SELECT1 now to save one write */"},{"line_number":520,"context_line":"\t\tsel |\u003d (DP_SELECT1 \u0026 0x000000f0) \u003e\u003e 4;"},{"line_number":521,"context_line":"\t} else {"},{"line_number":522,"context_line":"\t\tsel |\u003d dap-\u003eselect \u0026 DP_SELECT_DPBANK;"},{"line_number":523,"context_line":"\t}"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"\tif (set_select) {"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"ef7583a2_d6c47d8e","line":522,"in_reply_to":"ab0b3080_638427b8","updated":"2023-09-17 15:10:08.000000000","message":"Ack","commit_id":"90c146f6bf3eeb543632ce1cad6fac7d75397355"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"5e748c68a0060bfd111ca2aa9832373117ec1cf0","unresolved":true,"context_lines":[{"line_number":496,"context_line":"\treturn swd_queue_dp_write_inner(dap, reg, data);"},{"line_number":497,"context_line":"}"},{"line_number":498,"context_line":""},{"line_number":499,"context_line":"/** Select the AP register bank matching bits 7:4 of reg. */"},{"line_number":500,"context_line":"static int swd_queue_ap_bankselect(struct adiv5_ap *ap, unsigned reg)"},{"line_number":501,"context_line":"{"},{"line_number":502,"context_line":"\tint retval;"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"6564f9bc_719e82fc","line":499,"updated":"2023-09-10 15:04:54.000000000","message":"ditto. 7:4 for ADIv5, 11:4 for ADIv6","commit_id":"3f86181f747ca33350b74953c26825d635965ebf"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"c30a3458ba927f0735fd1cf20e38cc674d52e36f","unresolved":false,"context_lines":[{"line_number":496,"context_line":"\treturn swd_queue_dp_write_inner(dap, reg, data);"},{"line_number":497,"context_line":"}"},{"line_number":498,"context_line":""},{"line_number":499,"context_line":"/** Select the AP register bank matching bits 7:4 of reg. */"},{"line_number":500,"context_line":"static int swd_queue_ap_bankselect(struct adiv5_ap *ap, unsigned reg)"},{"line_number":501,"context_line":"{"},{"line_number":502,"context_line":"\tint retval;"}],"source_content_type":"text/x-csrc","patch_set":4,"id":"a31a0657_9e016ce7","line":499,"in_reply_to":"6564f9bc_719e82fc","updated":"2023-09-11 13:56:57.000000000","message":"Done","commit_id":"3f86181f747ca33350b74953c26825d635965ebf"}]}
