Commit Graph

27059 Commits

Author SHA1 Message Date
Nathan Whitehorn
2b5bab93fb Allow nesting of simplebuses. 2014-02-02 05:41:12 +00:00
Bryan Venteicher
54fb8142b6 Use m_defrag() instead of m_collapse() to compact a long mbuf chain
This should be an infrequent occurrence, so remove the per-queue
counters in favor of just global counters in the softc.
2014-02-02 05:20:46 +00:00
Bryan Venteicher
443c3d0bd1 Do not place the sglist used for Rx/Tx on the stack
The sglist segment array has grown to a bit over 512 bytes (on
64-bit system) which is more than ideally should be put on the
stack. Instead allocate an appropriately sized sglist and hang
it off each Rx/Tx queue structure.

Bump the maximum number of Tx segments to 64 to make it unlikely
we'll have defragment an mbuf chain. Our previous count was
rounded up to this value since it is the next power of two, so
effective memory usage should not change.

Also only allocate the maximum number of Tx segments if TSO was
negotiated.
2014-02-02 05:15:36 +00:00
Nathan Whitehorn
06763f5e55 Provide a simpler and more standards-compliant simplebus implementation to
get the Routerboard 800 up and running with the vendor device tree. This
does not implement some BERI-specific features (which hopefully won't be
necessary soon), so move the old code to mips/beri, with a higher attach
priority when built, until MIPS interrupt domain support is rearranged.
2014-02-01 17:41:54 +00:00
Nathan Whitehorn
bbc6da03ef Open Firmware interrupt specifiers can consist of arbitrary-length byte
strings and include arbitrary information (IRQ line/domain/sense). When the
ofw_bus_map_intr() API was introduced, it assumed that, as on most systems,
these were either 1 cell, containing an interrupt line, or 2, containing
a line number plus a sense code. It turns out a non-negligible number of
ARM systems use 3 (or even 4!) cells for interrupts, so make this more
general.
2014-02-01 17:17:35 +00:00
Hans Petter Selasky
b1a93b386c Add a comment about the origin of some structures, defines and so on.
MFC after:	1 week
2014-02-01 06:58:16 +00:00
Justin Hibbits
169dd953b0 Add hwpmc(4) support for the PowerPC 970 class processors, direct events.
This also fixes asserts on removal of the module for the mpc74xx.

The PowerPC 970 processors have two different types of events: direct events
and indirect events.  Thus far only direct events are supported.  I included
some documentation in the driver on how indirect events work, but support is
for the future.

MFC after:	1 month
2014-02-01 02:03:50 +00:00
Hans Petter Selasky
198fc7c37f Fix a range check for maximum transmit length. The existing code was
off by 4 bytes in one case.

Approved by:	kevlo @
MFC after:	2 weeks
2014-01-31 22:42:26 +00:00
Jamie Gritton
f15444cc97 Back out r261266 pending security buy-in.
r261266:
  Add a jail parameter, allow.kmem, which lets jailed processes access
  /dev/kmem and related devices (i.e. grants PRIV_IO and PRIV_KMEM_WRITE).
  This in conjunction with changing the drm driver's permission check from
  PRIV_DRIVER to PRIV_KMEM_WRITE will allow a jailed Xorg server.
2014-01-31 17:39:51 +00:00
Hans Petter Selasky
4e8bc8514d Fix for unexpected selection with two fingers sometimes.
Fix for unexpected scrolling when click with two fingers.

Submitted by:	Huang Wen Hui <huanghwh@gmail.com>
MFC after:	1 week
2014-01-31 07:14:21 +00:00
George V. Neville-Neil
e1cda2b313 The timestamp bit is number 17, and not number 9, in the stat error
field of the receive descriptor.

MFC after:	1 week
2014-01-30 18:32:33 +00:00
Nick Hibma
16bf0e5da1 Fix the ordering of the arguments to printf in
uhub_child_location_string(). This produced bogus information in

	dev.<USB driver>.<id>.%location

output from sysctl.

