]> git.baikalelectronics.ru Git - kernel.git/commit
staging: most: hdm-dim2: monitor atx DBR space
authorAndrey Shvetsov <andrey.shvetsov@k2l.de>
Thu, 15 Sep 2016 14:19:13 +0000 (16:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2016 17:23:29 +0000 (19:23 +0200)
commit183447fa645310dbeb5700f0bb7e2d423e76d995
tree57072198ad76e916dcf33c8e4f8fee17775229be
parentbb2a68b495a92f67f05771b811531e845f6e8801
staging: most: hdm-dim2: monitor atx DBR space

This patch implements a workaround for a DIM2 issue where the device
macro, in case the asynchronous channel sends data (to MOST), sporadically
duplicates the synchronous blocks with a size of half the synchronous DBR
buffer.

The patch monitors the size of the unused asynchronous Tx DBR memory
(that includes the ping and pong sizes) to prevent the potential DBR
overflow for the asynchronous Tx DBR buffer.

The patched DIM2 HDM expects that the platform driver delivers the 2nd
platform irq (index 1) as the mlb_int of the DIM2 macro.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/hdm-dim2/dim2_hal.c
drivers/staging/most/hdm-dim2/dim2_hal.h
drivers/staging/most/hdm-dim2/dim2_hdm.c
drivers/staging/most/hdm-dim2/dim2_reg.h