Commit Graph
614 Commits
Author SHA1 Message Date
Sebastian Huber ab8817ca03 rtems: Add get/set interrupt priorities
Add directives to get and set the priority of an interrupt vector.

Implement the directives for the following BSP families:

* arm/lpc24xx
* arm/lpc32xx
* powerpc/mpc55xxevb
* powerpc/qoriq

Implement the directives for the following interrupt controllers:

* GICv2 and GICv3 (arm and aarch64)
* NVIC (arm)
* PLIC (riscv)

Update #5002.
2024-05-10 13:26:22 +00:00
Sebastian Huber f6c8726cb7 bsps/arm: Move BSP-specific header file 2024-05-10 13:20:45 +00:00
Sebastian Huber f5b52a3af0 bsps/arm: Fix Doxygen group assignment 2024-05-07 11:16:49 +02:00
Sebastian Huber 81f868ede4 bsps/arm: Add CMSIS files to Doxygen group 2024-05-07 11:16:49 +02:00
Sebastian Huber 7024401d76 bsps/arm: Add Doxygen group for Armv7-M SysTick
Change license to BSD-2-Clause according to file history and contributor
agreements.
2024-05-07 11:16:49 +02:00
Sebastian Huber 901e893087 arm/xen: Fix BSP_INTERRUPT_VECTOR_COUNT
Do not use reserved interrupt IDs.
2024-04-30 01:39:06 -04:00
Sebastian Huber bc7e6ae550 dev/irq: Improve Doxgyen group assignments
Make the GIC interrupt controller support a subgroup of the generic interrupt
controller support.
2024-04-30 01:39:06 -04:00
Sebastian Huber 39584528e9 bsps/arm: Improve GICv2 support
In addtion to 1023, the GICC_IAR register may return 1022 as a special value.
Simply check for a valid interrupt vector for the dispatching.

Check the GICC_IAR again after the dispatch to quickly process a next interrupt
without having to go through the interrupt prologue and epiloge.
2024-04-30 01:39:05 -04:00
Ning Yang b7a0e2a89b dev/clock: Move bcm2835-system-timer driver to shared space
This patch moves the bcm2835 system timer driver in the arm/raspberrypi directory to the shared directory and adjusts arm/raspberrypi BSP.
2024-04-30 01:39:05 -04:00
Sebastian Huber 087fc4351a bsps/xil-ttc: Improve clock driver
Make the clock driver parameters configurable.  Use the maximum counter
frequency to get the best time resolution.  Decouple the CPU counter from the
timecounter.  Make the tick catch up handling more robust.  Add a validation
test for the tick catch up.
2024-04-30 01:39:05 -04:00
Chris Johns 7db1948917 bsp/arm/zynq: Move README to README.md 2024-04-26 08:01:52 +10:00
Sebastian Huber 53d092471f dev/serial: Add Zynq UART kernel I/O support
Replace the BSP_CONSOLE_MINOR BSP option for the Xilinx Zynq BSPs with the new
BSP option ZYNQ_UART_KERNEL_IO_BASE_ADDR.  Move the kernel I/O support to a
shared file.
2024-04-04 12:53:53 +02:00
Sebastian Huber 8ad3f92b9a dev/serial: Add ZYNQ_UART_[01]_BASE_ADDR
This helps to provide a shared implementation of the kernel I/O support.
2024-04-04 12:53:51 +02:00
Sebastian Huber 4c2da2c343 dev/serial: Simplify some Zynq UART functions
Make the initialization and polled functions independent of the Termios
context.  This helps to implement the kernel I/O support without a dependency
on the Termios framework.
2024-03-27 20:22:53 +01:00
Sebastian Huber 5b0e355ed7 bsps: Move declarations to <bsp/irq-generic.h>
Move declarations of bsp_interrupt_get_affinity() and
bsp_interrupt_set_affinity() to <bsp/irq-generic.h>.  Canonicalize the
<bsp/irq.h> includes.

