2368 Commits

Author SHA1 Message Date
gjb
42ea6b1b27 Fix two remaining issues with the arm UFS mount issue:
- Add the GEOM_PART_GPT option and enable MSDOSFS in the GUMSTIX
  kernel. [1]

- Add GEOM_LABEL to the PANDABOARD kernel, that should have been
  included included in r285132.  I confused the kernel configuration
  used for the WANDBOARD and PANDABOARD, which the former uses the
  IMX6 kernel configuration, along with the CUBOX-HUMMINGBOARD.

This is a direct commit to stable/10, as was r285132.

[1] I do not actually have the GUMSTIX board, but I suspect it will
    fail to boot in the same way as the others have been.

Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
2015-07-10 22:10:00 +00:00
gjb
4d6a99d3a9 Add the GEOM_LABEL option to the BEAGLEBONE, GUMSTIX, and RPI-B
kernel configuration files, resolving an issue where the UFS and
MSDOSFS partitions would not mount as set in fstab(5).

This is a direct commit to stable/10, as the GEOM_LABEL option
is handled differently in head for arm/armv6.  The WANDBOARD
and PANDABOARD already have this kernel option entry via the IMX6
kernel configuration file, so do not need to be changed.

Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
2015-07-04 14:50:32 +00:00
ian
72a6278f84 MFC r279824, r279827, r279825:
Add a dtb module for AM335x systems (just Beaglebone right now).

  Remove the static DTB config and instead build modules/dtb/am335x.

  Also, remove WITHOUT_MODULES="ahc" which was added long ago to work
  around build problems that have long since been fixed correctly.

  Revert accidentally commited modules/Makefile file from r279824.
2015-06-06 19:15:48 +00:00
ian
98d314ee2c MFC r278338, r278340, r278458, r278519:
Create a module to install the Raspberry Pi dtb files.

  Pull in the rpi.dts -> rpi.dtb module (dtb/rpi) and have it install
  rpi.dtb in /boot/dtb by default.

  Add a module to build the dtb files for all supported imx6 systems.

  Remove imx6s-wandboard.dts, there is no such file.
2015-06-06 18:49:02 +00:00
np
0a68383238 MFC r276480, r276485, r276498, r277225, r277226, r277227, r277230,
r277637, and r283149 (by emaste@).

r276485 is the real change here, the rest deal with the fallout of
mp_ring's reliance on 64b atomics.

Use the incorrectly spelled 'eigth' from struct pkthdr in this branch
instead of MFC'ing r261733, which would have renamed the field of a
public structure in a -STABLE branch.
---

r276480:
Temporarily unplug cxgbe(4) from !amd64 builds.

r276485:
cxgbe(4): major tx rework.

a) Front load as much work as possible in if_transmit, before any driver
lock or software queue has to get involved.

b) Replace buf_ring with a brand new mp_ring (multiproducer ring).  This
is specifically for the tx multiqueue model where one of the if_transmit
producer threads becomes the consumer and other producers carry on as
usual.  mp_ring is implemented as standalone code and it should be
possible to use it in any driver with tx multiqueue.  It also has:
- the ability to enqueue/dequeue multiple items.  This might become
  significant if packet batching is ever implemented.
- an abdication mechanism to allow a thread to give up writing tx
  descriptors and have another if_transmit thread take over.  A thread
  that's writing tx descriptors can end up doing so for an unbounded
  time period if a) there are other if_transmit threads continuously
  feeding the sofware queue, and b) the chip keeps up with whatever the
  thread is throwing at it.
- accurate statistics about interesting events even when the stats come
  at the expense of additional branches/conditional code.

The NIC txq lock is uncontested on the fast path at this point.  I've
left it there for synchronization with the control events (interface
up/down, modload/unload).

c) Add support for "type 1" coalescing work request in the normal NIC tx
path.  This work request is optimized for frames with a single item in
the DMA gather list.  These are very common when forwarding packets.
Note that netmap tx in cxgbe already uses these "type 1" work requests.

d) Do not request automatic cidx updates every 32 descriptors.  Instead,
request updates via bits in individual work requests (still every 32
descriptors approximately).  Also, request an automatic final update
when the queue idles after activity.  This means NIC tx reclaim is still
performed lazily but it will catch up quickly as soon as the queue
idles.  This seems to be the best middle ground and I'll probably do
something similar for netmap tx as well.

e) Implement a faster tx path for WRQs (used by TOE tx and control
queues, _not_ by the normal NIC tx).  Allow work requests to be written
directly to the hardware descriptor ring if room is available.  I will
convert t4_tom and iw_cxgbe modules to this faster style gradually.

r276498:
cxgbe(4): remove buf_ring specific restriction on the txq size.

