Introduce sbintime_t type -- the simplified version of struct bintime,
using 32.32 fixed point in form of single int64_t.  It is much easier to
use in cases where additional precision and range of struct bintime is
not required.

Reviewed by:	bde (previous version), davide


git-svn-id: svn://svn.freebsd.org/base/head@247452 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFcalloutng:
When CPU becomes idle, cpu_idleclock() calculates time to the next timer
event in order to reprogram hw timer. Return that time in sbintime_t to
the caller and pass it to acpi_cpu_idle(), where it can be used as one
more factor (quite precise) to extimate furter sleep time and choose
optimal sleep state. This is a preparatory change for further callout
improvements will be committed in the next days.

The commmit is not targeted for MFC.


git-svn-id: svn://svn.freebsd.org/base/head@247454 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFcalloutng (r247427 by mav):
We don't need any precision here. Let it be fast and dirty shift then
slow and excessively precise 64-bit division.


git-svn-id: svn://svn.freebsd.org/base/head@247460 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFcalloutng:
Switch eventtimers(9) from using struct bintime to sbintime_t.
Even before this not a single driver really supported full dynamic range of
struct bintime even in theory, not speaking about practical inexpediency.
This change legitimates the status quo and cleans up the code.


git-svn-id: svn://svn.freebsd.org/base/head@247463 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFcalloutng:
Style fixes.


git-svn-id: svn://svn.freebsd.org/base/head@247467 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Move the definition of sbintime_t type from <sys/time.h> to <sys/types.h>.
With this change we prevent gross namespace pollution.

Reported by:	bde
Suggested by:	attilio


git-svn-id: svn://svn.freebsd.org/base/head@247476 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add hooks for plugging platform-provided transfer backend.

In order to use platorm backend hardware driver should
impement three methods:
- platform_start_transfer and platform_finish_transfer
    to start and finish transfer
- platform_will_handle - check whether transaction is
    suitable for backend. If not - driver will fall back
    to PIO mode.

Submitted by:	Daisuke Aoyama <aoyama at peach.ne.jp>
Approved by:	ian@


git-svn-id: svn://svn.freebsd.org/base/head@247495 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add driver for BCM2835's DMA engine

This is a version of code submitted by Daisuke Aoyama <aoyama at peach.ne.jp>
with some architectural changes.


git-svn-id: svn://svn.freebsd.org/base/head@247496 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add platform DMA support to SDHCI driver for BCM2835

Submitted by:	Daisuke Aoyama <aoyama at peach.ne.jp>
Reviewed by:	ian@


git-svn-id: svn://svn.freebsd.org/base/head@247497 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Change the ixgbe module name to if_ixgbe to conform
to the usual naming convention.


git-svn-id: svn://svn.freebsd.org/base/head@247505 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Don't enable the HT flags for legacy rates.

I stumbled across this whilst trying to debug another weird hang reported
on the freebsd-wireless list.

Whilst here, add in the STBC check to ath_rateseries_setup().

Whilst here, fix the short preamble flag to be set only for legacy rates.

Whilst here, comment that we should be using the full set of decisions
made by ath_rateseries_setup() rather than recalculating them!


git-svn-id: svn://svn.freebsd.org/base/head@247506 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Oops - fix an incorrect test.


git-svn-id: svn://svn.freebsd.org/base/head@247507 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add missing flags.


git-svn-id: svn://svn.freebsd.org/base/head@247508 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Minor wordsmithing.

X-MFC-Needs:	r245617


git-svn-id: svn://svn.freebsd.org/base/head@247509 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add support for A10 uart.
A10 uart is derived from Synopsys DesignWare uart and requires
to read Uart Status Register when IIR_BUSY has detected.
Also this change includes FDT check, where it checks device
specific properties defined in dts and sets the busy_detect variable.
broken_txfifo is also needed to be set in order to make it work for
A10 uart case.

Reviewed by: marcel@
Approved by: gonzo@


git-svn-id: svn://svn.freebsd.org/base/head@247519 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Enable uart driver for A10.

Approved by: gonzo@


git-svn-id: svn://svn.freebsd.org/base/head@247520 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Specify the length of the mapping requested from 'paddr_guest2host()'.

This seems prudent to do in its own right but it also opens up the possibility
of not having to mmap the entire guest address space in the 'bhyve' process
context.

Discussed with:	grehan
Obtained from:	NetApp


git-svn-id: svn://svn.freebsd.org/base/head@247523 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Provide slightly more helpful feedback when we can't figure out what
compiler the user is using.

PR:		misc/173914


git-svn-id: svn://svn.freebsd.org/base/head@247527 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge remote-tracking branch 'upstream/master'