MFC after:	2 weeks
2014-01-29 16:24:50 +00:00
Justin Hibbits
17661cc725 Micro-optimize 8-bit blanking. This is the same as in ofw_syscons.
Reviewed by:	ray
MFC after:	1 week
2014-01-29 15:50:01 +00:00
Jamie Gritton
109ca2d5f1 Add a jail parameter, allow.kmem, which lets jailed processes access
/dev/kmem and related devices (i.e. grants PRIV_IO and PRIV_KMEM_WRITE).
This in conjunction with changing the drm driver's permission check from
PRIV_DRIVER to PRIV_KMEM_WRITE will allow a jailed Xorg server.

Submitted by:	netchild
MFC after:	1 week
2014-01-29 13:41:13 +00:00
Hans Petter Selasky
cc47735350 - Remove some dead code.
- Use system provided functions for HID report requests.
- Nice the mode setting, because the USB hardware does appear to
handle the commands right away.

MFC after:	1 week
2014-01-29 12:34:05 +00:00
Hans Petter Selasky
eed447b59b Add support for trackpads found in Apple MacBook products. While at it
add some missing devd entries.

Submitted by:	Huang Wen Hui <huanghwh@gmail.com>
MFC after:	1 week
2014-01-29 10:42:01 +00:00
John Baldwin
7e3343bfcf Some BIOSes incorrectly use standard memory resource ranges to list
the memory ranges that they decode for downstream devices rather than
creating ResourceProducer range resource entries.  The result is that
we allocate the full range to the PCI root bridge device causing
allocations in child devices to all fail.

As a workaround, ignore any standard memory resources on a PCI root
bridge device.  It is normal for a PCI root bridge to allocate an I/O
resource for the I/O ports used for PCI config access, but I have not
seen any PCI root bridges that legitimately allocate a memory resource.

Reviewed by:	jkim
MFC after:	1 week
2014-01-28 20:53:33 +00:00
Hans Petter Selasky
1c006b57f6 When detaching a [USB] keyboard, keys might still be pressed. Ensure
that all pressed keys are released before completing the USB keyboard
detach. This will prevent so-called "ghost-keys" from appearing after
that the USB device generating the key event(s) has been detached.

MFC after:	1 week
2014-01-28 09:55:07 +00:00
Hans Petter Selasky
ef3187d5f5 Revert r260622:
To be implemented a bit differently.
2014-01-28 08:49:00 +00:00
John Baldwin
d53497cc2b Explicitly enable I/O and memory decoding in the bridge's command register
when activating an I/O or memory window on the CardBus bridge.

Tested by:	Olivier Cochard-Labbe <olivier@cochard.me>
Reviewed by:	imp
MFC after:	3 days
2014-01-27 19:49:52 +00:00
Justin Hibbits
e35effceaf MPC74xx should not fall through, to the error case.
MFC after:	1 week
2014-01-25 22:50:42 +00:00
Gleb Smirnoff
3dbdfe820b Fix compilation with IGB_LEGACY_TX defined.
PR:		185909
Submitted by:	Aurelien Rougemont <beorn binaries.fr>
2014-01-25 20:39:23 +00:00
Bryan Venteicher
9ef6342f9e Check for a full virtqueue in the multiqueue transmit path
With most hosts, we'll negotiate indirect descriptors, so all we
need is one available descriptor to transmit a frame.
2014-01-25 19:58:53 +00:00
Bryan Venteicher
dd6f83a00f Avoid queue unlock followed by relock when the enable interrupt race is lost
This already happens infrequently, and the hold time is still bounded since
we defer to a taskqueue after a few tries.
2014-01-25 19:57:30 +00:00
Bryan Venteicher
bddddcd566 Move duplicated transmit start code into a single function 2014-01-25 19:55:42 +00:00
Bryan Venteicher
5591e479fe Remove stray space 2014-01-25 18:34:57 +00:00
Bryan Venteicher
9471658415 Also include the mbuf's csum_flags in an assert message 2014-01-25 07:35:09 +00:00
Bryan Venteicher
1dbb21dcc9 Read and write the MAC address in the config space byte by byte 2014-01-25 07:13:47 +00:00
Bryan Venteicher
8c457c885e Read each field of the configuration individually
In the forthcoming VirtIO spec, the device configuration is
always in little endian instead of guest edian. This is a
noop change for now.
2014-01-25 07:01:51 +00:00
Bryan Venteicher
31ac03991b Remove spaces before tabs in the function prototype list 2014-01-25 06:54:04 +00:00
Hans Petter Selasky
3525f1dbf2 Add more USB quirks.
Submitted by:	Gerrit Kuehn <gerrit.kuehn@aei.mpg.de>
MFC after:	1 week
2014-01-24 18:52:04 +00:00
Kevin Lo
51fcfa2666 Fix comment. 2014-01-24 15:34:22 +00:00
Hans Petter Selasky
5c8c627bf9 Hide now harmless warning from dmesg.
MFC after:	1 week
2014-01-24 15:05:28 +00:00
Kevin Lo
56ae078529 Get rid of memmove(). It's not portable.
Tested on RT3071, RT3573, RT3570, RT3572, and RT5572.

