[PATCH 03/30] leon, ambapp_bus: IRQ affinity for on-chip AMBAPP bus

2017-04-13 Thread Daniel Hellstrom
--- c/src/lib/libbsp/sparc/shared/drvmgr/ambapp_bus.c | 38 + .../libbsp/sparc/shared/drvmgr/ambapp_bus_grlib.c | 39 ++ .../sparc/shared/include/drvmgr/ambapp_bus.h | 4 +++ 3 files changed, 81 insertions(+) diff --git a/c/src/lib/libbsp/sparc/sha

[PATCH 01/30] leon, GR-CPCI-GR740: Added peripheral PCI driver

2017-04-13 Thread Daniel Hellstrom
From: Javier Jalle --- c/src/lib/libbsp/sparc/Makefile.am | 2 + c/src/lib/libbsp/sparc/leon2/Makefile.am | 2 + c/src/lib/libbsp/sparc/leon2/preinstall.am | 4 + c/src/lib/libbsp/sparc/leon3/Makefile.am | 2 + c/src/lib/libbsp/sparc/leon3/prei

[PATCH 02/30] drvmgr: ability to configure IRQ affinity

2017-04-13 Thread Daniel Hellstrom
--- cpukit/libdrvmgr/drvmgr.h| 20 cpukit/libdrvmgr/drvmgr_drvinf.c | 13 + 2 files changed, 33 insertions(+) diff --git a/cpukit/libdrvmgr/drvmgr.h b/cpukit/libdrvmgr/drvmgr.h index 194de66..a8e1c8c 100644 --- a/cpukit/libdrvmgr/drvmgr.h +++ b/cpukit/libd

[PATCH 04/30] leon, tlib: added timer width mask information

2017-04-13 Thread Daniel Hellstrom
--- c/src/lib/libbsp/sparc/shared/include/tlib.h | 8 c/src/lib/libbsp/sparc/shared/timer/gptimer.c | 16 2 files changed, 24 insertions(+) diff --git a/c/src/lib/libbsp/sparc/shared/include/tlib.h b/c/src/lib/libbsp/sparc/shared/include/tlib.h index 7e6c49a..5e49dd4

[PATCH 00/30] LEON improvements, second batch

2017-04-13 Thread Daniel Hellstrom
Second batch of patches for LEON. Focus this time on the two multi-core LEON chips, GR712RC and GR740. In short it contains: * GR740 quad-core LEON4-FT BSP updates, new drivers specific for GR740: - I/O MMU bit access vector protection - LEON4 statistics counters - Main memory scrubber

[PATCH 05/30] leon, clock: new driver manager clock driver

2017-04-13 Thread Daniel Hellstrom
From: Martin Aberg - 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 compat

[PATCH 08/30] leon, apbuart: RX delayed interrupt

2017-04-13 Thread Daniel Hellstrom
From: Martin Aberg 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. --- c/src/lib/libbsp/sparc/shared/uart/apbuart_cons.c | 44 +-- 1 file changed, 42 insertions(+)

[PATCH 09/30] leon, apbuart: Assign proper device name

2017-04-13 Thread Daniel Hellstrom
From: Martin Aberg Always assign a device/file system name. Use device unique name for ISR. --- c/src/lib/libbsp/sparc/shared/uart/apbuart_cons.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/c/src/lib/libbsp/sparc/shared/uart/apbuart_cons.c b/c/src/lib/libbsp/sparc

[PATCH 13/30] leon, apbuart: Wait for shift register on close

2017-04-13 Thread Daniel Hellstrom
From: Martin Aberg 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. --- c/src/lib/libbsp/sparc/shared/uart/apbuart_co

[PATCH 11/30] leon, apbuart: support termios task driven mode

2017-04-13 Thread Daniel Hellstrom
From: Martin Aberg 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. --- c/src/lib/libbsp

[PATCH 12/30] leon, apbuart: Optimized RX processing in ISR

2017-04-13 Thread Daniel Hellstrom
From: Martin Aberg 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. --- c/src/lib/libbsp/sparc/shared/uart/apbuart_cons.c | 25 +++ 1 file changed, 17 insertions(+), 8 deletions(-)

