Commit Graph

12 Commits

Author SHA1 Message Date
Ian Lepore
8fb0ef085c Enhance the interrupt capabilities of ti_pruss driver.
The existing ti_pruss driver for the PRUSS Hardware provided by the AM335x
ARM CPU has basic interrupt capabilities.  This updated driver provides some
more options:

 - Sysctl based configuration for the interrupts (for some examples, see the
   test plan in the phabricator review cited below).

 - A device file (/dev/pruss0.irqN) for each enabled interrupt. This file
   can be read and the device blocks if no irq has happened or returns an
   uint64_t timestamp based on nanouptime().

 - Each interrupt device file provides kqueue-based event notification,
   blocking read(), or select().

Submitted by:	Manuel Stuhn <freebsdnewbie@freenet.de>
Differential Revision:	https://reviews.freebsd.org/D11959
2017-10-02 01:03:18 +00:00
Andrew Turner
df7675353e Stop including fdt_common.h from the arm code when it's unneeded.
Sponsored by:	ABT Systems Ltd
2016-11-14 11:41:22 +00:00
Oleksandr Tymoshenko
a4554c3736 Let knlist_add do the locking part
Remove explicit mtx_lock/mtx_unlock around knlist_add and pass 0 as
locked parameter so knlist_add does the locking itself

Suggested by:	kib@
2016-09-06 19:36:28 +00:00
Oleksandr Tymoshenko
6de4dd4f60 Fix TI PRUSS driver panic with INVARIANTS enabled
Value passed as islocked argument to knlist_add should
be consistent with actual lock state so add lock/unlock
calls around knlist_add

PR:		212120
Submitted by:	Manuel Stuhn
2016-08-30 01:31:03 +00:00
Rui Paulo
c71d7e6735 ti_pruss: pass the correct IRQ to userland.
Also, fix several problems with the kqueue notification.

Submitted by:	Manuel Stühn freebsdnewbie at freenet.de
2015-05-20 06:23:01 +00:00
Andrew Turner
ff3b52bb19 Stop using machine/fdt.h in the arm kernel code when we don't need it. 2015-04-04 21:34:26 +00:00
Rui Paulo
c0a9702f95 ti_pruss: make sure the mmap'ed memory region is uncacheable.
MFC after:	1 week
2015-01-31 02:12:57 +00:00
Oleksandr Tymoshenko
7d948458b1 Remove "#define DEBUG" that conflicts with "option DEBUG" in kernel config 2015-01-21 19:23:46 +00:00
Rui Paulo
afe2c75694 Allow multiple devices to mmap. It's impossible to prevent this with
checks on the open/close functions.

MFC after:	1 week
2014-12-01 19:48:23 +00:00
Ian Lepore
add35ed5b8 Follow r261352 by updating all drivers which are children of simplebus
to check the status property in their probe routines.

Simplebus used to only instantiate its children whose status="okay"
but that was improper behavior, fixed in r261352.  Now that it doesn't
check anymore and probes all its children; the children all have to
do the check because really only the children know how to properly
interpret their status property strings.

Right now all existing drivers only understand "okay" versus something-
that's-not-okay, so they all use the new ofw_bus_status_okay() helper.
2014-02-02 19:17:28 +00:00
John-Mark Gurney
6eebe8507a fix args to mtx_init
Note that this commit hasn't been compile tested because these files
are not hooked up to the build...

PR:		186129
Submitted by:	Takanori Sawada
Approved by:	rpaulo
2014-01-27 17:31:21 +00:00
Rui Paulo
8cfbb9cf03 Add a driver for the TI Programmable Realtime Unit Subsystem.
This is only a userland accessibility driver.  It mmaps the hardware region to
userland and posts interrupt notifications via kqueue.
2013-11-16 08:23:15 +00:00