760 Commits

Author SHA1 Message Date
Jan Sommer
13cbd83444 grlib/occan: Fix baud rate calculation
Fixes #5219
2025-02-20 11:24:30 +01:00
Reinking, Janosch
7b40317e76 bsps/shared: NS16550 driver updates the line control register during operation
Fixes: #5179
2025-01-23 15:30:28 +01:00
Christian Mauderer
fc21b923ba bsp/atsam: Improve UART / USART tx performance
Put the next character into the send buffer if the buffer is empty and
not when the last character has been sent out to the line. This improves
the performance slightly.

Before that patch, the receive path was faster than the transmit path.
Therefore a simple echo could drop characters on a busy connection.
With this patch sending and receiving has about the same performance so
that no characters are lost.

Fixes #4611
2022-02-15 14:45:42 +01:00
Christian Mauderer
f7a204e3d7 bsp/atsam/i2c: Add error return and fix edge cases
The driver didn't return with an error on (for example) a NACK on the
bus. This adds the expected error return. Due to the new case that a
transfer can be interrupted on an error, there were some new edge cases.
This patch therefore also fixes these edge cases by removing the
transfer_state that more or less duplicated the interrupt states.

Fixes #4591
2022-02-10 09:03:19 +01:00
Christian Mauderer
f71c620f7e bsp/atsam/i2c: Simplify driver
Do some clean ups. Remove superfluous variables. Eliminate some overly
complex logic (information about transfer and remaining bytes has been
tracked redundantly in multiple variables).

This patch doesn't change the behavior of the driver.

Update #4591
2022-02-10 09:02:56 +01:00
Christian Mauderer
779847a5ef bsp/atsam: Optionally use DMA for UART Rx
If the system is busy with other interrupts and the UART is set to a
fast baud rate, it's possible to loose UART interrupts and therefore
characters. This allows to optionally enable a DMA for the UARTs so that
a number of lost interrupts can be tolerated.

The number of DMAs on this chip is limited and not not all applications
need that feature. Therefore the DMA is disabled by default.

Close #4577
2022-01-18 08:50:06 +01:00
Christian Mauderer
d9c0dd3c32 bsp/atsam: Merge USART and UART driver
If no extended features of the USART are used and if the comparison
feature of the UART is not used, the two modules are compatible. The
drivers were nearly identical except for some names of the defines.

This patch merges the two drivers into one.

Update #4577
2022-01-18 08:50:04 +01:00
Chris Johns
99698fb5a2 powerpc/motorola_powerpc: Map LibBSD bus space to the PCI base address
Closes #4516
2021-09-22 10:58:14 +10:00
Chris Johns
cfef84a007 powerpc/io: Make [out/in] le and be calls conditional
- These calls clash with the Linux IO header in LibBSD. Making these
  conditional here means BSPs build and the imported Linux header is
  untouched.

Updates #4245
2021-09-22 10:58:14 +10:00
Gedare Bloom
e5a1b15848 m68k/uC5282: linkcmds KEEP and SORT sections
Fixes a problem with bad epilog code in _fini and to keep sections
necessary with the -ffunction/data-sections.

Closes #4465.
2021-07-01 12:53:50 -06:00
Jan Sommer
4925ab4f52 bsps/i386: Update calibration of TSC to be more accurate
Closes #4456
2021-06-21 10:13:37 +02:00
Sebastian Huber
8d4382ba34 bsps/irq: Change license to BSD-2-Clause
Change license to BSD-2-Clause according to file history and
re-licensing agreement.

Update #3053.
2021-06-21 10:12:26 +02:00
Sebastian Huber
d697769d46 bsps/arm: ARMV7_CP15_START_WORKSPACE_ENTRY_INDEX
Change the ARMV7_CP15_START_WORKSPACE_ENTRY_INDEX value to be in line
with the workspace entry in ARMV7_CP15_START_DEFAULT_SECTIONS.