Implement bsp_interrupt_get_affinity() and bsp_interrupt_set_affinity() only if
needed (usually RTEMS_SMP).

Provide stub implementations for i386 to fix build errors.
2024-03-27 20:20:38 +01:00
Sebastian Huber 1eed6f8bfc bsps: Avoid unused argument in clock interrupt
Pass the parameter of the clock interrupt handler to
Clock_driver_support_at_tick() and Clock_driver_timecounter_tick().  This makes
it possible to use the interrupt handler argument in clock drivers.

Use the interrupt handler provided by Clock_driver_support_install_isr() to
avoid local delarations of Clock_isr().

Update #4862.
2024-03-20 16:34:09 +01:00
Joel Sherrill 00e71f0b4b arm/altera-cyclone-v/README: Fix use of CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
The proper name is now CONFIGURE_MAXIMUM_FILE_DESCRIPTORS.
2024-02-23 08:35:59 -06:00
Adrien Chardon b1fdf75338 bsp/tms570: Fix console receive interrupts
`tms570_sci_interrupt_handler()` is called when an RX interrupt fires. It checks
in the register `FLR`, the `RXRDY` bit (Receiver ready flag - indicate that the
SCIRD contains new data). If it is set, it calls
`tms570_sci_read_received_chars()`.

`tms570_sci_read_received_chars()` checks the register `RD` against 0. If it is
non zero, it returns 1 to indicate that one byte was read.

In the old behavior, if it is zero, the function returns 0 to indicate that no
data was read.

The new behavior is to not silently drop 0x00 bytes. Ignoring 0x00 bytes is fine
when working with printable text (which, I assume, is how this driver was
tested), but as soon as the UART is used in non canonical (raw) mode, with
potentially 0x00 bytes, these bytes will be silently dropped, causing issues in
the data/protocol layer above.

Update #4982.
2024-02-01 07:54:57 +01:00
Stanislav Pankevich 7eee05a37d bsps/xilinx-zynqmp-rpu: Invalidate caches on start
This corrects an issue where caches can be dirty on warm boot.
2024-01-16 10:57:43 -06:00
Sebastian Huber df378641e6 bsp/tms570: Use TMS570_OSCILLATOR_MAIN
This option replaces BSP_OSCILATOR_CLOCK.  It may be used in PLL setup
calculatios.

Update #4982.
2024-01-15 10:34:08 +01:00
Tyler Miller b47c8188bf bsp/tms570: Update README
Update #4982.
2024-01-15 10:34:04 +01:00
Tyler Miller 449d836800 bsp/tms570: Board-specific tms570_emif_sdram_init()
Update #4982.
2024-01-15 10:34:02 +01:00
Tyler Miller 87be7eaba2 bsp/tms570: Board-specific tms570_pinmux_init()
Update #4982.
2024-01-15 10:34:00 +01:00
Tyler Miller 42e013a5dd bsp/tms570: Board-specific tms570_map_clock_init()
Update #4982.
2024-01-15 10:33:59 +01:00
Tyler Miller b300b967ee bsp/tms570: Board-specific tms570_pll_init()
Update #4982.
2024-01-15 10:33:57 +01:00
Tyler Miller 53cbe74878 bsp/tms570: Initialize MPU
Update #4982.
2024-01-15 10:33:56 +01:00
Sebastian Huber 65831d71ed bsp/tms570: Optimize tms570_debug_console_out()
Reduce number of interrupt disable/enable actions.

Update #4982.
2024-01-15 10:33:54 +01:00
Sebastian Huber 5a2f64cf34 bsp/tms570: Initialize and enable caches on demand
Update #4982.
2024-01-15 10:33:52 +01:00
Sebastian Huber 663bedd59e bsp/tms570: Use bsp_start_copy_sections_compact()
There is no need to relocate the text and read-only data.

