821 Commits

Author SHA1 Message Date
Joel Sherrill
c5e81a2169 linker_set.h: Add alignof implementation for when not C11 or C++11
The default implementation was completely broken. Use the GCC specific
__alignof__ if compiling for C99 or C++03. If not C++11, C11, or
GCC, then it is an error.
2021-07-21 17:00:22 -05:00
Kinsey Moore
14576608a9 freebsd/if_cgem: Fail probe for unterminated MII
When the MII bus is unterminated on unused interfaces, it results in PHY
read timeouts which manifest as spurious PHYs during the attach call.
Detect these timeouts during the probe so the device can be ignored.
2021-07-15 10:07:16 -05:00
Jan Sommer
974ab1568a i386: Remove unneeded include header files 2021-06-09 18:47:07 +02:00
Christian Mauderer
00a5f9748e MMCSD: Use cache aligned alloc for ioctl
Some drivers can't easily work with buffers that are not cache aligned
and have an arbitrary length. Therefore use an aligned malloc instead.
2021-04-19 09:02:22 +02:00
Christian Mauderer
33e3cf8eaf ping6: Honor file descriptor maximum
This is basically the same as the patch for ping.

Update #4360
2021-03-26 14:08:01 +01:00
Kinsey Moore
3abebabf1d linker: Enforce set alignment requirements
According to commentary on GCC bug
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99143, the alignment
behavior of linker sections on which RTEMS has relied was never
guaranteed to be consistent across platforms and any alignment
requirements for linker sections needs to be enforced explicitly.
This adds those explicit alignment requirements.
2021-03-10 08:57:59 -06:00
Kinsey Moore
28129f8ee6 ck: Update for ILP32
libck assumes all AArch64 pointers are 8 bytes. This adds the required
defines to handle 4 byte pointers on ILP32.
2021-03-10 08:57:59 -06:00
Kinsey Moore
e256668d6e nexus: Add ZynqMP SLCR driver
Add a System Level Control Register driver for the Xilinx Zynq
Ultrascale+ MPSoC with basic clock control functionality for use with
the Cadence GEM. This also removes the Zynq-7000 clock control weakref
from compilation depending on the BSP in use.
2021-03-10 08:57:59 -06:00
Kinsey Moore
b7a12cc8f9 if_cgem: Add support for ZynqMP CGEM
This is a port of the latest patch in FreeBSD that adds support for
64bit CGEMs as used in ZynqMP. This does not include the work necessary
for support on RISC-V systems.
2021-03-10 08:57:59 -06:00
Moyano, Gabriel
7abb8915d7 ehci_pci: Import from freebsd-org
see #4264
2021-03-08 18:07:46 +01:00
Christian Mauderer
a58f553e9d if_ffec: Fix cache handling on tx
With the previous fix, it could happen that the end of the packet hasn't
been flushed. For example assume the following addresses:

ds_addr: 0x81c804A
ds_len: 0x57

In that case the data ends at 0x81c80a1. But due to the rounding the
area from 0x81c8040 to 0x81c80a0 would have been flushed.

This fix now first calculates the start and end address, aligns these
addresses and then recalculates the len that has to be flushed.

Update #4180
2020-11-17 11:33:23 +01:00
Kinsey Moore
19d98d3a19 Update arm64/aarch64 support 2020-11-13 12:33:17 -06:00
Sebastian Huber
0e7108f940 dwc_otg: Add support for nexus bus
Update #3910.
2020-10-27 06:29:37 +01:00
Sebastian Huber
8c4c7807f5 dwc_otg: Update host frame interval
Update the host frame interval after a device connection.  Select also
the FS/LS PHY clock.  It is not clear if this works on all platforms.

Update #3910.
2020-10-27 06:29:29 +01:00
Sebastian Huber
a0556e196a Add moxie support 2020-09-29 14:09:53 +02:00
Sebastian Huber
cb1faf6d43 Add or1k support 2020-09-29 06:30:01 +02:00
Sebastian Huber
1c2cc5b3f7 ck: Use default implementation < ARMv6 2020-09-29 06:29:52 +02:00
Sebastian Huber
272d5f522d ifmcstat: Port to RTEMS 2020-09-07 10:12:44 +02:00
Sebastian Huber
11bdcef24d ifmcstat: Import from FreeBSD 2020-09-07 09:39:22 +02:00
Christian Mauderer
97dc907946 if_ffec: Align send buffers to cache if necessary. 2020-07-29 13:09:11 +02:00
Christian Mauderer
bbdac23a5a rtwn_usb: Make sure buffers are cache aligned 2020-07-29 13:09:11 +02:00
Christian Mauderer
cdd6003eb8 busdma: Option to round to cache lines on sync
Some targets support only flushing or invalidating complete cache lines.
In this cases misaligned buffers might lead to unexpected results. This
patch adds a flag that allows drivers to signal to the bus dma driver
that it is OK to round a buffer to the next full cache line. That's for
example necessary if a driver wants to send out 14 byte via a USB DMA.
Only the driver knows whether these 14 bytes are located in an otherwise
unused cache line aligned buffer.
2020-07-29 13:09:11 +02:00
Christian Mauderer
1398d9329f imx: Use RTEMS GPIO driver instead of FreeBSD one
Update 3869
2020-07-29 13:09:11 +02:00
Christian Mauderer
4c762de2fd gpioregulator: Remove.
There is a bug in the #ifdef regarding FDT so this file hasn't been
compiled. If that bug is solved, the driver doesn't work for some other
reason.