Reviewed by:	hselasky
2014-01-24 09:17:29 +00:00
Ian Lepore
f2a7dc989c Be more robust with malformed interrupt config data. Instead of crashing
or going into a near-infinite loop, warn and make potentially-reasonable
assumptions.

Reviewed by:	brooks, nwhitehorn
2014-01-24 00:42:18 +00:00
Warner Losh
65e79cf474 clock-frequency is a FreeBSD-specific extention. Make it optional and
allow the client uart drivers to decide if a frequency is required.
2014-01-24 00:14:14 +00:00
John Baldwin
e07ef9b0f6 Move <machine/apicvar.h> to <x86/apicvar.h>. 2014-01-23 20:10:22 +00:00
Warner Losh
df10106a87 Add Atmel serial drivers. 2014-01-23 18:09:10 +00:00
Hans Petter Selasky
2719d9c909 Revert r261014. Let Kevin fix it.
MFC after:	1 week
2014-01-23 10:18:28 +00:00
Justin Hibbits
c821b4820f Properly sort the arguments to mtx_init(9).
PR:		misc/186020
Submitted by:	alfred
MFC after:	1 week
2014-01-23 01:09:33 +00:00
Hans Petter Selasky
dfd7cd8014 We are using the old callout API and should also add one extra tick in
the FreeBSD 10 case.

Suggested by:	mav @
MFC after:	1 week
2014-01-22 17:50:43 +00:00
Hans Petter Selasky
2e74d8c857 - Fix some non-portable code with regard to endianness. Don't use memmove().
- Fix a range check for maximum transmit length.
- Fix read from missing field when transmitting data.

MFC after:	2 weeks
2014-01-22 09:57:26 +00:00
Hans Petter Selasky
924b1f5db0 Ensure that the DMA delay does not get rounded down to zero ticks when
a timeout value of a single tick is given. With FreeBSD-10 and newer
the current system time is used as a starting point, and the minimum
callout time of a single tick will be guaranteed. This patch mostly
affect the DMA delay timeouts, which are typically in the range from
0.125 to 2ms.

MFC after:	1 week
2014-01-22 07:48:39 +00:00
Hans Petter Selasky
3448548027 Wait a bit more before we free any EHCI DMA descriptors. Some USB
controllers need more time than others.

MFC after:	1 week
2014-01-22 07:32:55 +00:00
Hans Petter Selasky
338b63a918 Add new quirk.
PR:		usb/185968
MFC after:	1 week
2014-01-22 07:22:42 +00:00
Aleksandr Rybalko
5beb07abdd Style(9) fix.
No functional changes.

Sponsored by:	The FreeBSD Foundation
2014-01-20 23:36:16 +00:00
John Baldwin
84b755dfe5 Add support for displaying VPD for PCI devices via pciconf.
- Store the length of each read-only VPD value since not all values are
  guaranteed to be ASCII values (though most are).
- Add a new pciio ioctl to fetch VPD for a single PCI device.  The values
  are returned as a list of variable length records, one for the device
  name and each keyword.
- Add a new -V flag to pciconf's list mode which displays VPD data for
  each device.