Update #4982.
2024-01-15 10:33:50 +01:00
Sebastian Huber d4c6def68b bsp/tms570: Use shared bsp_start_hook_1()
Update #4982.
2024-01-15 10:33:49 +01:00
Sebastian Huber e9634471d9 bsp/tms570: Add header guards
Update #4982.
2024-01-15 10:33:47 +01:00
Sebastian Huber 3f75b58d46 bsp/tms570: The TMS570LC4357 has no TCRAM modules
Update #4982.
2024-01-15 10:33:45 +01:00
Sebastian Huber 2db0844b87 bsp/tms570: Initialize SRAM on demand
Update #4982.
2024-01-15 10:33:43 +01:00
Sebastian Huber 23ba8d2c2c bsp/tms570: Use asm code for tms570_memory_init()
Make sure that we do not use the stack for this function.

Update #4982.
2024-01-15 10:33:41 +01:00
Tyler Miller f7530be75c bsp/tms570: Honor DBGRST for TMS570LC4357
Update #4982.
2024-01-15 10:33:39 +01:00
Sebastian Huber b99013e580 bsp/tms570: Remove reset source handling
Do not clear SYSESR and let the application handle the reset source.

Update #4982.
2024-01-15 10:33:37 +01:00
Tyler Miller ec79400503 bsp/tms570: Add HCLKCNTL register
Update #4982.
2024-01-15 10:33:36 +01:00
Tyler Miller 2bbacdb557 bsp/tms570: TMS570LC4x Errata DEVICE#60
Update #4982.
2024-01-15 10:33:34 +01:00
Sebastian Huber 75dd824079 bsp/tms570: Add errata SSWF021#45 handling
Update #4982.
2024-01-15 10:33:33 +01:00
Sebastian Huber 4d9c9c52ae bsp/tms570: Conditionalize TMS570LS3137 errata
Update #4982.
2024-01-15 10:33:31 +01:00
Sebastian Huber eeaa318dc6 bsp/tms570: Simplify expression
Update #4982.
2024-01-15 10:33:29 +01:00
Tyler Miller c14efe493b bsp/tms570: Add TMS570LC4357 power support
Update #4982.
2024-01-15 10:33:28 +01:00
Tyler Miller 4f6fa9746d bsp/tms570: Add TMS570LC4357 pin config support
Update #4982.
2024-01-15 10:33:26 +01:00
Tyler Miller 39fd4b142e bsp/tms570: Remove double pin configuration
Do not set pins to the default function before the actual setting is
applied.  If a pin setting needs to be done in a certain order, then
this should be done explicitly through multiple calls to
tms570_bsp_pinmmr_config().

Update #4982.
2024-01-15 10:33:24 +01:00
Tyler Miller b995211907 bsp/tms570: Add tms570_pbist_run_and_check()
Update #4982.
2024-01-15 10:33:22 +01:00
Tyler Miller 048d81a076 bsp/tms570: Add TMS570LC4357 PBIST support
Update #4982.
2024-01-15 10:33:19 +01:00
Sebastian Huber 36192165e2 bsp/tms570: Fix PBIST clock enable
Bit 1 of the PACT is reserved (writes have no effect).

Update #4982.
2024-01-15 10:33:17 +01:00
Sebastian Huber eb97cd148c bsp/tms570: Add TMS570LC4357 BSP variants
Update #4982.
2024-01-15 10:33:15 +01:00
Sebastian Huber 437da01f80 bsp/tms570: Add linkcmds.memory
Remove obsolete tms570ls3137_hdk_with_loader BSP variant.  With the new
memory origin/size build options this variant is no longer required.

Update #4982.
2024-01-15 10:33:13 +01:00
Sebastian Huber 285d1a4056 bsp/tms570: Avoid vector overlay memory region
Reserve the space in a section.  This makes it possible to use a common
memory region definition.

Update #4982.
2024-01-15 10:33:09 +01:00