Commit Graph

3915 Commits

Author SHA1 Message Date
Oleksandr Tymoshenko
6dcc1178c4 Fix release MSI method for ARM GIC 2016-10-09 04:37:21 +00:00
Oleksandr Tymoshenko
5031b2a018 Fix release MSI method for NVidia Tegra PCI controller 2016-10-09 04:36:40 +00:00
Oleksandr Tymoshenko
de2929fff0 Fix MSI allocation for NVidia Tegra
- Fix range check
- Due to checking found value in for(;;) condition irq after loop was
    always + 1 from actually found slot and wrong entry was marked as
    used which lead to returning slot 0 for all requests.
2016-10-09 04:29:42 +00:00
Oleksandr Tymoshenko
b5e34627d8 Add multitouch support for RPi's FT5406
- Add multitouch support (protocol B)
- Report physical size of the screen
- Switch from using busy loop to callbacks
- Enable callbacks only when there is active listener on /dev/input/eventX

Submitted by:	Vladimir Kondratiev <wulf@cicgroup.ru>
2016-10-08 18:19:52 +00:00
Michal Meloun
fd3d8ea51a ARM: Remove ARMv4 #defines from busdma_machdep-v6.c, it's ARMv6
specific file. Consistently use BUSDMA_DCACHE_ALIGN for cache
line alignment.

MFC after: 1 week
2016-10-06 13:53:17 +00:00
Michal Meloun
7cc70732a3 ARM: SEV/WFE instructions are implemented starting from ARMv6K,
use it directly.

MFC after: 1 week
2016-10-06 13:18:18 +00:00
Michal Meloun
55e447c98c ARM: Add identifiers for ARM Cortex v8 and Marvell Sheeva v7 cores.
Not a functional change.

MFC after: 3 days
2016-10-06 12:01:10 +00:00
Michal Meloun
4f18c103db ARM: Remove unused variable.
Not a functional change.

MFC after: 3 days
2016-10-06 11:54:42 +00:00
Luiz Otavio O Souza
ba14258f32 if_cpsw overhaul:
- Fix RX and TX teardown:
  . TX teardown would not reclaim the abandoned descriptors;
  . Interrupt storms in RX teardown;
  . Fixed the acknowledge of the teardown completion interrupt.

- Remove temporary lists for the descriptors;

- Simplified the descriptor handling (less writes and reads from
  descriptors where possible);

- Better debug;

- Add support for the RX threshold interrupts:
  With interrupt moderation only, an RX overrun is likely to happen.  The
  RX threshold is set to trigger a non paced interrupt everytime your RX
  free buffers are under the minimum threshold, helping to prevent the rx
  overrun.

The NIC now survive when pushed over its limits (where previously it would
lock up in a few seconds).

uFW (600MHz SoC) can now forward up to 560Mb/s of UDP traffic (netmap
pkt-gen as source and sink).  TCP forwarding rate is over 350Mb/s.

No difference (other than CPU use) was seen on Beaglebone black (1GHz SoC)
for his fast ethernet.

Tested on:	uFW, BBB
Sponsored by:	Rubicon Communications, LLC (Netgate)
2016-10-05 19:09:27 +00:00
Andrew Turner
c5bf621b7a We don't use cpu_control on armv6, remove the macro there. 2016-10-05 14:00:05 +00:00
Michal Meloun
9567acca41 ARM: Remove next bunch of unused cpu_functions from ARMv6. 2016-10-05 12:19:09 +00:00
Andrew Turner
1834282de6 Split CPU_CORTEXA into CPU_CORTEXA8, for the Cortex-A8, and CPU_CORTEXA_MP,
for later Cortex-A CPUs that support the Multiprocessor Extensions. This
will be needed to support both in a single GENERIC kernel while still
being able to only build for a single SoC.

Reviewed by:	mmel
Relnotes:	yes
Sponsored by:	ABT Systems Ltd
Differential Revision:	https://reviews.freebsd.org/D8138
2016-10-04 12:25:44 +00:00
Andrew Turner
d029cb6152 Read the Multiprocessing Extensions bit from the Multiprocessor Affinity
register.