MFC after:	1 week
2014-01-20 20:56:09 +00:00
Warner Losh
138277120c Don't lock in the generic grab just to lock again in the specific grabs.
(I committed the wrong version of uart_core.c, which still had this).

Pointy hat: imp
2014-01-20 17:45:36 +00:00
Hans Petter Selasky
62b97a9adf Add support for GPS ports to UHSO driver.
Submitted by:	Lundberg, Johannes <johannes@brilliantservice.co.jp>
MFC after:	1 week
2014-01-20 07:09:19 +00:00
Warner Losh
1a75471bbb Free the dma memory from the dma map before destroying the dma map. 2014-01-19 20:32:20 +00:00
Warner Losh
d76a1ef4e1 Introduce grab and ungrab upcalls. When the kernel desires to grab the
console, it calls the grab functions. These functions should turn off
the RX interrupts, and any others that interfere. This makes mountroot
prompt work again. If there's more generalized need other than
prompting, many of these routines should be expanded to do those new
things.

Should have been part of r260889, but waasn't due to command line typo.

Reviewed by:	bde (with reservations)
2014-01-19 19:39:13 +00:00
Warner Losh
90a9a51875 Generalize AT91 NAND support a bit. Be more flexible about ALE and CLE
address line assignment. Provide convenince function to set these things.
2014-01-19 17:53:51 +00:00
Bryan Venteicher
10c4018057 Add very simple virtio_random(4) driver to harvest entropy from host
Reviewed by:	markm (random bits only)
2014-01-18 06:14:38 +00:00
Alexander Motin
3fcad654e2 Add ID for one more ASMedia AHCI-compatible controller.
Reported by:	ignace.peeters@gmail.com
MFC after:	2 weeks
2014-01-17 17:16:49 +00:00
Hans Petter Selasky
f97da128ab Fix a possible memory use after free and leak situation associated
with USB device detach when using character device handles. This also
includes LibUSB. It turns out that "usb_close()" cannot always get a
reference to clean up its USB transfers and such, if called during the
kernel USB device detach.

Analysis by:	hselasky @
Reported by:	Juergen Lock <nox@jelal.kn-bremen.de>
MFC after:	1 week
2014-01-17 10:35:18 +00:00
Hans Petter Selasky
c7d8c1c6e0 Close a minor deadlock.
MFC after:	1 week
2014-01-17 08:21:09 +00:00
Gleb Smirnoff
b8c83a1957 Another round of removing historical mbuf(9) allocator flags.
They are breeding! New ones arouse since last round.

Sponsored by:	Nginx, Inc.
2014-01-16 13:44:47 +00:00
Luigi Rizzo
f263752668 netmap_user.h:
add separate rx/tx ring indexes
   add ring specifier in nm_open device name

netmap.c, netmap_vale.c
   more consistent errno numbers

netmap_generic.c
   correctly handle failure in registering interfaces.

tools/tools/netmap/
   massive cleanup of the example programs
   (a lot of common code is now in netmap_user.h.)

nm_util.[ch] are going away soon.
pcap.c will also go when i commit the native netmap support for libpcap.
2014-01-16 00:20:42 +00:00
Aleksandr Rybalko
c3fbb0d11a Update xboxfb driver to actual state.
NOTE: Not tested.

Sponsored by:	The FreeBSD Foundation
2014-01-15 12:35:28 +00:00
Hans Petter Selasky
8af981a406 Don't output any modifier keys before we see a valid
non-modifier key press. This prevents so-called "ghost
keyboards" keeping modifier keys pressed while not
actually seen as a real keyboard.

MFC after:	2 weeks
2014-01-14 08:43:38 +00:00
Hans Petter Selasky
a0d53e0b38 Implement better error recovery for Transaction Translators, TTs,
found in High Speed USB HUBs which translate from High Speed USB into
FULL or LOW speed USB. In some rare cases SPLIT transactions might get
lost, which might leave the TT in an unknown state. Whenever we detect
such an error try to issue either a clear TT buffer request, or if
that is not possible reset the whole TT.