Close #4394.
2021-04-29 13:39:36 +02:00
Moyano, Gabriel
bc806d41a5 grlib/genirq: Taking into account that it could be more than one ISR enabled/disabled
Closes #4385
2021-04-16 08:49:54 +02:00
Jan Sommer
ec2660548e bsps/xilinx_zynq: Add Xilinx AXI SPI driver to build
Closes #4370
2021-03-31 10:22:42 +02:00
Jan Sommer
ce2b276803 bsps/xilinx_zynq: Add SPI driver for xilinx-axi-spi
Updates #4370
2021-03-31 10:15:49 +02:00
Jan Sommer
14e74e4312 bsps/xilinx_zynq: Add cadence SPI driver to build system
Closes #4369
2021-03-31 10:02:00 +02:00
Jan Sommer
c86d513664 bsps/xilinx_zynq: Add SPI driver for cadence-spi
Updates #4369
2021-03-31 10:00:12 +02:00
Jan Sommer
645dbc5fcc bsps/shared: Allow setting baud rate for zynq uart
Closes #4236
2021-03-09 09:28:43 +01:00
Kinsey Moore
2f323700b9 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.

Updates #4236
2021-03-09 09:28:43 +01:00
Daniel Hellstrom
291267113b grlib,grspw_pkt: correct link state enum numbering
Not used by the driver itself, but shuold be correct if used by
application.

Update #4316.
2021-03-07 16:08:26 +01:00
Martin Aberg
8cfaa0eb76 leon, l2cache: prevent unused diagnostic access
Update #4315.
2021-03-07 16:08:26 +01:00
Martin Aberg
b0eb952427 leon, ahbstat: register definitions for AHBSTAT version 1
Update #4314.
2021-03-07 16:08:26 +01:00
Martin Aberg
1161e1fb92 leon, grspw_router: added router_port_link_div()
Allows user to set SpaceWire run clock divisor for an individual port.

Update #4313.
2021-03-07 16:08:26 +01:00
Daniel Hellstrom
cb8379dc09 leon: restart and load timer counter at initialization
Without this smp05 and smpthreadlife01 tests may fail
depending on how the boot loader initialized the GPTIMER.
Before the time counter stopped counting when reaching
zero, but tests could work since it could take 2^32 us
before stopping.

The timer driver will potentially overwrite this, but it
happens later due to the initialization order having
RTEMS_SYSINIT_CPU_COUNTER very early.

Update #4312.
2021-03-07 16:08:25 +01:00
Daniel Hellstrom
81e4a15b18 leon,ckinit: avoid assuming 1MHz timer pre-scaler clock
Update #4310.
2021-03-07 16:08:25 +01:00
Daniel Hellstrom
0ed294b6cc leon3: avoid dependency on apbuart/timer driver
Moves drvmgr_drivers[] from amba.c to a separate file in order
to avoid the dependecy on APBUART/GPTIMER drivers. This has
an effect when user configured not to use timer or uart
in their project.

Update #4309.
2021-03-07 16:08:25 +01:00
Daniel Hellstrom
c13205f691 leon,greth: added support for variable sized descriptor table sizes
The descriptor table size is equal to its alignment and set when
configuring the HW IP through VHDL generics. This SW patch simply
probes the HW how large the RX/TX descriptor tables are and adjusts
accordingly.

The number of descriptors actual used are controlled by other
settings (rxDescs and txDescs) controlled by the user.

Update #4308.
2021-03-07 16:08:25 +01:00
Daniel Hellstrom
23cc5a6090 leon,grcan: split out GRCAN non-FD specific support in separate file
Update #4307.
2021-03-07 16:08:24 +01:00
Daniel Hellstrom
e180f281ab leon,grcanfd: split out GRCANFD specific support in separate file
Update #4307.
2021-03-07 16:08:24 +01:00
Daniel Hellstrom
c41e7bae9c leon,grcan: added support for GRCANFD
The new GRCAN_FD IP supports CAN FD standard and is mostly backwards
compatible with GRCAN SW interface. The GRCAN driver have been extended
to support the GRCANFD IP using the same driver.

Additional functions have been added that uses a new CAN FD frame
format and read/write/baud-rate functions that supports both GRCANFD
and GRCAN. To keep the SW API fully backwards compatible with GRCAN,
the old functions remain.

