summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sparc/shared (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* leon, grcan: RTEMS_NO_TIMEOUT on tx_semMartin Aberg2017-05-141-1/+1
|
* leon, grcan: redesigned bus-off and AHB error handlingMartin Aberg2017-05-142-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().
* leon, grcan: updated device name and use it for ISRDaniel Hellstrom2017-05-142-3/+36
|
* leon, grcan: fixed race on interrupt mask registerMartin Aberg2017-05-141-0/+14
| | | | | There was a potential read-modify-write race on the interrupt mask (imr) register between the ISR and user functions.
* leon, grcan: unregister interrupt handler at closeMartin Aberg2017-05-141-1/+5
|
* leon, grcan: protect statistics on copy to userMartin Aberg2017-05-141-0/+3
| | | | | Locking the stats structure when copying to user buffer ensures a consistent view to the user.
* leon, grcan: use RTEMS 4.12 SMP interrupt lockMartin Aberg2017-05-141-27/+44
|
* leon, grcan: consistent indentationMartin Aberg2017-05-142-620/+618
| | | | This commit does not contain any change of functionality.
* leon, grcan: function based user interfaceMartin Aberg2017-05-142-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.
* bsp/leon3: Cleaner namespace for LEON3 debug UARTMartin Aberg2017-05-141-3/+5
| | | | | | Prefix BSP specific symbols with BSP name: dbg_uart -> leon3_debug_uart debug_uart_index -> leon3_debug_uart_index
* leon, irq: single CPU SMP configuration does not need IPI ISRDaniel Hellstrom2017-05-141-3/+8
|
* leon, greth: new option and change soft-reset logic for EDCLDaniel Hellstrom2017-05-141-18/+49
|
* leon, greth: 10/100 modes should be assigned in fastest priorityDaniel Hellstrom2017-05-141-6/+4
|
* leon, greth: speed modes advertising now configurableDaniel Hellstrom2017-05-142-4/+42
|
* leon, greth: EDCL and DD is disabled during resetDaniel Hellstrom2017-05-142-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.
* leon, greth: let Gbit full duplex override halfDaniel Hellstrom2017-05-021-5/+5
|
* leon, greth: SMP support by using spin-lock protectionDaniel Hellstrom2017-05-021-63/+69
|
* leon, gptimer: offset intnum with subtimer indexMartin Aberg2017-05-021-1/+7
| | | | | If separate interrupts are not available, then do not add the timer hardware index number when configuring interrupt affinity.
* leon, gptimer: fixed probing separate interruptsMartin Aberg2017-05-021-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.
* leon, l4stat: Initial driver commitJavier Jalle2017-05-022-0/+717
|
* leon, ambapp: Added L4STAT driver to ambapp idsJavier Jalle2017-05-021-0/+1
|
* leon, occan: Converted disable/enable to SMP locksMartin Aberg2017-05-021-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.
* leon, ahbstat: Use RTEMS 4.12 SMP interrupt lockMartin Aberg2017-05-021-14/+51
|
* leon, memscrub: add GR740 memory scrubber driverJavier Jalle2017-05-023-0/+864
|
* leon, griommu: add GR740 IOMMU driverJavier Jalle2017-05-022-0/+1641
| | | | | The driver is limited to the access protection bit-vector. It currently does not support the IOMMU page-table functionality.
* leon, ambapp: Added GRIOMMU driver to ambapp idsJavier Jalle2017-05-021-0/+1
|
* leon, l2cache: add GR740 L2-Cache driverJavier Jalle2017-05-022-0/+2310
|
* leon, ambapp: Added L2CACHE driver to ambapp idsJavier Jalle2017-05-021-0/+1
|
* leon, grpci2dma: add GR740 PCI DMA driverJavier Jalle2017-05-022-0/+2321
|
* leon, grpci2: prepare for GRPCI2DMA driverJavier Jalle2017-05-021-38/+72
|
* leon, grpci2: Make driver SMP safeJavier Jalle2017-05-021-15/+41
|
* leon, ambapp: updated AMBA PnP IDs and names databaseDaniel Hellstrom2017-05-022-23/+87
|
* leon, apbuart: Wait for shift register on closeMartin Aberg2017-05-021-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.
* leon, apbuart: Optimized RX processing in ISRMartin Aberg2017-05-021-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.
* leon, apbuart: support termios task driven modeMartin Aberg2017-05-021-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.
* leon, apbuart: Inherit HW parameters on sysconsoleMartin Aberg2017-05-023-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.
* leon, apbuart: Assign proper device nameMartin Aberg2017-05-021-3/+4
| | | | | Always assign a device/file system name. Use device unique name for ISR.
* leon, apbuart: RX delayed interruptMartin Aberg2017-05-021-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.
* leon, cons: drvmgr cons interface uses new TERMIOSMartin Aberg2017-05-023-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.
* leon, apbuart: added register defines: FIFO, delay intMartin Aberg2017-05-021-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.
* leon, clock: new driver manager clock driverMartin Aberg2017-05-023-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
* leon, tlib: added timer width mask informationDaniel Hellstrom2017-05-022-0/+24
|
* leon, ambapp_bus: IRQ affinity for on-chip AMBAPP busDaniel Hellstrom2017-05-023-0/+81
|
* leon, GR-CPCI-GR740: Added peripheral PCI driverJavier Jalle2017-05-022-0/+799
|
* shared/drvmgr/leon2_amba_bus.c: Include <rtems/bspIo.h>Joel Sherrill2017-04-241-0/+1
|
* amba/ahbstat.c: Correct printf() formatJoel Sherrill2017-04-231-1/+1
|
* uart/apbuart.c: Correct printk() formatJoel Sherrill2017-04-231-1/+1
|
* spw/grspw_router.c: Include <rtems/bspIo.h>Joel Sherrill2017-04-231-0/+1
|
* irq/genirq.c: Include <rtems/bspIo.h>Joel Sherrill2017-04-231-0/+1
|
* drvmgr/ambapp_bus.c: Include <rtems/bspIo.h>Joel Sherrill2017-04-231-0/+1
|