MFC after:	1 week
2014-01-13 15:21:11 +00:00
Hans Petter Selasky
a148d44fb5 Separate I/O errors from reception of STALL PID.
MFC after:	1 week
2014-01-13 15:06:03 +00:00
Bryan Venteicher
22525db507 Add unmapped IO support to virtio_scsi(4) 2014-01-13 04:46:48 +00:00
Bryan Venteicher
ee11ec3437 Add unmapped IO support to virtio_blk(4) 2014-01-13 04:43:01 +00:00
Bryan Venteicher
bf51187b26 Remove incorrect bit shift when assigning the LUN request field
This caused duplicate targets appearing on Google Compute Engine
instances.

PR:		kern/185626
Submitted by:	Venkatesh Srinivas <venkateshs@google.com>
MFC after:	3 days
2014-01-12 17:40:47 +00:00
Hans Petter Selasky
9ae7f7c13c Make sure reserved fields of the EHCI DMA descriptors are not dirty
after previous transfers.

MFC after:	1 week
2014-01-12 13:16:25 +00:00
Hans Petter Selasky
b353507895 Don't do synchronous USB requests inside USB transfer callbacks. It is
technically OK, but not recommended.

MFC after:	1 weeks
2014-01-12 11:44:28 +00:00
Kevin Lo
030dda5d1d Fix a logic error when checking if Tx power entries are greater than 31. 2014-01-11 14:48:16 +00:00
Hans Petter Selasky
67fd1a8fb6 Optimise interrupt logic. Technically writing a zero to the XHCI USB
status register has no effect. Can happen when the interrupt vector is
shared.

MFC after:	1 week
2014-01-11 08:16:31 +00:00
Hans Petter Selasky
13156a5241 Force clearing of event ring interrupts. The "Intel Lynx Point" XHCI
controller found in the MBP2013 has been observed to not work properly
unless this operation is performed.

MFC after:	1 week
Tested by:	Huang Wen Hui <huanghwh@gmail.com>
2014-01-11 08:10:01 +00:00
Hans Petter Selasky
5199761b66 Move USB ID from u3g driver to uhso driver.
Submitted by:	Lundberg, Johannes <johannes@brilliantservice.co.jp>
MFC after:	1 week
2014-01-11 07:53:03 +00:00
Alexander Motin
23c628f7f7 Remove not applicable PI_SDTR_ABLE and PI_WIDE_16 hba_inquiry flags to
make CAM to not try negotiate unsupported settings and suppress warnings.

While there, enable command queuing on pass-through devices, announced
in hba_inquiry, but disabled.  Even though queue size is very small, It
seems working well enough.

Reviewed by:	scottl
MFC after:	2 weeks
2014-01-10 19:21:46 +00:00
Luigi Rizzo
0c7ba37e01 Fix netmap emulation when NICs attached to a VALE switch have a different
number of tx and rx rings

Submitted by:	Vincenzo Maffione
2014-01-10 16:01:44 +00:00
Luigi Rizzo
f6c2a31f72 sync with our internal repo - small change in debugging messages 2014-01-10 16:00:27 +00:00
Kevin Lo
107f00c0b9 Use m_get2() instead of m_getcl().
Spotted by:	glebius
2014-01-10 14:47:20 +00:00
Kevin Lo
569dfed32c Use m_getcl() instead of MGETHDR/MCLGET macros.
Suggested by:	glebius
2014-01-10 02:47:20 +00:00
Kevin Lo
115ea7c105 Replace deprecated M_DONTWAIT with M_NOWAIT. 2014-01-09 01:48:33 +00:00
Gleb Smirnoff
339f59c096 Fix build with VIMAGE. 2014-01-09 00:59:03 +00:00
Aleksandr Rybalko
92762d566e Restore VGA mode on vt switch. It fix VESA mode left by Xorg on exit.
Sponsored by:	The FreeBSD Foundation
2014-01-08 14:42:26 +00:00
Robert Millan
57a9b881a3 Fix build of vt_xboxfb. 2014-01-08 14:36:35 +00:00
Gavin Atkinson
e4b141d4eb Add support for the Intel Centrino Wireless-N 135 chipset.
MFC after:	2 weeks
2014-01-08 13:59:33 +00:00
Kevin Lo
5945b5f5ab Rename definition of IEEE80211_FC1_WEP to IEEE80211_FC1_PROTECTED.
The origin of WEP comes from IEEE Std 802.11-1997 where it defines
whether the frame body of MAC frame has been encrypted using WEP
algorithm or not.
IEEE Std. 802.11-2007 changes WEP to Protected Frame, indicates
whether the frame is protected by a cryptographic encapsulation
algorithm.

