Commit Graph

28381 Commits

Author SHA1 Message Date
Daniel Hellstrom
5dd83de944 GRSPW: fixed SET_RMAPEN and SET_RMAPBUFDIS
Both ioctl commands destroyed the control register by writing the
content of the status register into it.
2015-04-17 01:10:18 +02:00
Daniel Hellstrom
4d249b9fed GPTIMER: support separate & shared irq by clearing pending bit after ISR 2015-04-17 01:10:18 +02:00
Daniel Hellstrom
7ebc28cd1a GPTIMER: Only probe pending bit on timer0 2015-04-17 01:10:18 +02:00
Daniel Hellstrom
b583cc5f75 leon,gpiolib: add mask/unmask interrupt support 2015-04-17 01:10:18 +02:00
Arvid Bjorkengren
949d0d6206 GRSPW: Make sure buffers are 64-bit aligned
This is to improve odds of getting a fast memcpy-operation.
2015-04-17 01:10:18 +02:00
Daniel Hellstrom
18564f5317 APBUART: fix GRMON -u support for older UARTs 2015-04-17 01:10:18 +02:00
Daniel Hellstrom
0f49c0e2f4 GRSPW: New packet based driver for SPW/SPW2/SPW2_DMA
This patch adds a new driver for the GRSPW SpaceWire AMBA
interface family. The new driver does not implement a standard
RTEMS driver, instead it provides only a library interface to
the GRSPW devices. This driver can be used to implement a
RTEMS I/O driver or used directly.

New features compared with old GRSPW driver:
 * zero-copy packet interface
 * possibility to send/receive mulitple packets per call
 * optional interrupt awaken work-task to process TX/RX queues
 * DMA channels support. Before only first DMA channel supported
 * Separate DMA and link control
 * Packet based error flags
2015-04-17 01:10:18 +02:00
Daniel Hellstrom
16d6e42c43 LEON3: fixed nano seconds support in TLIB
The _Watchdog_Nanoseconds_since_tick_handler() function caller does
not take into account that the timer counter may wrap, underflow or
overflow. Instead, the driver must take that into account. This
GPTIMER DrvMgr driver patch makes use of the IRQ-Pending bit to
determine if a underflow has happened. In that case a greater time
than one tick is returned (even considering the function name..).

The TLIB clock layer must also ACK the interrupt pending bit,
otherwise we couldn't determine whether an IRQ is pending or if
belongs to un old already handled tick IRQ.

Note that this patch only fixes the DrvMgr GPTIMER driver and TLIB,
the standard LEON3 GPTIMER driver still needs a fix.
2015-04-17 01:10:18 +02:00
Daniel Hellstrom
f00fee8eb1 GRTM: fixed bug where transmitter start loop was optimized away 2015-04-17 01:10:17 +02:00
Daniel Hellstrom
e9378fa191 GRPCI: fix target BAR1 initialization 2015-04-17 01:10:17 +02:00
Daniel Hellstrom
30594a91ca DRVMGR: add LEON BSPs driver registration 2015-04-17 01:10:17 +02:00
Daniel Hellstrom
3bb41226e0 LEON: added new drivers to the LEON2/LEON3 BSPs
Most drivers use the Driver Manager for device probing, they
work on AMBA-over-PCI systems if PCI is big-endian.

New APIs:
 * GPIO Library, interfaced to GRGPIO
 * GENIRQ, Generic interrupt service implementation helper

New GRLIB Drivers:
 * ACTEL 1553 RT, user interface is similar to 1553 BRM driver
 * GR1553 (1553 BC, RT and BM core)
 * AHBSTAT (AHB error status core)
 * GRADCDAC (Core interfacing to ADC/DAC hardware)
 * GRGPIO (GPIO port accessed from GPIO Library)
 * MCTRL (Memory controller settings configuration)
 * GRETH (10/100/1000 Ethernet driver using Driver manager)
 * GRPWM (Pulse Width Modulation core)
 * SPICTRL (SPI master interface)
 * GRSPW_ROUTER (SpaceWire Router AMBA configuration interface)
 * GRCTM (SpaceCraft on-board Time Management core)
 * SPWCUC (Time distribution over SpaceWire)
 * GRTC (SpaceCraft up-link Tele core)
 * GRTM (SpaceCraft down-link Tele Metry core)

GR712RC ASIC specific interfaces:
 * GRASCS
 * CANMUX (select between OCCAN and SATCAN)
 * SATCAN
 * SLINK
2015-04-17 01:10:17 +02:00
Daniel Hellstrom
fe1aa9c002 LEON: added network device configuration helper function 2015-04-17 01:10:17 +02:00
Daniel Hellstrom
3681925508 LEON: updated shared drivers to Driver Manger framework
Some bugfixes at the same time. After this patch the drivers
may be used on RASTA systems having a big-endian PCI layout.

Removed not up to date changelogs, rely on git log instead.
2015-04-17 01:10:17 +02:00
Daniel Hellstrom
e67b2b8d05 LEON: updated and added PCI peripherals for LEON BSPs
The CCHIP driver is replaced with the GR_701 driver. The
RASTA driver is replaced by the GR-RASTA-IO driver.

