Commit Graph

391 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
Joel Sherrill
04db5eaee1 bsps/shared/start/setvec.c: Fix warning across multiple BSPs
GCC 14 flags this method with a warning.
2025-02-24 16:46:58 -06:00
Gedare Bloom
8e6ded473c rtems: update licenses to 2BSD
This is an update of many lingering embedded brains GmbH licenses from
the RTEMS License to the 2-BSD license where possible depending on the
joint copyrights.

Updates #3053.
2025-02-10 15:44:09 +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
Jan Sommer
ab21dcba06 grlib/occan: Fix baud rate calculation
Fixes #5166
2025-02-07 15:08:07 +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
Matteo Concas
72c0f5ccc1 grlib/grcanfd: Mask frame data length value to prevent overflow 2025-02-07 01:03:33 +00:00
Matteo Concas
0bafb10a69 grlib/grcanfd: Use signed integer to account for errors 2025-02-07 01:03:33 +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
Sebastian Huber
e53dfabe36 sparc/leon3: Add leon3_l2c_lock
Use a single lock for all L2C support functions.

Close #4925.
2024-11-20 15:08:04 +00:00
Martin Åberg
85add65a91 grlib/l2c: Prevent concurrent register access
Accesses to the L2C registers performed by the L2C driver are now
serialized with spin locks. This avoids concurrent access to the L2C
registers by multiple processors. Proposed by GRLIB-TN-0021.

Update #4925.
2024-11-20 15:08:04 +00:00
Martin Åberg
1ce6347976 grlib/l2c: Write to flush registers using atomic instructions
All writes to the L2C flush registers performed by the driver are now
done using atomic write instructions. Proposed by GRLIB-TN-0021.

Update #4925.
2024-11-20 15:08:04 +00:00
Martin Åberg
6198260d26 grlib/l2c: Access registers with helper functions 2024-11-20 15:08:04 +00:00
Martin Åberg
0a2c310d39 grlib/l2c: Use printk for debug print 2024-11-20 15:08:04 +00:00
Martin Åberg
ed55634d51 grlib/l2c: Fix whitespace
No functional change
2024-11-20 15:08:04 +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
Matteo Concas
8820b8e63f grlib/b1553rt: Fix bit shift direction
The RT_TSW_OK field is set to 1 if there was no error. The Message Error
(ME) field indicates an error and must be set to 0 if there was no error
so the result of tsw&RT_TSW_OK must be negated. It is then left-shifted
to the Messsage Error (ME) bit field of the message information word.

Fix issue CID 1399772
2024-10-29 13:25:14 +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
Matteo Concas
a5f64ff27d grlib/ascs: Fix evaluation order violations, CIDs 1399778, 1399782 2024-10-21 07:02:51 +00:00
Matteo Concas
93413ed315 grlib/pwm: Fix PWM enable bit check, CID 1399774 2024-10-21 07:02:51 +00:00
Matteo Concas
de56c23c14 grlib/1553: Remove dead code, CID 1399770 2024-10-21 07:02:51 +00:00
Matteo Concas
ff22dd6f7c grlib/1553: Remove dead code, CID 1399764 2024-10-21 07:02:51 +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
8db6a45009 bsps: Assembly implementation for PSCI bsp_reset()
Avoid issues with potential dead code after the secure monitor or
hypervisor call.
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
dd3bc5bfb7 bsps: Remove superfluous include 2024-10-08 00:30:54 +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
8c497f2693 bsps/shared/xil: Add files to Doxygen group 2024-10-02 05:24:30 +02:00
Sebastian Huber
bbc87a471d bsps/aarch64: Simplify SMP support
Remove copy and paste from the arm SMP support.  The shared aarch64
implementation of rtems_cache_enable_data() does not enable a particular
cache, it just enables the C bit in the SCTLR_EL1.  This is already done
in aarch64_mmu_enable().  There is no need to wait for secondary
processors in _CPU_SMP_Start_processor().
2024-09-29 23:13:32 +00: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
Sebastian Huber
3332e54772 score: Disable ISR for fatal extensions
Update #5067.
2024-08-23 14:54:37 +00:00
Sebastian Huber
002c6067ba bsps: Add fatal source/code to bsp_reset()
Mark bsp_reset() as no-return.  Use default BSP fatal handler in lm32 and m68k
BSPs.  Remove empty bsp_reset() implementation.

Update #5067.
2024-08-23 14:54:37 +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