summaryrefslogtreecommitdiffstats
path: root/sys/arm
Commit message (Collapse)AuthorAgeFilesLines
* MFC r283382:dchagin2016-01-091-0/+1
| | | | | In preparation for switching linuxulator to the use the native 1:1 threads add a hook for cleaning thread resources before the thread die.
* MFC r281828, r289083, r289084, r289091, r289093, r289095, r289097, r289098,ian2015-10-203-174/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r289104, r289105, r289118: various i2c fixes... Fix numerous issues in iic(4) and iicbus(4): --Allow multiple open iic fds by storing addressing state in cdevpriv --Fix, as much as possible, the baked-in race conditions in the iic ioctl interface by requesting bus ownership on I2CSTART, releasing it on I2CSTOP/I2CRSTCARD, and requiring bus ownership by the current cdevpriv to use the I/O ioctls --Reduce internal iic buffer size and remove 1K read/write limit by iteratively calling iicbus_read/iicbus_write --Eliminate dynamic allocation in I2CWRITE/I2CREAD --Move handling of I2CRDWR to separate function and improve error handling --Add new I2CSADDR ioctl to store address in current cdevpriv so that I2CSTART is not needed for read(2)/write(2) to work --Redesign iicbus_request_bus() and iicbus_release_bus(): --iicbus_request_bus() no longer falls through if the bus is already owned by the requesting device. Multiple threads on the same device may want exclusive access. Also, iicbus_release_bus() was never device-recursive anyway. --Previously, if IICBUS_CALLBACK failed in iicbus_release_bus(), but the following iicbus_poll() call succeeded, IICBUS_CALLBACK would not be issued again --Do not hold iicbus mtx during IICBUS_CALLBACK call. There are several drivers that may sleep in IICBUS_CALLBACK, if IIC_WAIT is passed. --Do not loop in iicbus_request_bus if IICBUS_CALLBACK returns EWOULDBLOCK; instead pass that to the caller so that it can retry if so desired. Bugfix: Exit the transfer loop if any read or write operation fails. Also, perform a stop operation on the bus if there was an error, otherwise the bus will remain hung forever. Consistantly use 'if (error != 0)' style in the function. Mostly rewrite the imx i2c driver. This started out as an attempt to fix one specific problem: the driver didn't check for ACK/NAK after writing a slave address byte to the bus, and some slaves signal that they are busy (such as when completing an internal write to flash memory) by sending a NAK in response to being addressed. Use IIC_EBUSBSY and IIC_BUSERR status values consistantly across all drivers. Make it clearer what each one means in the comments that define them. Add iic2errno(), a helper function to translate IIC_Exxxxx status values to errno values that are at least vaguely equivelent. Also add a new status value, IIC_ERESOURCE, to indicate a failure to acquire memory or other required resources to complete a transaction. Return only IIC_Exxxx status values from iicbus-layer functions. Most of these functions are thin wrappers around calling the hardware-layer driver, but some of them do sanity checks and return an error. Add a short name, IIC_INTRWAIT, for the common case (IIC_INTR | IIC_WAIT). Replace a local sx lock that allowed only one client at a time to access an eeprom device with iicbus_request/release_bus(), which achieves the same effect and also keeps other i2c slave drivers from clashing on the bus.
* MFC of r288447. Only the Marvell driver has been updated as there is noandrew2015-10-121-6/+6
| | | | | | | | | | | | | | | | | | | support for Raspbetty Pi 2 in stable/10. An IPI must be cleared before it is handled otherwise next IPI could be missed. In other words, if a new request for an IPI is sent while the previous request is being handled but the IPI is not cleared yet, the clearing of the previous IPI request also clears the new one and the handling is missed. There are only three MP interrupt controllers in ARM now. Two of them are fixed by this change, the third one is correct, probably only just by accident. The fix is minimalistic as new interrupt framework is awaited. It was debugged on RPi2 where missing IPI handling together with SCHED_ULE led to situation in which tdq_ipipending was not cleared and so IPI_PREEMPT was stopped to be sent. Various odditys were found related to slow system response time like various events timed out, and slow console response.
* MFC r288000:kib2015-09-271-4/+5
| | | | Add support for weak symbols to the kernel linkers.
* MFC r283547:ian2015-08-2311-11/+8
| | | | | | | | Ensure that all arm kernel configs contain ALT_BREAK_TO_DEBUGGER and not BREAK_TO_DEBUGGER if they have a serial console (most do). A burst of serial line noise (such as unplugging a usb serial adapter) can look like a break and drop a working system into the debugger. The alt break sequence (<CR>~^B) works fine on both serial and non-serial consoles.
* MFC r286942, r286943, r286944: imx watchdog fixes...ian2015-08-233-34/+39
| | | | | | | | | | | | | | | | Add compatible strings for all the hardware this driver works with. Also, move the READ/WRITE bus space access macros from the header into the source file, and rename them to RD2/WR2 to make it clear they're 16-bit accessors. (READ/WRITE just don't seem like good names to be in a public header file.) Make the imx watchdog actually work, by setting WDOG_CR_WDE (enable bit). Also, follow the rules from watchdog(9) about what values to return in various situations (especially, don't touch *error when asked to set a non-zero timeout that isn't achievable on the hardware). Enable the watchdog driver on imx6, now that it works.
* Always compile in PPS capture. Use the same device name used in 11-current.ian2015-08-231-18/+1
| | | | | | This is a direct commit to 10-stable because the corresponding changes in 11 are bound up with all the device-tree rework for beaglebone. This somewhat aligns the features between the two branches, from a user's perspective.
* MFC r280451:mav2015-08-222-878/+0
| | | | | | | Remove from legacy ata(4) driver support for hardware, supported by newer and more functional drivers ahci(4), siis(4) and mvs(4). This removes about 3400 lines of code, unused since FreeBSD 9.0 release.
* MFC: r281752marius2015-07-301-1/+2
| | | | Make a comment reflect reality.
* Fix two remaining issues with the arm UFS mount issue:gjb2015-07-102-1/+3
| | | | | | | | | | | | | | | | | | - 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
* Add the GEOM_LABEL option to the BEAGLEBONE, GUMSTIX, and RPI-Bgjb2015-07-043-0/+3
| | | | | | | | | | | | | 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
* MFC r279824, r279827, r279825:ian2015-06-061-3/+1
| | | | | | | | | | | 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.
* MFC r278338, r278340, r278458, r278519:ian2015-06-062-1/+3
| | | | | | | | | | | 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.
* MFC r276480, r276485, r276498, r277225, r277226, r277227, r277230,np2015-06-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* MFC:imp2015-06-021-1/+7
| | | | | r283014: Disable unmapped I/O: it is broken for unaligned pages r283126: Fix comments
* MFC:imp2015-06-021-1/+1
| | | | Merge r276846: Add infrastructure to build dtb files from dts files.
* MFC r283033, r283062, r283066, r283069:ian2015-05-251-1/+0
| | | | | | | | | | | 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.
* MFC r282516:ian2015-05-244-21/+63
| | | | | Add the code necessary to run the imx6 chip at its lowest clock/power operating point (396MHz/950mV).
* MFC r268838, r277644:ian2015-05-2412-1/+1927
| | | | | | | | | 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)
* MFC r282418:ian2015-05-241-0/+3
| | | | | On an icache sync by address/len, round the length up if the operation spans a cacheline boundary.
* MFC r279850:ian2015-05-246-8/+3
| | | | | | Remove MODULES_OVERRIDE="" for Marvel-based armv5 systems. Also add some #NO_UNIVERSE to configs that essentially duplicate DB-88F6XXX.
* MFC r279837:ian2015-05-248-20/+0
| | | | Remove MODULES_OVERRIDE="" and WITHOUT_MODULES="ahc" from armv6 configs.
* MFC r276004: Fix the indentation to simplify comparing the ARM config files.ian2015-05-2416-117/+117
|
* MFC r262409, r267129, r267130, r280709:ian2015-05-232-13/+22
| | | | | | | | | | | 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.
* MFC r280278, r280402:ian2015-05-234-18/+14
| | | | | | Allow to override default kernel virtual address assignment on ARM. Do not save/restore the TLS pointer on context switch for armv6.
* MFC r279816, r279826:ian2015-05-232-2/+3
| | | | | | 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.
* MFC r279810, r279811:ian2015-05-235-12/+53
| | | | | | | 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.
* MFC r278518: Resolve cache line size from CP15 instead of hard-coded 32.ian2015-05-234-11/+41
|
* MFC r277098, r279235:ian2015-05-231-4/+4
| | | | | | Introduce ofw_bus_reg_to_rl() to replace part of common bus code Fix endianness on FDT read in ARM GIC
* MFC r274249, r274484, r275583:ian2015-05-232-2/+2
| | | | | | | | 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
* MFC r276021, r279766:ian2015-05-231-20/+29
| | | | | | | 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.
* MFC r279723, r279724:ian2015-05-238-5/+42
| | | | | | | | | 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.
* MFC r277132: Rename Exynos UART driver functions. No functional change.ian2015-05-231-62/+62
|
* MFC r266942, r266944:ian2015-05-233-3/+8
| | | | | | | Do only receive chars if there are some data in the buffer. This fixes operation on newer Exynos boards. Rename exynos uart driver filenames.
* MFC r279702: Update a comment that had drifted out of date.ian2015-05-231-1/+1
|
* MFC r278770, r279114, r279215, r279338, r279543:ian2015-05-233-8/+8
| | | | | | | | | | | | | | | | 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.
* MFC r282500, r282693:gjb2015-05-203-84/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC r282120:hselasky2015-05-052-4/+4
| | | | | | | | | | | | 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@
* Merge r263233 from HEAD to stable/10:rwatson2015-03-191-1/+1
| | | | | | | | | 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.
* MFC r279312:dim2015-03-014-7/+7
| | | | | | | Fix a number of -Wcast-qual warnings under sys/arm. No functional change. Submitted by: andrew
* MFC r279311:dim2015-03-011-1/+1
| | | | | | | 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
* MFC r274670, r274671, r276168:loos2015-02-149-98/+1
| | | | | | | | | | | | | | 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.
* MFC r273799:loos2015-02-1411-22/+25
| | | | | | | | 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.
* MFC: r273264, r274409, r278212, r278213:loos2015-02-141-49/+10
| | | | | | | | | | | | | | | | | | | | | | 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.
* MFC r276298, r276303:loos2015-02-141-21/+6
| | | | | | | | | | | | 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.
* MFC r276296, r277207:loos2015-02-141-4/+3
| | | | | | | | 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.
* MFC r277643:kib2015-02-141-2/+6
| | | | | | | Remove Giant from /dev/mem and /dev/kmem. MFC r277743: Arm: ensure that _tmppt KVA is used exclusively.
* MFC r278031: Remove a stale comment.ian2015-02-131-2/+0
|
* MFC r277555, r277568:ian2015-02-132-4/+29
| | | | | | Enable all sd device clocks on imx6. Add imx5/6 pinmux driver support for encoded input register configs.
* MFC r277523: Add last_fault_code when DEBUG is defined.ian2015-02-131-0/+8
|
OpenPOWER on IntegriCloud