All drivers are now compatible with both LEON2 and LEON3,
drivers were initialized directly by the PCI-board drivers
are now initialized by the driver manager and therefore
does not require the double code created by including for
example grcan.c into grcan_rasta.c. The other drivers needs
to be updated to the driver manager framework however.

Added support for:
 * GR-701 (only LEON2 before)
 * GR-RASTA-IO (only LEON2 before)
 * GR-RASTA-ADCDAC
 * GR-RASTA-TMTC
 * GR-RASTA-SPW-ROUTER
 * GR-TMTC-1553
2015-04-17 01:10:17 +02:00
Daniel Hellstrom
3e3fb0d40b LEON2: added support for LEON2-GRLIB systems
In some non-standard designs GRLIB peripherals are used together
LEON2. This patch adds a GRLIB amba Plug&Play driver so that AMBA
devices can be found from Plug&Play the same way as with the LEON3
BSP.

The user is required to add an AMBA-PnP device entry into the LEON2
bus configuration, so that the driver manager unite this driver
with the "fake" device and start scanning after AMBA PnP devices.
2015-04-17 01:10:17 +02:00
Daniel Hellstrom
46e41c98b3 LEON: replaced old BSP PCI layer with new generic libpci PCI layer
The old code used a limited PCI configuration library, which was
duplicated into LEON2 and LEON3 BSP pci.c together with respective
Host controller PCI interface.

The LEON2 BSP had support for AT697 PCI, and LEON3 for GRPCI PCI
Host controller. With this update new PCI Host drivers are added,
and all support the new generic PCI Library:
 * AT697 PCI (LEON2 only)
 * GRPCI (LEON2-GRLIB and LEON3)
 * GRPCI2 (LEON2-GRLIB and LEON3)
 * Actel PCIF GRLIB Wrapper (LEON3 only)

The LEON2 BSP is defined as big-endian PCI in bsp.h, since the
AT697 supports only big-endian PCI.
2015-04-17 01:10:17 +02:00
Daniel Hellstrom
c176410021 LEON3: new Console driver, APBUART driver using Driver Manager
This patch reimplements the console driver of the LEON3 BSP, it
has split up the console driver in two parts: Console driver and
UART driver. Before the only UART supported was APBUART and only
on-chip APBUARTs found during startup. However splitting the
driver in two allows any UART interface to reuse the termios
attach code of the console driver, pratically this has always
been a problem when discovering APBUARTs after startup for
example the PCI board GR-RASTA-IO has APBUARTs and must wait
until after PCI has been setup.

Since the only current driver that supports the new console
driver uses the Driver Manager, the new console driver is
only enabled when Driver Manager is initialized during startup.

The new APBUART driver supports:
 * polling mode
 * interrupt mode
 * task-driven mode
 * set UART attributes
 * read UART attributes (system console inherit settings from
   boot loader)
 * Driver manager for finding/initialization of the hardware
2015-04-17 01:10:16 +02:00
Daniel Hellstrom
045de3556f MERGE: new system clock implementation 2015-04-17 01:10:16 +02:00
Daniel Hellstrom
cd64fbfb68 LEON: GPTIMER driver, Timer Library and System Clock for LEON3
With this patch the LEON family can access the GRLIB GPTIMER using
the Timer library (TLIB).

A System Clock driver instead of BSP/clock/ck_init.c is provided
using the TLIB. The classic clock driver is split in two parts,
clock driver and timer driver. The BSPs need only to fullfill the
timer interface instead of the clock interface. Currently only
LEON3 uses it. The LEON2 Timer is not ported to TLIB.

The GPTIMER driver is implemented using the Driver Manager, so the
System Clock Driver is at this point only suitable for LEON3 when
the driver manager is initialized during BSP startup. When the DrvMgr
is not initialized during startup the standard BSP/clock dirver is
used.

LEON2 sometimes also needs to access GPTIMER when a off-chip GRLIB AMBA
systems is connected, for example AMBA-over-PCI.
2015-04-17 01:10:16 +02:00
Daniel Hellstrom
3db9e5b03d LEON2: implemented AMBA Bus Driver for Driver Manager 2015-04-17 01:10:16 +02:00
Daniel Hellstrom
e05c2659f4 LEON3: implemented AMBA PnP Bus Driver for Driver Manager 2015-04-17 01:10:16 +02:00
Daniel Hellstrom
d11f2286c2 sparc BSPs: implemented libpci IRQ BSP support 2015-04-17 01:10:16 +02:00
Daniel Hellstrom
e428dc4a95 LEON3: implemented BSP DRVMGR startup initialization 2015-04-17 01:10:16 +02:00
Daniel Hellstrom
219d4045e7 DRVMGR: added drvmgr shell command 2015-04-17 01:10:16 +02:00
Daniel Hellstrom
1c5a7e5e52 LIBPCI: added DRVMGR model for PCI bus 2015-04-17 01:10:16 +02:00
Daniel Hellstrom
e7fade3ac4 DRVMGR: added driver manager to cpukit/libdrvmgr 2015-04-17 01:10:16 +02:00
Daniel Hellstrom
02550220c5 LIBPCI: added PCI shell command 2015-04-17 01:10:15 +02:00
Daniel Hellstrom
a31845f7f9 LIBPCI: added PCI layer to cpukit/libpci 2015-04-17 01:10:15 +02:00
Daniel Hellstrom
e51eb80e88 leon3,ngmp: simplify cpucounter initialization
Remove support for using the second timer for time stamping.
Instead the user can configure the system clock timer to a higher
base clock frequency (lower the prescaler). This change does not
affect the GR712RC or LEON4-N2X. The GR712RC does not have two
GPTIMERs and the N2X uses the Interrupt Controller for time
stamping.

