Commit Graph

156 Commits

Author SHA1 Message Date
Daniel Hellstrom
65237ba01d leon,occan: use common CAN baud-rate calculation routine
Close #4323.
2021-03-11 17:31:21 +01:00
Daniel Hellstrom
4d19220742 leon,grcan: use common CAN baud-rate calculation routine
Update #4323.
2021-03-11 17:31:21 +01:00
Daniel Hellstrom
cff99cf1fa leon,can: introduce common CAN baud-rate calculation function
Reimplemented the baud-rate algorithm from scratch to cope with
GRCAN, GRCANFD and OC_CAN devices.

Update #4323.
2021-03-11 17:31:21 +01:00
Daniel Hellstrom
68c882ef45 grlib,ambapp: added new IP core IDs 2021-03-11 17:31:21 +01:00
Daniel Hellstrom
e227ae53ab leon,grspw: fix for SET_PACKET_SIZE
When the DMA table has been allocated dynamically, the IOCTL_SET_PACKETSIZE
will trigger an issue where pDev->rx and pDev->tx are not updated with
the new DMA tables base address. Instead the old pointers are used.

There is no point in reallocting the DMA tables because there is no
configuration option to it. Therefore the DMA tables allocation is
moved to a separate function never called from SET_PACKETSIZE.
2021-03-11 17:31:21 +01:00
Arvid Bjorkengren
50db7f2d6b leon,gr1553b: Only align allocated memory. Verify alignment of memory. 2021-03-11 17:31:21 +01:00
Arvid Bjorkengren
70f87f9e87 leon,gr1553b: set codec version
This is enables the updated codec for GR740 and is backwards compatible
with all other versions of the IP.
2021-03-11 17:31:21 +01:00
Arvid Bjorkengren
3344d0299f leon,gr1553rt: Fixed spinlock unlock 2021-03-11 17:31:21 +01:00
Arvid Bjorkengren
f798a75cd5 leon,gr1553rt: Fixed memory leak 2021-03-11 17:31:21 +01:00
Jan Sommer
cc825d0322 bsps/xilinx_zynq: Add SPI driver for cadence-spi
Updates #4320
2021-03-10 20:12:08 +01:00
Ryan Long
f762b7c272 grcan.c: Fix Unused value (CID #1437613)
CID 1437613: Unused value in grcan_set_filter().
This fix was recommended by Daniel Hellstrom (daniel@gaisler.com).

Closes #4301
2021-03-05 14:00:07 -06:00
Ryan Long
c57079a814 b1553brm.c: Fix Unsigned compared against 0 (CID #1399773)
CID 1399773: Unsigned compared against 0 in brm_write().

Closes #4295
2021-03-05 14:00:07 -06:00
Ryan Long
1f29ee4528 satcan.c: Fix Unsigned compared against 0 (CID #1399768)
CID 1399768: Unsigned compared against 0 in satcan_ioctl().

Closes #4294
2021-03-05 14:00:07 -06:00
Ryan Long
5f0a7ceb81 gr_tmtc_1553.c: Unchecked return value from library (CID #1399785)
CID 1399785: Unchecked return value from library in gr_tmtc_1553_init1().

Closes #4289
2021-03-05 14:00:07 -06:00
Ryan Long
4c0d9c5a57 gr_701.c: Unchecked return value from library (CID #1399783)
CID 1399783: Unchecked return value from library in gr701_init1().

Closes #4288
2021-03-05 14:00:06 -06:00
Ryan Long
91e38f8a8f gr_rasta_adcdac.c: Fix Unchecked return value from library (CID #1399780)
CID 1399780: Unchecked return value from library in gr_rasta_adcdac_init1().

Closes #4287
2021-03-05 14:00:06 -06:00
Ryan Long
17d525b584 gr_rasta_tmtc.c: Fix Unchecked return value from library (CID #1399771)
CID 1399771: Unchecked return value from library in gr_rasta_tmtc_init1().

Closes #4286
2021-03-05 14:00:06 -06:00
Ryan Long
b84ce61aa3 gr_rasta_io.c: Fix Unchecked return value from library (CID #1399763)
CID 1399763: Unchecked return value from library in gr_rasta_io_init1().

Closes #4284
2021-03-05 14:00:06 -06:00
Ryan Long
0443601356 gr_rasta_spw_router.c: Fix Unchecked return value from library (CID #1399760)
CID 1399760: Unchecked return value from library in gr_rasta_spw_router_init1().

Closes #4283
2021-03-05 14:00:05 -06:00
Ryan Long
13d6fae8dd grtc.c: Fix four Missing break in switch Coverity errors
CID 1399761: Missing break in switch in process_dma().
CID 1399765: Missing break in switch in process_dma().
CID 1399766: Missing break in switch in process_dma().
CID 1399777: Missing break in switch in process_dma().

Closes #4277
2021-03-05 14:00:05 -06:00
Ryan Long
1eaf4e461f grspw.c: Fix Unchecked return value (CID #1399781)
CID 1399781: Unchecked return value in grspw_device_init().

Closes #4259
2021-03-05 14:00:05 -06:00
Jan Sommer
6ebf376bf2 bsps/shared: Allow setting baud rate for zynq uart 2021-03-05 19:06:25 +01:00
Sebastian Huber
de7df0419d bsps: Fix legacy build 2021-02-26 09:48:41 +01:00
Sebastian Huber
7480c34698 bsps: Add default rtems_get_target_hash()
Update #4267.
2021-02-26 09:10:09 +01:00
Sebastian Huber
32b0d6f84a bsps: Change license to BSD-2-Clause of some files
Change license to BSD-2-Clause according to file histories and
re-licensing agreement.

Update #3899.
2021-02-24 11:15:07 +01:00
Ryan Long
fac1ff1820 grspw_pkt.c: Fix Dereference before null check (CID #1399846)
CID 1399846: Dereference before null check in grspw_addr_ctrl().

Closes #4253
2021-02-19 14:05:50 -06:00
Ryan Long
1fd56a96fc grtc.c: Fix Dereference before null check (CID #1399840)
CID 1399840: Dereference before null check in grtc_ioctl().

Closes #4252
2021-02-19 14:05:49 -06:00
Ryan Long
4edcdf43c7 b1553rt.c: Fix Deference before null check (CID #1399830)
CID 1399830: Dereference before null check in rt_control().

Closes #4251
2021-02-19 14:05:49 -06:00
Ryan Long
eff3d7c05f b1553brm.c: Fix Dereference before null check (CID #1399829)
CID 1399829: Dereference before null check in brm_control().

Closes #4250
2021-02-19 14:05:49 -06:00
G S Niteesh Babu
8b32f1d8c4 bsps/shared/ofw: Bug fixes
Fixed bugs in rtems_ofw_get_prop, rtems_ofw_get_prop_len
and removed hardcoded value.
2021-02-08 21:08:36 +01:00
G S Niteesh Babu
6da50db55b bsps/shared/ofw: Make rtems_ofw_get_effective_phandle iterative
Refactored recursive rtems_ofw_get_effective_phandle into a
iterative function.
2021-02-08 21:08:36 +01:00
G S Niteesh Babu
066687c43a bsps/shared/ofw: Use strlcpy instead of strncpy
Changed rtems_ofw_get_prop to use strlcpy instead of strncpy
to ensure the buffer is null terminated incase of overflow.
2021-02-08 21:08:36 +01:00
G S Niteesh Babu
c4985b7718 bsps/shared/ofw: Fix coverity reported defects
Fixed use after free and null pointer dereference defects

FIXES:
1) CID 1472601 (NULL_RETURNS)
2) CID 1472600 (USE_AFTER_FREE)
3) CID 1472599 (USE_AFTER_FREE)
4) CID 1472598 (USE_AFTER_FREE)
5) CID 1472596 (USE_AFTER_FREE)

The below two defects have to marked false positive
1) CID 1472597 (ARRAY_VS_SINGLETON)
2) CID 1472595 (ARRAY_VS_SINGLETON)
2021-02-08 21:08:36 +01:00
Sebastian Huber
361ec32070 cacheimpl.h: Avoid potential dead code
If CPU_DATA_CACHE_ALIGNMENT == CPU_INSTRUCTION_CACHE_ALIGNMENT we had
dead code with the previous implementation.

This fix relates to CID 1399776 (DEADCODE).
2021-01-27 19:02:03 +01:00
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
G S Niteesh Babu
9d2ed41fcb bsps/shared/ofw: Implement RTEMS OFW interface
RTEMS OFW is a FDT only implementation of the OpenFirmWare
interface. This API is created to be compatible with FreeBSD
OpenFirmWare interface. The main intention is to make
porting of FreeBSD drivers to RTEMS easier.

Most functions implemented have an direct one-one mapping
with the original OFW API and some extra auxiliary functions
were implemented to make working with device trees easier in
RTEMS.

Update #3784
2020-12-27 10:05:02 +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
Christian Mauderer
21a0d20c68 bsps: Replace non-ASCII bullet points 2020-12-14 10:48:57 +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
368fab5a82 bsps: Print CPU in default fatal error extension 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