[PATCH 07/30] leon, cons: drvmgr cons interface uses new TERMIOS

2017-04-13 Thread Daniel Hellstrom
From: Martin Aberg 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

[PATCH 06/30] leon, apbuart: added register defines: FIFO, delay int

2017-04-13 Thread Daniel Hellstrom
From: Martin Aberg 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

[PATCH 14/30] leon, ambapp: updated AMBA PnP IDs and names database

2017-04-13 Thread Daniel Hellstrom
--- c/src/lib/libbsp/sparc/shared/amba/ambapp_names.c | 28 +++- c/src/lib/libbsp/sparc/shared/include/ambapp_ids.h | 82 -- 2 files changed, 87 insertions(+), 23 deletions(-) diff --git a/c/src/lib/libbsp/sparc/shared/amba/ambapp_names.c b/c/src/lib/libbsp/sparc/shared/

[PATCH 10/30] leon, apbuart: Inherit HW parameters on sysconsole

2017-04-13 Thread Daniel Hellstrom
From: Martin Aberg 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. --- c/src/lib/libbsp/sparc/shared/include/c

[PATCH 15/30] leon, grpci2: Make driver SMP safe

2017-04-13 Thread Daniel Hellstrom
From: Javier Jalle --- c/src/lib/libbsp/sparc/shared/pci/grpci2.c | 57 ++ 1 file changed, 42 insertions(+), 15 deletions(-) diff --git a/c/src/lib/libbsp/sparc/shared/pci/grpci2.c b/c/src/lib/libbsp/sparc/shared/pci/grpci2.c index be459cc..7556f68 100644 --- a/c/sr

[PATCH 16/30] leon, grpci2: prepare for GRPCI2DMA driver

2017-04-13 Thread Daniel Hellstrom
From: Javier Jalle --- c/src/lib/libbsp/sparc/shared/pci/grpci2.c | 110 +++-- 1 file changed, 72 insertions(+), 38 deletions(-) diff --git a/c/src/lib/libbsp/sparc/shared/pci/grpci2.c b/c/src/lib/libbsp/sparc/shared/pci/grpci2.c index 7556f68..eb62226 100644 --- a/c/sr

[PATCH 20/30] leon, ambapp: Added GRIOMMU driver to ambapp ids

2017-04-13 Thread Daniel Hellstrom
From: Javier Jalle --- c/src/lib/libbsp/sparc/shared/include/drvmgr/ambapp_bus.h | 1 + 1 file changed, 1 insertion(+) diff --git a/c/src/lib/libbsp/sparc/shared/include/drvmgr/ambapp_bus.h b/c/src/lib/libbsp/sparc/shared/include/drvmgr/ambapp_bus.h index e783b68..203e7e9 100644 --- a/c/src/li

[PATCH 17/30] leon, grpci2dma: add GR740 PCI DMA driver

2017-04-13 Thread Daniel Hellstrom
From: Javier Jalle --- c/src/lib/libbsp/sparc/Makefile.am|2 + c/src/lib/libbsp/sparc/leon2/Makefile.am |2 + c/src/lib/libbsp/sparc/leon2/preinstall.am|4 + c/src/lib/libbsp/sparc/leon3/Makefile.am |2 + c/src/lib/libbsp/sparc/leon3/prei

[PATCH 18/30] leon, ambapp: Added L2CACHE driver to ambapp ids

2017-04-13 Thread Daniel Hellstrom
From: Javier Jalle --- c/src/lib/libbsp/sparc/shared/include/drvmgr/ambapp_bus.h | 1 + 1 file changed, 1 insertion(+) diff --git a/c/src/lib/libbsp/sparc/shared/include/drvmgr/ambapp_bus.h b/c/src/lib/libbsp/sparc/shared/include/drvmgr/ambapp_bus.h index ee4a152..e783b68 100644 --- a/c/src/li

[PATCH 19/30] leon, l2cache: add GR740 L2-Cache driver