r277225:
Make cxgbe(4) buildable with the gcc in base.

r277226:
Allow cxgbe(4) to be built on i386.  Driver attach will succeed only on
a subset of i386 systems.

r277227:
Plug cxgbe(4) back into !powerpc && !arm builds, instead of building it
on amd64 only.

r277230:
Build cxgbe(4) on powerpc64 too.

r277637:
Make sure the compiler flag to get cxgbe(4) to compile with gcc is used
only when gcc is being used.  This is what r277225 should have been.
2015-06-06 09:28:40 +00:00
imp
44bead40e5 MFC:
r283014: Disable unmapped I/O: it is broken for unaligned pages
r283126: Fix comments
2015-06-02 21:36:45 +00:00
imp
a5587d67f9 MFC:
Merge r276846: Add infrastructure to build dtb files from dts files.
2015-06-02 21:24:47 +00:00
ian
a210991c80 MFC r283033, r283062, r283066, r283069:
Do not set preload_addr_relocate for ARM.

  Refactor net_getparams() to make it easier to get params from sources other
  than bootp and rarp.

  Add a routine to obtain netboot parameters from the U-Boot env vars

  Enable the NETIF_OPEN_CLOSE_ONCE option for ubldr.
2015-05-25 01:29:45 +00:00
ian
1cf579b9a3 MFC r282516:
Add the code necessary to run the imx6 chip at its lowest clock/power
  operating point (396MHz/950mV).
2015-05-24 19:00:46 +00:00
ian
d6c6dd582e MFC r268838, r277644:
Add support for Toradex Apalis i.MX6 development board.

  Add support for imx6 audio transmitting, include drivers for:
  o Digital Audio Multiplexer (AUDMUX)
  o Smart Direct Memory Access Controller (SDMA)
  o Synchronous Serial Interface (SSI)
2015-05-24 18:59:45 +00:00
ian
83a17cbb77 MFC r282418:
On an icache sync by address/len, round the length up if the operation
  spans a cacheline boundary.
2015-05-24 18:23:57 +00:00
ian
bc7a934b2f MFC r279850:
Remove MODULES_OVERRIDE="" for Marvel-based armv5 systems.

  Also add some #NO_UNIVERSE to configs that essentially duplicate DB-88F6XXX.
2015-05-24 15:21:47 +00:00
ian
29f247a63e MFC r279837:
Remove MODULES_OVERRIDE="" and WITHOUT_MODULES="ahc" from armv6 configs.
2015-05-24 14:57:17 +00:00
ian
8b432f3b56 MFC r276004: Fix the indentation to simplify comparing the ARM config files. 2015-05-24 14:25:03 +00:00
ian
884316392a MFC r262409, r267129, r267130, r280709:
Move the declaration for mpentry() into a header file

  Fix broken SMP startup on Armada XP after r265694

  Avoid using hard-coded SoC's register address in mptramp code for Armada XP

  Use pmap_mapdev()/unmapdev() to temporarily map on-chip sram while copying
  the startup trampoline code.
2015-05-23 23:35:19 +00:00
ian
45e1cf60a1 MFC r280278, r280402:
Allow to override default kernel virtual address assignment on ARM.

  Do not save/restore the TLS pointer on context switch for armv6.
2015-05-23 23:27:00 +00:00
ian
9e0f8345df MFC r279816, r279826:
Attach the prcm clock driver early, so it can set the mpcore timer frequency.

  Change the name of the dmtimer pps device from /dev/ppsN to /dev/dmtppsN.
2015-05-23 23:08:54 +00:00
ian
98dff7fa06 MFC r279810, r279811:
Clean data cache before instruction cache in armv7_icache_sync_range().

  Add minimum cache line sizes to struct cpuinfo, use them in the new cache
  maintenance routines.  Also add a routine to invalidate the branch cache.
2015-05-23 23:05:31 +00:00
ian
68a3dfa740 MFC r278518: Resolve cache line size from CP15 instead of hard-coded 32. 2015-05-23 22:48:54 +00:00
ian
011666b0a8 MFC r277098, r279235:
Introduce ofw_bus_reg_to_rl() to replace part of common bus code

  Fix endianness on FDT read in ARM GIC
2015-05-23 22:36:41 +00:00
ian
a17d85346e MFC r274249, r274484, r275583:
Avoid panic in ofwbus caused by not released resource list entry

  Fix typo in ARM GIC device_printf()

  Fix buffer overflow in Marvell PCI/PCIe driver
2015-05-23 22:33:06 +00:00
ian
0c377e52af MFC r276021, r279766:
Reduce the diff in the Ti aintc between head and arm_intrng

  Fix spurious interrupts on arm am335x (beaglebone), by doing the EOI in
  both the post-filter and post-thread callbacks.