Sponsored by:	ABT Systems Ltd
X-Differential Revision:	https://reviews.freebsd.org/D8092
2016-10-04 12:01:08 +00:00
Michal Meloun
fe8151a0e3 ARM: Add mising early clobber modifier in atomic_swap_32().
MFC after: 2 weeks
2016-10-04 09:59:37 +00:00
Michal Meloun
6542d1a4e7 ARM: Add atomic_swap_64(). It's need by linuxkpi and drm-next-4.7.
MFC after: 2 weeks
2016-10-04 09:51:54 +00:00
Michal Meloun
c7533311be TEGRA: Fix PCIe link timeout.
MFC after: 2 weeks
2016-10-04 09:14:48 +00:00
Jared McNeill
1ef15cafa0 Clear GT_CTRL_ENABLE to stop the timer.
Reviewed by:	andrew
2016-10-03 21:42:05 +00:00
Andrew Turner
c6b8d2a2a3 Use the cortex functions when booting on one of the Cortex-A ARMv8 CPUs.
This list is incomplete, however we don't have the ID values for the
missing Cortex-A32 or A35.

Submitted by:	loos (Cortex-A53)
Sponsored by:	ABT Systems Ltd
2016-10-03 20:05:33 +00:00
Luiz Otavio O Souza
430d5eb47d Enable the TX completion interrupt for the cpsw NIC to assure the free tx
descriptors are reclaimed as soon as possible.

Without this the free buffers are reclaimed only on watchdog runs or after
trying to enqueue more packets.

Sponsored by:	Rubicon Communications, LLC (Netgte)
2016-10-03 19:48:56 +00:00
Oleksandr Tymoshenko
82e4e00f18 Add Tegra TK1 DTBs to GENERIC kernel
Approved by:	andrew
2016-10-03 19:34:32 +00:00
Andrew Turner
905339874b Add the Cortex-A{53,57,72} ID register values. These can all run 32-bit
code so could run a 32-bit kernel.

Sponsored by:	ABT Systems Ltd
2016-10-03 18:00:10 +00:00
Andrew Turner
18f555023a Remove the old Allwinner std.* files, these are not part of the common
Allwinner kernel configs.

Sponsored by:	ABT Systems Ltd
2016-10-03 16:47:46 +00:00
Andrew Turner
0e484d95ca Remove unused functions on armv6. Some of the cache handling code is still
used in the elf trampoline so add a macro to handle this.

Sponsored by:	ABT Systems Ltd
2016-10-03 16:10:38 +00:00
Andrew Turner
610d93d80a Remove the parts of cpu_functions from armv6 that are unused on that
architecture.

Sponsored by:	ABT Systems Ltd
2016-10-03 14:43:57 +00:00
Andrew Turner
d15a8db5ad Only define the CF_* macros on ARMv4/v5. They are unused on armv6.
Sponsored by:	ABT Systems Ltd
2016-10-03 14:26:55 +00:00
Andrew Turner
037a0903ee Use C99 designated initializers to create the armv6 cpu_functions structs.
This will help with a later cleanup of what functions we implement.

Sponsored by:	ABT Systems Ltd
2016-10-03 11:57:10 +00:00
Oleksandr Tymoshenko
2abb9b42a5 Add rpi_ft5406 module and add it to extra modules in Raspberry Pi configs 2016-10-03 01:08:34 +00:00
Oleksandr Tymoshenko
19de549b41 Fix attach/detach methods
- Initialize lock before starting worker process
- Do not hold lock when destroying evdev. By that time ther should be no
    other active code pathes that can access softc
2016-10-03 01:07:06 +00:00
Oleksandr Tymoshenko
a6b15a3429 Modularize evdev
- Convert "options EVDEV" to "device evdev" and "device uinput", add
    modules for both new devices. They are isolated subsystems and do not
    require any compile-time changes to general kernel subsytems
- For hybrid drivers that have evdev as an optional way to deliver input
    events add option EVDEV_SUPPORT. Update all existing hybrid drivers
    to use it instead of EVDEV
- Remove no-op DECLARE_MODULE in evdev, it's not required, MODULE_VERSION
    is enough
- Add evdev module dependency to uinput