With the FDT-bug the driver hasn't been used by anyone. So just remove
it again.
2020-07-29 13:09:11 +02:00
Christian Mauderer
d38dbbe18e imx6_usbphy: Fix regulator (vbus-supply)
Update #3869.
2020-04-20 09:20:09 +02:00
Christian Mauderer
318422720b regulator: Disable FDT parts for non-FDT targets 2020-04-17 14:43:51 +02:00
Jan Sommer
a69293ca57 i386: Port to RTEMS
- Update imported files to compile rtems-libbsd for i386 based BSPs
- Mostly commenting out parts which create compile or link errors in
RTEMS, but aren't needed
2020-04-17 13:18:06 +02:00
Jan Sommer
dc86c55f51 i386: Delete old machine dependent files
- The files in the i386 directory have been moved to common x86 directories by FreeBSD:
  - freebsd/sys/x86/x86/legacy.c
  - freebsd/sys/x86/include/machine/legacyvar.h
  - freebsd/sys/x86/include/machine/specialreg.h
- Add header files in rtemsbsd directory to direct compiler to new files
2020-04-17 13:15:51 +02:00
Jan Sommer
efe9b55393 iflib.c: Deactivate use of ifc_cpus
- cpusets and SMP are currently not supported in libbsd for RTEMS
- Disable the ifc_cpus context variable and replace its usage,
essentially hard-coding for cpu 0
2020-04-17 13:15:51 +02:00
Jan Sommer
fb5499af2f Callout: Redefine callout_reset_on for rtems
- callout_reset_on takes a cpu which is ignored by the subsequent call
to callout_reset_sbt_on in RTEMS.
- The macro is redefined to discard the cpu argument directly which
enables uses of it with cpu-dependent variables (disabled in
RETMS) without further changes, e.g. in iflib.c.
2020-04-17 13:15:51 +02:00
Jan Sommer
ce5b52d575 i386: Add missing files from FreeBSD
- Files needed to make rtems-libbsd build again for i386
2020-04-17 13:15:50 +02:00
Christian Mauderer
592003fa3e imx: Fix build for all other BSPs. 2020-04-16 10:51:48 +02:00
Christian Mauderer
b3da96ceb8 imx6_usbphy: Add regulator (vbus-supply).
Update #3869.
2020-04-15 16:14:18 +02:00
Christian Mauderer
2eab5465f3 ehci_imx: Set/clear ENHOSTDISCONNECT in USB PHY.
This is not a nice solution but it should work on all chips. As soon as
FreeBSD has a nice solution via the USB PHY driver, this should be
replaced.

Update #3869.
2020-04-15 16:14:18 +02:00
Christian Mauderer
4a2d99b4b0 ehci_imx: Port to RTEMS
Update #3869.
2020-04-15 16:14:18 +02:00
Sebastian Huber
29eda67d54 ehci_imx: Import from FreeBSD
Update #3869.
2020-04-15 16:14:18 +02:00
Christian Mauderer
404ad60f5f regulator: Import from FreeBSD.
Update #3869.
2020-04-14 16:39:20 +02:00
Sebastian Huber
10aa08e580 imx gpio port
Update #3869.
2020-04-14 16:39:20 +02:00
Sebastian Huber
f88f7a02ad imx6_ccm: Port to RTEMS
Update #3869.
2020-04-14 16:39:20 +02:00
Sebastian Huber
beabd3bfa9 imx6_ccm: Import from FreeBSD
Update #3869.
2020-04-14 16:39:20 +02:00
Sebastian Huber
64c45b5a1a usb_busdma: Add USB_NEED_BUSDMA_COHERENT_ALLOC
Some BSPs have a cache-coherent memory area, however, it should not be
used for the USB controller.
2020-04-14 16:39:20 +02:00
Christian Mauderer
cec7e3f982 mmcsd: Don't handle multiple hardware partitions.
The rtems_bsd_mmcsd_attach_worker acquired the bus without releasing it.
If a MMC device has multiple hardware partitions (like eMMC which
typically has at least one boot partition) the
rtems_bsd_mmcsd_attach_worker would try to acquire the bus multiple
times. This doesn't work.

Doing it right would mean to acquire and release the bus for each
access which would have an performance impact. Beneath that it would
mean that partition switching has to be supported by the RTEMS code too.

There is currently no known use case where the access would be
necessary. Therefore this patch prefers the performance and just avoids
all further hardware partitions.
2020-04-01 14:12:47 +02:00
Sebastian Huber
835250de09 Fix INVARIANTS support 2020-03-31 09:26:36 +02:00
Sebastian Huber
46b3858b27 Update to FreeBSD stable/12 2020-02-10
Git mirror commit 0d1c391321b34b3025cf0e72f2231d836ff76da8.
2020-02-18 15:00:48 +01:00
Sebastian Huber
9d905758df EVENTHANDLER(9): Avoid multiple definition errors 2020-02-10 18:20:13 +01:00
Sebastian Huber
a8f29d695e SOCKATMARK(3): Import from FreeBSD
Close #3798.
2019-12-19 10:51:48 +01:00
Sebastian Huber
afaeccc05a NVMECONTROL(8): Port to RTEMS
Update #3821.
2019-11-13 13:22:36 +01:00
Sebastian Huber
94a7b59e06 NVMECONTROL(8): Import from FreeBSD
Update #3821.
2019-11-13 13:22:25 +01:00
Sebastian Huber
6735da1a70 NVME(4): Add NVME_GET_NAMESPACE IO control
Update #3821.
2019-11-13 13:22:22 +01:00
Sebastian Huber
16c04c33ef NVME(4): Enable per-CPU IO queues
Update #3821.
2019-11-13 13:22:19 +01:00