Reviewed by:	adrian, rpaulo
2014-01-08 08:06:56 +00:00
Pyun YongHyeon
2c6d18ebc3 m_defrag(9) does not touch original mbuf chain when it can't
allocate new mbuf.  Free original mbuf chain when driver is not
able to send the packet.
2014-01-08 01:06:32 +00:00
Eric Davis
0f25d857e0 defragment mbuf chains longer than hw segment limit before dropping
Approved by:	davidch
2014-01-07 22:26:20 +00:00
Luigi Rizzo
fb25194fb0 fix use after free when releasing a netmap adapter.
Submitted by:	Giuseppe Lettieri
2014-01-07 21:14:28 +00:00
Scott Long
50b464aa1a Remove aicasm as a build dependency. It made sense when the ahc and ahd
drivers and their firmware were under active development, but those days
have passed.  The firmware now exists in pre-compiled form, no longer
dependent on it's sources or on aicasm.  If you wish to rebuild the
firmware from source, the glue still exists under the 'make firmware'
target in sys/modules/aic7xxx.

This also fixes the problem introduced with r257777 et al with building
kernels the old fashioned way in sys/$arch/compile/$CONFIG when the
ahc/ahd drivers were included.
2014-01-07 19:33:17 +00:00
Alexander V. Chernikov
50da3e886d Teach every SIOCGIFSTATUS provider to fill in ifs->ascii anyway.
Remove old bits of data concat for 'ascii' field.
Remove special SIOCGIFSTATUS handling from if.c (which Coverity yells at).

Reported by:	Coverity
Coverity CID:	1147174
MFC after:	2 weeks
2014-01-07 15:59:33 +00:00
Edward Tomasz Napierala
2901576a0d Fix a rare "truncated checksums" problem, which manifested like this:
WARNING: icl_pdu_check_data_digest: data digest check failed; got 0xf23b,
    should be 0xdb7f23b

Tested by:	Darcy Birkbeck
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-01-07 11:03:57 +00:00
Hans Petter Selasky
d08bc9e548 Check the XHCI event ring regardless of the XHCI status register
value. The "Intel Lynx Point" XHCI controller found in the MBP2013 has
been observed to not always set the event interrupt bit while there
are events to consume in the event ring.

MFC after:	1 week
Tested by:	Huang Wen Hui <huanghwh@gmail.com>
2014-01-07 09:52:26 +00:00
Jim Harris
448cffc859 For IDENTIFY passthrough commands to Chatham prototype controllers, copy
the spoofed identify data into the user buffer rather than issuing the
command to the controller, since Chatham IDENTIFY data is always spoofed.

While here, fix a bug in the spoofed data for Chatham submission and
completion queue entry sizes.

Sponsored by:	Intel
MFC after:	3 days
2014-01-06 23:51:26 +00:00
Luigi Rizzo
17885a7bfd It is 2014 and we have a new version of netmap.
Most relevant features:

- netmap emulation on any NIC, even those without native netmap support.

  On the ixgbe we have measured about 4Mpps/core/queue in this mode,
  which is still a lot more than with sockets/bpf.

- seamless interconnection of VALE switch, NICs and host stack.

  If you disable accelerations on your NIC (say em0)

        ifconfig em0 -txcsum -txcsum

  you can use the VALE switch to connect the NIC and the host stack:

        vale-ctl -h valeXX:em0

  allowing sharing the NIC with other netmap clients.

- THE USER API HAS SLIGHTLY CHANGED (head/cur/tail pointers
  instead of pointers/count as before). This was unavoidable to support,
  in the future, multiple threads operating on the same rings.
  Netmap clients require very small source code changes to compile again.
      On the plus side, the new API should be easier to understand
  and the internals are a lot simpler.

