summaryrefslogtreecommitdiffstats
path: root/bsps/shared (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-04-16bsps/arm: Improve GICv3 supportSebastian Huber1-5/+11
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-16dev/irq: Improve Doxgyen group assignmentsSebastian Huber4-8/+21
Make the GIC interrupt controller support a subgroup of the generic interrupt controller support.
2024-04-16bsps/arm: Improve GICv2 supportSebastian Huber1-5/+20
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-11dev/clock: Move bcm2835-system-timer driver to shared spaceNing Yang1-0/+94
This patch moves the bcm2835 system timer driver in the arm/raspberrypi directory to the shared directory and adjusts arm/raspberrypi BSP.
2024-04-11bsps/xil-ttc: Improve clock driverSebastian Huber1-133/+122
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-11bsps/xil-ttc: Add XIL_FATAL_TTC_IRQ_INSTALLSebastian Huber1-4/+2
2024-04-11bsps/xil-ttc: Use interrupt entrySebastian Huber1-4/+10
2024-04-09bsps: Include <rtems/score/processormaskimpl.h>Sebastian Huber3-0/+3
This fixes commit b678a199e499b6c3f0b453393434aefaee180423 for SMP configurations.
2024-04-04dev/serial: Add Zynq UART kernel I/O supportSebastian Huber1-0/+88
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-03-27dev/serial: Simplify some Zynq UART functionsSebastian Huber2-25/+21
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-27bsps: Move declarations to <bsp/irq-generic.h>Sebastian Huber3-3/+4
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-20bsps: Avoid unused argument in clock interruptSebastian Huber4-52/+40
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-20dev/irq: Optional arm_gic_irq_processor_count()Sebastian Huber2-0/+4
Provide arm_gic_irq_processor_count() only in SMP configurations.
2024-03-19arm/xilinx-zynqmp-rpu: Fix clock driverStanislav Pankevich1-1/+1
We observed a strange behavior of the 1Hz timer when running cFS on Zynq RPU. After some investigation, we reduced the error to the truncation issue. This patch fixes the issue.
2024-03-11bsps/shared/xqspipsu: Read correct status bitsKinsey Moore1-0/+15
When resetting the QSPI FIFOs, the driver was reading write-only bits of a register for status information when it was actually in a different register. This corrects the driver so that it reads the correct status bits.
2024-03-11bsps/shared/xnandpsu: Add opportunistic page cacheKinsey Moore1-0/+41
Add an opportunistic page cache to the xnandpsu driver since it does not implement partial page reads and common filesystem access patterns perform multiple reads from the same page. This has been seen to provide a 10x speedup to read speeds and a 2x speedup on first initialization when used with JFFS2.
2024-03-11bsps/clock: Fix fast idle for SMPSebastian Huber1-0/+16
2024-02-28bsps/xnandpsu: Allow creation of BBTKinsey Moore1-1/+1
This fixes a logic inversion that was preventing creation of a Bad Block Table (BBT) from scratch on devices that lack one. This was discovered during upstream integration testing. The BBT management layer in this driver is not designed to be easily testable other than on real hardware.
2024-02-19bsps/qspipsu: Calculate correct parallel mode sizeKinsey Moore1-1/+2
Stacked mode doubles the number of sectors and device size while parallel mode doubles the sector size and the device size. Make sure that this is accounted for in the device size accessor.
2024-01-10libio: Clean up usage of rtems_termios_device_modeKinsey Moore2-2/+6
This cleans up outputUsesInterrupts usage with rtems_termios_device_mode enum values. The outputUsesInterrupts member was typed as an int, named as if it were a boolean value, and used as if it were a rtems_termios_device_mode enum. In this patch, values assigned to outputUsesInterrupts have been converted to the corresponding rtems_termios_device_mode enum value, conversions from deviceOutputUsesInterrupts have been made explicit, and uses of rtems_termios_device_mode enum values with deviceOutputUsesInterrupts have been converted to booleans.
2023-12-14bsps/xnandpsu: Allow manipulation of BBTKinsey Moore1-0/+41
Expose functions to directly manipulate the bad block table (BBT). These functions are necessary to correct possible BBT corruption caused by bugs in the BBT management layer.
2023-12-14bsps/xnandpsu: Constrain block erasure to deviceKinsey Moore1-0/+4
The XNandPsu_EraseBlock function takes a target device and a block offset for erasure. Ensure the block offset is within the size of the target device.
2023-12-14bsps/xnandpsu: Mark correct reserved blocksKinsey Moore1-0/+4
When marking the trailing blocks on a device as reserved for Bad Block Table usage, ensure that the correct blocks are marked. This resolves an off-by-one error that was marking one block too low and leaving the last block in the device unmarked.
2023-12-14bsps/xnandpsu: Write BBT to correct locationKinsey Moore1-0/+5
When writing out the Bad Block Table, write it to the targeted device and ensure the block is appropriately mapped to the targeted device.
2023-12-14bsps/xnandpsu: Detect missing BBTsKinsey Moore1-0/+3
Mark the BBT descriptor as invalid before scanning to ensure that missing BBTs are detected and written correctly if necessary.
2023-12-14bsps/xnandpsu: Read correct BBT sizeKinsey Moore1-0/+4
The Bad Block Table is a per-device catalog of the dispositions of each block in the device. Only read enough data to determine the dispositions of blocks for the device being read.
2023-12-14bsps/xnandpsu: Fix BBT mapping functionsKinsey Moore1-0/+32
The xnandpsu driver includes functionality to map back and forth between the flash-based BBT and the memory-based BBT with the values in each being a bitwise inversion of each other. This resolves several bugs in this process and simplifies the inversion from operating on the block representation to operating on the entire BBT entry (4 blocks, 2 bits per block, one byte total). Bugs resolved in XNandPsu_ConvertBbt(): * The calculation of memory BBT entry offset was off by a factor of 4 * The entry offset into the flash BBT has been removed since each flash BBT directly describes the flash space it is contained within and has no reference to other devices in the chip Bugs resolved in XNandPsu_WriteBbt(): * The BBT length calculated was reduced to NumTargetBlocks from NumBlocks since only the relevant portion of the in-memory BBT should be written to the flash-based BBT space * An offset was applied to values retrieved from the in-memory BBT so that only the relevant portion was converted and written to the flash-based BBT
2023-11-20bsps/arm: Add BSP for ZynqMP RPUPhilip Kirkpatrick1-0/+229
2023-10-27bsps/xnandpsu: Always wrap page to device sizeKinsey Moore1-0/+8
The xnandpsu driver conditionally tries to wrap page index to NAND chip size causing an off-by-one error where the first page of the second chip is not wrapped correctly. This removes the conditional so that page index is always wrapped.
2023-10-27bsps/xnandpsu: Avoid loop counter resetKinsey Moore1-0/+8
On configurations where multiple NAND chips are in use, the erasure loop in XNandPsu_Erase() can reset the loop counter variable once it gets to blocks in the second chip causing an infinite loop overwriting parts of the first chip. This change ensures that the loop counter is not accidentally reset.
2023-10-24bsps/xil: Adjust Xilinx support code for Cortex-R5Kinsey Moore2-0/+4
This fixes some issues in the Xilinx support code that are critical to support the Cortex-R5F cores present in my Xilinx SoCs. The imported Cortex-R5 xil_cache.c matches the existing information in bsps/shared/xil/VERSION.
2023-10-24bsps/xil: Import Xilinx Cortex-R5 supportKinsey Moore2-0/+1202
This imports Xilinx support code for the MPU and cache on Cortex-R5 cores. This was imported as specified in bsps/shared/xil/VERSION.
2023-10-13bsps: Remove unused includesKinsey Moore3-5/+0
2023-09-26bsps/xnandpsu: Ensure buffer cache syncKinsey Moore1-0/+6
When a buffer is modified by both hardware components such as DMA and by software components, the buffer cache state must be kept in sync so that data is not accidentally thrown away during future invalidations.
2023-09-26bsps/xnandpsu: Don't rely on usleep for pollingKinsey Moore1-0/+15
When polling hardware registers in high performance situations, don't rely on usleep or other standard sleep functions since they will necessarily rely on kernel ticks to be woken up. This can easily cause an immense reduction in throughput.
2023-09-23bsps/xqspipsu: Add SFDP config space read abilityKinsey Moore1-0/+48
This adds a function to allow reading of the SFDP configuration space that describes attributes of NOR flash chips.
2023-09-23bsps/xqspipsu: Break out RDIDKinsey Moore1-16/+29
Expose a function to read the NOR flash chip ID information beyond the minimum 3 bytes for the lookup table.
2023-09-06bsps/xnandpsu: Ensure correct cache maintenanceKinsey Moore1-0/+21
The changes here ensure correct cache maintenance around DMA operations. One cache flush was missing and two cache invalidations occurred before the corresponding read that would make them necessary.
2023-08-03bsps/shared: Fix Coverity warning in MCP7940MChristian Mauderer1-3/+2
Fixes the following Coverity warning: ** CID 1539495: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /bsps/shared/dev/rtc/mcp7940m.c: 317 in mcp7940m_set_time() Basically coverity warns that (buf[...] & 0x7) can't be bigger than 7. Just remove the unnecessary comparison.
2023-08-01bsps/shared: Add MCP7940M RTC driverChristian Mauderer1-0/+362
The MCP7940M is a I2C RTC chip. The new driver uses the dev/i2c API to support the RTC. It is written with the intention, that the driver can be adapted to other RTCs with a similar register layout by just replacing the initialization function.
2023-07-28bsps/irq: Remove unused parameterSebastian Huber1-4/+2
Update #4862.
2023-07-26rtems: Add files to Doxygen groupsSebastian Huber1-0/+9
Provide basic Doxygen comments. Update #3706. Update #3707.
2023-07-24score: Move _IO_Relax() to new <rtems/dev/io.h>Sebastian Huber1-1/+1
This function is not a super core service.
2023-07-17bsps/grlib: Fix use of uninitialized variableSebastian Huber1-1/+0
Fixes Coverity CID 1538314.
2023-07-14bsp/leon3: Use new GPTIMER register block APISebastian Huber1-94/+84
2023-07-14bsps: Use new APBUART register block APISebastian Huber3-95/+142
2023-06-22bsps/xqspipsu: Handle SMP systems properlyKinsey Moore2-0/+26
The NOR driver was not written with SMP systems and caching in mind. This makes the IsBusy flag volatile for updates across cores and introduces cache flushing and invalidation where necessary for data manipulated by the DMA engine in the QSPI peripheral.
2023-06-16bsps: Remove uses of BSP-specific interrupt APISebastian Huber1-4/+13
Update #3269.
2023-06-08bsps/xqspipsu: Use device information from the FCTKinsey Moore1-0/+16
Instead of statically defining the device parameters, use the device information available via the NOR device layer's Flash Configuration Table.
2023-06-08bsps/xqspipsu: Calculate erase sectors correctlyKinsey Moore1-16/+3
When given the exact bounds of a sector, the current algorithm calculates that 3 sectors need to be erased. This corrects the calculation such that only 1 sector needs to be erased for erasures that exactly match sector boundaries.