Update #4307.
2021-03-07 16:08:24 +01:00
Daniel Hellstrom
e1062fae3c grlib: added 64-bit read no-cache function
Update #4307.
2021-03-07 16:08:24 +01:00
Daniel Hellstrom
7db032cf02 leon,occan: use common CAN baud-rate calculation routine
Update #4306.
2021-03-07 16:08:24 +01:00
Daniel Hellstrom
78b45cc561 leon,grcan: use common CAN baud-rate calculation routine
Update #4306.
2021-03-07 16:08:23 +01:00
Daniel Hellstrom
da7cb87b4d 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 #4306.
2021-03-07 16:08:23 +01:00
Daniel Hellstrom
0ab993b04a grlib,ambapp: added new IP core IDs
Update #4305.
2021-03-07 16:08:23 +01:00
Daniel Hellstrom
84fb340ac4 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.

Update #4304.
2021-03-07 16:08:23 +01:00
Arvid Bjorkengren
8004ffb649 leon,gr1553b: Only align allocated memory. Verify alignment of memory.
Update #4303.
2021-03-07 16:08:23 +01:00
Arvid Bjorkengren
14fcf38891 leon,gr1553b: set codec version
This is enables the updated codec for GR740 and is backwards compatible
with all other versions of the IP.

Updates #4275.
2021-03-07 16:08:22 +01:00
Arvid Bjorkengren
1223f5e402 leon,gr1553rt: Fixed spinlock unlock
Update #4274.
2021-03-07 16:08:22 +01:00
Arvid Bjorkengren
a97a4732f7 leon,gr1553rt: Fixed memory leak
Update #4274.
2021-03-07 16:08:22 +01:00
Vijay Kumar Banerjee
f4d00aa538 powerpc/beatnik/net: Remove unused files
Close #4293
2021-03-03 19:45:00 -07:00
Chris Johns
d1bab986ca powerpc/motorola_power: Place any common data in the .bss section
- It seems the compiler how defaults to -fcommon and this means
  some uninitialised data is ignored.

Closes #4266
2021-02-27 10:59:25 +11:00
Chris Johns
3824960f24 powerpc/motorola_power: Link all text sections into the executable image
- The change to building all code with code and data sections means
  we have a section per function. Make sure all functions are
  placed in the text section.

Closes #4266
2021-02-24 17:04:36 +11:00
Chris Johns
2f56b7375a Update motorola_power to irq-generic interrupt management
- Add support to the BSP to enable irq-generic management

- Update the powerpc shared irq code to support irq-generic. This
  is an opt in option for existing powerpc bsps. This change
  should be simpler now

- Fix a number of issues in ISA IRQ controller handling by porting
  fixes from the i386 (PC) BSP

Closes #4247
Closes #4248
2021-02-16 15:24:33 +11:00
Chris Johns
388bd8054c bsp/motorola_powerp: Print RTEMS_VERSION from the bootloader
Close #4234
2021-02-10 17:35:30 +11:00
Chris Johns
6d9843e189 powerpc/shared: ISA bus bridge fails to enable the openpic irq
- The call to enable the openpic irq for the ISA bridge fails
  because the IRQ used is offset by the ISA bus signals and
  the openpic call expects an IRQ relative to its signals.

- Add the MVME 2600/2700 to the list of boards with an ISA bridge.

Closes #4233
2021-02-08 09:43:48 +11:00
Christian Mauderer
0d44334ca1 bsp/imx: Fix system counter init for imx6
For i.MX7 U-Boot initializes the system counter. On i.MX6 Barebox is
often used which doesn't initialize the counter. With this patch, we try
to auto-detect whether the counter is initialized or not and do the
initialization ourself if necessary.

Closes #4220
2021-01-21 10:29:15 +01:00
Sebastian Huber
2a8f755107 bsps/arm: Fix MMU configuration
Update #4185.
2020-12-15 11:26:43 +01:00
Jan Sommer
21ed8d11c5 bsps/arm: Fix MMU small pages support
- For small tables only round to the next 4kiB instead of 1MiB

Close #4185.
2020-12-11 06:55:18 +01:00