summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sparc/shared (unfollow)
Commit message (Collapse)AuthorFilesLines
2017-05-14leon, grcan: RTEMS_NO_TIMEOUT on tx_semMartin Aberg1-1/+1
2017-05-14leon, grcan: redesigned bus-off and AHB error handlingMartin Aberg2-154/+334
When bus-off condition is detected by the ISR, it sets the started flag to STATE_BUSOFF. This is monitored by the user functions grcan_read() and grcan_write() each time they want to enable DMA or update interrupt mask. If they detect that ISR has detected bus-off then they will return either with an error or with the number of CAN messages processed. Future calls to functions which require STARTED mode will be rejected and grcan_isstarted() will return 0. The next call to grcan_stop() will do the transition from BUSOFF->STOPPED and the device can then be started again with grcan_start(). Similar to a bus-off condition, the AHB error condition detected by the ISR will trigger the same shut-down logic of the driver. The difference is that the state entered is STATE_AHBERR and the routines will return a different value to indicate AHB error state. This commit also fixes an issue where ISR was not always unregistered on close. User functions can cause these transitions: STATE_STOPPED -> STATE_STARTED (grcan_start) STATE_STARTED -> STATE_STOPPED (grcan_stop) STATE_BUSOFF -> STATE_STOPPED (grcan_stop, grcan_close) STATE_AHBERR -> STATE_STOPPED (grcan_stop, grcan_close) ISR can cause these transition STATE_STARTED -> STATE_BUSOFF (grcan_interrupt) STATE_STARTED -> STATE_AHBERR (grcan_interrupt) STATE_BUSOFF/AHBERR is entered from ISR on bus-off condition. At transition the ISR disables DMA, masks all interrupts and flushes semaphores. Other related updates: * Statistics are updated from the ISR. Update is now spin-locked to ensure a consistent user view. * The debug output has been updated to include state changes. * For read/write/flush, return error (-4) if driver aborted the operation due to bus-off. Likewise if abourted due to AHB error -5 is returned. * Collect bus-off statistics Related to the new BUSOFF and AHBERR states the API has been updated to reflect the current SW driver state. The isstarted() function has been replaced with get_state().
2017-05-14leon, grcan: updated device name and use it for ISRDaniel Hellstrom2-3/+36
2017-05-14leon, grcan: fixed race on interrupt mask registerMartin Aberg1-0/+14
There was a potential read-modify-write race on the interrupt mask (imr) register between the ISR and user functions.
2017-05-14leon, grcan: unregister interrupt handler at closeMartin Aberg1-1/+5
2017-05-14leon, grcan: protect statistics on copy to userMartin Aberg1-0/+3
Locking the stats structure when copying to user buffer ensures a consistent view to the user.
2017-05-14leon, grcan: use RTEMS 4.12 SMP interrupt lockMartin Aberg1-27/+44
2017-05-14leon, grcan: consistent indentationMartin Aberg2-620/+618
This commit does not contain any change of functionality.
2017-05-14leon, grcan: function based user interfaceMartin Aberg2-356/+436
This commit preserves all driver services, using a function based user interface instead of the I/O interface. The messages count parameter is now number of CAN messages instead of number of bytes.
2017-05-14bsp/leon3: Cleaner namespace for LEON3 debug UARTMartin Aberg1-3/+5
Prefix BSP specific symbols with BSP name: dbg_uart -> leon3_debug_uart debug_uart_index -> leon3_debug_uart_index
2017-05-14leon, irq: single CPU SMP configuration does not need IPI ISRDaniel Hellstrom1-3/+8
2017-05-14leon, greth: new option and change soft-reset logic for EDCLDaniel Hellstrom1-18/+49
2017-05-14leon, greth: 10/100 modes should be assigned in fastest priorityDaniel Hellstrom1-6/+4
2017-05-14leon, greth: speed modes advertising now configurableDaniel Hellstrom2-4/+42
2017-05-14leon, greth: EDCL and DD is disabled during resetDaniel Hellstrom2-14/+34
The EDCL and Duplex-Detection are now disabled during soft-reset of the GRETH core. The speed settings are preserved on boot and greth_stop() also, this is required to keep EDCL operational when DD is set.
2017-05-02leon, greth: let Gbit full duplex override halfDaniel Hellstrom1-5/+5
2017-05-02leon, greth: SMP support by using spin-lock protectionDaniel Hellstrom1-63/+69
2017-05-02leon, gptimer: offset intnum with subtimer indexMartin Aberg1-1/+7
If separate interrupts are not available, then do not add the timer hardware index number when configuring interrupt affinity.
2017-05-02leon, gptimer: fixed probing separate interruptsMartin Aberg1-1/+1
Probing of separate interrupts was done by storing the GPTIMER_CFG_SI bit. But it was never actually stored since it is bit 8 and the datatype is 8-bit. Now store the AND result as boolean value instead.
2017-05-02leon, l4stat: Initial driver commitJavier Jalle2-0/+717
2017-05-02leon, ambapp: Added L4STAT driver to ambapp idsJavier Jalle1-0/+1
2017-05-02leon, occan: Converted disable/enable to SMP locksMartin Aberg1-17/+38
This commit updates the OCCAN driver locking mechanism: 1. Convert interrupt disable/enable to interrupt locks. 2. Make sure interrupt service routines use proper locking to deal with threads running in parallel.
2017-05-02leon, ahbstat: Use RTEMS 4.12 SMP interrupt lockMartin Aberg1-14/+51
2017-05-02leon, memscrub: add GR740 memory scrubber driverJavier Jalle3-0/+864
2017-05-02leon, griommu: add GR740 IOMMU driverJavier Jalle2-0/+1641
The driver is limited to the access protection bit-vector. It currently does not support the IOMMU page-table functionality.
2017-05-02leon, ambapp: Added GRIOMMU driver to ambapp idsJavier Jalle1-0/+1
2017-05-02leon, l2cache: add GR740 L2-Cache driverJavier Jalle2-0/+2310
2017-05-02leon, ambapp: Added L2CACHE driver to ambapp idsJavier Jalle1-0/+1
2017-05-02leon, grpci2dma: add GR740 PCI DMA driverJavier Jalle2-0/+2321
2017-05-02leon, grpci2: prepare for GRPCI2DMA driverJavier Jalle1-38/+72
2017-05-02leon, grpci2: Make driver SMP safeJavier Jalle1-15/+41
2017-05-02leon, ambapp: updated AMBA PnP IDs and names databaseDaniel Hellstrom2-23/+87
2017-05-02leon, apbuart: Wait for shift register on closeMartin Aberg1-1/+6
Do not disable transmitter until shift register is empty when closing device. It is correct to look at the sending software state when closing the device. However, the sending state must be cleared only when everything is sent.
2017-05-02leon, apbuart: Optimized RX processing in ISRMartin Aberg1-8/+17
Limit the number of calls to termios rtems_termios_enqueue_raw_characters() by reading out the RX FIFO on stack and then call termios only once.
2017-05-02leon, apbuart: support termios task driven modeMartin Aberg1-16/+48
The APBUART control register can be updated from both ISR and task context so the device must be locked when manipulating the register. There is also a scenario with RX FIFO interrupts where a few characters can be in the FIFO without generating interrupt.
2017-05-02leon, apbuart: Inherit HW parameters on sysconsoleMartin Aberg3-7/+15
The cons layer decides which of the registered console device is granted as system console. When a device specific console driver performs its first_open, it inherits UART parameters from boot loader only if it is the system console.
2017-05-02leon, apbuart: Assign proper device nameMartin Aberg1-3/+4
Always assign a device/file system name. Use device unique name for ISR.
2017-05-02leon, apbuart: RX delayed interruptMartin Aberg1-2/+42
Utilize the APBUART RX delayed interrupt if available. It also enables RX FIFO interrupt when used. The APBUART RX delayed interrupt is supported by the GR740.
2017-05-02leon, cons: drvmgr cons interface uses new TERMIOSMartin Aberg3-205/+232
LEON driver manager console driver interface (cons) and the APBUART cons driver (apbuart_cons) have been updated for recent TERMIOS interface changes. The legacy callback API is not used anymore and deprecated functions are eliminated. This new implementation is based on RTEMS BSP and Device Driver Development Guide, chapter named "Console Driver". - Functions marked as deprecated (rtems_termios_open() and rtems_termios_close()) have been updated with the present-day versions. - The legacy "callback" interface is replaced with the "handler" interface. - Implementation is inspired by the documentation example, the non-driver manager driver for APBUART (apbuart_termios). - Polled, interrupt and task mode is supported.
2017-05-02leon, apbuart: added register defines: FIFO, delay intMartin Aberg1-0/+3
The FIFOs available capability bit is available in the UART Control Register: FIFOs available (FA) - Set to 1 when receiver and transmitter FIFOs are available. When 0, only holding register is available. Delay interrupt can delay a receive character interrupt to better handle RX bursts.
2017-05-02leon, clock: new driver manager clock driverMartin Aberg3-194/+373
- Compatible with SMP - Selects timecounter depending on features available - Fixes problem with time going to fast on SMP This is an implementation of the RTEMS "clockdrv_shell" interface for LEON2/3/4 systems using the Driver Manager. It is clock hardware agnostic and compatible with SMP and UP. Availability of free running counters is probed and selected as needed. GR740: RTEMS TESTSUITE FAILURE SUMMARY Result Test ExecRes ConsoleRes ExitCode1 ExitCode2 FAIL: ./fstests/imfs_fsscandir01 OK FAIL 5 0 FAIL: ./fstests/jffs2_fsscandir01 OK FAIL 5 0 FAIL: ./fstests/mdosfs_fsscandir01 OK FAIL 5 0 FAIL: ./fstests/mimfs_fsscandir01 OK FAIL 5 0 FAIL: ./fstests/mrfs_fsscandir01 OK FAIL 5 0 FAIL: ./psxtests/psxshm01 FAIL FAIL N/A N/A FAIL: ./psxtests/psxshm02 FAIL FAIL N/A N/A FAIL: ./sptests/spinternalerror01 OK N/A -559038737 1611526157 FAIL: ./sptests/sptimecounter01 OK N/A 5 0 SUMMARY Tests failing: 9 Tests successful: 578 --- GR712RC: RTEMS TESTSUITE FAILURE SUMMARY Result Test ExecRes ConsoleRes ExitCode1 ExitCode2 FAIL: ./smptests/smpipi01 FAIL FAIL N/A N/A FAIL: ./smptests/smpthreadlife01 FAIL FAIL N/A N/A FAIL: ./fstests/imfs_fsscandir01 OK FAIL 5 0 FAIL: ./fstests/jffs2_fsscandir01 OK FAIL 5 0 FAIL: ./fstests/mdosfs_fsscandir01 OK FAIL 5 0 FAIL: ./fstests/mimfs_fsscandir01 OK FAIL 5 0 FAIL: ./fstests/mrfs_fsscandir01 OK FAIL 5 0 FAIL: ./psxtests/psxshm01 FAIL FAIL N/A N/A FAIL: ./psxtests/psxshm02 FAIL FAIL N/A N/A FAIL: ./sptests/spinternalerror01 OK N/A -559038737 1611526157 FAIL: ./sptests/sptimecounter01 OK N/A 5 0 SUMMARY Tests failing: 11 Tests successful: 576
2017-05-02leon, tlib: added timer width mask informationDaniel Hellstrom2-0/+24
2017-05-02leon, ambapp_bus: IRQ affinity for on-chip AMBAPP busDaniel Hellstrom3-0/+81
2017-05-02leon, GR-CPCI-GR740: Added peripheral PCI driverJavier Jalle2-0/+799
2017-04-24shared/drvmgr/leon2_amba_bus.c: Include <rtems/bspIo.h>Joel Sherrill1-0/+1
2017-04-23amba/ahbstat.c: Correct printf() formatJoel Sherrill1-1/+1
2017-04-23uart/apbuart.c: Correct printk() formatJoel Sherrill1-1/+1
2017-04-23spw/grspw_router.c: Include <rtems/bspIo.h>Joel Sherrill1-0/+1
2017-04-23irq/genirq.c: Include <rtems/bspIo.h>Joel Sherrill1-0/+1
2017-04-23drvmgr/ambapp_bus.c: Include <rtems/bspIo.h>Joel Sherrill1-0/+1