2015-05-23 21:12:51 +00:00
ian
f3f411e10b MFC r279723, r279724:
Define new linker set, UART_FDT_CLASS_AND_DEVICE, for registering full
  (class and device) FDT UART. Define second one, UART_FDT_CLASS, for UART
  class only.

  Move the uart_class definitions and fdt compat data into the individual
  uart implementations, and export them using the new linker-set mechanism.
2015-05-23 20:54:25 +00:00
ian
446930c903 MFC r277132: Rename Exynos UART driver functions. No functional change. 2015-05-23 19:57:44 +00:00
ian
e9db1ba7b7 MFC r266942, r266944:
Do only receive chars if there are some data in the buffer.
  This fixes operation on newer Exynos boards.

  Rename exynos uart driver filenames.
2015-05-23 19:50:14 +00:00
ian
18d9495565 MFC r279702: Update a comment that had drifted out of date. 2015-05-23 17:48:09 +00:00
ian
c063f629c5 MFC r278770, r279114, r279215, r279338, r279543:
Add logic for handling new-style ARM cpu ID info.

  Correct a comment which was exactly backwards from reality.

  There is no reason to do i+dcache writeback and invalidate when changing
  the translation table (this may be left over from armv5 days).  It's
  especially bad to do so using a cache operation that isn't coherent on
  SMP systems.

  Add casting to make atomic ops work for pointers.  (Apparently nobody has
  ever done atomic ops on pointers before now on arm).

  Revert incorrect casting.
2015-05-23 17:30:30 +00:00
gjb
b1fc2fbae9 MFC r282500, r282693:
r282500:
  Add initial support for building RPI2 images.

  In release.sh, allow overriding buildenv_setup() before
  the handoff to arm/release.sh.

  Copy arm/RPI-B.conf -> arm/RPI2.conf, set UBOOT_PORT and
  the correct KERNEL, and add the buildenv_setup() override
  to install the sysutils/u-boot-rpi2 port/package.

  Copy tools/arm/crochet-RPI-B.conf -> tools/arm/crochet-RPI2.conf,
  and set the correct entries for the RaspberryPi2 board.

 r282693:
  Merge ^/projects/release-arm-redux into ^/head.

  Of note:

  - This commit adds native FreeBSD/arm release build support without
    requiring out-of-tree utilities.

  - Part of this merge removes the WANDBOARD-{SOLO,DUAL,QUAD} kernel
    configuration files, for which the IMX6 kernel configuration file
    should be used instead.

  - The resulting images have a 'freebsd' user (password 'freebsd'),
    to allow ssh(1) access when console access is not available (VGA
    or serial).  The default 'root' user password is set to 'root'.

  - The /etc/ttys file for arm images now enable both ttyv0 and ttyu0
    by default.

Note:  The RPI2 kernel configuration does not yet exist in stable/10,
however the merge conflicts needed to be properly resolved.
Additionally, SRCBRANCH has been set to base/stable/10 in the updated
arm configuration files as part of this commit.

Sponsored by:	The FreeBSD Foundation
2015-05-20 19:32:57 +00:00
hselasky
fd490e69db MFC r282120:
The add_bounce_page() function can be called when loading physical
pages which pass a NULL virtual address. If the BUS_DMA_KEEP_PG_OFFSET
flag is set, use the physical address to compute the page offset
instead. The physical address should always be valid when adding
bounce pages and should contain the same page offset like the virtual
address.

Submitted by:	Svatopluk Kraus <onwahe@gmail.com>
Reviewed by:	jhb@
2015-05-05 19:47:17 +00:00
rwatson
6102a34d38 Merge r263233 from HEAD to stable/10:
Update kernel inclusions of capability.h to use capsicum.h instead; some
  further refinement is required as some device drivers intended to be
  portable over FreeBSD versions rely on __FreeBSD_version to decide whether
  to include capability.h.

Sponsored by:	Google, Inc.
2015-03-19 13:37:36 +00:00
dim
058f9df187 MFC r279312:
Fix a number of -Wcast-qual warnings under sys/arm.  No functional
change.

Submitted by:	andrew
2015-03-01 01:08:14 +00:00
dim
d160004487 MFC r279311:
In sys/arm/ti/am335x/am335x_rtc.c, fix a clang 3.6.0 warning about
am33x_rtc_softc::sc_irq_res (which is an array) never being NULL.

Submitted by:	andrew
2015-03-01 00:57:01 +00:00
loos
a7a8c39e00 MFC r274670, r274671, r276168:
Moves all the duplicate code to a single function.

Verify for invalid modes and unwanted flags before pass the new flags to
driver.