The manual page has been updated extensively to reflect the current
features and give some examples.

This is the result of work of several people including Giuseppe Lettieri,
Vincenzo Maffione, Michio Honda and myself, and has been financially
supported by EU projects CHANGE and OPENLAB, from NetApp University
Research Fund, NEC, and of course the Universita` di Pisa.
2014-01-06 12:53:15 +00:00
Adrian Chadd
2aeb1b35eb Correctly remove entries from the relevant receive ath_buf list before
freeing them.

The current code would walk the list and call the buffer free, which
didn't remove it from any lists before pushing it back on the free list.

Tested:		AR9485, STA mode

Noticed by:	dillon@apollo.dragonflybsd.org
2014-01-06 03:48:32 +00:00
Ian Lepore
02c7dba919 Remove dev/fdt/fdt_pci.c, which was code specific to Marvell ARM SoCs,
related to setting up static device mappings.  Since it was only used by
arm/mv/mv_pci.c, it's now just static functions within that file, plus
one public function that gets called only from arm/mv/mv_machdep.c.
2014-01-05 22:36:34 +00:00
Nathan Whitehorn
dcd08302e5 Retire machine/fdt.h as a header used by MI code, as its function is now
obsolete. This involves the following pieces:
- Remove it entirely on PowerPC, where it is not used by MD code either
- Remove all references to machine/fdt.h in non-architecture-specific code
  (aside from uart_cpu_fdt.c, shared by ARM and MIPS, and so is somewhat
  non-arch-specific).
- Fix code relying on header pollution from machine/fdt.h includes
- Legacy fdtbus.c (still used on x86 FDT systems) now passes resource
  requests to its parent (nexus). This allows x86 FDT devices to allocate
  both memory and IO requests and removes the last notionally MI use of
  fdtbus_bs_tag.
- On those architectures that retain a machine/fdt.h, unused bits like
  FDT_MAP_IRQ and FDT_INTR_MAX have been removed.
2014-01-05 18:46:58 +00:00
Ian Lepore
51dbd04609 Convert from using fdt_immr style to arm_devmap_add_entry() to make
static device mappings.

This SoC relied heavily on the fact that all devices were static-mapped
at a fixed address, and it (rather bogusly) used bus_space read and write
calls passing hard-coded virtual addresses instead of proper bus handles,
relying on the fact that the virtual addresses of the mappings were known
at compile time, and relying on the implementation details of arm
bus_space never changing.  All such usage was replaced with calls to
bus_space_map() to obtain a proper bus handle for the read/write calls.

This required adjusting some of the #define values that map out hardware
registers, and some of them were renamed in the process to make it clear
which were defining absolute physical addresses and which were defining
offsets.  (The ones that just define offsets don't appear to be referenced
and probably serve no value other than perhaps documentation.)
2014-01-05 18:40:06 +00:00
Adrian Chadd
25a9c4c83a Move the retune notification print to a debug print.
Yes, I still have to do the retune.  But I'm giving in to many people
pestering me (very gently!) about this.

Tested:

* Intel Centrino 6205
2014-01-05 00:46:31 +00:00
Warner Losh
b3a6fedaec More NAND IDs of some really old Samsung parts, also list the part
number that we're matching...
2014-01-04 22:30:18 +00:00
Nathan Whitehorn
ad6ea57585 Remove fdt_pic_table code from MIPS, PowerPC, and x86, as it is no longer
used by anything. The equivalent functionality is provided by the PIC drivers
themselves on PowerPC and this is a no-op on MIPS and x86.
2014-01-04 21:19:20 +00:00
Nathan Whitehorn
67dbd33ca8 Reimplement fdt_intr_to_rl() in terms of OFW_BUS_MAP_INTR() and
OFW_BUS_CONFIG_INTR(). This function is only used by simplebus, so will
likely be moved there in the future.
2014-01-04 21:14:33 +00:00
Ruslan Bukin
5d9306834b ENET on Vybrid Family SoC don't advertise its media capabilities
themselves properly, so force auto-negotiation.

Tested on mvf600.

Reviewed by:	ian
2014-01-04 10:19:21 +00:00