Commit graph

21 commits

Author SHA1 Message Date
Amaury Pouly
fafb770ca5 regtools/soc_desc: fix bug in library
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-04 17:18:37 +01:00
Amaury Pouly
6ef3f7c13b regtools: fix normalization procedure
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-24 15:17:46 +01:00
Amaury Pouly
6f7ee0bb7c regtools: fix library bug when checking if a reference is valid or not
Change-Id: I8adea40d2fa7c1a26f1975d987233249f61af8ef
2016-09-21 00:31:18 +01:00
Amaury Pouly
7b1bcae879 regtools: rename error_t to err_t to avoid name clash
Change-Id: Ib8d34e4f58f3225b1dafc533ce7e1b7867ad053b
2016-09-21 00:31:12 +01:00
Amaury Pouly
cc4c9b70bc regtools: add register access to soc desc
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-08 19:38:36 +02:00
Amaury Pouly
7619031307 regtools: make description file parser stricter
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-07 15:46:06 +00:00
Amaury Pouly
0f701a64be regtools: update v2 specification, library and tools
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
2016-02-06 15:12:55 +00:00
Amaury Pouly
1cada1f833 soc_desc: new version of the desc file format
Fix qeditor to use the old soc_desc_v1.
Port hwstub_shell to the new description format.

Change-Id: I9fefbff534bfaa5c3603bb3dd8307a2b76e88cfc
2015-09-11 16:40:19 +02:00
Amaury Pouly
6cb861137d regtools/socdesc: update library with a field useful functions
Change-Id: Ib2891fe36b0594e8554bb354a29bc8b3485de20d
Reviewed-on: http://gerrit.rockbox.org/1018
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-12-15 22:53:57 +01:00
Amaury Pouly
40a2ac4b5f regtools/socdesc: fix red
Change-Id: If40c52168eb5cd2d194c90c3f65263d2b9da0451
2014-10-08 16:28:14 +02:00
Marcin Bukat
b888743cac qeditor: Implement clock analyzer for rk27xx
Change-Id: Ib8f53d32120893b6c1054299ed434a6650a0d7c2
Reviewed-on: http://gerrit.rockbox.org/971
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2014-09-19 11:00:31 +02:00
Amaury Pouly
8855ce5a79 regtools/soc_desc: fix libxml2 misinit
The code did not call xmlInitParser() and would call xmlCleanupParser() each
time which is doubly wrong because 1) it's not init 2) all init/cleanup
must be done from the main thread. To ensure 2), call it from a static ctor.

Change-Id: I3d191bf3b8c0cfc51da78157e88c786636fd3ebf
Reviewed-on: http://gerrit.rockbox.org/966
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-09-16 12:16:55 +02:00
Amaury Pouly
4c1eafc208 regtools: headergen can now output the description in the headers
This is useful to provide some documentation in the code.

Change-Id: Ib440363d82c47c36fffb9567a2e7f374eaaa5cbc
2014-05-11 19:56:50 +02:00
Amaury Pouly
dc869e70ac qeditor: add support for deletion of items
Change-Id: I886e15585bd3bfed3303e4b845cd8960a9461277
2014-05-11 19:54:48 +02:00
Amaury Pouly
cf93b33613 regtools: fix makefiles
Change-Id: Ib69aac4e7510c99398130467b7fe0f10fc4897f7
2014-05-01 19:34:58 +02:00
Amaury Pouly
4356666101 regtools: completely rework qeditor, improve soc desc library and tools
The graphical editor can now display and editor description files.
The library has been improved to provide more useful function.
The XML format has been slightly changed: only one soc is allowed per file
(this is was already de facto the case since <soc> was the root tag).
Also introduce a DTD to validate the files.

Change-Id: If70ba35b6dc0242bdb87411cf4baee9597798aac
2014-05-01 19:34:18 +02:00
Amaury Pouly
3754624edc regtools: update soc desc parser/header to include desc fields
Change-Id: I32374784d17f4352905f15e404df23b01338235b
2014-05-01 19:32:01 +02:00
Amaury Pouly
c35e4a4b7d Fix red
Change-Id: Ib64eb3539e33d4336c298612b4508c4611b80c9e
2014-02-12 13:14:02 +01:00
Amaury Pouly
8358707d82 hwstub/regtools/qeditor: put soc descriptors in a list instead of a vector
A SoC descriptor is not a small object: it can be as large as ~100KiB so
it's better to avoid copying things over.

Change-Id: I1ef862e1260299cdaa0c4d2822ac45968713498a
2014-02-10 23:14:26 +01:00
Amaury Pouly
f04d3c518a regtools: add shortcut notation for simple register in the desc files
Change-Id: I2745287844ad0a47dd41ba4dae5e1f7218ae5814
Reviewed-on: http://gerrit.rockbox.org/679
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2013-11-26 00:29:48 +01:00
Amaury Pouly
73db73dbd3 regtools: modify description format and refactor tools
Change the XML description to unify multi dev/reg in a clean
fashion. Move the description parser to its own library. Fix
the tester and headergen tools to work with the new format and
library. Move the STMP3700/3780 descriptions to the new format
(and fixes many errors as well). Drop the hwemulgen tool
in favor on the upcoming hwstub tools revamp.

Change-Id: I7119a187aab5c8b083cc5228cb1b248ee29f184d
2013-06-13 02:25:08 +02:00