Submitted by:	Vladimir Kondratiev <wulf@cicgroup.ru>
2016-10-02 03:20:31 +00:00
Oleksandr Tymoshenko
8ee7716721 Use VM_MEMATTR_WRITE_COMBINING memattr for mmap(2) on framebuffer
VM_MEMATTR_WRITE_COMBINING sets write-through cache flag for framebuffer
memory that prevents pixel data from being stuck in cache until evicition
happens
2016-10-01 17:57:32 +00:00
Michal Meloun
a7b380d7d6 TEGRA: Fix bindings for cpufreq and coretemp drivers,
it was broken in r306477.
Correct a description for coretemp driver.
2016-10-01 06:50:16 +00:00
Michal Meloun
a27852480c TEGRA: Extend timeout for PLLs lock to 5 ms. Real lock time for PLLA
has been very near to old limit.
2016-10-01 03:35:03 +00:00
Oleksandr Tymoshenko
76a46b2918 Add dependency to evdev module 2016-09-30 21:14:42 +00:00
Oleksandr Tymoshenko
15eefa5b12 Add dependency to evdev module (if required) 2016-09-30 21:13:19 +00:00
Luiz Otavio O Souza
848a049b71 Remove the GLOBAL queue lock which just adds unnecessary complexity to code
(when used together with the individual tx and rx locks).

Sponsored by:	Rubicon Communications, LLC (Netgate)
2016-09-30 17:30:39 +00:00
Luiz Otavio O Souza
5a9c270ab6 Fix a typo in CPSW_DEBUG MACRO and then replace all the CPSWP_DEBUG() calls
with CPSW_DEBUG().

Sponsored by:	Rubicon Communications, LLC (Netgate)
2016-09-30 17:19:43 +00:00
Luiz Otavio O Souza
c933457038 Sort and remove unnecessary includes.
No functional changes.

Sponsored by:	Rubicon Communications, LLC (Netgate)
2016-09-30 17:16:02 +00:00
Andrew Turner
7efd943a95 Revert an accedintal commit. 2016-09-30 14:00:23 +00:00
Andrew Turner
968e30efd5 Fix the spelling of Cortex. 2016-09-30 13:47:52 +00:00
Emmanuel Vadot
e540b12f31 Add support for RPI2 to the armv6 GENERIC kernel. 2016-09-30 10:46:27 +00:00
Andrew Turner
75ea4d5245 Remove the duplicate ukbd device from the armv6 GENERIC
Sponsored by:	ABT Systems Ltd
2016-09-30 10:22:50 +00:00
Emmanuel Vadot
d654c8053d RPI2: Add support for MULTIDELAY, this is needed for inclusion into GENERIC. 2016-09-30 10:21:04 +00:00
Andrew Turner
65be9c9af9 Add support for Tegra to the armv6 GENERIC kernel.
Reviewed by:	imp, mmel
Sponsored by:	ABT Systems Ltd
Differential Revision:	https://reviews.freebsd.org/D8084
2016-09-30 10:20:53 +00:00
Emmanuel Vadot
e374c33592 bcm2835_cpufreq: Only attach driver if we correcly match on the machine
compatible string.
2016-09-30 10:00:57 +00:00
Michal Meloun
b58616d5d7 ALLWINNER: ahci_devclass is local variable, don't export it. 2016-09-30 05:30:16 +00:00
Michal Meloun
4bda238a9b TEGRA: Prepare Tegra subtree for inclusion into ARM generic kernel.
- use DEFINE_CLASS_0() for driver classes
 - unify driver names
 - cleanup driver definitions and bindings
2016-09-30 05:25:15 +00:00
Andrew Turner
caa1c435de Use SV_ABI_ERRNO to set the syscall return value. The Linuxulator will
need this.

Submitted by:	Grégory Soutadé <soutade@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D7976
2016-09-29 17:13:17 +00:00
Michal Meloun
1d59a5bb1b TEGRA: Rename (cut & pasted) genahci to tegra_ahci. Make device class definition static. 2016-09-29 13:54:09 +00:00
Michal Meloun
114abe7615 TEGRA: Return back kern_clocksource.c into tegra config file. It was removed in r306444 by mistake. 2016-09-29 12:54:27 +00:00
Michal Meloun
ef3639e852 TEGRA: Don't include files already included by system or arch configs. 2016-09-29 12:25:04 +00:00