Commit Graph
30215 Commits
Author SHA1 Message Date
Daniel Hellstrom ab9b4478a3 leon, grspw_pkt: added work-task configuration options
Following changes:
     * possible for user to create work-tasks and assign custom  message queues.
     * possible for user to override default ISR message to implement custom
       handling of DMA error, DMA RX/TX and link error from ISR.
     * work-task now checks message to determine which work to perform rather than
       looking at registers only, this makes it possible for user to implement
       custom handling.
     * exported work-queue message definitions and separated them so that a user
       can assign custom DMA RX/TX handling of a specific DMA channel.
     * added a work-task event callback to let user add custom handling or
       monitoring of DMA Stop, DMA error, Link Error or work-task exits etc.
2017-03-06 07:54:55 +01:00
Javier Jalle f46f5f845d leon, grpci2: latency timer user configurable (default 64) 2017-03-06 07:54:55 +01:00
Javier Jalle 0c23dd5046 leon, gr740: fix device registration for GRPCI2 core 2017-03-06 07:54:55 +01:00
Javier Jalle 73b06e64f7 leon, gr-cpci-leon4-n2x: small comment fix 2017-03-06 07:54:55 +01:00
Javier Jalle bb8e099c48 leon, grpci2: updated DMA descriptor layout 2017-03-06 07:54:55 +01:00
Javier Jalle d9d8dbdf09 leon, grpci2: fixed wrong bit layout 2017-03-06 07:54:55 +01:00
Javier Jalle a545ce26d7 leon, grpci2: added TIMEOUT interrupt 2017-03-06 07:54:55 +01:00
Javier Jalle 89173ee97e bsps/sparc: Updated L2C registers 2017-03-06 07:54:55 +01:00
Daniel Cederman 84557ef62c libdrvmgr: remove braces 2017-03-06 07:54:55 +01:00
Daniel Hellstrom 418149c80b libdrvmgr: added default BSP init level hook 2017-03-06 07:54:55 +01:00
Daniel Hellstrom ef94150f41 leon, grspw_pkt: Added checks for special list cases
- Fixed grspw_dma_tx_send() so that it does not fail when an empty user packet
  is provided.
- Added empty checks on some of the list handling inline functions for
  GRSPW_PKT. Their use by the driver may be correct already, but the user might
  not have been aware of the assumptions that certain lists had to be non-empty.
2017-03-06 07:54:55 +01:00
Daniel Hellstrom a7cc0da94f leon, grspw_pkt: fix stscfg cfg TimeCode Int clr
Without this patch time code interrupts was never cleared
in the STATUS register.
2017-03-06 07:54:55 +01:00
Daniel Hellstrom 0d31dccdee leon, grspw_pkt: split DMA sem into RX and TX sem
By introducing a spearate RX and TX DMA channel semaphore RX
operations and TX operations does not block each other. Stopping
a DMA channel needs now to take both RX and TX semaphores to
block out both RX and TX tasks.
2017-03-06 07:54:55 +01:00
Daniel Hellstrom 7701c37d60 leon, grspw_pkt: coding style fix 2017-03-06 07:54:55 +01:00
Daniel Hellstrom 77856f67aa leon, grspw_pkt: allow user controlled DMA intr
The user has already the power to control which DMA buffer
will generate interrupt, but no clean way to enable RX/TX
interrupts on DMA channel. Without this patch the user had
to init DMA config rx/tx_irq_en_cnt to a very large value.
2017-03-06 07:54:55 +01:00
Daniel Hellstrom 1ef9caa26b leon, grspw_pkt: support for reading tx/rx DMA queue
* Add support for reading the GRSPW TX/RX descriptor counters
   directly.
 * Add semaphore lock to counters to avoid couters being out
   of sync
 * This makes it possible for the user in polling mode to check
   the amount of work before entering RX/TX descriptor table
   processing.
2017-03-06 07:54:55 +01:00
Daniel Hellstrom eb5a42f6e0 leon, grspw_pkt: fixed device/dma closing
The user is now responsible to stop and close the DMA channels
before closing the device. To prevent complicated situations and
blocking the caller of grspw_close and grspw_dma_close a return
code was added to indicate to the user that the DMA may not have
been stopped or that blocked tasks are still active within the
driver for the specified device.
2017-03-06 07:54:55 +01:00
Daniel Hellstrom 36c3fbbd4a leon, grspw_pkt: coding style fixups 2017-03-06 07:54:55 +01:00
Daniel Hellstrom 9cb7e5d80f leon, grspw_pkt: fixed and improved RX/TX wait 2017-03-06 07:54:55 +01:00
Daniel Hellstrom 57e1f4c30b leon, grspw_pkt: fixed error return path in dma_open 2017-03-06 07:54:55 +01:00
Daniel Hellstrom ac7da5bcb0 leon, grspw_pkt: Manual handling of link status events
Added functionality for manual handling of link status events,
configurable via grspw_link_ctrl.

Added statistics counter for disconnect error.
2017-03-06 07:54:55 +01:00
Daniel Hellstrom 49cf776e7f leon, grspw_pkt: added link_ctrl options
Improved the link error handling options. Its now possible to
disable the link on individual link errors/warnings instead of
always on all or none.

