Commit Graph

27862 Commits

Author SHA1 Message Date
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
Sebastian Huber
1dc6662276 score: Rename _Watchdog_Reset()
Update #2307.
2015-04-14 08:21:51 +02:00
Sebastian Huber
54cf0e34c5 score: Add Watchdog_Header
This type is intended to encapsulate all state to manage a watchdog
chain.

Update #2307.
2015-04-13 13:39:26 +02:00
Sebastian Huber
bcf536a50a score: Split _Watchdog_Adjust()
Split _Watchdog_Adjust() into _Watchdog_Adjust_backward() and
_Watchdog_Adjust_forward().  Remove Watchdog_Adjust_directions,
_Watchdog_Adjust_seconds() and _Watchdog_Adjust_ticks().  This avoids to
check the same condition again.

Update #2307.
2015-04-13 13:08:55 +02:00
Thomas Volgmann
a1d6f7a405 bsp/altera-cyclone-v: Add RTC driver 2015-04-10 08:23:00 +02:00
Daniel Krueger
a6c5a7e0b6 arm: Align ARM exception frame to 8 bytes
The stack pointer must be aligned on 8 byte boundary on ARM, so the size of
the exception frame must be a multiple of 8 bytes. Otherwise we might/will
get an alignment fault, when executing code in the data abort handler for
example.

Close #2318.

Signed-off-by: Daniel Krueger <daniel.krueger@systec-electronic.com>
2015-04-10 08:12:14 +02:00
Alan Cudmore
044c7d8280 Add hardware FPU flags for Raspberry Pi 2 BSP 2015-04-09 14:35:10 -04:00
Sebastian Huber
41814fa648 score: Fix thread queue race condition
On uni-processor configurations the change of the thread blocking state
in _Thread_queue_Requeue_priority() did no harm and was simply useless.
However on SMP configurations this resulted in invalid state changes
leading to a wrong resource ownership.
2015-04-09 13:54:17 +02:00
Sebastian Huber
1461aba8da score: Use _Thread_Clear_state() for _Thread_Ready 2015-04-08 11:48:15 +02:00
Sebastian Huber
edcf89b6f2 rtems: Atomically suspend/resume tasks 2015-04-08 11:48:15 +02:00
Sebastian Huber
342708b983 score: Return prev state in thread state set/clear 2015-04-08 11:48:12 +02:00
Sebastian Huber
ca10004ef2 score: Simplify _Thread_Set_state() 2015-04-08 10:25:33 +02:00
Sebastian Huber
f820f22cf0 fstests/fsfseeko01: Fix for long == off_t
Close #2317.
2015-04-08 07:46:10 +02:00
Sebastian Huber
9baffdf7e4 score: Move _Watchdog_Ticks_since_boot definition 2015-04-08 07:40:22 +02:00
Joel Sherrill
45491a8804 lm32 BSPs: Add lm32_evr variant for running on gdb.
Lay groundwork for a simulator configuration configuration
for the Milkymist. This is needed to use the shared code.
2015-04-05 15:49:32 -05:00
Joel Sherrill
d0307c8a06 or1ksim-testsuite.tcfg: new file 2015-04-03 16:18:40 -05:00
Joel Sherrill
fd50acd54f shell/main_rtrace.c: Fix warning 2015-04-03 15:08:20 -05:00
Joel Sherrill
475ff0a748 ods68302-testsuite.tcfg: Add fileio 2015-04-03 15:08:01 -05:00
Joel Sherrill
6601619807 rtl22xx-testsuite.tcfg: Add fileio 2015-04-03 15:07:47 -05:00
Hesham ALMatary
1c8466165c or1k: Send halt signal to or1k simulators when rtems terminates 2015-04-02 10:01:50 -05:00