Bow that the AMBA initialization code exports the AMBA device,
the frequency can be obtained without an additional AMBA PnP
scanning.
2015-04-17 01:10:15 +02:00
Daniel Hellstrom
5da315ffdc leon3: make timer initialization configurable
Its now possible to select which timer core will be used for
system clock timer and to control the timer prescaler that
affects all timer instances on that timer core.

The timer and interrupt controller AMBA devices are exported
to make it possible for other code to get detailed information.
For example the frequency of the timer and interrupt controller
is required by the cpucounter support.
2015-04-17 01:10:15 +02:00
Daniel Hellstrom
ead16ae1ba leon3: always clear interrupt controller 2015-04-17 01:10:15 +02:00
Daniel Hellstrom
60b0fd511f leon3: clock driver rely on previous found timer
No point in scanning for the same GPTIMER twice. Rely on
amba.c AMBA PnP scanning.
2015-04-17 01:10:15 +02:00
Daniel Hellstrom
31e4e25dfe LEON3: GPTIMER timer watchdog driver
Last timer instance of GPTIMER is sometimes a watchdog timer that
can reset the system on timer underflow.
2015-04-17 01:10:15 +02:00
Daniel Hellstrom
04cf2c5556 IO_MANAGER: early dynamic driver registration
Adds the possibility to register drivers before the IO Manager has
completed the initialization. Sometimes the BSP may want to register
a driver dynamically early in the boot process.
2015-04-17 01:10:15 +02:00
Sebastian Huber
ab69324746 sptests/sp68: Avoid use of internal variables 2015-04-16 20:29:29 +02:00
Sebastian Huber
e98df4d8d0 score: Add _ISR_lock_Flash() 2015-04-16 11:36:48 +02:00
Sebastian Huber
64548a3aff score: Add const qualifier 2015-04-16 11:36:48 +02:00
Sebastian Huber
72e846d534 score: Fix _API_Mutex_Is_locked()
Remove superfluous ISR disable/enable.  In addition using a stand-alone
_ISR_Disable/Enable is wrong on SMP configurations.
2015-04-16 11:36:48 +02:00
Sebastian Huber
45c9cf2aeb score: Delete unused WATCHDOG_MAXIMUM_INTERVAL 2015-04-16 10:01:42 +02:00
Joel Sherrill
cb02e8accc bf537Stamp: Re-enable bsp_reset() 2015-04-15 10:02:58 -05:00
Joel Sherrill
74c4facdce tms570/startup/bspreset.c: Add include <bsp/bootcard.h> to fix warning 2015-04-15 10:02:58 -05:00
Sebastian Huber
644caa2074 score: Fix name 2015-04-15 08:46:51 +02:00
Joel Sherrill
1aaf2fb736 lm32/shared/startup/bspreset.c: New file missed in previous commit 2015-04-14 15:01:53 -05:00
Joel Sherrill
b1debed0b9 spcpuset01: Reduce output to reduce run-time 2015-04-14 15:00:57 -05:00
Joel Sherrill
351858d753 sp13: Update configuration to account for messages on fourth message queue 2015-04-14 14:07:35 -05:00
Joel Sherrill
1047f37cac semdestroy.c: Add missing _Objects_Allocator_unlock()
closes 2319.
2015-04-14 12:12:50 -05:00
Daniel Krueger
5049dca6c5 semunlink.c: Add missing _Objects_Allocator_unlock()
updates 2319.

Signed-off-by: Daniel Krueger <daniel.krueger@systec-electronic.com>
2015-04-14 12:12:40 -05:00
Joel Sherrill
fc0756e8d9 Add test assertion for allocator mutex being unlocked
The Allocator Mutex should not be locked outside a tested
service call. In an SMP test or heavily multithreaded test,
this is possible since another thread could have the lock
for an extended period of time but this is not the norm
for the tests.

updates 2319.
2015-04-14 11:17:10 -05:00
Hesham ALMatary
0a73de2fc8 or1ksim: Fix bug at UART driver.
Fix some UART register addresses and implementation bugs that
were causing malfunction of console driver on real hardware.

hello and ticker samples are tested and working fine now on mor1kx
based SoC on Atlys FPGA board.
BSP_OR1K_OR1KSIM_PERIPHCLK has been changed to 50MHz as with mor1kx/atlys
SoC; this change has no effect on the current simulators that RTEMS run
on.
2015-04-14 11:10:14 -05:00