2017-04-13 Thread Daniel Hellstrom
From: Javier Jalle --- c/src/lib/libbsp/sparc/Makefile.am |4 + c/src/lib/libbsp/sparc/leon2/Makefile.am|4 + c/src/lib/libbsp/sparc/leon2/preinstall.am |4 + c/src/lib/libbsp/sparc/leon3/Makefile.am|4 + c/src/lib/libbsp/sparc/leon3/preinstall.am |4 + c/s

[PATCH 21/30] leon, griommu: add GR740 IOMMU driver

2017-04-13 Thread Daniel Hellstrom
From: Javier Jalle The driver is limited to the access protection bit-vector. It currently does not support the IOMMU page-table functionality. --- c/src/lib/libbsp/sparc/Makefile.am |4 + c/src/lib/libbsp/sparc/leon2/Makefile.am|4 + c/src/lib/libbsp/sparc/leon2/pre

[PATCH 25/30] leon, ambapp: Added L4STAT driver to ambapp ids

2017-04-13 Thread Daniel Hellstrom
From: Javier Jalle --- c/src/lib/libbsp/sparc/shared/include/drvmgr/ambapp_bus.h | 1 + 1 file changed, 1 insertion(+) diff --git a/c/src/lib/libbsp/sparc/shared/include/drvmgr/ambapp_bus.h b/c/src/lib/libbsp/sparc/shared/include/drvmgr/ambapp_bus.h index 41df26e..e59af06 100644 --- a/c/src/li

[PATCH 27/30] leon, gptimer: fixed probing separate interrupts

2017-04-13 Thread Daniel Hellstrom
From: Martin Aberg 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. --- c/src/lib/libbsp/sparc/shared/timer/gptimer.c | 2 +- 1 file changed,

[PATCH 23/30] leon, ahbstat: Use RTEMS 4.12 SMP interrupt lock

2017-04-13 Thread Daniel Hellstrom
From: Martin Aberg --- c/src/lib/libbsp/sparc/shared/amba/ahbstat.c | 64 ++-- 1 file changed, 51 insertions(+), 13 deletions(-) diff --git a/c/src/lib/libbsp/sparc/shared/amba/ahbstat.c b/c/src/lib/libbsp/sparc/shared/amba/ahbstat.c index a30f0b1..0119fc1 100644 --- a/

[PATCH 22/30] leon, memscrub: add GR740 memory scrubber driver

2017-04-13 Thread Daniel Hellstrom
From: Javier Jalle --- c/src/lib/libbsp/sparc/Makefile.am | 4 + c/src/lib/libbsp/sparc/leon2/Makefile.am | 4 + c/src/lib/libbsp/sparc/leon2/preinstall.am | 4 + c/src/lib/libbsp/sparc/leon3/Makefile.am | 4 + c/src/lib/libbsp/sparc/leon3/prei

[PATCH 28/30] leon, gptimer: offset intnum with subtimer index

2017-04-13 Thread Daniel Hellstrom
From: Martin Aberg If separate interrupts are not available, then do not add the timer hardware index number when configuring interrupt affinity. --- c/src/lib/libbsp/sparc/shared/timer/gptimer.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/c/src/lib/libbsp/sparc/sh

[PATCH 24/30] leon, occan: Converted disable/enable to SMP locks

2017-04-13 Thread Daniel Hellstrom
From: Martin Aberg 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. --- c/src/lib/libbsp/sparc/shared/can/occan.c | 55 +

[PATCH 26/30] leon, l4stat: Initial driver commit

2017-04-13 Thread Daniel Hellstrom
From: Javier Jalle --- c/src/lib/libbsp/sparc/Makefile.am | 4 + c/src/lib/libbsp/sparc/leon2/Makefile.am | 5 + c/src/lib/libbsp/sparc/leon2/preinstall.am | 4 + c/src/lib/libbsp/sparc/leon3/Makefile.am | 4 + c/src/lib/libbsp/sparc/leon3/preinstall.am |

[PATCH 30/30] leon, greth: let Gbit full duplex override half

