)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000860,"name":"Stefan T","email":"stefan.tauner@gmx.at","username":"stefanct"},"change_message_id":"d6d789530188486d6ca07697b9059cd593c71b54","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"b4386e6e_7fd0ff91","updated":"2023-10-02 10:07:58.000000000","message":"Hi Brandon,\nI\u0027d like to know if you plan to continue on this one. I got an RT1024 eval board and would like to ditch the mcuxpresso IDE rather sooner than later ;)\nBut I haven\u0027t rebased or tested (or really read) the patch yet.\nKR","commit_id":"147a2466ce336c1a85203064c14dc7f2d25686fe"},{"author":{"_account_id":1000005,"name":"Andreas Fritiofson","email":"andreas.fritiofson@gmail.com","username":"Nattgris"},"change_message_id":"fa2adc060eb5eb4c9c6f14037474334541317c9d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"8d11251f_177887a9","updated":"2022-11-16 12:35:17.000000000","message":"Looks nice overall.\n\nRegarding the style issues, it would be best to just bite the bullet and do what the jenkins run of checkpatch says. If I\u0027m not mistaken Antonio has done a lot of naming changes to get rid of camel-case macros, maybe he can suggest a better naming, adding him to CC.","commit_id":"147a2466ce336c1a85203064c14dc7f2d25686fe"},{"author":{"_account_id":1002079,"name":"Brandon Martin","email":"martinbv@mothictech.com","username":"mothictech"},"change_message_id":"438b7675e35a453c94143531d868c262c4867e65","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"eb9e8bc6_c892554a","updated":"2022-11-14 21:24:13.000000000","message":"Regarding the style notes found:\n\nThe camelcase checks are for macros for registers where a register builder could apply to multiple registers with different names but the same form and are of the format REGnnXYZ.  If there\u0027s a better way to name them that avoids camelcase while not detracting from readability, I\u0027m all ears. Alternately, the code only actually uses one register of a given type, so the register builder could just use the non-generic name if folks would prefer.\n\nThe lines ending with open paren are used for function calls with long/lots of arguments and are not unique in the codebase, though a lot of code seems to avoid it.  That\u0027s an easy change if folks prefer.\n\nThe long line is from a comment and can obviously be remedied.\n\nI\u0027m not sure why checkpatch.sh didn\u0027t catch these.  Running checkpatch.pl on the files directly does appear to catch them.","commit_id":"147a2466ce336c1a85203064c14dc7f2d25686fe"},{"author":{"_account_id":1000860,"name":"Stefan T","email":"stefan.tauner@gmx.at","username":"stefanct"},"change_message_id":"b10bd344b8c48f330c1b822e096857befa5396c4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"dbf2e741_f9790bed","in_reply_to":"70372cdb_cee95d54","updated":"2023-10-22 19:58:59.000000000","message":"I know that situation way too well unfortunately :) I have no immediate need to get this to work or in. Maybe in a few months/next year, if at all. If nothing has happened then, I\u0027ll rebase, test and report back.","commit_id":"147a2466ce336c1a85203064c14dc7f2d25686fe"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"506bcf1820d717095f66e1411966a43a5455e8cf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"2ee265d3_c8b8a12f","in_reply_to":"7ab52b03_a58300d6","updated":"2024-06-24 11:56:34.000000000","message":"Done","commit_id":"147a2466ce336c1a85203064c14dc7f2d25686fe"},{"author":{"_account_id":1002079,"name":"Brandon Martin","email":"martinbv@mothictech.com","username":"mothictech"},"change_message_id":"3665eb7f78f54746402c3c2baad7e65a8d6dd1da","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"7ab52b03_a58300d6","in_reply_to":"8d11251f_177887a9","updated":"2022-11-16 19:53:29.000000000","message":"Yeah I had intended to just straight up change everything except perhaps the macro names.  I\u0027ll wait for Antonio\u0027s comments on those.  I usually try to avoid making stylistic changes for style\u0027s sake if it appears to detract from other more tangible concerns, but there are options here.\n\nIf we do want it change, I can maybe just change the macro names to match the registers then define macros for the other 3 registers (they always come in quads due to the nature of the controller) that just alias the first one.  That would avoid the need for camelcase without ending up with especially redundant definitions.","commit_id":"147a2466ce336c1a85203064c14dc7f2d25686fe"},{"author":{"_account_id":1002079,"name":"Brandon Martin","email":"martinbv@mothictech.com","username":"mothictech"},"change_message_id":"83339723d357ad35cdb793ff4895b7b845186287","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"70372cdb_cee95d54","in_reply_to":"b4386e6e_7fd0ff91","updated":"2023-10-07 03:07:50.000000000","message":"Yes, I do.  I had just been busy working on the projects for which this code was written.  As you can guess, when something like this gets written, there\u0027s an immediate need.\n\nI should have some time in the next week or so to get this rebased onto the current codebase and the formatting convention concerns resolved.  I think then it can be merged based on the above commentary.\n\nThe nice thing about this delay is that it\u0027s had a chance to be tested.  It does seem to work reasonably reliably.  There are some corner cases you can get the micro into where it won\u0027t work, but honestly they\u0027re rare enough I haven\u0027t been able to qualify what exactly they are and how to work out of them.  In at lease some cases, power cycling the target was required.  Unfortunately the iMXRT doesn\u0027t seem to have the best reset circuitry.","commit_id":"147a2466ce336c1a85203064c14dc7f2d25686fe"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"999ee847c646557779894c0a76387b1e47e2235e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"3acf51f9_1a3d7a49","updated":"2024-06-23 12:55:59.000000000","message":"I\u0027m unable to review the code in the flash subsystem.\nAnyway, this patch contains an incorrect change to libjaylink driver. I think it\u0027s due to some incorrect manipulation with git.\nAlso, the comment from Andreas about host endianness is relevant.","commit_id":"a2b741ff7874da244fec437436e09d113f55eab3"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"5638b7a86cf3a062555dad5de8209cdc0141ed2c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9f029fcd_c2cd829b","in_reply_to":"0122dbb4_97162b90","updated":"2025-05-18 02:20:27.000000000","message":"Done","commit_id":"a2b741ff7874da244fec437436e09d113f55eab3"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"506bcf1820d717095f66e1411966a43a5455e8cf","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"0122dbb4_97162b90","in_reply_to":"3acf51f9_1a3d7a49","updated":"2024-06-24 11:56:34.000000000","message":"Well that change to libjaylink was certainly unintended.  I suspect it\u0027s a botched rebase from when this was resubmitted with changes and rebased onto what was then the current HEAD of openocd master.  I\u0027ll fix this.","commit_id":"a2b741ff7874da244fec437436e09d113f55eab3"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"5638b7a86cf3a062555dad5de8209cdc0141ed2c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"d1e00221_f3da6b0d","updated":"2025-05-18 02:20:27.000000000","message":"I believe all outstanding issues are now addressed.","commit_id":"c8034091773f4c14cebdcfebaeda14fed48cc27c"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"416514ae410bad52efe1a255ebe5704b079de39a","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":5,"id":"144994f7_ac69c289","updated":"2025-05-24 06:12:56.000000000","message":"Please describe the flash driver in `doc/openocd.texi`, chapter `12.5.1 External Flash`","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"5c5a22bea266a9c43f07a88137ebe44f1fa1e6ef","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":5,"id":"8f5df29f_c62670bf","in_reply_to":"144994f7_ac69c289","updated":"2025-05-24 06:40:04.000000000","message":"Ack","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"2166cc993feafd258f9ae01f6ff1b6c26de4fa16","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"5657f625_83678d4f","in_reply_to":"8f5df29f_c62670bf","updated":"2025-05-25 04:07:34.000000000","message":"Done","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"1fdf5137654fe39eb25efd15d18f6927ab8ae1de","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"21750fff_b889b7f2","updated":"2025-05-25 08:25:23.000000000","message":"@Andreas Bolsch,\ncould you please give us detail about fake OK return if probed QSPI flash id is not found? See https://review.openocd.org/c/openocd/+/7348/comment/e404f957_52e7c8e2/\nThanks","commit_id":"a6c021e68c9908031ccc235281f22b30c61e3883"}],"src/flash/nor/fsl_flexspi.c":[{"author":{"_account_id":1000005,"name":"Andreas Fritiofson","email":"andreas.fritiofson@gmail.com","username":"Nattgris"},"change_message_id":"fa2adc060eb5eb4c9c6f14037474334541317c9d","unresolved":true,"context_lines":[{"line_number":277,"context_line":"\t\tif (ret !\u003d ERROR_OK)"},{"line_number":278,"context_line":"\t\t\tgoto err;"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"\t\tmemcpy(buf + i, \u0026val, 4);"},{"line_number":281,"context_line":"\t}"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"\tif (i \u003c datalen) {"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"5497794f_9c47ed01","line":280,"updated":"2022-11-16 12:35:17.000000000","message":"This will give different results depending on the *host\u0027s* byte-order, which is most likely not what you want.\n\nIf you need a specific byte-order of 32-bit words in buf, there are buffer-handling helpers in types.h, however I suppose you actually want to treat the data in the fifo as a stream of bytes without interpreting them as 32-bit units and in that case, target_read_memory() with access size 4 directly to buf would be better than target_read_u32().\n\nSame in the other direction, of course.","commit_id":"147a2466ce336c1a85203064c14dc7f2d25686fe"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"5638b7a86cf3a062555dad5de8209cdc0141ed2c","unresolved":false,"context_lines":[{"line_number":277,"context_line":"\t\tif (ret !\u003d ERROR_OK)"},{"line_number":278,"context_line":"\t\t\tgoto err;"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"\t\tmemcpy(buf + i, \u0026val, 4);"},{"line_number":281,"context_line":"\t}"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"\tif (i \u003c datalen) {"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"a90d21c8_21c73e49","line":280,"in_reply_to":"1881f8d3_58a5fa10","updated":"2025-05-18 02:20:27.000000000","message":"Done","commit_id":"147a2466ce336c1a85203064c14dc7f2d25686fe"},{"author":{"_account_id":1000005,"name":"Andreas Fritiofson","email":"andreas.fritiofson@gmail.com","username":"Nattgris"},"change_message_id":"0d75477e5ad13679883a7be8f8602a7ef64a733a","unresolved":true,"context_lines":[{"line_number":277,"context_line":"\t\tif (ret !\u003d ERROR_OK)"},{"line_number":278,"context_line":"\t\t\tgoto err;"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"\t\tmemcpy(buf + i, \u0026val, 4);"},{"line_number":281,"context_line":"\t}"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"\tif (i \u003c datalen) {"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"1881f8d3_58a5fa10","line":280,"in_reply_to":"1d506274_2c42fc89","updated":"2024-12-21 13:06:41.000000000","message":"That\u0027s the thing with the coding rules re byte order. If you follow them, i.e. avoid any operation that depend on host byte order, there\u0027s no *need* to test on all different host platforms, it\u0027ll automatically just work, guaranteed by the C language standard.","commit_id":"147a2466ce336c1a85203064c14dc7f2d25686fe"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"506bcf1820d717095f66e1411966a43a5455e8cf","unresolved":true,"context_lines":[{"line_number":277,"context_line":"\t\tif (ret !\u003d ERROR_OK)"},{"line_number":278,"context_line":"\t\t\tgoto err;"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"\t\tmemcpy(buf + i, \u0026val, 4);"},{"line_number":281,"context_line":"\t}"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"\tif (i \u003c datalen) {"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"1d506274_2c42fc89","line":280,"in_reply_to":"35557fbc_1f614ca1","updated":"2024-06-24 11:56:34.000000000","message":"Fair enough.  I\u0027ll fix all the stuff that\u0027s apparent, but I don\u0027t have a big-endian box to test on, so I can\u0027t test it.  Maybe someone at NXP/Freescale still has an old Power or 68k workstation they can try it out on.","commit_id":"147a2466ce336c1a85203064c14dc7f2d25686fe"},{"author":{"_account_id":1002079,"name":"Brandon Martin","email":"martinbv@mothictech.com","username":"mothictech"},"change_message_id":"3665eb7f78f54746402c3c2baad7e65a8d6dd1da","unresolved":true,"context_lines":[{"line_number":277,"context_line":"\t\tif (ret !\u003d ERROR_OK)"},{"line_number":278,"context_line":"\t\t\tgoto err;"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"\t\tmemcpy(buf + i, \u0026val, 4);"},{"line_number":281,"context_line":"\t}"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"\tif (i \u003c datalen) {"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"ad7ecb2e_ce663c85","line":280,"in_reply_to":"5497794f_9c47ed01","updated":"2022-11-16 19:53:29.000000000","message":"It was known when this was written that the host byte order had to match the target.  Unless someone\u0027s doing ARM dev on a MIPS or PPC system (or the rare-to-nonexistent big-endian ARM or RISC-V system, I guess), it would be a non-issue.  At minimum, a warning is perhaps appropriate.\n\nThe existing OpenOCD drivers I used as reference has similar issues, so I didn\u0027t consider it to be a fatal flaw.  There are other situations this driver doesn\u0027t handle as the controller is indeed \"flexible\" (go figure).  I\u0027d say the driver handles about 90% of actual real-world use cases including the EVK but maybe 10% of physically possible use cases.\n\nIs that considered a problem in need of correction before the code can be merged, or is it OK for now given that it doesn\u0027t appear to be a deficiency unique to this driver?","commit_id":"147a2466ce336c1a85203064c14dc7f2d25686fe"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"999ee847c646557779894c0a76387b1e47e2235e","unresolved":true,"context_lines":[{"line_number":277,"context_line":"\t\tif (ret !\u003d ERROR_OK)"},{"line_number":278,"context_line":"\t\t\tgoto err;"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"\t\tmemcpy(buf + i, \u0026val, 4);"},{"line_number":281,"context_line":"\t}"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"\tif (i \u003c datalen) {"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"35557fbc_1f614ca1","line":280,"in_reply_to":"ad7ecb2e_ce663c85","updated":"2024-06-23 12:55:59.000000000","message":"The OpenOCD coding style requires to take care of host endianness.\nYes, there is some old code that does not comply, but for new code it should be a must!","commit_id":"147a2466ce336c1a85203064c14dc7f2d25686fe"},{"author":{"_account_id":1000005,"name":"Andreas Fritiofson","email":"andreas.fritiofson@gmail.com","username":"Nattgris"},"change_message_id":"fa2adc060eb5eb4c9c6f14037474334541317c9d","unresolved":true,"context_lines":[{"line_number":844,"context_line":"\tunsigned int sector;"},{"line_number":845,"context_line":"\tint ret;"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":"\tLOG_DEBUG(\"%s: from sector %u to sector %u\", __func__, first, last);"},{"line_number":848,"context_line":""},{"line_number":849,"context_line":"\tif (target-\u003estate !\u003d TARGET_HALTED) {"},{"line_number":850,"context_line":"\t\tLOG_ERROR(\"Target not halted\");"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"1789a8b0_c8794136","line":847,"range":{"start_line":847,"start_character":46,"end_line":847,"end_character":54},"updated":"2022-11-16 12:35:17.000000000","message":"Debug output already includes function name and other context so this is redundant. There are other instances of the same thing in the file, won\u0027t comment each separately.","commit_id":"147a2466ce336c1a85203064c14dc7f2d25686fe"},{"author":{"_account_id":1002079,"name":"Brandon Martin","email":"martinbv@mothictech.com","username":"mothictech"},"change_message_id":"3665eb7f78f54746402c3c2baad7e65a8d6dd1da","unresolved":false,"context_lines":[{"line_number":844,"context_line":"\tunsigned int sector;"},{"line_number":845,"context_line":"\tint ret;"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":"\tLOG_DEBUG(\"%s: from sector %u to sector %u\", __func__, first, last);"},{"line_number":848,"context_line":""},{"line_number":849,"context_line":"\tif (target-\u003estate !\u003d TARGET_HALTED) {"},{"line_number":850,"context_line":"\t\tLOG_ERROR(\"Target not halted\");"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"b62d1e69_28845172","line":847,"range":{"start_line":847,"start_character":46,"end_line":847,"end_character":54},"in_reply_to":"1789a8b0_c8794136","updated":"2022-11-16 19:53:29.000000000","message":"Makes sense.  I suspect this was a copypasta from something I cribbed from.  Will change.","commit_id":"147a2466ce336c1a85203064c14dc7f2d25686fe"},{"author":{"_account_id":1000005,"name":"Andreas Fritiofson","email":"andreas.fritiofson@gmail.com","username":"Nattgris"},"change_message_id":"fa2adc060eb5eb4c9c6f14037474334541317c9d","unresolved":true,"context_lines":[{"line_number":1038,"context_line":"\t/* Match with OpenOCD\u0027s list of known SPI flash memories */"},{"line_number":1039,"context_line":"\tfor (const struct flash_device *p \u003d flash_devices; id \u0026\u0026 p-\u003ename ; p++) {"},{"line_number":1040,"context_line":"\t\tif (p-\u003edevice_id \u003d\u003d id) {"},{"line_number":1041,"context_line":"\t\t\tmemcpy(\u0026flexspi_info-\u003edev, p, sizeof(flexspi_info-\u003edev));"},{"line_number":1042,"context_line":"\t\t\tif (p-\u003esize_in_bytes / 4096)"},{"line_number":1043,"context_line":"\t\t\t\tLOG_INFO(\"flash A1 \\\u0027%s\\\u0027 id \u003d 0x%06\" PRIx32 \" size \u003d %\" PRIu32"},{"line_number":1044,"context_line":"\t\t\t\t\t\" KiB\", p-\u003ename, id, p-\u003esize_in_bytes / 1024);"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"b1a496a1_4bb2d27c","line":1041,"updated":"2022-11-16 12:35:17.000000000","message":"Would be better with struct assignment for type safety.","commit_id":"147a2466ce336c1a85203064c14dc7f2d25686fe"},{"author":{"_account_id":1002079,"name":"Brandon Martin","email":"martinbv@mothictech.com","username":"mothictech"},"change_message_id":"3665eb7f78f54746402c3c2baad7e65a8d6dd1da","unresolved":false,"context_lines":[{"line_number":1038,"context_line":"\t/* Match with OpenOCD\u0027s list of known SPI flash memories */"},{"line_number":1039,"context_line":"\tfor (const struct flash_device *p \u003d flash_devices; id \u0026\u0026 p-\u003ename ; p++) {"},{"line_number":1040,"context_line":"\t\tif (p-\u003edevice_id \u003d\u003d id) {"},{"line_number":1041,"context_line":"\t\t\tmemcpy(\u0026flexspi_info-\u003edev, p, sizeof(flexspi_info-\u003edev));"},{"line_number":1042,"context_line":"\t\t\tif (p-\u003esize_in_bytes / 4096)"},{"line_number":1043,"context_line":"\t\t\t\tLOG_INFO(\"flash A1 \\\u0027%s\\\u0027 id \u003d 0x%06\" PRIx32 \" size \u003d %\" PRIu32"},{"line_number":1044,"context_line":"\t\t\t\t\t\" KiB\", p-\u003ename, id, p-\u003esize_in_bytes / 1024);"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"61420823_cd6fc03b","line":1041,"in_reply_to":"b1a496a1_4bb2d27c","updated":"2022-11-16 19:53:29.000000000","message":"Agreed.  Again probably matches what I cribbed from (likely stmqspi).  Will change.","commit_id":"147a2466ce336c1a85203064c14dc7f2d25686fe"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"999ee847c646557779894c0a76387b1e47e2235e","unresolved":true,"context_lines":[{"line_number":7,"context_line":" ***************************************************************************/"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"/*"},{"line_number":10,"context_line":" * Based on the U-Boot fsl-qspi driver (C) 2013-2020 Freescale/NXP and others"},{"line_number":11,"context_line":" * and stmqspi OpenOCD driver (C) 2016-2019 Andreas Bolsch / (C) 2010 Antonio"},{"line_number":12,"context_line":" * Borneo"},{"line_number":13,"context_line":" */"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"67a55df5_1ac8f312","line":10,"updated":"2024-06-23 12:55:59.000000000","message":"After reading this reference to U-Boot drive, I went straight to check for its license.\nPlease confirm it is the U-Boot driver drivers/spi/nxp_fspi.c\nIt has SPDX-License-Identifier: GPL-2.0+, so it\u0027s ok for OpenOD.","commit_id":"a2b741ff7874da244fec437436e09d113f55eab3"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"506bcf1820d717095f66e1411966a43a5455e8cf","unresolved":false,"context_lines":[{"line_number":7,"context_line":" ***************************************************************************/"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"/*"},{"line_number":10,"context_line":" * Based on the U-Boot fsl-qspi driver (C) 2013-2020 Freescale/NXP and others"},{"line_number":11,"context_line":" * and stmqspi OpenOCD driver (C) 2016-2019 Andreas Bolsch / (C) 2010 Antonio"},{"line_number":12,"context_line":" * Borneo"},{"line_number":13,"context_line":" */"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"f9cd265c_d985565e","line":10,"in_reply_to":"67a55df5_1ac8f312","updated":"2024-06-24 11:56:34.000000000","message":"It is indeed this driver, and AFAIK GPL-2.0+ is compatible with OpenOCD.  That\u0027s also why this file in the patch bears that same license (with the [I think] more modern \"GPL-2.0-or-later\").  I would be willing to place my contributions under a more permissive license, but there\u0027s too much influence from the GPL code in this driver for that.","commit_id":"a2b741ff7874da244fec437436e09d113f55eab3"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"416514ae410bad52efe1a255ebe5704b079de39a","unresolved":true,"context_lines":[{"line_number":289,"context_line":"\tif (ret !\u003d ERROR_OK)"},{"line_number":290,"context_line":"\t\tgoto err;"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"\tnbytes \u003d ALIGN_DOWN(datalen, 4);"},{"line_number":293,"context_line":"\tret \u003d target_read_memory(target, rx_fifo, 4, nbytes / 4, buf);"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"\tif (nbytes \u003c datalen) {"},{"line_number":296,"context_line":"\t\tret \u003d target_read_memory(target, rx_fifo + nbytes, 4, 1, bytes);"},{"line_number":297,"context_line":"\t\tmemcpy(buf + nbytes, bytes, datalen - nbytes);"},{"line_number":298,"context_line":"\t\tif (ret !\u003d ERROR_OK)"},{"line_number":299,"context_line":"\t\t\tgoto err;"},{"line_number":300,"context_line":"\t}"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"\tret \u003d target_write_u32(target, io_base + REG_INTR, INTR_IPRXWA);"},{"line_number":303,"context_line":"\tif (ret !\u003d ERROR_OK)"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"c5907a90_616653a8","line":300,"range":{"start_line":292,"start_character":1,"end_line":300,"end_character":2},"updated":"2025-05-24 06:12:56.000000000","message":"If the FIFO implements also 16-bit read, the marked block could be replaced by `target_read_buffer()`.\n\nIf not, act on err returned from the first `target_read_memory()`","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"2166cc993feafd258f9ae01f6ff1b6c26de4fa16","unresolved":false,"context_lines":[{"line_number":289,"context_line":"\tif (ret !\u003d ERROR_OK)"},{"line_number":290,"context_line":"\t\tgoto err;"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"\tnbytes \u003d ALIGN_DOWN(datalen, 4);"},{"line_number":293,"context_line":"\tret \u003d target_read_memory(target, rx_fifo, 4, nbytes / 4, buf);"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"\tif (nbytes \u003c datalen) {"},{"line_number":296,"context_line":"\t\tret \u003d target_read_memory(target, rx_fifo + nbytes, 4, 1, bytes);"},{"line_number":297,"context_line":"\t\tmemcpy(buf + nbytes, bytes, datalen - nbytes);"},{"line_number":298,"context_line":"\t\tif (ret !\u003d ERROR_OK)"},{"line_number":299,"context_line":"\t\t\tgoto err;"},{"line_number":300,"context_line":"\t}"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"\tret \u003d target_write_u32(target, io_base + REG_INTR, INTR_IPRXWA);"},{"line_number":303,"context_line":"\tif (ret !\u003d ERROR_OK)"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"fbd7fcd4_6a3134c6","line":300,"range":{"start_line":292,"start_character":1,"end_line":300,"end_character":2},"in_reply_to":"631ce5bc_d3613dcb","updated":"2025-05-25 04:07:34.000000000","message":"Done","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"5c5a22bea266a9c43f07a88137ebe44f1fa1e6ef","unresolved":true,"context_lines":[{"line_number":289,"context_line":"\tif (ret !\u003d ERROR_OK)"},{"line_number":290,"context_line":"\t\tgoto err;"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"\tnbytes \u003d ALIGN_DOWN(datalen, 4);"},{"line_number":293,"context_line":"\tret \u003d target_read_memory(target, rx_fifo, 4, nbytes / 4, buf);"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"\tif (nbytes \u003c datalen) {"},{"line_number":296,"context_line":"\t\tret \u003d target_read_memory(target, rx_fifo + nbytes, 4, 1, bytes);"},{"line_number":297,"context_line":"\t\tmemcpy(buf + nbytes, bytes, datalen - nbytes);"},{"line_number":298,"context_line":"\t\tif (ret !\u003d ERROR_OK)"},{"line_number":299,"context_line":"\t\t\tgoto err;"},{"line_number":300,"context_line":"\t}"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"\tret \u003d target_write_u32(target, io_base + REG_INTR, INTR_IPRXWA);"},{"line_number":303,"context_line":"\tif (ret !\u003d ERROR_OK)"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"631ce5bc_d3613dcb","line":300,"range":{"start_line":292,"start_character":1,"end_line":300,"end_character":2},"in_reply_to":"c5907a90_616653a8","updated":"2025-05-24 06:40:04.000000000","message":"It does not reliably implement smaller than 32-bit access.\n\nActing on error here similarly to how fill_txfifo works was intended.  Good catch.","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"416514ae410bad52efe1a255ebe5704b079de39a","unresolved":true,"context_lines":[{"line_number":327,"context_line":"\tif (ret !\u003d ERROR_OK)"},{"line_number":328,"context_line":"\t\tgoto err;"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"\tnbytes \u003d ALIGN_DOWN(datalen, 4);"},{"line_number":331,"context_line":"\tret \u003d target_write_memory(target, tx_fifo, 4, nbytes / 4, buf);"},{"line_number":332,"context_line":"\tif (ret !\u003d ERROR_OK)"},{"line_number":333,"context_line":"\t\tgoto err;"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"\tif (nbytes \u003c datalen) {"},{"line_number":336,"context_line":"\t\tmemcpy(\u0026bytes, buf + nbytes, datalen - nbytes);"},{"line_number":337,"context_line":"\t\tret \u003d target_write_memory(target, tx_fifo + nbytes, 4, 1, bytes);"},{"line_number":338,"context_line":"\t\tif (ret !\u003d ERROR_OK)"},{"line_number":339,"context_line":"\t\t\tgoto err;"},{"line_number":340,"context_line":"\t}"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"\tret \u003d target_write_u32(target, io_base + REG_INTR, INTR_IPTXWE);"},{"line_number":343,"context_line":"\tif (ret !\u003d ERROR_OK)"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"fa4854cc_9ca4df07","line":340,"range":{"start_line":330,"start_character":1,"end_line":340,"end_character":2},"updated":"2025-05-24 06:12:56.000000000","message":"Similarly as above `target_read_buffer()` could do it.","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"5c5a22bea266a9c43f07a88137ebe44f1fa1e6ef","unresolved":false,"context_lines":[{"line_number":327,"context_line":"\tif (ret !\u003d ERROR_OK)"},{"line_number":328,"context_line":"\t\tgoto err;"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"\tnbytes \u003d ALIGN_DOWN(datalen, 4);"},{"line_number":331,"context_line":"\tret \u003d target_write_memory(target, tx_fifo, 4, nbytes / 4, buf);"},{"line_number":332,"context_line":"\tif (ret !\u003d ERROR_OK)"},{"line_number":333,"context_line":"\t\tgoto err;"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"\tif (nbytes \u003c datalen) {"},{"line_number":336,"context_line":"\t\tmemcpy(\u0026bytes, buf + nbytes, datalen - nbytes);"},{"line_number":337,"context_line":"\t\tret \u003d target_write_memory(target, tx_fifo + nbytes, 4, 1, bytes);"},{"line_number":338,"context_line":"\t\tif (ret !\u003d ERROR_OK)"},{"line_number":339,"context_line":"\t\t\tgoto err;"},{"line_number":340,"context_line":"\t}"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"\tret \u003d target_write_u32(target, io_base + REG_INTR, INTR_IPTXWE);"},{"line_number":343,"context_line":"\tif (ret !\u003d ERROR_OK)"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"b37b0d40_7a3cc2be","line":340,"range":{"start_line":330,"start_character":1,"end_line":340,"end_character":2},"in_reply_to":"fa4854cc_9ca4df07","updated":"2025-05-24 06:40:04.000000000","message":"See above","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"416514ae410bad52efe1a255ebe5704b079de39a","unresolved":true,"context_lines":[{"line_number":386,"context_line":""},{"line_number":387,"context_line":"\treturn ERROR_OK;"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"err:"},{"line_number":390,"context_line":"\treturn ret;"},{"line_number":391,"context_line":"}"},{"line_number":392,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":5,"id":"b116daca_a600505e","line":389,"updated":"2025-05-24 06:12:56.000000000","message":"Lock in case of err?","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"5c5a22bea266a9c43f07a88137ebe44f1fa1e6ef","unresolved":true,"context_lines":[{"line_number":386,"context_line":""},{"line_number":387,"context_line":"\treturn ERROR_OK;"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"err:"},{"line_number":390,"context_line":"\treturn ret;"},{"line_number":391,"context_line":"}"},{"line_number":392,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":5,"id":"de97e1f2_a2b8b0a7","line":389,"in_reply_to":"b116daca_a600505e","updated":"2025-05-24 06:40:04.000000000","message":"As in re-lock the LUT memory?  That\u0027s reasonable.  The silicon doesn\u0027t actually care, but the intent is generally to leave it in the locked state since that\u0027s how some of Freescale/NXP\u0027s BSP code expects it (or at least leaves it on its own).","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"2166cc993feafd258f9ae01f6ff1b6c26de4fa16","unresolved":false,"context_lines":[{"line_number":386,"context_line":""},{"line_number":387,"context_line":"\treturn ERROR_OK;"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"err:"},{"line_number":390,"context_line":"\treturn ret;"},{"line_number":391,"context_line":"}"},{"line_number":392,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":5,"id":"17de5bf9_09b909b4","line":389,"in_reply_to":"de97e1f2_a2b8b0a7","updated":"2025-05-25 04:07:34.000000000","message":"Done","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"416514ae410bad52efe1a255ebe5704b079de39a","unresolved":true,"context_lines":[{"line_number":404,"context_line":"\tLOG_DEBUG(\"with opcode 0x%02x\", opcode);"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"\t/* Prepare sequence LUT */"},{"line_number":407,"context_line":"\tlutval[lutidx / 2] |\u003d LUT_DEF(lutidx, OPCODE_CMD, lut_pad(1), opcode);"},{"line_number":408,"context_line":"\tlutidx++;"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"\tif (datalen \u003e 0) {"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"c921135d_c5e50d29","line":407,"range":{"start_line":407,"start_character":8,"end_line":407,"end_character":18},"updated":"2025-05-24 06:12:56.000000000","message":"LUT code is unnecessary complicated by using 32-bit array for 16-bit LUT table items. Using proper uint16_t type for LUTs and conversion in `write_lut_memory()` would simplify the code.\n\nWith 16-bit you might be able to directly define some fixed sequences at array init:\n```\nuint16_t lutval[8] \u003d {\n   LUT_DEF(OPCODE_CMD, lut_pad(1), flexspi_info-\u003edev.erase_cmd),\n   LUT_DEF(OPCODE_RADDR, lut_pad(1), naddrbytes * 8),\n   LUT_DEF(OPCODE_STOP, 0, 0),\n};\n```","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"1462314aef8d1767ae8ef7c62a13e8f3332d51d1","unresolved":false,"context_lines":[{"line_number":404,"context_line":"\tLOG_DEBUG(\"with opcode 0x%02x\", opcode);"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"\t/* Prepare sequence LUT */"},{"line_number":407,"context_line":"\tlutval[lutidx / 2] |\u003d LUT_DEF(lutidx, OPCODE_CMD, lut_pad(1), opcode);"},{"line_number":408,"context_line":"\tlutidx++;"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"\tif (datalen \u003e 0) {"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"7f10ac5d_ba7e9281","line":407,"range":{"start_line":407,"start_character":8,"end_line":407,"end_character":18},"in_reply_to":"488b987b_9a2f9ade","updated":"2025-05-24 07:34:00.000000000","message":"Ok.\n\nBTW I think the endianness of LUT array could be easily converted by `target_buffer_set_u16_array()` and then written by `target_write_memory()` to ensure 32-bit access.","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"80de73f271775b3c1ce34d11047e06970508d3b9","unresolved":false,"context_lines":[{"line_number":404,"context_line":"\tLOG_DEBUG(\"with opcode 0x%02x\", opcode);"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"\t/* Prepare sequence LUT */"},{"line_number":407,"context_line":"\tlutval[lutidx / 2] |\u003d LUT_DEF(lutidx, OPCODE_CMD, lut_pad(1), opcode);"},{"line_number":408,"context_line":"\tlutidx++;"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"\tif (datalen \u003e 0) {"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"675ce7af_874fedb0","line":407,"range":{"start_line":407,"start_character":8,"end_line":407,"end_character":18},"in_reply_to":"7f10ac5d_ba7e9281","updated":"2025-05-24 07:49:41.000000000","message":"Agreed.  I\u0027ll still go ahead and keep it as is if everybody\u0027s OK with it in the interest of keeping the code similar to what appears to be every other F/OSS driver for this controller which includes at least the Linux kernel, U-Boot, and apparently FreeBSD.","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"5c5a22bea266a9c43f07a88137ebe44f1fa1e6ef","unresolved":true,"context_lines":[{"line_number":404,"context_line":"\tLOG_DEBUG(\"with opcode 0x%02x\", opcode);"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"\t/* Prepare sequence LUT */"},{"line_number":407,"context_line":"\tlutval[lutidx / 2] |\u003d LUT_DEF(lutidx, OPCODE_CMD, lut_pad(1), opcode);"},{"line_number":408,"context_line":"\tlutidx++;"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"\tif (datalen \u003e 0) {"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"488b987b_9a2f9ade","line":407,"range":{"start_line":407,"start_character":8,"end_line":407,"end_character":18},"in_reply_to":"c921135d_c5e50d29","updated":"2025-05-24 06:40:04.000000000","message":"I agree.  In fact, my that I use in my device code does just this.\n\nThe reason it\u0027s defined this way is two-fold:\n* Freescale\u0027s BSP code does this.  The LUT_DEF macro comes from them.\n* Defining it the way you propose introduces a weird endianness issue.  If the host is big-endian, you now need to byte swap 16-bit words within the array (but NOT 32-bit words).\n\nI would propose leaving this as-is despite the ugliness.","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"416514ae410bad52efe1a255ebe5704b079de39a","unresolved":true,"context_lines":[{"line_number":490,"context_line":"{"},{"line_number":491,"context_line":"\tint ret;"},{"line_number":492,"context_line":""},{"line_number":493,"context_line":"\tLOG_DEBUG(\"reached\");"},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"\t*id \u003d 0;"},{"line_number":496,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":5,"id":"99a91106_7ee4c59c","line":493,"range":{"start_line":493,"start_character":12,"end_line":493,"end_character":19},"updated":"2025-05-24 06:12:56.000000000","message":"No problem if empty string is used to log the function name","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"5c5a22bea266a9c43f07a88137ebe44f1fa1e6ef","unresolved":true,"context_lines":[{"line_number":490,"context_line":"{"},{"line_number":491,"context_line":"\tint ret;"},{"line_number":492,"context_line":""},{"line_number":493,"context_line":"\tLOG_DEBUG(\"reached\");"},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"\t*id \u003d 0;"},{"line_number":496,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":5,"id":"d591b237_b6c9620a","line":493,"range":{"start_line":493,"start_character":12,"end_line":493,"end_character":19},"in_reply_to":"99a91106_7ee4c59c","updated":"2025-05-24 06:40:04.000000000","message":"You\u0027d prefer just LOG_DEBUG(\"\")?  That\u0027s reasonable, though I don\u0027t immediately see any instances in the codebase of that exact behavior, either.","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"1462314aef8d1767ae8ef7c62a13e8f3332d51d1","unresolved":true,"context_lines":[{"line_number":490,"context_line":"{"},{"line_number":491,"context_line":"\tint ret;"},{"line_number":492,"context_line":""},{"line_number":493,"context_line":"\tLOG_DEBUG(\"reached\");"},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"\t*id \u003d 0;"},{"line_number":496,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":5,"id":"f73d7e07_e627139a","line":493,"range":{"start_line":493,"start_character":12,"end_line":493,"end_character":19},"in_reply_to":"d591b237_b6c9620a","updated":"2025-05-24 07:34:00.000000000","message":"It\u0027s not important. Feel free to leave as is.","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"80de73f271775b3c1ce34d11047e06970508d3b9","unresolved":false,"context_lines":[{"line_number":490,"context_line":"{"},{"line_number":491,"context_line":"\tint ret;"},{"line_number":492,"context_line":""},{"line_number":493,"context_line":"\tLOG_DEBUG(\"reached\");"},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"\t*id \u003d 0;"},{"line_number":496,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":5,"id":"b6f12621_3f99cb89","line":493,"range":{"start_line":493,"start_character":12,"end_line":493,"end_character":19},"in_reply_to":"f73d7e07_e627139a","updated":"2025-05-24 07:49:41.000000000","message":"In the interest of keeping changes minimal at this stage, I\u0027ll leave it as is.","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"416514ae410bad52efe1a255ebe5704b079de39a","unresolved":true,"context_lines":[{"line_number":885,"context_line":"\t\tif (ret !\u003d ERROR_OK)"},{"line_number":886,"context_line":"\t\t\tbreak;"},{"line_number":887,"context_line":"\t\talive_sleep(10);"},{"line_number":888,"context_line":"\t\tkeep_alive();"},{"line_number":889,"context_line":"\t}"},{"line_number":890,"context_line":""},{"line_number":891,"context_line":"\tif (ret !\u003d ERROR_OK)"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"7e134114_c3c7d56c","line":888,"range":{"start_line":888,"start_character":2,"end_line":888,"end_character":15},"updated":"2025-05-24 06:12:56.000000000","message":"`alive_sleep()` calls `keep_alive()`, no need to duplicate","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"2166cc993feafd258f9ae01f6ff1b6c26de4fa16","unresolved":false,"context_lines":[{"line_number":885,"context_line":"\t\tif (ret !\u003d ERROR_OK)"},{"line_number":886,"context_line":"\t\t\tbreak;"},{"line_number":887,"context_line":"\t\talive_sleep(10);"},{"line_number":888,"context_line":"\t\tkeep_alive();"},{"line_number":889,"context_line":"\t}"},{"line_number":890,"context_line":""},{"line_number":891,"context_line":"\tif (ret !\u003d ERROR_OK)"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"322a3362_7107aa48","line":888,"range":{"start_line":888,"start_character":2,"end_line":888,"end_character":15},"in_reply_to":"2565d65a_060359f2","updated":"2025-05-25 04:07:34.000000000","message":"Done","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"5c5a22bea266a9c43f07a88137ebe44f1fa1e6ef","unresolved":true,"context_lines":[{"line_number":885,"context_line":"\t\tif (ret !\u003d ERROR_OK)"},{"line_number":886,"context_line":"\t\t\tbreak;"},{"line_number":887,"context_line":"\t\talive_sleep(10);"},{"line_number":888,"context_line":"\t\tkeep_alive();"},{"line_number":889,"context_line":"\t}"},{"line_number":890,"context_line":""},{"line_number":891,"context_line":"\tif (ret !\u003d ERROR_OK)"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"2565d65a_060359f2","line":888,"range":{"start_line":888,"start_character":2,"end_line":888,"end_character":15},"in_reply_to":"7e134114_c3c7d56c","updated":"2025-05-24 06:40:04.000000000","message":"Ack","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"416514ae410bad52efe1a255ebe5704b079de39a","unresolved":true,"context_lines":[{"line_number":951,"context_line":""},{"line_number":952,"context_line":"\t\t/* Write the lesser of one page or the TX FIFO size at a time */"},{"line_number":953,"context_line":"\twhile (count \u003e 0) {"},{"line_number":954,"context_line":"\t\tif (count \u003c wrsize)"},{"line_number":955,"context_line":"\t\t\twrsize \u003d count;"},{"line_number":956,"context_line":""},{"line_number":957,"context_line":"\t\tret \u003d execute_page_program(bank, flexspi_info-\u003edev.pprog_cmd,"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"b76fcdb4_6e550ff0","line":954,"updated":"2025-05-24 06:12:56.000000000","message":"Write size should take page boundary into account. Crossing page boundary causes the address is wrapped around the page (at least in some devices)","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"1462314aef8d1767ae8ef7c62a13e8f3332d51d1","unresolved":true,"context_lines":[{"line_number":951,"context_line":""},{"line_number":952,"context_line":"\t\t/* Write the lesser of one page or the TX FIFO size at a time */"},{"line_number":953,"context_line":"\twhile (count \u003e 0) {"},{"line_number":954,"context_line":"\t\tif (count \u003c wrsize)"},{"line_number":955,"context_line":"\t\t\twrsize \u003d count;"},{"line_number":956,"context_line":""},{"line_number":957,"context_line":"\t\tret \u003d execute_page_program(bank, flexspi_info-\u003edev.pprog_cmd,"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"d5fdc767_889d88fe","line":954,"in_reply_to":"1b746cda_af20b19d","updated":"2025-05-24 07:34:00.000000000","message":"The problem could be writing from an address unaligned to the page boundary.\nIn this case the first page write should be shortened to avoid addr wraparound.\nSplitting page to the shorter chunks forced by TX FIFO size may complicate it further. Probably the simplest solution is to align writes to min(TX FIFO size, pagesize) and if TX FIFO size \u003c pagesize then check pagesize is divisible by TX FIFO size.","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"5b8aa9a3f44ad5e5a281055b87c9cd9132cd121c","unresolved":true,"context_lines":[{"line_number":951,"context_line":""},{"line_number":952,"context_line":"\t\t/* Write the lesser of one page or the TX FIFO size at a time */"},{"line_number":953,"context_line":"\twhile (count \u003e 0) {"},{"line_number":954,"context_line":"\t\tif (count \u003c wrsize)"},{"line_number":955,"context_line":"\t\t\twrsize \u003d count;"},{"line_number":956,"context_line":""},{"line_number":957,"context_line":"\t\tret \u003d execute_page_program(bank, flexspi_info-\u003edev.pprog_cmd,"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"b5466afe_ddfe443c","line":954,"in_reply_to":"27ff1ec8_69fc0209","updated":"2025-05-25 06:28:55.000000000","message":"There is a follow-up (still somewhat WIP, though it does work well) that uses an on-chip algorithm to speed up the programming process considerably (a factor of about 5x).  It would need this to be done, anyway, since the algorithm wants to be simple and so expects everything aligned - this seems the same as other flash drivers that use the same approach - so I went ahead and just did it now rather than deferring it so that the future changes are cleaner.\n\nThat\u0027s actually the 4th in this patch series if you want to take a look.","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"2166cc993feafd258f9ae01f6ff1b6c26de4fa16","unresolved":false,"context_lines":[{"line_number":951,"context_line":""},{"line_number":952,"context_line":"\t\t/* Write the lesser of one page or the TX FIFO size at a time */"},{"line_number":953,"context_line":"\twhile (count \u003e 0) {"},{"line_number":954,"context_line":"\t\tif (count \u003c wrsize)"},{"line_number":955,"context_line":"\t\t\twrsize \u003d count;"},{"line_number":956,"context_line":""},{"line_number":957,"context_line":"\t\tret \u003d execute_page_program(bank, flexspi_info-\u003edev.pprog_cmd,"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"97cca541_bf2b1f83","line":954,"in_reply_to":"87ad3fd0_0d9b65d4","updated":"2025-05-25 04:07:34.000000000","message":"Done","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"65f415cac9b01800af2b64004cd1c3a4847dd91d","unresolved":true,"context_lines":[{"line_number":951,"context_line":""},{"line_number":952,"context_line":"\t\t/* Write the lesser of one page or the TX FIFO size at a time */"},{"line_number":953,"context_line":"\twhile (count \u003e 0) {"},{"line_number":954,"context_line":"\t\tif (count \u003c wrsize)"},{"line_number":955,"context_line":"\t\t\twrsize \u003d count;"},{"line_number":956,"context_line":""},{"line_number":957,"context_line":"\t\tret \u003d execute_page_program(bank, flexspi_info-\u003edev.pprog_cmd,"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"27ff1ec8_69fc0209","line":954,"in_reply_to":"97cca541_bf2b1f83","updated":"2025-05-25 06:20:24.000000000","message":"Instead of adding another `execute_page_program()` call correct the size in the main loop. Something like that:\n```\nwhile (count \u003e 0) {\n   uint32_t thispgsz \u003d MIN(count, wrsize - offset % wrsize);\n```\nIMO computing modulo in each loop iteration is negligible ineficiency","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"1fdf5137654fe39eb25efd15d18f6927ab8ae1de","unresolved":false,"context_lines":[{"line_number":951,"context_line":""},{"line_number":952,"context_line":"\t\t/* Write the lesser of one page or the TX FIFO size at a time */"},{"line_number":953,"context_line":"\twhile (count \u003e 0) {"},{"line_number":954,"context_line":"\t\tif (count \u003c wrsize)"},{"line_number":955,"context_line":"\t\t\twrsize \u003d count;"},{"line_number":956,"context_line":""},{"line_number":957,"context_line":"\t\tret \u003d execute_page_program(bank, flexspi_info-\u003edev.pprog_cmd,"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"fbb073a0_fdac1b83","line":954,"in_reply_to":"b5466afe_ddfe443c","updated":"2025-05-25 08:25:23.000000000","message":"I\u0027ve seen it. Looks good. Just didn\u0027t realised that this code is taking the future patch into account. Ok then.","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"5c5a22bea266a9c43f07a88137ebe44f1fa1e6ef","unresolved":true,"context_lines":[{"line_number":951,"context_line":""},{"line_number":952,"context_line":"\t\t/* Write the lesser of one page or the TX FIFO size at a time */"},{"line_number":953,"context_line":"\twhile (count \u003e 0) {"},{"line_number":954,"context_line":"\t\tif (count \u003c wrsize)"},{"line_number":955,"context_line":"\t\t\twrsize \u003d count;"},{"line_number":956,"context_line":""},{"line_number":957,"context_line":"\t\tret \u003d execute_page_program(bank, flexspi_info-\u003edev.pprog_cmd,"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"1b746cda_af20b19d","line":954,"in_reply_to":"b76fcdb4_6e550ff0","updated":"2025-05-24 06:40:04.000000000","message":"I think all practical devices have a page size that is a multiple of the TX FIFO size (which is just 128 bytes on the IMXRT, though it\u0027s larger on the IMX application processors that use essentially the same IP), but it\u0027s easy enough to add a check to ensure it.","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"80de73f271775b3c1ce34d11047e06970508d3b9","unresolved":true,"context_lines":[{"line_number":951,"context_line":""},{"line_number":952,"context_line":"\t\t/* Write the lesser of one page or the TX FIFO size at a time */"},{"line_number":953,"context_line":"\twhile (count \u003e 0) {"},{"line_number":954,"context_line":"\t\tif (count \u003c wrsize)"},{"line_number":955,"context_line":"\t\t\twrsize \u003d count;"},{"line_number":956,"context_line":""},{"line_number":957,"context_line":"\t\tret \u003d execute_page_program(bank, flexspi_info-\u003edev.pprog_cmd,"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"87ad3fd0_0d9b65d4","line":954,"in_reply_to":"d5fdc767_889d88fe","updated":"2025-05-24 07:49:41.000000000","message":"Got it.  I will go ahead and fix this here since it would also impact my future support which includes an on-chip algorithm that is only intended to handle page-aligned accesses.","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"416514ae410bad52efe1a255ebe5704b079de39a","unresolved":true,"context_lines":[{"line_number":970,"context_line":"\treturn ret;"},{"line_number":971,"context_line":"}"},{"line_number":972,"context_line":""},{"line_number":973,"context_line":"static int fsl_flexspi_read(struct flash_bank *bank, uint8_t *buffer,"},{"line_number":974,"context_line":"\tuint32_t offset, uint32_t count)"},{"line_number":975,"context_line":"{"},{"line_number":976,"context_line":"\tstruct target *target \u003d bank-\u003etarget;"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"cfa12943_925b6866","line":973,"updated":"2025-05-24 06:12:56.000000000","message":"No need to define `fsl_flexspi_read()` at all - the default read does the same without unnecessary checks.","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"2166cc993feafd258f9ae01f6ff1b6c26de4fa16","unresolved":false,"context_lines":[{"line_number":970,"context_line":"\treturn ret;"},{"line_number":971,"context_line":"}"},{"line_number":972,"context_line":""},{"line_number":973,"context_line":"static int fsl_flexspi_read(struct flash_bank *bank, uint8_t *buffer,"},{"line_number":974,"context_line":"\tuint32_t offset, uint32_t count)"},{"line_number":975,"context_line":"{"},{"line_number":976,"context_line":"\tstruct target *target \u003d bank-\u003etarget;"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"87a451ac_164550d2","line":973,"in_reply_to":"88dda1dd_d044a3cc","updated":"2025-05-25 04:07:34.000000000","message":"Done","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"5c5a22bea266a9c43f07a88137ebe44f1fa1e6ef","unresolved":true,"context_lines":[{"line_number":970,"context_line":"\treturn ret;"},{"line_number":971,"context_line":"}"},{"line_number":972,"context_line":""},{"line_number":973,"context_line":"static int fsl_flexspi_read(struct flash_bank *bank, uint8_t *buffer,"},{"line_number":974,"context_line":"\tuint32_t offset, uint32_t count)"},{"line_number":975,"context_line":"{"},{"line_number":976,"context_line":"\tstruct target *target \u003d bank-\u003etarget;"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"88dda1dd_d044a3cc","line":973,"in_reply_to":"cfa12943_925b6866","updated":"2025-05-24 06:40:04.000000000","message":"That\u0027s reasonable.","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"416514ae410bad52efe1a255ebe5704b079de39a","unresolved":true,"context_lines":[{"line_number":1012,"context_line":"\tLOG_DEBUG(\"reached\");"},{"line_number":1013,"context_line":""},{"line_number":1014,"context_line":"\tif (flexspi_info-\u003eprobed) {"},{"line_number":1015,"context_line":"\t\tfree(bank-\u003esectors);"},{"line_number":1016,"context_line":"\t\tbank-\u003esectors \u003d NULL;"},{"line_number":1017,"context_line":"\t}"},{"line_number":1018,"context_line":""},{"line_number":1019,"context_line":"\tflexspi_info-\u003eprobed \u003d false;"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"59773ac2_993dea2f","line":1016,"range":{"start_line":1015,"start_character":2,"end_line":1016,"end_character":23},"updated":"2025-05-24 06:12:56.000000000","message":"Safer to do it unconditionally","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"2166cc993feafd258f9ae01f6ff1b6c26de4fa16","unresolved":false,"context_lines":[{"line_number":1012,"context_line":"\tLOG_DEBUG(\"reached\");"},{"line_number":1013,"context_line":""},{"line_number":1014,"context_line":"\tif (flexspi_info-\u003eprobed) {"},{"line_number":1015,"context_line":"\t\tfree(bank-\u003esectors);"},{"line_number":1016,"context_line":"\t\tbank-\u003esectors \u003d NULL;"},{"line_number":1017,"context_line":"\t}"},{"line_number":1018,"context_line":""},{"line_number":1019,"context_line":"\tflexspi_info-\u003eprobed \u003d false;"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"eb5ff480_1f7b9b36","line":1016,"range":{"start_line":1015,"start_character":2,"end_line":1016,"end_character":23},"in_reply_to":"37e43b84_7ecd665d","updated":"2025-05-25 04:07:34.000000000","message":"Done","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"5c5a22bea266a9c43f07a88137ebe44f1fa1e6ef","unresolved":true,"context_lines":[{"line_number":1012,"context_line":"\tLOG_DEBUG(\"reached\");"},{"line_number":1013,"context_line":""},{"line_number":1014,"context_line":"\tif (flexspi_info-\u003eprobed) {"},{"line_number":1015,"context_line":"\t\tfree(bank-\u003esectors);"},{"line_number":1016,"context_line":"\t\tbank-\u003esectors \u003d NULL;"},{"line_number":1017,"context_line":"\t}"},{"line_number":1018,"context_line":""},{"line_number":1019,"context_line":"\tflexspi_info-\u003eprobed \u003d false;"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"37e43b84_7ecd665d","line":1016,"range":{"start_line":1015,"start_character":2,"end_line":1016,"end_character":23},"in_reply_to":"59773ac2_993dea2f","updated":"2025-05-24 06:40:04.000000000","message":"Ack","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"65f415cac9b01800af2b64004cd1c3a4847dd91d","unresolved":true,"context_lines":[{"line_number":1012,"context_line":"\tLOG_DEBUG(\"reached\");"},{"line_number":1013,"context_line":""},{"line_number":1014,"context_line":"\tif (flexspi_info-\u003eprobed) {"},{"line_number":1015,"context_line":"\t\tfree(bank-\u003esectors);"},{"line_number":1016,"context_line":"\t\tbank-\u003esectors \u003d NULL;"},{"line_number":1017,"context_line":"\t}"},{"line_number":1018,"context_line":""},{"line_number":1019,"context_line":"\tflexspi_info-\u003eprobed \u003d false;"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"fe29c57a_a3e3ec66","line":1016,"range":{"start_line":1015,"start_character":2,"end_line":1016,"end_character":23},"in_reply_to":"eb5ff480_1f7b9b36","updated":"2025-05-25 06:20:24.000000000","message":"I meant both `free()` and `sectors \u003d NULL` without a condition.\nman 3 free: If ptr is NULL, no operation is performed.\nThe sectors ptr is either NULL or properly allocated.","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"5b8aa9a3f44ad5e5a281055b87c9cd9132cd121c","unresolved":true,"context_lines":[{"line_number":1012,"context_line":"\tLOG_DEBUG(\"reached\");"},{"line_number":1013,"context_line":""},{"line_number":1014,"context_line":"\tif (flexspi_info-\u003eprobed) {"},{"line_number":1015,"context_line":"\t\tfree(bank-\u003esectors);"},{"line_number":1016,"context_line":"\t\tbank-\u003esectors \u003d NULL;"},{"line_number":1017,"context_line":"\t}"},{"line_number":1018,"context_line":""},{"line_number":1019,"context_line":"\tflexspi_info-\u003eprobed \u003d false;"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"43bf6828_e0fa2c05","line":1016,"range":{"start_line":1015,"start_character":2,"end_line":1016,"end_character":23},"in_reply_to":"fe29c57a_a3e3ec66","updated":"2025-05-25 06:28:55.000000000","message":"That works.","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"416514ae410bad52efe1a255ebe5704b079de39a","unresolved":true,"context_lines":[{"line_number":1052,"context_line":"\t\t\t\t\t\" B\", p-\u003ename, id, p-\u003esize_in_bytes);"},{"line_number":1053,"context_line":"\t\t\tbreak;"},{"line_number":1054,"context_line":"\t\t}"},{"line_number":1055,"context_line":"\t}"},{"line_number":1056,"context_line":""},{"line_number":1057,"context_line":"\t/* Configure flash size */"},{"line_number":1058,"context_line":"\tbank-\u003esize \u003d flexspi_info-\u003edev.size_in_bytes;"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"9dc03352_3817f8c5","line":1055,"updated":"2025-05-24 06:12:56.000000000","message":"What if no matching id is found?","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"80de73f271775b3c1ce34d11047e06970508d3b9","unresolved":true,"context_lines":[{"line_number":1052,"context_line":"\t\t\t\t\t\" B\", p-\u003ename, id, p-\u003esize_in_bytes);"},{"line_number":1053,"context_line":"\t\t\tbreak;"},{"line_number":1054,"context_line":"\t\t}"},{"line_number":1055,"context_line":"\t}"},{"line_number":1056,"context_line":""},{"line_number":1057,"context_line":"\t/* Configure flash size */"},{"line_number":1058,"context_line":"\tbank-\u003esize \u003d flexspi_info-\u003edev.size_in_bytes;"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"7aae14c0_8ed54a12","line":1055,"in_reply_to":"140ffd04_e89c8ad3","updated":"2025-05-24 07:49:41.000000000","message":"That is a very good point. Leaving early with \"not probed\" status would seem to resolve all of these concerns.","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"2166cc993feafd258f9ae01f6ff1b6c26de4fa16","unresolved":false,"context_lines":[{"line_number":1052,"context_line":"\t\t\t\t\t\" B\", p-\u003ename, id, p-\u003esize_in_bytes);"},{"line_number":1053,"context_line":"\t\t\tbreak;"},{"line_number":1054,"context_line":"\t\t}"},{"line_number":1055,"context_line":"\t}"},{"line_number":1056,"context_line":""},{"line_number":1057,"context_line":"\t/* Configure flash size */"},{"line_number":1058,"context_line":"\tbank-\u003esize \u003d flexspi_info-\u003edev.size_in_bytes;"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"c1b0d19d_31f38d56","line":1055,"in_reply_to":"7aae14c0_8ed54a12","updated":"2025-05-25 04:07:34.000000000","message":"Done","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"5c5a22bea266a9c43f07a88137ebe44f1fa1e6ef","unresolved":true,"context_lines":[{"line_number":1052,"context_line":"\t\t\t\t\t\" B\", p-\u003ename, id, p-\u003esize_in_bytes);"},{"line_number":1053,"context_line":"\t\t\tbreak;"},{"line_number":1054,"context_line":"\t\t}"},{"line_number":1055,"context_line":"\t}"},{"line_number":1056,"context_line":""},{"line_number":1057,"context_line":"\t/* Configure flash size */"},{"line_number":1058,"context_line":"\tbank-\u003esize \u003d flexspi_info-\u003edev.size_in_bytes;"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"f04fccd1_b8479d14","line":1055,"in_reply_to":"9dc03352_3817f8c5","updated":"2025-05-24 06:40:04.000000000","message":"The struct is initialized to all 0s, so it mostly does the right thing including configuring the controller with a memory region of zero size.  It\u0027s not an uncommon issue that the wonky reset system on these chips will result in the IOs being unusable or otherwise an inability to probe for the external flash, and the result is usually an ID of all 1s.\n\nI can tell you for sure that it doesn\u0027t crash, though it looks like there is a divison-by-zero opportunity later on.  Obviously that should be avoided.\n\nIt\u0027s probably better to be hands-off and not touch the controller in this case and declare that the probe failed which I would assume will inhibit further action on the controller.","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"1462314aef8d1767ae8ef7c62a13e8f3332d51d1","unresolved":true,"context_lines":[{"line_number":1052,"context_line":"\t\t\t\t\t\" B\", p-\u003ename, id, p-\u003esize_in_bytes);"},{"line_number":1053,"context_line":"\t\t\tbreak;"},{"line_number":1054,"context_line":"\t\t}"},{"line_number":1055,"context_line":"\t}"},{"line_number":1056,"context_line":""},{"line_number":1057,"context_line":"\t/* Configure flash size */"},{"line_number":1058,"context_line":"\tbank-\u003esize \u003d flexspi_info-\u003edev.size_in_bytes;"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"140ffd04_e89c8ad3","line":1055,"in_reply_to":"f04fccd1_b8479d14","updated":"2025-05-24 07:34:00.000000000","message":"\u003e The struct is initialized to all 0s, so it mostly does the right thing including configuring the controller with a memory region of zero size.\n\nNot in the corner case the flash is re-probed by `flash probe` command.\n\n\u003e .. and the result is usually an ID of all 1s.\n\nThe probe should fail in this case.\nUser may re-try `flash probe` or any other flash command until probe succeeds.\n\n\u003e It\u0027s probably better to be hands-off and not touch the controller in this case and declare that the probe failed which I would assume will inhibit further action on the controller.\n\nYes, not probed status ensure it.","commit_id":"126f37da9895e1e8f7a8e14f5e674d28428dc191"},{"author":{"_account_id":1000860,"name":"Stefan T","email":"stefan.tauner@gmx.at","username":"stefanct"},"change_message_id":"f46282055cd8200fc191bf0dfdf3fd3b244cd6bf","unresolved":true,"context_lines":[{"line_number":531,"context_line":""},{"line_number":532,"context_line":"\t*id \u003d 0;"},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"\tret \u003d execute_ipcmd_read(bank, SPIFLASH_READ_ID, id, sizeof(*id));"},{"line_number":535,"context_line":"\tif (ret !\u003d ERROR_OK)"},{"line_number":536,"context_line":"\t\tgoto err;"},{"line_number":537,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":7,"id":"fca32fad_e8080a69","line":534,"range":{"start_line":534,"start_character":56,"end_line":534,"end_character":57},"updated":"2025-06-05 09:44:50.000000000","message":"read_flash_id reads 4 bytes. While I agree that this is a sensible thing to do in general since there are devices that have IDs longer than 3 bytes this is different to other NOR flash drivers in oocd (cf. jtagspi_probe(), mrvlqspi_read_id()). I think all of them need to be changed even for the currently supported flash chips (cf. adesto xp032). However, that\u0027s out of scope here (it is worth pursuing though IMHO. I am not a part of the community... would a mail to an ML or a SF bug report make more sense?).\n\nReading 4 bytes creates a problem because many flash chips continue repeating their IDs after transmitting them the first time. On our custom board we are using a IS25LP128F that has this behavior documented. This leads to an ID mismatch in fsl_flexspi_probe():\n\nWarn : 326 63 fsl_flexspi.c:1394 fsl_flexspi_probe(): Unknown flash A1 device id \u003d 0x9d18609d\n\nIf I change the parameter to a hard-coded 3 the chip is detected correctly (in the context of oocd):\n\nInfo : 225 29 fsl_flexspi.c:1383 fsl_flexspi_probe(): flash A1 \u0027issi is25lp128d\u0027 id \u003d 0x18609d size \u003d 16384 KiB\n\nI have yet to try it on a vanilla RT1020 EVK (not sure if we still have one) but I think the revision we got had a smaller ISSI chip that should show the same behavior. This would probably take a few days but I don\u0027t think there is too much use anyway.","commit_id":"a6c021e68c9908031ccc235281f22b30c61e3883"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"65f415cac9b01800af2b64004cd1c3a4847dd91d","unresolved":true,"context_lines":[{"line_number":1001,"context_line":"\t */"},{"line_number":1002,"context_line":"\tif (offset % wrsize) {"},{"line_number":1003,"context_line":"\t\tret \u003d execute_page_program(bank, flexspi_info-\u003edev.pprog_cmd, buffer, offset,"},{"line_number":1004,"context_line":"\t\t\t\toffset % flexspi_info-\u003edev.pagesize);"},{"line_number":1005,"context_line":"\t\tif (ret !\u003d ERROR_OK)"},{"line_number":1006,"context_line":"\t\t\tgoto err;"},{"line_number":1007,"context_line":"\t}"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"d8330e59_861a12ef","line":1004,"range":{"start_line":1004,"start_character":4,"end_line":1004,"end_character":39},"updated":"2025-05-25 06:20:24.000000000","message":"The size is not correct. See below","commit_id":"a6c021e68c9908031ccc235281f22b30c61e3883"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"1fdf5137654fe39eb25efd15d18f6927ab8ae1de","unresolved":true,"context_lines":[{"line_number":1001,"context_line":"\t */"},{"line_number":1002,"context_line":"\tif (offset % wrsize) {"},{"line_number":1003,"context_line":"\t\tret \u003d execute_page_program(bank, flexspi_info-\u003edev.pprog_cmd, buffer, offset,"},{"line_number":1004,"context_line":"\t\t\t\toffset % flexspi_info-\u003edev.pagesize);"},{"line_number":1005,"context_line":"\t\tif (ret !\u003d ERROR_OK)"},{"line_number":1006,"context_line":"\t\t\tgoto err;"},{"line_number":1007,"context_line":"\t}"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"39454fb2_4ad85441","line":1004,"range":{"start_line":1004,"start_character":4,"end_line":1004,"end_character":39},"in_reply_to":"3590df8b_3f52302e","updated":"2025-05-25 08:25:23.000000000","message":"I think it should be `MIN(count, wrsize - offset % wrsize)`\n\nYes, compiled/linked images usually do so. But there is possibility of sparse image with some special data segments in isolated chunks or user may use bin data with an offset.\nUse `flash fillw` over page boundary to quick test.","commit_id":"a6c021e68c9908031ccc235281f22b30c61e3883"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"ee7f114a738e025b4c29b82d3a396a64f5ae96ad","unresolved":true,"context_lines":[{"line_number":1001,"context_line":"\t */"},{"line_number":1002,"context_line":"\tif (offset % wrsize) {"},{"line_number":1003,"context_line":"\t\tret \u003d execute_page_program(bank, flexspi_info-\u003edev.pprog_cmd, buffer, offset,"},{"line_number":1004,"context_line":"\t\t\t\toffset % flexspi_info-\u003edev.pagesize);"},{"line_number":1005,"context_line":"\t\tif (ret !\u003d ERROR_OK)"},{"line_number":1006,"context_line":"\t\t\tgoto err;"},{"line_number":1007,"context_line":"\t}"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"ed601d45_9505160a","line":1004,"range":{"start_line":1004,"start_character":4,"end_line":1004,"end_character":39},"in_reply_to":"39454fb2_4ad85441","updated":"2025-05-26 06:24:51.000000000","message":"You are again correct.  That\u0027ll teach me to blindly/quickly implement \"minor\" changes like that.\n\nIt\u0027s also missing the followup adjustments to count, offset, and buffer pointer.","commit_id":"a6c021e68c9908031ccc235281f22b30c61e3883"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"5b8aa9a3f44ad5e5a281055b87c9cd9132cd121c","unresolved":true,"context_lines":[{"line_number":1001,"context_line":"\t */"},{"line_number":1002,"context_line":"\tif (offset % wrsize) {"},{"line_number":1003,"context_line":"\t\tret \u003d execute_page_program(bank, flexspi_info-\u003edev.pprog_cmd, buffer, offset,"},{"line_number":1004,"context_line":"\t\t\t\toffset % flexspi_info-\u003edev.pagesize);"},{"line_number":1005,"context_line":"\t\tif (ret !\u003d ERROR_OK)"},{"line_number":1006,"context_line":"\t\t\tgoto err;"},{"line_number":1007,"context_line":"\t}"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"3590df8b_3f52302e","line":1004,"range":{"start_line":1004,"start_character":4,"end_line":1004,"end_character":39},"in_reply_to":"d8330e59_861a12ef","updated":"2025-05-25 06:28:55.000000000","message":"Correct. It should be offset % wrsize.\n\nI\u0027ve had trouble making a good test case for this.  Everything seems to want to naturally align to at least 128 anyway no matter what I do.","commit_id":"a6c021e68c9908031ccc235281f22b30c61e3883"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"65f415cac9b01800af2b64004cd1c3a4847dd91d","unresolved":true,"context_lines":[{"line_number":1086,"context_line":""},{"line_number":1087,"context_line":"\tif (!p-\u003ename) {"},{"line_number":1088,"context_line":"\t\t/* Chip could not be identified by ID */"},{"line_number":1089,"context_line":"\t\tLOG_WARNING(\"Unknown flash A1 device id \u003d 0x%06\" PRIx32, id);"},{"line_number":1090,"context_line":""},{"line_number":1091,"context_line":"\t\t/* This is not actually a probe error, but there\u0027s nothing left to do */"},{"line_number":1092,"context_line":"\t\treturn ERROR_OK;"},{"line_number":1093,"context_line":"\t}"},{"line_number":1094,"context_line":""},{"line_number":1095,"context_line":"\t/* Configure flash size */"},{"line_number":1096,"context_line":"\tbank-\u003esize \u003d flexspi_info-\u003edev.size_in_bytes;"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"e404f957_52e7c8e2","line":1093,"range":{"start_line":1089,"start_character":0,"end_line":1093,"end_character":0},"updated":"2025-05-25 06:20:24.000000000","message":"From user point of view it is error, no flash operations will work. Also the flash infrastructure expects error.\nPlease be compatible with other flash drivers: log ERROR and return ERROR_FLASH_BANK_INVALID","commit_id":"a6c021e68c9908031ccc235281f22b30c61e3883"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"73de5ea80040612716d1a6659f9954ed950c1366","unresolved":true,"context_lines":[{"line_number":1086,"context_line":""},{"line_number":1087,"context_line":"\tif (!p-\u003ename) {"},{"line_number":1088,"context_line":"\t\t/* Chip could not be identified by ID */"},{"line_number":1089,"context_line":"\t\tLOG_WARNING(\"Unknown flash A1 device id \u003d 0x%06\" PRIx32, id);"},{"line_number":1090,"context_line":""},{"line_number":1091,"context_line":"\t\t/* This is not actually a probe error, but there\u0027s nothing left to do */"},{"line_number":1092,"context_line":"\t\treturn ERROR_OK;"},{"line_number":1093,"context_line":"\t}"},{"line_number":1094,"context_line":""},{"line_number":1095,"context_line":"\t/* Configure flash size */"},{"line_number":1096,"context_line":"\tbank-\u003esize \u003d flexspi_info-\u003edev.size_in_bytes;"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"924978d4_f74f232b","line":1093,"range":{"start_line":1089,"start_character":0,"end_line":1093,"end_character":0},"in_reply_to":"2bd11ed1_2ddd3f15","updated":"2025-06-05 04:10:12.000000000","message":"Hmm, so that driver takes advantage of the fact that the controller needs no on-device initialization to access the flash (because it\u0027s just using boundary scan).  That means that there\u0027s no distinction between \"probing the controller\" and \"probing the flash device\".\n\nThis is something of an architectural problem. OpenOCD currently considers that a flash device and controller are basically a pair from what I can tell.  There\u0027s no real way to say \"I could talk to the controller but not any subtended flash memory\".\n\nThe closest approach I can see without architectural changes to address the above (which is definitely not in the scope of this patch series unless it\u0027s already present and I missed it) would be to attempt to probe and thereby place the controller into a known state and set a driver-internal flag that says that\u0027s been done even if the flash device probe failed.  This could perhaps be extended a little further to make \"place the controller into a known state but don\u0027t even try to talk to a flash device\" callable from TCL.  Do either of those sound reasonable?","commit_id":"a6c021e68c9908031ccc235281f22b30c61e3883"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"1fdf5137654fe39eb25efd15d18f6927ab8ae1de","unresolved":true,"context_lines":[{"line_number":1086,"context_line":""},{"line_number":1087,"context_line":"\tif (!p-\u003ename) {"},{"line_number":1088,"context_line":"\t\t/* Chip could not be identified by ID */"},{"line_number":1089,"context_line":"\t\tLOG_WARNING(\"Unknown flash A1 device id \u003d 0x%06\" PRIx32, id);"},{"line_number":1090,"context_line":""},{"line_number":1091,"context_line":"\t\t/* This is not actually a probe error, but there\u0027s nothing left to do */"},{"line_number":1092,"context_line":"\t\treturn ERROR_OK;"},{"line_number":1093,"context_line":"\t}"},{"line_number":1094,"context_line":""},{"line_number":1095,"context_line":"\t/* Configure flash size */"},{"line_number":1096,"context_line":"\tbank-\u003esize \u003d flexspi_info-\u003edev.size_in_bytes;"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"7aa30de3_31c0be6b","line":1093,"range":{"start_line":1089,"start_character":0,"end_line":1093,"end_character":0},"in_reply_to":"34f1cd54_09ed0302","updated":"2025-05-25 08:25:23.000000000","message":"Lot of OpenOCD code returns a generic ERROR_FAIL just because author did not bother searching the specific one. I think in the current flash code there is no functional difference related to error type returned from probe.\n\nI\u0027m sure that flash driver should not fake probed state if it handles an internal flash. But there might be some consequences of the external interface availability (and creating memory map for gdb in the time of attach) which I don\u0027t remind now.\n\nReference to stmqspi is a good point. Unfortunately stmqspi is very complicated with octo and dual QSPI modes, it also allows to configure SPI flash commands/parameters on the fly by flash specific commands. I believe the fake OK return from the probe is related to this usage - the config commands would not work without probed bank.\n\nTo be sure, let\u0027s ask the author.","commit_id":"a6c021e68c9908031ccc235281f22b30c61e3883"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"ee7f114a738e025b4c29b82d3a396a64f5ae96ad","unresolved":true,"context_lines":[{"line_number":1086,"context_line":""},{"line_number":1087,"context_line":"\tif (!p-\u003ename) {"},{"line_number":1088,"context_line":"\t\t/* Chip could not be identified by ID */"},{"line_number":1089,"context_line":"\t\tLOG_WARNING(\"Unknown flash A1 device id \u003d 0x%06\" PRIx32, id);"},{"line_number":1090,"context_line":""},{"line_number":1091,"context_line":"\t\t/* This is not actually a probe error, but there\u0027s nothing left to do */"},{"line_number":1092,"context_line":"\t\treturn ERROR_OK;"},{"line_number":1093,"context_line":"\t}"},{"line_number":1094,"context_line":""},{"line_number":1095,"context_line":"\t/* Configure flash size */"},{"line_number":1096,"context_line":"\tbank-\u003esize \u003d flexspi_info-\u003edev.size_in_bytes;"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"dcecbe97_9e256288","line":1093,"range":{"start_line":1089,"start_character":0,"end_line":1093,"end_character":0},"in_reply_to":"7aa30de3_31c0be6b","updated":"2025-05-26 06:24:51.000000000","message":"Yes, stmqspi is very complicated.  The FLEXSPI can actually do basically everything the stmqspi can (and gets just about as complicated in doing so), but I suspect the basic \"single NOR device with single or quad IO\" is sufficient for enough use cases to be very useful.  At minimum, it handles most of the relevant NXP IMXRT dev boards.\n\nAs to the case of making the controller available for subsequent config commands, you may be right.  That is not currently relevant to the FLEXSPI support given its somewhat more limited scope at the moment, though the raw flash commands (3rd patch in the train) could still be useful and would require the bank be marked as probed.  I think I\u0027ll go ahead and leave the bank \"not probed\" if identification of external flash fails, though.","commit_id":"a6c021e68c9908031ccc235281f22b30c61e3883"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"706b42542d337ce851cba4efc0297c4dc8c22616","unresolved":true,"context_lines":[{"line_number":1086,"context_line":""},{"line_number":1087,"context_line":"\tif (!p-\u003ename) {"},{"line_number":1088,"context_line":"\t\t/* Chip could not be identified by ID */"},{"line_number":1089,"context_line":"\t\tLOG_WARNING(\"Unknown flash A1 device id \u003d 0x%06\" PRIx32, id);"},{"line_number":1090,"context_line":""},{"line_number":1091,"context_line":"\t\t/* This is not actually a probe error, but there\u0027s nothing left to do */"},{"line_number":1092,"context_line":"\t\treturn ERROR_OK;"},{"line_number":1093,"context_line":"\t}"},{"line_number":1094,"context_line":""},{"line_number":1095,"context_line":"\t/* Configure flash size */"},{"line_number":1096,"context_line":"\tbank-\u003esize \u003d flexspi_info-\u003edev.size_in_bytes;"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"c027dc74_30c5cfd7","line":1093,"range":{"start_line":1089,"start_character":0,"end_line":1093,"end_character":0},"in_reply_to":"924978d4_f74f232b","updated":"2025-06-05 17:02:38.000000000","message":"I admit the SPI infrastructure deserves some architectural changes. AFAIK nobody is working on it.\nPlease ensure that the internal flag `controller initialised` even in out-of-sync state (e.g. after not detected target reset or power cycle) never makes manual `flash probe` defunct.","commit_id":"a6c021e68c9908031ccc235281f22b30c61e3883"},{"author":{"_account_id":1000687,"name":"Tomas Vanek","display_name":"Tomas Vanek","email":"vanekt@fbl.cz","username":"vanekt"},"change_message_id":"120f53fffeffc2ae66e47f3d880865fbd69a082c","unresolved":true,"context_lines":[{"line_number":1086,"context_line":""},{"line_number":1087,"context_line":"\tif (!p-\u003ename) {"},{"line_number":1088,"context_line":"\t\t/* Chip could not be identified by ID */"},{"line_number":1089,"context_line":"\t\tLOG_WARNING(\"Unknown flash A1 device id \u003d 0x%06\" PRIx32, id);"},{"line_number":1090,"context_line":""},{"line_number":1091,"context_line":"\t\t/* This is not actually a probe error, but there\u0027s nothing left to do */"},{"line_number":1092,"context_line":"\t\treturn ERROR_OK;"},{"line_number":1093,"context_line":"\t}"},{"line_number":1094,"context_line":""},{"line_number":1095,"context_line":"\t/* Configure flash size */"},{"line_number":1096,"context_line":"\tbank-\u003esize \u003d flexspi_info-\u003edev.size_in_bytes;"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"2bd11ed1_2ddd3f15","line":1093,"range":{"start_line":1089,"start_character":0,"end_line":1093,"end_character":0},"in_reply_to":"dcecbe97_9e256288","updated":"2025-05-26 06:52:06.000000000","message":"\u003e ... though the raw flash commands (3rd patch in the train) could still be useful and would require the bank be marked as probed.\n\nI had feeling we solved it somewhere but was wrong thinking it was in stmqspi.c\nFinally I found it: please see\n7432: flash/jtagspi: sending command and setting parameters without probing. | https://review.openocd.org/c/openocd/+/7432\nif you can adopt similar solution in your\n8060: flash/nor/fsl_flexspi: Support arbitrary flash cmd | https://review.openocd.org/c/openocd/+/8060","commit_id":"a6c021e68c9908031ccc235281f22b30c61e3883"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"5b8aa9a3f44ad5e5a281055b87c9cd9132cd121c","unresolved":true,"context_lines":[{"line_number":1086,"context_line":""},{"line_number":1087,"context_line":"\tif (!p-\u003ename) {"},{"line_number":1088,"context_line":"\t\t/* Chip could not be identified by ID */"},{"line_number":1089,"context_line":"\t\tLOG_WARNING(\"Unknown flash A1 device id \u003d 0x%06\" PRIx32, id);"},{"line_number":1090,"context_line":""},{"line_number":1091,"context_line":"\t\t/* This is not actually a probe error, but there\u0027s nothing left to do */"},{"line_number":1092,"context_line":"\t\treturn ERROR_OK;"},{"line_number":1093,"context_line":"\t}"},{"line_number":1094,"context_line":""},{"line_number":1095,"context_line":"\t/* Configure flash size */"},{"line_number":1096,"context_line":"\tbank-\u003esize \u003d flexspi_info-\u003edev.size_in_bytes;"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"34f1cd54_09ed0302","line":1093,"range":{"start_line":1089,"start_character":0,"end_line":1093,"end_character":0},"in_reply_to":"e404f957_52e7c8e2","updated":"2025-05-25 06:28:55.000000000","message":"Interestingly, this is NOT what the stmqspi driver (which is what I\u0027ve used as an example) does.  It logs a warning only and then explicitly returns ERROR_OK.\n\nThe LPC spifi driver returns a generic ERROR_FAIL.\n\nI can do whatever is most appropriate.","commit_id":"a6c021e68c9908031ccc235281f22b30c61e3883"}],"src/jtag/drivers/libjaylink":[{"author":{"_account_id":1000410,"name":"Oleksij Rempel","email":"linux@rempel-privat.de","username":"olerem"},"change_message_id":"7ec394796af5471929404de68a5c7973602c2586","unresolved":true,"context_lines":[{"line_number":1,"context_line":"Subproject commit 9aa7a5957c07bb6e862fc1a6d3153d109c7407e4"}],"source_content_type":"x-git/gitlink","patch_set":3,"id":"22cfe21e_584bb4b7","line":1,"updated":"2024-10-06 12:39:30.000000000","message":"The update for git submodule should be dropped.","commit_id":"a2b741ff7874da244fec437436e09d113f55eab3"},{"author":{"_account_id":1002224,"name":"Brandon Martin","username":"martinbv07"},"change_message_id":"5638b7a86cf3a062555dad5de8209cdc0141ed2c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"Subproject commit 9aa7a5957c07bb6e862fc1a6d3153d109c7407e4"}],"source_content_type":"x-git/gitlink","patch_set":3,"id":"a22c1be5_84b30d01","line":1,"in_reply_to":"22cfe21e_584bb4b7","updated":"2025-05-18 02:20:27.000000000","message":"Done","commit_id":"a2b741ff7874da244fec437436e09d113f55eab3"}]}
