path: root/utils/regtools
AgeCommit message (Collapse)AuthorFilesLines
2021-02-27Make headergen_v2's output include what it usesAidan MacDonald1-0/+3
Change-Id: Ie9790faac44c33a170bc2dc39d706575cefa0f2f
2020-11-04qeditor: add better fallback mecanism for iconsAmaury Pouly2-17/+57
Change-Id: Ib87406c95fc6c579f108b81246350d12de428ba4
2017-09-06qeditor: add workaround for c++11 in qt4, suggest to use qt5Amaury Pouly1-1/+10
Change-Id: Iad7b8fd171d57228796a68cb3406914213b91926
2017-02-04regtools/qeditor: replace deprecated QStyleOptionViewItemV4Amaury Pouly2-5/+5 QStyleOptionViewItem. Yes Qt got it right, in 5.7 they deprecated QStyleOptionViewItemV4 and recommend using QStyleOptionViewItem which contains less fields except on newer Qt where it contains all fields. Hopefully it still works on Qt>4.x for a large enough value of x. Change-Id: I013c383d2424b04c1c0745f0d7b1d5e62a29d324
2017-02-04regtools/qeditor: compute RAM sizeAmaury Pouly2-0/+23
Change-Id: I7bfb5cc25bc3dc55f379b2319b20dc9510434de0
2017-02-04regtools/qeditor: enable imx233 analysers for imx233Amaury Pouly1-9/+12
The clock structure is identical, and the EMI are the same. Also fix SSP clock, it was broken on imx233 as well. Change-Id: I25ec66059b00b1a456ef2f02131d225082536c0a
2017-02-04regtools/soc_desc: fix bug in libraryAmaury Pouly1-1/+1
Because a node ref is at root doesn't make it valid, check that soc is valid otherwise we return garbage. Change-Id: I6e5befc959dc670ab39a87484e87af6d90be7726
2017-02-04regtools: add new tool list/find/describe registersAmaury Pouly2-1/+631
Change-Id: I2d93d24bd421e1a2ea6d27b8f7cfd17311e6d458
2017-01-24jz4760b/regtools: fix/rename some register fields, add clock analyzer to qeditorAmaury Pouly3-6/+87
Change-Id: I196414d6e4fc18c00b77903e334b7e6adfb7debc
2017-01-24headergen_v2: add two new macros to write a raw write to set/clr variantsAmaury Pouly1-1/+48
These macros are like jz_setf but instead of writing fields, they write a raw value directly: jz_set(REG, value) and jz_clr(REG, value). Change-Id: I660f20dd691b26d367533877875fc3226a26c992
2017-01-24update jz4760b register descAmaury Pouly1-250/+582
Change-Id: Id0a071528eca08fe512941be9c8091819e817e4c
2017-01-24regtools: add JZ4760B descriptionAmaury Pouly1-0/+13645
This is a register description file for the JZ4760B. There are several details worth noticing: - it was obtained by gathering information from several sources/headers, but since there are inconsistencies between them about the exact differences between JZ4760 and JZ4760B, this file probably contains some errors - the register names are not the same as the manual ones (which are not the same as the one in the headers anyway): I dropped the "R" suffix on most registers because it's redundant - Ingenic likes to have read-only registers and then set/clr registers, with very confusing names like DIR/DIRS/DIRC: in the file, the set/clr registers are described as set/clr variants of the original register - Parts of the description were obtained programmatically, which explains why there are empty nodes or partially undocumented registers Change-Id: I8da1d61e172e932e1a4a58ac0a5008f02b1751be
2017-01-24regtools: fix normalization procedureAmaury Pouly1-16/+57
The code was not updated when I added support for list and other stuff, and thus it did not properly sort by addresses. Change-Id: Iaed0717b607beedfb2856c020c2a760e7a5667c5
2017-01-16regtools: convert all reg dumps to v2. keep v1 for referenceAmaury Pouly30-12561/+23874
Change-Id: Ib496eb5d47adb75479ce94a203d4a93524700843
2016-09-21regtools: fix library bug when checking if a reference is valid or notAmaury Pouly1-1/+1
Change-Id: I8adea40d2fa7c1a26f1975d987233249f61af8ef
2016-09-21regtools: rename error_t to err_t to avoid name clashAmaury Pouly5-39/+38
Change-Id: Ib8d34e4f58f3225b1dafc533ce7e1b7867ad053b
2016-09-21headergen_v1: remove warnings with newer GCCsAmaury Pouly1-15/+15
Change-Id: I90ed3a0c911014eee013cbea0e98a85f4310471d
2016-05-25regtools: add headergen_v2Amaury Pouly3-11/+2021
This new header generator works differently from the previous one: - it uses the new format - the generated macro follow a different style (see below) - the generated macro are highly documented! - it supports SCT-style platform or RMW-style ones Compared to the old style, the new one generate a big set of macros per register/field/enum (loosely related to iohw.h from Embedded C spec). The user then calls generic (names are customizable) macros to perform operations: reg_read(REG_A) reg_read(REG_B(3)) reg_read_field(REG_A, FIELD_X) reg_read_field(REG_B(3), COOL_FIELD) reg_write(REG_A, 0x42) reg_write_field(REG_A, FIELD_X(1), FIELD_Y(3), IRQ_V(FIQ)) reg_write_fielc(REG_B(3), COOL_FIELD_V(I_AM_COOL), BLA(42)) the following use RMW or SET/CLR variants, depending on target: reg_set_field(REG_A, FLAG_U, FLAG_V) reg_clr_field(REG_A, FIELD_X, FIELD_Y, IRQ) reg_clr_field(REG_B(3), COOL_FIELD, BLA) the following does clear followed by set, on SET/CLR targets: reg_cs(REG_A, 0xff, 0x42) reg_cs(REG_B(3), 0xaa, 0x55) reg_cs_field(REG_A, FIELD_X(1), FIELD_Y(3), IRQ_V(FIQ)) reg_cs_field(REG_B(3), COOL_FIELD_V(I_AM_COOL)) The generator code is pretty long but has lots of documentation and lots of macro names can be customized. Change-Id: I5d6c5ec2406e58b5da11a5240c3a409a5bb5239a
2016-04-08qeditor: port to the new hwstub library and add featuresAmaury Pouly10-328/+1393
This commit adds support for the version of the hwstub library, which requires a lot of changes. It also adds some editing features, such as register access and much better editing of fields using the mouse (double click on a field to be able to resize and move it). Change-Id: I3c4e4cc855cb44911c72bc8127bad841b68efe52
2016-04-08regtools: add register access to soc descAmaury Pouly3-6/+68
Registers (and variants) can now specify the type of access supported: - unspecified: for variant means same as register, for register defaults R/W - read/write - read only - write only Backward compatibility is preserved by setting access to unspecified by default. Change-Id: I3e84ae18f962a45db62f996a542d08405d05b895
2016-04-08soc_desc: add default constructors to most structuresAmaury Pouly1-0/+24
After being caught by several bugs of the type "let's forgot to initialize a field to default value", I'm finally fixing this. Change-Id: I01c33e0611d4f697f767db66465e4fb30858cdab
2016-03-14regtools: Convert rk27xx register description file to v2 formatMarcin Bukat2-2765/+11320
Change-Id: I60a764567d2fc73ed87fca2a8b0eaf643d4984bc
2016-02-07regtools: make description file parser stricterAmaury Pouly1-2/+48
The parser would simply ignore unknown elements or attributes, which is bad on many levels. Now any unknown tag will trigger a fatal error. Change-Id: I32eead8e96c1567241cf2a565d9e20e62877c14d
2016-02-06regtools/desc: convert v1 stmp description files to v2Amaury Pouly3-0/+67193
Conversion done using swiss_knife as follows: ./swiss_knife convert --author "Amaury Pouly" --version "2.4.0" desc/regs-stmp3XXX-v1.xml desc/regs-stmp3XXX.xml Change-Id: Iad26e04f8f599cf25339a33aa65f231379434e98
2016-02-06regtools/desc: rename v1 stmp filesAmaury Pouly3-0/+0
Change-Id: Ib66a404acf1f640e19b30b35d6a976094ae4264a
2016-02-06regtoosl/qeditor: port to the new description formatAmaury Pouly18-1908/+2912
This big commit port qeditor from v1 to v2 register file format. Although the display code was much simplified, the edit code had to be rewritten. The new code also brings many improvement to the register display widget. The new code also compiles with both Qt4 and Qt5, although it is recommended to use Qt5 to get some improvements, especially in the layout of editor. Change-Id: I24633ac37a144f25d9e705b565654269ec9cfbd3
2016-02-06regtools: update v2 specification, library and toolsAmaury Pouly9-211/+1491
A v2 register description file can now include register variants and instances addresses can now be a list (previously it could only be a stride or a formula). Update the library to deal with that. The convert option of swiss_knife was updated and one incompatible change was introduce: if a v1 device has several addresses, those are converted to a single v2 instance with list (instead of several single instances). This should have been the behaviour from the start. Swiss_knife can now also convert regdumps, in which case it needs to be given both the dump and register description file. Also introduce two register descriptions files (vsoc1000 and vsoc2000) which give more complicated examples of v2 register description files. Change-Id: Id9415b8363269ffaf9216abfc6dd1bd1adbfcf8d
2015-10-03qeditor: fix uninitialised variableAmaury Pouly2-1/+7
Change-Id: I12a785e554b7d598b91e526af1b7ebc1fc44f610
2015-09-11soc_desc: new version of the desc file formatAmaury Pouly20-706/+3735
Fix qeditor to use the old soc_desc_v1. Port hwstub_shell to the new description format. Change-Id: I9fefbff534bfaa5c3603bb3dd8307a2b76e88cfc
2015-09-11qeditor: introduce new "sexy register display"Amaury Pouly7-134/+286
Change-Id: Ib938b4be71d2c7623851dbc3c211f96105077d7d
2015-09-10qeditor: use delegate to show bit range informationAmaury Pouly2-8/+25
Change-Id: I314365c3a2cb9d230c412f24d2a8034a12c43444
2015-03-04qeditor: Add external static libraries to build dependeciesMarcin Bukat1-0/+10
The solution is a bit hacky as it simply call make in libs directory as pre-dependency. Clean doesn't touch libs. Change-Id: Ib447a48fd87cc41228944f17444474a55d393543
2015-01-23atj213x: Fix DMAC block in description fileMarcin Bukat1-49/+55
Change-Id: I4afc17b06f85d552248c0248e6b4b921ffc1e7a7
2015-01-22atj213x: fix desc file errorsMarcin Bukat1-6/+6
Catched by swiss_knife check there are some overlaping fields and invalid characters in some names. Change-Id: Ia26ffd2e29452f4ddd9f8229f78bb2a2cc325ab4
2015-01-12regtools/headergen: Make generator more flexibleMarcin Bukat1-83/+126
Change-Id: I2328ec021ed990a40257d4ce6f4fc5b3db2ba998
2014-12-15regtools/qeditor: use the new model, drop unused codeAmaury Pouly4-111/+67
Change-Id: Ic4e2e201f6d055c85d52b7fe15d25980386df5b8 Reviewed-on: Reviewed-by: Amaury Pouly <>
2014-12-15regtools/qeditor: introduce custom table model for reg fieldsAmaury Pouly2-0/+289
This one is much more efficient than using a generic table widget. Change-Id: I3578964eead746e656f6b0a8dcec0f8442deb13d Reviewed-on: Reviewed-by: Amaury Pouly <>
2014-12-15regtoosl/qeditor: remove unused codeAmaury Pouly2-118/+0
Change-Id: I79ad3151d6a500903786b3467c271b43741f8fee Reviewed-on: Reviewed-by: Amaury Pouly <>
2014-12-15regtools/qeditor: fix field editor not updating the validator on changeAmaury Pouly3-4/+26
Change-Id: Ib8df47c8b7cfe0beb486e45542e3fcc9187bcc54 Reviewed-on: Reviewed-by: Amaury Pouly <>
2014-12-15regtools/qeditor: fix backend dump bug, be more correct on readAmaury Pouly2-4/+5
Change-Id: I581c033435f553f092b61144c4b68b05ab931dd8 Reviewed-on: Reviewed-by: Amaury Pouly <>
2014-12-15regtools/socdesc: update library with a field useful functionsAmaury Pouly1-1/+23
Change-Id: Ib2891fe36b0594e8554bb354a29bc8b3485de20d Reviewed-on: Reviewed-by: Amaury Pouly <>
2014-12-15qeditor: message widget now supports IDs, useful to clear messagesAmaury Pouly4-6/+37
Change-Id: Ibe0a8909128469a71a25415761860e06fc9f1e67 Reviewed-on: Reviewed-by: Amaury Pouly <>
2014-12-15qeditor: change setting names, they were inconsistentAmaury Pouly3-6/+6
Change-Id: I47c94520749d0cef1e602c7c62c685a8a3703258 Reviewed-on: Reviewed-by: Amaury Pouly <>
2014-12-15qeditor: rework register dump to be more general and flexibleAmaury Pouly2-6/+25
Change-Id: I2fb7a2813c93f0804ed1ca6223625706d0dff9a5 Reviewed-on: Reviewed-by: Amaury Pouly <>
2014-12-15qeditor: introduce a new "RAM" backend, and refactor file backendAmaury Pouly2-31/+69
Change-Id: Icfbbc01b83d3592041803387e35f5aa6fb0fa813 Reviewed-on: Reviewed-by: Amaury Pouly <>
2014-12-15qeditor: display message on "Nothing" backend selectionAmaury Pouly3-4/+19
Change-Id: I071c79500f55afe0b6342cbb5a26a9fddba35d94 Reviewed-on: Reviewed-by: Amaury Pouly <>
2014-12-15qeditor: backends can now report validity statusAmaury Pouly2-0/+9
Change-Id: Iefedc9cee10a8c7457d972e5a60d151a6cb38aa8 Reviewed-on: Reviewed-by: Amaury Pouly <>
2014-12-15qeditor: introduce a message widget to display non-interactive messagesAmaury Pouly4-0/+120
Change-Id: Iad43efa1f09428389fbd09403c1ae20d2805f1c5 Reviewed-on: Reviewed-by: Amaury Pouly <>
2014-12-15qeditor: rework mainwindow tab names handlingAmaury Pouly4-7/+20
With the previous code, tab names would be ignored if tab is detached which can happen early on. Change-Id: I9eac4202850f3e79a04590a4ba1444850ec6a583 Reviewed-on: Reviewed-by: Amaury Pouly <>
2014-12-15qeditor: add copyrightAmaury Pouly19-1/+380
Change-Id: I7834bc09b21f2a2d84b1c9edbbe1188372809c63 Reviewed-on: Reviewed-by: Amaury Pouly <>