2017-04-13 Thread Daniel Hellstrom
--- c/src/lib/libbsp/sparc/shared/net/greth.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/c/src/lib/libbsp/sparc/shared/net/greth.c b/c/src/lib/libbsp/sparc/shared/net/greth.c index 9af2de2..bb33309 100644 --- a/c/src/lib/libbsp/sparc/shared/net/greth.c +++ b/c/

[PATCH 29/30] leon, greth: SMP support by using spin-lock protection

2017-04-13 Thread Daniel Hellstrom
--- c/src/lib/libbsp/sparc/shared/net/greth.c | 134 -- 1 file changed, 71 insertions(+), 63 deletions(-) diff --git a/c/src/lib/libbsp/sparc/shared/net/greth.c b/c/src/lib/libbsp/sparc/shared/net/greth.c index 7726799..9af2de2 100644 --- a/c/src/lib/libbsp/sparc/shar

[PATCH v2 4/6] posix/mman: add mmap support for shm objects

2017-04-13 Thread Gedare Bloom
Update #2859. --- cpukit/posix/include/rtems/posix/mmanimpl.h | 4 ++- cpukit/posix/src/mmap.c | 43 +++-- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/cpukit/posix/include/rtems/posix/mmanimpl.h b/cpukit/posix/include/rtems/posix/mm

[PATCH v2 1/6] posix/mman: update atime on shared memory read call

2017-04-13 Thread Gedare Bloom
Update #2859. --- cpukit/posix/include/rtems/posix/shmimpl.h | 9 + cpukit/posix/src/shmopen.c | 1 + 2 files changed, 10 insertions(+) diff --git a/cpukit/posix/include/rtems/posix/shmimpl.h b/cpukit/posix/include/rtems/posix/shmimpl.h index 207f50f..ff3299e 100644 --- a

[PATCH v2 6/6] posix/mmap: add mmap hooks for MAP_SHARED shms

2017-04-13 Thread Gedare Bloom
Updates #2859. --- cpukit/posix/include/rtems/posix/mmanimpl.h | 2 +- cpukit/posix/include/rtems/posix/shm.h | 30 cpukit/posix/src/mmap.c | 208 +--- cpukit/posix/src/munmap.c | 17 ++- cpukit/posix/src/shmheap.c

[PATCH v2 5/6] posix/mman: defer cleaning up mapped objects

2017-04-13 Thread Gedare Bloom
In case a file or shared memory object has been mmapped, then the libc close() needs to defer recycling the file descriptor and related rtems_libo_t structure until all mappings are unmapped. Similarly, shm_close() needs to defer removing the backing shared memory object until the mappings are unma

[PATCH v2 3/6] posix: Add mmap/unmap support for mapping files.

2017-04-13 Thread Gedare Bloom
From: Chris Johns This version of mmap comes from early work done on the RTL code base circa 2012. Update #2859. --- cpukit/posix/Makefile.am| 1 + cpukit/posix/include/rtems/posix/mmanimpl.h | 44 + cpukit/posix/preinstall.am | 4 + cpukit/posix/sr

[PATCH v2 2/6] posix/shm: replace threadq with mutex (allocator lock)

2017-04-13 Thread Gedare Bloom
Closes #2957. --- cpukit/posix/include/rtems/posix/shmimpl.h | 19 --- cpukit/posix/src/shmopen.c | 14 +- 2 files changed, 5 insertions(+), 28 deletions(-) diff --git a/cpukit/posix/include/rtems/posix/shmimpl.h b/cpukit/posix/include/rtems/posix/shmi

Re: [PATCH 27/30] leon, gptimer: fixed probing separate interrupts

2017-04-13 Thread Chris Johns
On 14/4/17 5:31 am, Daniel Hellstrom wrote: > From: Martin Aberg > > 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. > --- > c/src/lib/l

Re: [PATCH 08/30] leon, apbuart: RX delayed interrupt

2017-04-13 Thread Chris Johns
On 14/4/17 5:31 am, Daniel Hellstrom wrote: > From: Martin Aberg > > 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. > --- > c/src/lib/libbsp/sparc/shared/uart/apbuart_cons.c |