Commit Graph

52 Commits

Author SHA1 Message Date
Christian Mauderer
a434cc80cb bsps/shared: Adapt fsl-edma driver for imxrt
Note: The changes have been done with portability in mind. The driver
should (in theory) be able to replace the original one in the MPC BSPs
too. For full compatibility an adaption layer and especially a test
would be necessary. Because both are missing, don't integrate it into
the MPC BSP now.

Update #4180
2021-01-21 10:17:31 +01:00
Christian Mauderer
301bbc3a4d bsps/shared: Copy fsl-edma from mpc55xx
This is a preparation for making the driver universal.

Update #4180
2021-01-21 10:17:31 +01:00
Sebastian Huber
9f3a08ef2d bsps: Use header file for GIC architecture support
This avoids a function call overhead in the interrupt dispatching.

Update #4202.
2020-12-23 09:24:49 +01:00
Sebastian Huber
39ef7e5496 bsps: Fix includes
Update #4202.
2020-12-22 13:02:41 +01:00
Sebastian Huber
b5aceef5d9 bsps: Remove gicvx_interrupt_dispatch()
Avoid one level of indirection.

Update #4202.
2020-12-16 11:00:03 +01:00
Sebastian Huber
747fb65c6e bsps: Add GICv3 arm_gic_irq_processor_count()
Update #4202.
2020-12-16 11:00:03 +01:00
Kinsey Moore
9edca35dbe bsps/gicv3: Resolve build warnings on 64bit 2020-12-11 15:32:15 -06:00
Sebastian Huber
105e52032e bsps: Remove ARM GIC SGI target filter
Remove the target filter for software-generated interrupts since this
feature is not supported by the affinity routing in GICv3.

Update #4202.
2020-12-10 09:42:50 +01:00
Sebastian Huber
b6925e10c8 bsps: Fix GICv3 arm_gic_trigger_sgi()
Use the targets parameter to determine the targets of the SGI.  Change
targets parameter type to 32-bit to ease the parameter passing.  GICv3
supports up to 16 targets.

Update #4202.
2020-12-10 09:42:49 +01:00
Sebastian Huber
bd7bef528d bsps/arm: Support system level ARM Generic Timer
Update #4202.
2020-12-10 07:58:03 +01:00
Sebastian Huber
9ce47a52a4 bsps: Add SMP support to ARM GICv3
Update #4202.
2020-12-09 17:30:52 +01:00
Kinsey Moore
5686b44d13 zynq-uart: Fix set_attributes implementation
The zynq-uart set_attributes implementation was configured to always
return false which causes spconsole01 to fail. This restores the
disabled implementation which sets the baud rate registers
appropriately and allows spconsole01 to pass. This also expands the
set_attributes functionality to allow setting of the stop bits,
character width, and parity.
2020-12-03 17:35:28 -06:00
Kinsey Moore
a151ee167e bsps: Move ARM GICv2 driver to bsps/shared
This moves the ARM GICv2 driver to bsps/shared to be usable by AArch64
code.
2020-12-02 18:51:40 -06:00
Kinsey Moore
f0859573f9 bsps: Move zynq-uart to bsps/shared
This moves the zynq-uart driver from bsps/arm/shared to bsps/shared to
accomodate use by AArch64 BSPs.
2020-12-02 18:51:40 -06:00
Sebastian Huber
9c20b987cd rtems: Add <rtems/rtems/clockimpl.h> 2020-12-02 07:45:53 +01:00
Frank Kühndel
f28a6defd1 disp_hcms29xx: Fix string truncation warning
The strlcpy() function ensures there is always a NUL character
at the end of the string. Hence it is safer as strncpy() and it avoids the
compiler warning
2020-10-10 15:04:15 +02:00
Kinsey Moore
f8ad5bb2a4 bsps: Break out AArch32 GICv3 support
This breaks out AArch32-specific code so that the shared GICv3 code can
be reused by other architectures.
2020-10-05 16:11:39 -05:00
Kinsey Moore
1480c3f5e8 bsps: Break out AArch32 portions of GPT driver
This breaks AArch32-specific portions of the ARM GPT driver into their
own file so that the generic code can be moved for reuse by other
architectures.
2020-10-05 16:11:39 -05:00
Kinsey Moore
1c03649312 Move ARM PL011 UART driver
This UART driver is now needed for BSPs other than ARM.
2020-10-05 16:11:39 -05:00
Sebastian Huber
29e7a069f8 dev/spi-memdrv: Fix use of uninit mem_param_ptr 2020-08-03 08:53:31 +02:00
Sebastian Huber
33314eb60a bsps/clock: Fix fast idle clock tick support
If we interrupt a thread dispatch critical section (thread dispatch
disable level != ISR nest level), then we should not do the fast idle
mode since this may delay an ongoing system call forever.
2020-07-23 08:56:06 +02:00
Jan Sommer
1483012b38 bsp/shared/clock: Reset Clock_driver_isrs to correct value
CLOCK_DRIVER_ISRS_PER_TICK is the configuration define,
CLOCK_DRIVER_ISRS_PER_TICK_VALUE is the actual value of ISRS per clock
tick, therefore use this one to reset the Clock_driver_isrs after each
tick.
2020-04-03 11:47:18 +02:00
Sebastian Huber
51614bd5bf bsps/clock: Use _SMP_Get_processor_maximum()
Use a specific test to enable the fast idle mode instead of using the
rtems_configuration_is_smp_enabled() workaround.

