Commit Graph

29 Commits

Author SHA1 Message Date
Marek Vasut 5fc01191eb asix-sigma: Rework decode_chunk_ts()
This function could have never returned correct data. Rework the decoding
logic according to the Sigma documentation. This patch also fixes the
handling of partial DRAM lines and partial DRAM clusters.

While at it, do not allocate megabytes of data on stack, just allocate 2KiB
which is plenty for all the work this function needs to do.

Signed-off-by: Marek Vasut <marex@denx.de>
2014-04-30 09:45:52 -07:00
Marek Vasut fd830beb67 asix-sigma: Remove stack-based alloc in download_capture()
Avoid allocating 32KiB of data on stack in download_capture(). Instead,
do a glib-variant of calloc(1, ) to allocate the data for the samples
which will be downloaded. This avoids explosions of stack on systems
with tight stack limits.

Furthermore, define structures describing the organisation of Sigma's
DRAM memory and start using those instead of ad-hoc preprocessor macros
defining the sizes of various structures in memory.

Signed-off-by: Marek Vasut <marex@denx.de>
2014-04-30 09:45:51 -07:00
Marek Vasut 462fe78664 asix-sigma: Localize variables
The trigger position, stop position and chunk in which the trigger happened
are no longer needed in the global scope. Make those variables local to the
download_capture() function.

Signed-off-by: Marek Vasut <marex@denx.de>
2014-04-30 09:45:51 -07:00
Marek Vasut 1c2736f909 asix-sigma: Encode the opcodes as hex values
Just encode the opcodes as hexadecimal values. This makes for better
readability when mapping the communication dump with the sigma to the
code.

Signed-off-by: Marek Vasut <marex@denx.de>
2014-04-30 09:45:51 -07:00
Uwe Hermann ba7dd8bbb8 Replace 'probe' with 'channel' in most places.
Also, consistently use 'ch' for channel variables. This matches how we
consistently use sdi, devc, and so on all over the code-base.

This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Martin Ling 3544f848e0 Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
Uwe Hermann 29a27196a1 s/DRIVER_LOG_DOMAIN/LOG_PREFIX/.
This is more correct anyway, and also a bit shorter and more readable.
2013-05-03 21:59:32 +02:00
Uwe Hermann 50985c2019 GPL headers: Use correct project name. 2013-04-23 22:24:30 +02:00
Uwe Hermann 3e9b7f9c77 Rename session_dev_id to cb_data everywhere.
We use 'cb_data' in all drivers these days, make the few remaining ones
that use 'session_dev_id' consistent.
2013-02-07 11:26:02 +01:00
Uwe Hermann 47f4f073e0 asix-sigma: Use message logging helpers. 2012-11-10 19:42:37 +01:00
Bert Vermeulen e9022f596d sr: make struct drv_context global 2012-09-11 21:27:26 +02:00
Bert Vermeulen 0e1357e896 asix-sigma: use driver-private storage for instances 2012-08-03 11:29:00 +02:00
Uwe Hermann 3cd3a20b35 sr: More callback param renames.
Start/stop acquisition callbacks: Consistently name the 'void *' parameter
cb_data for now. The per-device-instance device pointer is called
'session_dev_id' everywhere for now, but this should be renamed to
something more clear.
2012-03-04 15:10:09 +01:00
Uwe Hermann ea9cfed7a5 sr: Consistent ctx name for per-dev-inst context. 2012-02-18 18:07:42 +01:00
Uwe Hermann 0f8522bf74 Project-wide consistent naming for #include guards.
Document the naming scheme in HACKING.
2012-02-05 15:05:13 +01:00
Bert Vermeulen 9c939c5132 use new datafeed packet format 2011-06-19 14:28:50 +02:00
Håvard Espeland 94ba4bd689 Sigma: Update set_configuration to reflect API. 2011-01-18 23:12:57 +01:00
Håvard Espeland 5b5ea7c6d2 Sigma: Only send trigger packet if enabled.
The Sigma hardware emits a default trigger event.
2011-01-18 22:24:23 +01:00
Håvard Espeland 9996570987 Sigma: Move sigma state to device specific struct
Thanks to Daniel Ribeiro for contributing this patch. Some
modifications were done.

Not tested on multiple Sigmas, because of lack of hardware.
2011-01-15 17:04:21 +01:00
Uwe Hermann c2bd92ec08 Slightly more consistent #include-guard naming. 2011-01-15 14:48:21 +01:00
Håvard Espeland 6aac77375b Sigma: Add state machine for tracking Sigma status. 2010-05-03 19:04:10 +02:00
Håvard Espeland a42aec7f6e Sigma: Merge storage of rise/fall triggers. 2010-05-03 15:06:43 +02:00
Håvard Espeland c53d793f03 Sigma: 50 MHZ falling/rising edge trigger support.
Falling/rising edge and value/mask triggers can be combined, e.g.:
  --triggers 1=0,2=r,3=1,4=1
2010-05-02 16:32:24 +02:00
Håvard Espeland ee492173a1 Sigma: Value/mask trigger support in 50 MHz mode. 2010-05-01 23:16:27 +02:00
Håvard Espeland 57bbf56b84 Sigma: Add triggers support for 100 and 200 MHz. 2010-05-01 00:00:57 +02:00
Håvard Espeland edca2c5c22 Sigma: Support for low samplerates
Lowest samplerate supported in driver is 250 KHz
2010-04-28 22:45:13 +02:00
Uwe Hermann fefa18001a ASIX SIGMA: Coding style fixes (via indent mostly).
Also, end all/most comments with full stop and avoid variable/array
definitions in the middle of functions.
2010-04-28 00:17:28 +02:00
Uwe Hermann 204b1629bd asix-sigma.h: Add missing license header. 2010-04-27 22:46:59 +02:00
Håvard Espeland 28a35d8ab3 This commit adds initial support for the Asix Sigma Logic Analyzer. Currently, only 200 MHz is supported, and only with software trigger. Firmware for the device will be distributed separately, with permission from the vendor.
Signed-off-by: Håvard Espeland <gus@ping.uio.no>
2010-04-27 13:16:01 -07:00