Commit Graph

190 Commits

Author SHA1 Message Date
Gedare Bloom
0149e6e749 spdx: add 2-BSD SPDX tags on relicensed files
Updates the recently merged relicensed files with the 2-Clause BSD
SPDX annotation.

Closes #5208.
2025-03-01 04:14:54 +00:00
Kinsey Moore
f4c179c610 bsps/shared/dev/spi: Fix undefined function warning
This adds the appropriate header to resolve a warning about a missing
declaration for the fls() function.
2025-02-07 17:58:16 +00:00
Gedare Bloom
9a1efe6f91 bsps/shared: relicense to 2BSD
Updates #3053.
2025-02-07 14:53:18 +00:00
Gedare Bloom
e27d41a38a bsps/rtc: add copyright and relicense based on git history
Updates #3053.
2025-02-07 14:53:18 +00:00
Reinking, Janosch
1a4e26e3ea bsps/shared: NS16550 driver updates the line control register during operation
Fixes: #5179
2025-01-23 13:51:07 +00:00
Kinsey Moore
7d1a934884 bsps/shared/flash: Add a JFFS2 flashdev driver
This adds generic JFFS2 interworking code that allows JFFS2 to be used
on top of any flashdev backend. It currently only supports NOR flashdev
backends.
2024-11-21 23:44:37 +00:00
Christian Mauderer
2c4e3ab117 bsps/shared: Fix bug in driver for I2C RTCs
The two RTCs supported by that driver (MCP7940M and EOZ9) use slightly
different register order. Add support for a different order to the
i2c-rtc driver.
2024-11-13 23:06:47 +00:00
Kinsey Moore
1bba349478 bsps: Remove imported Xilinx headers
This removes the headers imported from the embeddedsw repository in
favor of a much thinner shim. This also removes the complicated build
system configuration necessary to support use of these headers. The
primary reason for removal is that certain external Xilinx libraries
also require use of these headers and this causes version mismatches and
header conflicts that can be avoided.
2024-10-28 19:23:49 +00:00
Sebastian Huber
3fd063159d dev/irq: Simplify SMP GIC initialization
There is no need to wait on secondary processors for the GIC distributor
enable since the BSPs for real targets start the secondary processors
in _CPU_SMP_Start_processor().
2024-10-11 01:27:48 +02:00
Sebastian Huber
a8d3efe4b0 dev/irq: Simplify GICv2 set/get affinity 2024-10-11 01:27:48 +02:00
Sebastian Huber
dddbdf4d9a arm/xilinx-zynqmp-rpu: Add split mode BSP variants
Rename xilinx_zynqmp_rpu BSP variant to zynqmp_rpu_lock_step to
emphasize that this BSP is for the lock-step mode RPU configuration.
Add BSP variants zynqmp_rpu_split_0 and zynqmp_rpu_split_1 for the split
mode RPU configuration for core 0 and 1 respectively.
2024-10-02 05:35:47 +02:00
Sebastian Huber
ddef4ed1b0 dev/irq: Conditionally enable GIC get/set group 2024-10-02 05:24:30 +02:00
Sebastian Huber
a947bba9df dev/irq: Add BSP_IRQ_HAVE_GET_SET_AFFINITY
Allow BSPs to provide the interrupt get/set affinity implementation even for
non-SMP configurations.
2024-10-02 05:24:30 +02:00
Sebastian Huber
2c2f9a1451 dev/irq: Add BSP_ARM_GIC_MULTI_PROCESSOR_SECONDARY
Add support for the BSP_ARM_GIC_MULTI_PROCESSOR_SECONDARY build option
for the GICv2 support.  This option is useful for multiprocessor systems
without SMP support.
2024-10-02 05:24:30 +02:00
Sebastian Huber
1f52965f98 dev/serial: Fix uninitialized variable warnings
Use the reset values to get rid of uninitialized variable warnings.
2024-09-19 04:17:53 +02:00
Utkarsh Verma
0f42153959 dev/serial: Refactor the pl011 driver
- Refactor the pl011 driver to be extensible.
- Add IRQ support and baudrate configuration support for pl011 driver.
- Modify related BSP.
- Add doxygen comments for arm-pl011.

Close #5026

Co-authored-by: Ning Yang <yangn0@qq.com>
2024-09-18 19:30:21 +00:00
Sebastian Huber
d304a817db dev/serial: Move zynq_uart_input_clock()
This allows to wrap this function using the linker.
2024-09-17 01:53:58 +00:00
Sebastian Huber
3fe69b03a3 dev/serial: Optimize Zynq UART control reg writes
Just disable RX/TX to start the initialization sequence.  Do not double
disable RX/TX.  Enable RX/TX after the mode is set.
2024-09-17 01:53:58 +00:00
Sebastian Huber
ff9b19ad7c dev/serial: Rework Zynq UART baud calculation
Calculate the best approximation for the desired baud and return the
error.
2024-09-17 01:53:58 +00:00
Sebastian Huber
6efbf0c7b8 dev/serial: Rework Zynq UART Doxygen groups 2024-09-17 01:53:58 +00:00
Sebastian Huber
5d8d55a1cd dev/serial: Simplify zynq_uart_reset_tx_flush()
Load the status register only once.  Use _IO_Relax() to reduce bus
traffic while waiting and simplify testing.
2024-09-17 01:53:58 +00:00
Sebastian Huber
6757607199 dev/serial: Do not output '\r' during reset
It is not clear why this is necessary.  For example, the
zynq_uart_initialize() does not issue the '\r' before waiting for an
inactive transmission state.
2024-09-17 01:53:58 +00:00
Sebastian Huber
a078b091c1 dev/serial: Use _IO_Relax()
This reduces the system bus load while waiting for a state change.  In
addition, it simplifies testing by using a wrapped _IO_Relax().
2024-09-17 01:53:58 +00:00
Adrien Chardon
7be49773c0 bsps/shared/zynq-uart-polled: fix bug in zynq_uart_initialize()
Similar to the recent commit in tms570-sci.c, the assumption that a UART will
only see printable ASCII characters, instead of any value in the range
0x00-0xFF, is wrong.