Update #3876.
2020-02-25 07:18:35 +01:00
G S Niteesh
5857e83cfc libchip/ns16550: Allow user calculate baud divisor
This patch will allow the user to pass a function to calculate
the baud divisor.
This will allow for more flexibility, since for some BSPs
like raspberrypi, the calculation of baud divisor is different
from what is in the current driver.
2020-02-16 16:55:20 +01:00
Sebastian Huber
c344e5828c Use RTEMS_SYSINIT_ORDER_LAST_BUT_5
Use RTEMS_SYSINIT_ORDER_LAST_BUT_5 instead of RTEMS_SYSINIT_ORDER_LAST
to allow applications and support functions to place system
initialization handlers behind the standard handlers.

Update #3838.
2020-02-04 06:06:42 +01:00
Sebastian Huber
bb99cd0d83 clock: Simplify driver initialization
Use a system initialization handler instead of a legacy IO driver.

Update #3834.
2019-12-11 09:05:07 +01:00
Sebastian Huber
ad87de4a67 score: Rename _SMP_Get_processor_count()
Rename _SMP_Get_processor_count() in _SMP_Get_processor_maximum() to be
in line with the API level rtems_scheduler_get_processor_maximum().

Update #3732.
2019-04-11 09:19:12 +02:00
Joel Sherrill
90232bcf45 z85c30.c: Do not process 0 baud and return an error (CID 1399713) 2019-03-14 08:21:43 -05:00
Sebastian Huber
212663bede bsps: Adjust architecture Doxygen groups
- Use CamelCase as it is not used in our C code.  Enables simple search and
   replace.

 - Prefix with "RTEMS" to aid deployment and integration.  It aids
   searching and sorting.

Update #3706.
2019-03-04 07:51:38 +01:00
Sebastian Huber
feea03b625 Remove explicit file names from @file
This makes the @file documentation independent of the actual file name.

Update #3707.
2019-02-28 11:47:33 +01:00
Sebastian Huber
0a1f5df98e Simplify _CPU_Counter_difference()
In order to simplify the use of CPU counter values it is beneficial to
have monotonic increasing values within the range of the CPU counter
ticks data type, e.g. 32-bit unsigned integer.  This eases the use of
CPU counter timestamps in external tools which do not know the details
of the CPU counter hardware.  The CPU counter is the fastest way to get
a time on an RTEMS system.