Changed name of LINKOPTS_IRQ to LINKOPTS_EIRQ to match Linux
and VxWorks SpW driver.
2017-03-06 07:54:55 +01:00
Daniel Hellstrom fad4324d52 leon, grspw_pkt: added grspw_link_status_clr() to API 2017-03-06 07:54:55 +01:00
Daniel Hellstrom c442647f9d leon, grspw_pkt: code style clean-ups 2017-03-06 07:54:55 +01:00
Daniel Hellstrom 61cc024aca leon, gptimer: start/reset must take RS and IP into account 2017-03-06 07:54:55 +01:00
Daniel Hellstrom b109add5b2 leon: Fix ambapp_bus OCCAN device registeration order
NOTE that this will change the association of /dev/occanN
with OCCAN[N] device to the same order as in hardware. This means
that if you have been useing /dev/occan0 before you have to use
/dev/occan1 on a dual OCCAN device system (this affects GR712RC).
2017-03-06 07:54:55 +01:00
Martin Aberg 6ecad1d526 leon, grspw_pkt: Preserve DMA address enable at start.
The EN bit (enable separate node address for this channel) is preserved when
grspw_dma_start is called. This preserves any previous address configuration.
2017-03-06 07:54:55 +01:00
Martin Aberg a48bfc0ffa leon, grspw_pkt: Fixed txpkt flag for link error
There was a mixup between the transmit descriptor Link error (LE) bit and
Interrupt enable (IE) bit. TXPKT_FLAG_LINKERR now correctly indicates the link
error condition.
2017-03-06 07:54:55 +01:00
Martin Aberg 3395ca9912 leon, grspw_pkt: Fixed parameter check in grspw_dma_open() 2017-03-06 07:54:55 +01:00
Daniel Hellstrom 4431f7d262 leon, gr1553b: RT status words register declarations fix
The fix does not affect the driver since the bit definitions
were never used by the GR5133B drivers. However it could affect
and application using the definitions.
2017-03-06 07:54:55 +01:00
Daniel Hellstrom d7452976e4 leon, gr1553b: comment cleanup 2017-03-06 07:54:55 +01:00
Daniel Hellstrom 91df5a6995 libpci: code cleanup 2017-03-06 07:54:55 +01:00
Daniel Hellstrom be66bbc1e8 leon, grspw: rxPktSize must set DMA RX max length 2017-03-06 07:54:55 +01:00
Sebastian Huber cb056d02c5 cdtest: Print begin of test only once 2017-03-03 09:04:12 +01:00
Sebastian Huber c0dafd7ba3 bsp/qoriq: Use at most 2GiB of RAM 2017-03-02 16:53:45 +01:00
Sebastian Huber d3f60afbfe bsp/qoriq: Adjust workspace according to FDT 2017-03-02 15:25:34 +01:00
Sebastian Huber 35136d3d4e bsp/qoriq: Use -O2 2017-03-02 15:20:52 +01:00
Sebastian Huber 62f16ad4e3 bsp/qoriq: Enable linker garbage collection 2017-03-02 15:20:19 +01:00
Sebastian Huber 891b834fb5 bsp/qoriq: Do not overwrite configured baud 2017-03-02 15:17:35 +01:00
Sebastian Huber 805d721304 powerpc: Fix warnings 2017-03-02 12:02:49 +01:00
Sebastian Huber 09dab28da0 powerpc: Fix interrupt thread dispatch
Update #2751.
2017-03-02 12:02:49 +01:00
Sebastian Huber 1f618ab00f posix_devctl: Fix for pre C99
Use __restrict just like in <devctl.h> to avoid compiler errors with
older GCC, e.g. 4.8 or 4.9.
2017-03-02 07:54:52 +01:00
Sebastian Huber 08d8599245 bsps/powerpc: Fix warnings 2017-03-01 11:31:57 +01:00
Sebastian Huber a60db6958f dosfs: Fix FAT32 formatter
The second FAT entry contains a bit to indicate if the FAT32 filesystem
is not dirty and a bit to indicate if there was no IO error.  Set both
bits for a fresh filesystem.  This prevents a warning if mounted on
Windows.

Close #2913.
2017-02-28 09:31:04 +01:00
Sebastian Huber 267de79ad2 dosfs: Directories should have a file size of 0
Close #2755.
2017-02-28 09:31:04 +01:00
Sebastian Huber f71ccc345e termios: Simplify some calculations
Use the modular arithmetic addition rule.
2017-02-28 09:31:04 +01:00
Sebastian Huber 902ffeddb5 termios09: Test send callback 2017-02-28 09:09:23 +01:00
Sebastian Huber 3663543392 termios: Implement non-blocking write 2017-02-28 09:09:23 +01:00
Sebastian Huber a165a9607a termios: Make write POSIX compatible
Currently only blocking read/write operations are implemented.  A
blocking write must transfer at least one character.  It should not wait
for the device for the second character and so on.

Close #2917.
2017-02-28 09:09:19 +01:00
Sebastian Huber c41b47e3e4 termios: Introduce doTransmit() 2017-02-28 09:05:47 +01:00