A non forgiving binary protocol will be thrown off by this driver sending
"\r\r\r\r" when initializing.

If a user wants to flush the interface, they should explicitely use the
dedicated function `tcflush(fd, TCIOFLUSH);`.
2024-09-17 01:53:58 +00:00
Sebastian Huber
0f55591fd6 bsps: Option BSP_ARM_GIC_ENABLE_FIQ_FOR_GROUP_0
Add BSP option BSP_ARM_GIC_ENABLE_FIQ_FOR_GROUP_0 to customize the ARM
GIC support.  Enable this option for arm/altera-cyclone-v and
arm/xilinx-zynq BSPs by default.
2024-08-28 04:19:39 +02:00
Sebastian Huber
3a7dd0be37 dev/irq: Do not enable FIQ by default
The default FIQ handler terminates the system.  Delegate the FIQ
enabling to the place which installs a proper FIQ handler.
2024-08-28 04:19:39 +02:00
Christian Mauderer
3b053f6919 bsps/shared: Add Abracom EOZ9 RTC driver
The EOZ9 RTC has a similar register interface like the MCP7940M (and
quite some other I2C RTCs). This commit:

* Extracts the generic parts from MCP7940M and moves it into a generic
  i2c-rtc driver.
* Uses the new i2c-rtc for the MCP7940M.
* Uses the new i2c-rtc for the new Abracom EOZ9.
2024-08-27 21:54:43 +00:00
zhengxiaojun
3211cba9f9 bbsps/shared/arm-gicv3: Calculate cpu_count correctly
cpu_count should be increased before exit condition.
2024-08-08 01:55:25 +00:00
Joel Sherrill
5580f70bbd disp_hmsc29xx.c: Address Coverity flagged negative shift
Coverity CID 1512508

Closes #5084.
2024-08-07 02:46:57 +00:00
Amar Takhar
a5370d1870 bsps: Fold various files into README.md 2024-08-05 21:41:15 +00:00
Amar Takhar
28180a1fa9 bsps: Convert README to MarkDown 2024-08-05 21:37:42 +00:00
Amar Takhar
52a9fdec5c Convert various files to README.md MarkDown 2024-08-02 21:13:35 +00:00
Amar Takhar
f16de5fae9 rtc: Convert STATUS and README.* to MarkDown 2024-08-02 21:07:27 +00:00
Kinsey Moore
39da0b7fd4 bsps/xqspipsu: Add timeouts to NOR transfers
This switches the XQspiPsu NOR driver layer to use the RTEMS event
system so that waits for interrupt-based data transfers can time out
instead of waiting indefinitely. It is sometimes possible for either the
controller or the NOR chip to fail to issue a transfer completion event
and recovery is preferable to a hang.
2024-06-25 06:47:48 +00:00
Sebastian Huber
1d997f3338 bsps: Maybe fix Xilinx QSPI
Update #4870.
2024-06-12 00:17:59 +00:00
Aaron Nyholm
e950c4d76a bsps: Add flash wrapper for Xilinx GQSPI
Closes #4870
2024-06-10 17:58:00 +00:00
Christian Mauderer
0e7567bc2a bsps: Add a GPIO based SPI driver
The driver uses simple pin set or get functions to emulate an SPI. It
doesn't care much for speed settings and just tries it's best.
2024-06-07 06:46:00 +00:00
Kinsey Moore
f094427708 bsps/shared/gicv3: Validate BSP vector count
Ensure that BSP_INTERRUPT_VECTOR_COUNT does not allow for reserved
interrupt IDs.
2024-05-21 23:26:37 +00:00
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
40ddcf9580 bsps: Use interrupt entry in clock driver
This avoids a dependency on memory allocations.
2024-05-07 23:21:31 +00:00
Sebastian Huber
a8fba20baa bsps: Add Doxygen group for Arm Generic Timer 2024-05-07 11:16:49 +02:00
Sebastian Huber
76462bb64c bsps/arm: Improve GICv3 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: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
Sebastian Huber
5a8e99546f bsps/xil-ttc: Add XIL_FATAL_TTC_IRQ_INSTALL 2024-04-30 01:39:05 -04:00
Sebastian Huber
42f86dfd75 bsps/xil-ttc: Use interrupt entry 2024-04-30 01:39:05 -04:00
Sebastian Huber
83f0c0259b bsps: Include <rtems/score/processormaskimpl.h>
This fixes commit b678a199e499b6c3f0b453393434aefaee180423 for SMP
configurations.
2024-04-30 01:39:05 -04: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