Such a CPU counter may be also used as the timecounter.  Use it on SPARC
for this purpose to simplify the clock drivers.

Update #3456.
2018-12-07 14:22:01 +01:00
Sebastian Huber
028853637f bsps: Include missing header files
Update #3598.
2018-11-09 09:42:31 +01:00
Sebastian Huber
143c8d0d94 serial/ns16550: Fix precision clock synthesizer
The precision clock synthesizer support broke the driver on the QorIQ
P1020.  On this device the Alternate Function Register is accessed with
DLAB == 1 instead of the FIFO Control Register (FCR).  Restructure the
code to account for this.
2018-10-17 09:58:14 +02:00
Sebastian Huber
f004b2b8dc Use rtems_task_exit()
Update #3530.
Update #3533.
2018-10-02 10:22:15 +02:00
Sebastian Huber
f7cecc3308 libchip/ata: Use rtems_blkdev_create()
Update #3358.
2018-08-07 07:17:18 +02:00
Sebastian Huber
a7cd4b737c serial/ns16550: Precision clock synthesizer
Set the FIFO control register while DLAB == 1 in the line control
register.  At least on the QorIQ T4240 the driver still works with the
re-ordered FIFO control register access.
2018-08-01 11:13:58 +02:00
Sebastian Huber
8a78b784c4 serial/ns16550: Use standard register names
Use the standard register names for the divisor latches.  This makes it
easier to compare the code with other driver implementations.
2018-08-01 10:08:59 +02:00
Sebastian Huber
7ee5931393 Remove Clock_driver_support_shutdown_hardware()
The aim of this clock driver hook was to stop clock tick interrupts at
some late point in the exit() procedure.

The use of atexit() pulls in malloc() which pulls in errno. It is
incompatible with the intention of the
CONFIGURE_DISABLE_NEWLIB_REENTRANCY configuration option.

The exit() function must be called from thread context, so accompanied
clock tick interrupts should cause no harm.  On the contrary, someone
may assume a normal operating system operation, e.g. working timeouts.

Remove the Clock_driver_support_shutdown_hardware() clock driver hook.

Close #3436.
2018-06-27 08:58:16 +02:00
Sebastian Huber
65f868cac6 Add _CPU_Counter_frequency()
Add rtems_counter_frequency() API function.  Use it to initialize the
counter value converter via the new system initialization step
(RTEMS_SYSINIT_CPU_COUNTER).  This decouples the counter implementation
and the counter converter.  It avoids an unnecessary pull in of the
64-bit integer division from libgcc.

Update #3456.
2018-06-15 13:02:44 +02:00
Sebastian Huber
c4d35fb6c8 libchip: Use rtems_blkdev_create()
Update #3358.
2018-05-18 10:44:18 +02:00
Sebastian Huber
d7d66d7d45 bsps: Move console drivers to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-20 13:08:32 +02:00
Sebastian Huber
7632906fc2 bsps: Move clock drivers to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-20 09:57:01 +02:00
Sebastian Huber
7806d9c020 bsps: Move shared CPU counter support to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-20 09:49:37 +02:00
Sebastian Huber
79b9fe67ee bsps: Move getentropy-cpucounter.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-20 09:49:37 +02:00
Sebastian Huber
ef7845482a bsps: Move gpio.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-20 09:49:37 +02:00
Sebastian Huber
d6fb37aa9f bsps: Move shared btimer support to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-20 09:49:37 +02:00
Sebastian Huber
9ec8cfc59c bsps: Move pci_find_device.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-20 09:49:36 +02:00
Sebastian Huber
f9239014db bsps: Move pci_bus_count.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-20 09:49:36 +02:00
Sebastian Huber
223e22f1ed bsps: Move uart-output-char.c to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-16 14:56:10 +02:00
Sebastian Huber
90013f59bd bsps: Move tod.c to bsps and rename
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-16 14:56:05 +02:00