Make gpio_default_map_gpios() static.  No functional changes.

Improves the GPIO API description a little bit.

gpio_pin_max must return the maximum supported pin number and not the total
number of pins on the system.
2015-02-14 21:16:19 +00:00
loos
f991641986 MFC r273799:
Make the GPIO children attach to the first unit available and not only to
unit 0.

This fix a bug where a GPIO controller could fail to attach its children
(gpioc and gpiobus) if another GPIO driver attach first.
2015-02-14 20:37:33 +00:00
loos
c8630fd03e MFC: r273264, r274409, r278212, r278213:
Add a workaround needed to fix a bug of Arasan Host Controller where it may
lose the contents of consecutive writes (that happens within two SD card
clock cycles).

This fixes the causes of instability during the SD card detection and
identification on Raspberry Pi (which happens at 400 kHz and so was much
more vulnerable to this issue).

Remove the previous workaround which clearly can't provide the same effect.

Remove stale comments about the issues with HS mode.

Remove a previous workaround to limit the minimum sdhci frequency that
isn't needed anymore.

Remove some duplicate calls to bus_release_resource() and destroy the mutex
on error cases.

While here remove unnecessary includes.
2015-02-14 19:28:26 +00:00
loos
e5545eed6d MFC r276298, r276303:
Remove the '#undef DEBUG' that should not be committed.

Removes unused and duplicate headers.

Bring the wait limit on mailbox write to a more sane value.

Fix a off-by-one bug on wait time limit.

Remove extra blank line.
2015-02-14 18:45:43 +00:00
loos
2c27c21470 MFC r276296, r277207:
Make consistent use of the correct debug macros across the file.

Fix the C -> K temperature conversion for the dev.cpu.0.temperature sysctl.

Remove the unused temperature conversion macros.
2015-02-14 18:37:36 +00:00
kib
c85a726887 MFC r277643:
Remove Giant from /dev/mem and /dev/kmem.

MFC r277743:
Arm: ensure that _tmppt KVA is used exclusively.
2015-02-14 08:44:12 +00:00
ian
42d737e5aa MFC r278031: Remove a stale comment. 2015-02-13 23:37:56 +00:00
ian
1b3e6163a9 MFC r277555, r277568:
Enable all sd device clocks on imx6.

  Add imx5/6 pinmux driver support for encoded input register configs.
2015-02-13 23:34:40 +00:00
ian
fc13bac9c0 MFC r277523: Add last_fault_code when DEBUG is defined. 2015-02-13 23:32:03 +00:00
ian
c961e58ab5 MFC r277532, r277533: Add Maxmem global for arm. 2015-02-13 23:30:48 +00:00
ian
56013bbc63 MFC r277454, r277460, r277465, r277466, r277467, r277469, r277470, r277471,
r277472, r277473, r277474, r277475, r277476, r277477, r277478, r277479,
    r277480, r277512, r277516:

  Add inline implementations of arm bus_space_read/write_N().

  Revise the arm bus_space implementation to avoid dereferencing the tag on
  every operation to retrieve the bs_cookie value almost nothing actually uses.

  Use the explicit member initializer style to init the bus_space struct.

  Use arm/bus_space-v6.c for all armv6 systems

  Consolidate many identical implementations of bus_space to a single
  common tag and implementation shared by armv4 and armv6.

  Micro-optimize the new arm inline bus_space implementation by grouping all
  the data the inline functions access together at the start of the bus_space
  struct so that they all fit in a single cache line.
2015-02-13 22:32:02 +00:00
ian
b137f825dc MFC r272103: Move s3c2xx0 into the samsung directory. 2015-02-13 22:08:19 +00:00
ian
d8b2164f70 MFC r257740, r257739: Switch to using common armv6 bus_space tag. 2015-02-13 22:01:14 +00:00
ian
0d83b78040 MFC r277306, r277307, r277346:
Add defines for SDHCI 3.0 controllers.

  Add a new SDHCI quirk, SDHCI_QUIRK_DONT_SET_HISPD_BIT.

  Save the command-and-flags value into shadow register when it is written.
2015-02-13 20:38:39 +00:00
ian
f271f6c323 MFC r277305: Minor cleanups, comment changes. 2015-02-13 20:23:06 +00:00
ian
f3edb98cc7 MFC r277265: Enable the snoop control unit during MP startup 2015-02-13 20:21:13 +00:00
ian
0b254d1cdd MFC r277037: Enable ALT_BREAK_TO_DEBUGGER for rpi. 2015-02-13 20:18:29 +00:00
ian
d546a4529c MFC r276003:
Start to clean up the armv6 kernel configs by reducing the diff between
  them in the first sections and the later FDT support.
2015-02-13 20:15:10 +00:00