summaryrefslogtreecommitdiffstats
path: root/sys/arm/ti
Commit message (Collapse)AuthorAgeFilesLines
* Add support to IF_ALLMULTI which enable the reception of all the multicast ↵Luiz Souza2017-11-162-9/+13
| | | | | | | | frames in a interface. Ticket #7710 (cherry picked from commit d292b5ce7adecee7f57cee347735bc336ec225ee)
* ofw_spi: Parse property for the SPI mode and CS polarity.manu2017-10-171-0/+3
| | | | | | | | | | | As cs is stored in a uint32_t, use the last bit to store the active high flag as it's unlikely that we will have that much CS. Reviewed by: loos MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D8614 (cherry picked from commit f5f9058ccaec11fccc18817f45fff8859798a317)
* Only print the spurious interrupts messages with bootverbose enabled.Luiz Otavio O Souza2017-10-041-4/+6
| | | | | | It cannot be fixed, produces no useful output and is harmless with the actual code. (cherry picked from commit f1e039d0090c45ff05a5127847e38d285cb57279)
* Add a missing header.Luiz Souza2017-09-061-0/+1
| | | | (cherry picked from commit 9f2c71f9b8e1a514c395897c0ada18fbc9070690)
* Add ALTQ support to cpsw.Luiz Otavio O Souza2017-09-061-1/+1
| | | | | | Ticket #7199 (cherry picked from commit b95dbdb097fd2d5b148098bcc68e1f57b7dab544)
* Use the modern spelling of ofw_bus_node_is_compatible in sys/arm.andrew2017-09-061-1/+1
| | | | | | Sponsored by: ABT Systems Ltd (cherry picked from commit 7168ae84d82220caac0bb5f5f5d68ccc4e20915b)
* Add read and write support for the PHY registers.Luiz Otavio O Souza2017-07-201-4/+24
| | | | (cherry picked from commit 9a726e85185cf7cc2ed17cd59389dfa45421b61d)
* Add a tunable to set the number of TX descriptor on cpsw.Luiz Souza2017-07-201-3/+8
| | | | (cherry picked from commit 1b380dbbb0d6e31219a011dc9240226de745944f)
* Export more information about ARM CPUs and SoCs.Luiz Souza2017-07-201-1/+8
| | | | (cherry picked from commit 98135cfa4ef6f8bed339d3994e69b2cc6fb7a343)
* Merge remote-tracking branch 'origin/releng/11.1' into RELENG_2_5Renato Botelho2017-07-031-4/+8
|\
| * MFC: r312939, r313250, r314811 (partial), r314887 (partial), r315760,marius2017-05-111-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r315845, 315430, r317981, r315466 o Fix some overly long lines, whitespace and other bugs according to style(9) as well as spelling etc. in mmc(4), mmcsd(4) and sdhci(4). o In the mmc(4) bridges and sdhci(4) (bus) front-ends: - Remove redundant assignments of the default bus_generic_print_child device method, - use DEVMETHOD_END, - use NULL instead of 0 for pointers. o Trim/adjust includes. o Add and use a MMC_DECLARE_BRIDGE macro for declaring mmc(4) bridges as kernel drivers and their dependency onto mmc(4). o Add support for eMMC "partitions". Besides the user data area, i. e. the default partition, eMMC v4.41 and later devices can additionally provide up to: 1 enhanced user data area partition 2 boot partitions 1 RPMB (Replay Protected Memory Block) partition 4 general purpose partitions (optionally with a enhanced or extended attribute) Besides simply subdividing eMMC devices, some Intel NUCs having UEFI code in the boot partitions etc., another use case for the partition support is the activation of pseudo-SLC mode, which manufacturers of eMMC chips typically associate with the enhanced user data area and/ or the enhanced attribute of general purpose partitions. CAVEAT EMPTOR: Partitioning eMMC devices is a one-time operation. o Now that properly issuing CMD6 is crucial (so data isn't written to the wrong partition for example), make a step into the direction of correctly handling the timeout for these commands in the MMC layer. Also, do a SEND_STATUS when CMD6 is invoked with an R1B response as recommended by relevant specifications. o Add an IOCTL interface to mmcsd(4); this is sufficiently compatible with Linux so that the GNU mmc-utils can be ported to and used with FreeBSD (note that due to the remaining deficiencies outlined above SANITIZE operations issued by/with `mmc` currently most likely will fail). These latter have been added to ports as sysutils/mmc-utils. Among others, the `mmc` tool of mmc-utils allows for partitioning eMMC devices (tested working). o For devices following the eMMC specification v4.41 or later, year 0 is 2013 rather than 1997; so correct this for assembling the device ID string properly. o Let mmcsd.ko depend on mmc.ko. Additionally, bump MMC_VERSION as at least for some of the above a matching pair is required. o In the ACPI front-end of sdhci(4) describe the Intel eMMC and SDXC controllers as such in order to match the PCI one. Additionally, in the entry for the 80860F14 SDXC controller remove the eMMC-only SDHCI_QUIRK_INTEL_POWER_UP_RESET.
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2017-05-111-1/+1
|\ \ | |/
| * MFC r310189:ian2017-03-161-1/+1
| | | | | | | | | | Fix sscanf() format string to match an argument. This also fixes kernel build after r310171.
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2017-03-138-68/+63
|\ \ | |/
| * MFC r314064, r314060:ian2017-03-011-1/+0
| | | | | | | | | | | | | | | | Fix typos in bootverbose printfs... display the write-protect pin info, not the card-detect pin info. Remove a variable that has been unused since r311735 (it should have been removed as part of those changes).
| * MFC r312859:ian2017-03-012-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Configure the timer capture pin to input mode in the timer control register, in addition to configuring it as input with the pinmux driver. There was a control register bit commented as "no desc in datasheet". A later revision of the manual reveals the bit to be an input/output control for the timer pin. In addition to configuring capture or pulse mode, you apparently have to separately configure the pin direction in the timer control register. Before this change, the timer block was apparently driving a signal onto a pad configured by pinmux as input. Capture mode still accidentally worked for me during testing because I was using a very strong signal source that just out-muscled the weaker drive from the misconfigured pin.
| * MFC r311734, r311735, r311951, r314071:ian2017-03-011-26/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new helper routines for sdhci bridge drivers that use gpio pins for card presence and write protect switch detection. Use the new sdhci_fdt_gpio helper functions to add full support for FDT gpio pins for detecting card insert/remove and write protect for ti_sdhci. Include sys/systm.h for use of bootverbose. Revert to ti_sdhci driver's historic behavior: assume an sd card is writable if the fdt data doesn't provide a gpio pin for reading the write protect switch and also doesn't contain a "wp-disable" property.
| * MFC r306262, r306267, r310021: (needed to avoid conflicts on later merges)ian2017-03-013-22/+3
| | | | | | | | | | | | | | | | | | | | Remove bus_dma_get_range and bus_dma_get_range_nb on armv6. We only need this on a few earlier arm SoCs. Restrict where we need to define fdt_fixup_table to just PowerPC and Marvell. Add the missing void to function signatures in much of the arm code.
| * MFC r308640:ian2017-03-014-20/+21
| | | | | | | | | | Use the correct OF_getencprop over OF_getprop + fdt32_to_cpu to read integer data from the device tree.
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Luiz Otavio O Souza2017-02-093-103/+96
|\ \ | |/
| * MFC r312604 and r312605:loos2017-01-252-97/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify the handling of small packets padding in cpsw: - Pad small packets to 60 bytes and not 64 (exclude the CRC bytes); - Pad the packet using m_append(9), if the packet has enough space for padding, which is usually true, it will not be necessary append a newly allocated mbuf to the chain. Suggested by: yongari MFC r312608: Handle the rx queue stall while reading the packets from NIC (when the descriptor state will not change anymore). This seems to eliminate the race where we can miss a stalled queue under high load. While here remove the unnecessary curly brackets. Reported by: Konstantin Kormashev <konstantin@netgate.com> MFC r312636: Properly assemble an mbuf chain out of received fragments. Remove the rx_batch hack, it makes no difference now that most of bugs have been sorted out. MFC r312637: Be a little more pedantic here, the TRM says the hardware is supposed to only clean the OWNER bit on SOP descriptors. Sponsored by: Rubicon Communications, LLC (Netgate)
| * MFC r312411:loos2017-01-252-5/+23
| | | | | | | | | | | | | | | | | | | | | | Handle the set capabilities ioctl, letting the hardware checksum be disabled (Hi netmap!). Only remove the CRC bytes from packets when the hardware tell us to do so. Fixes the 'discard frame w/o leading ethernet header' issues. Sponsored by: Rubicon Communications, LLC (Netgate)
| * MFC r312408:loos2017-01-251-9/+8
| | | | | | | | | | | | The port number and the to_port_en flag are valid only on SOP descriptor. Sponsored by: Rubicon Communications, LLC (Netgate)
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2017-01-091-4/+7
|\ \ | |/
| * Fixes the sensor initialization, always reset the digital outputs on start.loos2017-01-041-4/+7
| | | | | | | | | | Obtained from: pfSense Sponsored by: Rubicon Communications, LLC (Netgate)
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Luiz Otavio O Souza2016-12-3010-256/+859
|\ \ | |/
| * MFC r309345:loos2016-12-312-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RX_FREEBUFFER registers are a write to increment field. Writing the full queue size to it every time was makeing it overflow with a lot of bogus values. This fixes the interrupt storms on irq 40. MFC r309347: MDIO_PHYACCESS_ACK is only valid for read access, remove it from miibus_writereg. Reduce the DELAY() between reads while waiting for MII access. Spotted by: yongari Sponsored by: Rubicon Communications, LLC (Netgate)
| * MFC r309113:loos2016-12-313-4/+316
| | | | | | | | | | | | | | | | | | | | | | Add the etherswitch(4) support for TI CPSW. Adds VLAN and port management abilities for etherswitchcfg(8). The code is conditionally enabled for now, because it is not necessary on single ethernet use cases. Obtained from: pfSense Sponsored by: Rubicon Communications, LLC (Netgate)
| * MFC r308692:loos2016-12-301-5/+8
| | | | | | | | | | | | Fix ti_gpio_detach() to avoid crashing if something goes wrong. Sponsored by: Rubicon Communication, LLC (Netgate)
| * MFC r306717:loos2016-12-303-155/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if_cpsw overhaul: - Fix RX and TX teardown: . TX teardown would not reclaim the abandoned descriptors; . Interrupt storms in RX teardown; . Fixed the acknowledge of the teardown completion interrupt. - Remove temporary lists for the descriptors; - Simplified the descriptor handling (less writes and reads from descriptors where possible); - Better debug; - Add support for the RX threshold interrupts: With interrupt moderation only, an RX overrun is likely to happen. The RX threshold is set to trigger a non paced interrupt everytime your RX free buffers are under the minimum threshold, helping to prevent the rx overrun. The NIC now survive when pushed over its limits (where previously it would lock up in a few seconds). uFW (600MHz SoC) can now forward up to 560Mb/s of UDP traffic (netmap pkt-gen as source and sink). TCP forwarding rate is over 350Mb/s. No difference (other than CPU use) was seen on Beaglebone black (1GHz SoC) for his fast ethernet. Tested on: uFW, BBB Sponsored by: Rubicon Communications, LLC (Netgate)
| * MFC r306654:loos2016-12-301-16/+32
| | | | | | | | | | | | | | | | | | | | Enable the TX completion interrupt for the cpsw NIC to assure the free tx descriptors are reclaimed as soon as possible. Without this the free buffers are reclaimed only on watchdog runs or after trying to enqueue more packets. Sponsored by: Rubicon Communications, LLC (Netgte)
| * MFC of r306388, r306510, r306511 and r306513:loos2016-12-301-68/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a typo. Sort and remove unnecessary includes. Fix a typo in CPSW_DEBUG MACRO and then replace all the CPSWP_DEBUG() calls with CPSW_DEBUG(). Remove the GLOBAL queue lock which just adds unnecessary complexity to code (when used together with the individual tx and rx locks). Sponsored by: Rubicon Communications, LLC (Netgate)
| * MFC r306376:loos2016-12-303-0/+73
| | | | | | | | | | | | | | | | | | | | | | Add a sysctl to control the interrupt pacing on AM335x integrated switch. The hardware can be set to limit the number of interrupts from 2 to 63 interrupts per ms. To keep the compatibility with the TI documentation the sysctl take the interval between the interrupts pulses: 16~500 us. Sponsored by: Rubicon Communications, LLC (Netgate)
| * MFC of r305114, r305115 and r305149:loos2016-12-304-1/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the use of control module extensions to cope with specific platform features. Add a driver for the AM335x bandgap sensor, an on-die temperature sensor as part of the AM335x control module extension. TI says that the bandgap sensor is not very accurate on AM335x, but in our tests it seems to be a good reference for the SoC temperature. TI details: http://processors.wiki.ti.com/index.php/AM335x_Thermal_Considerations#Measuring_Case_Temperature Sponsored by: Rubicon Communications, LLC (Netgate)
| * MFC of r305112, r305113, r305119, r305141 and r305432:loos2016-12-303-8/+13
| | | | | | | | | | | | | | | | | | Replace magic numbers with the proper register names. Fix the build, revert r305119, move the control module register data to am335x_scm.h and fix if_cpsw.c to include the correct header. Sponsored by: Rubicon Communications, LLC (Netgate)
| * MFC r309912:manu2016-12-161-3/+3
| | | | | | | | CS ivar is uint32_t, not int.
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-11-1014-44/+8
|\ \ | |/
| * MFC r307518:hselasky2016-11-072-16/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix device delete child function. When detaching device trees parent devices must be detached prior to detaching its children. This is because parent devices can have pointers to the child devices in their softcs which are not invalidated by device_delete_child(). This can cause use after free issues and panic(). Device drivers implementing trees, must ensure its detach function detaches or deletes all its children before returning. While at it remove now redundant device_detach() calls before device_delete_child() and device_delete_children(), mostly in the USB controller drivers. Tested by: Jan Henrik Sylvester <me@janh.de> Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D8070
| * MFC r304459,r305527:mmel2016-11-051-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r304459: INTRNG: Rework handling with resources. Partially revert r301453. - Read interrupt properties at bus enumeration time and store it into global mapping table. - At bus_activate_resource() time, given mapping entry is resolved and connected to real interrupt source. A copy of mapping entry is attached to given resource. - At bus_setup_intr() time, mapping entry stored in resource is used for delivery of requested interrupt configuration. - For MSI/MSIX interrupts, mapping entry is created within pci_alloc_msi()/pci_alloc_msix() call. - For legacy PCI interrupts, mapping entry must be created within pcib_route_interrupt() by pcib driver itself. r305527: Fix MIPS INTRNG (both FDT and non-FDT) behaviour broken by r304459
| * MFC r306902:mmel2016-11-0511-22/+0
| | | | | | | | ARM: Remove unused includes.
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-11-023-1/+81
|\ \ | |/
| * MFC r306530, r306531, r306532, r306579:gonzo2016-10-222-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r306530: Declare a module for evdev and add dependency to ukbd(4) and ums(4) Prepare for making evdev a module. "Pure" evdev device drivers (like touchscreen) and evdev itself can be built as a modules regardless of "options EVDEV" in kernel config. So if people does not require evdev functionality in hybrid drivers like ums and ukbd they can, for instance, kldload evdev and utouchscreen to run FreeBSD in kiosk mode. r306531: Add dependency to evdev module (if required) r306532: Add dependency to evdev module r306579: Modularize evdev - Convert "options EVDEV" to "device evdev" and "device uinput", add modules for both new devices. They are isolated subsystems and do not require any compile-time changes to general kernel subsytems - For hybrid drivers that have evdev as an optional way to deliver input events add option EVDEV_SUPPORT. Update all existing hybrid drivers to use it instead of EVDEV - Remove no-op DECLARE_MODULE in evdev, it's not required, MODULE_VERSION is enough - Add evdev module dependency to uinput Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>
| * MFC r305708, r305719gonzo2016-10-223-1/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r305708: Add evdev support to TI ADC/touchscreen driver Add generic evdev support to touchscreen part of ti_adc: two absolute coordinates + button touch to indicate pen position. Pressure value reporting is not implemented yet. Tested on: Beaglebone Black + 4DCAPE-43T + tslib r305719: Cleanup evdev support for TI ADC/TS - evdev_set_methods call is not required if actual methods are no-ops - evdev_set_serial is also optional if there is no meaningful input device identifier - evdev_set_id on the other hand is mandatory, so set virtual bus with dummy vendor/product/version Suggested by: Vladimir Kondratiev
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-10-191-1/+2
|\ \ | |/
| * MFC r306756:mmel2016-10-151-1/+2
| | | | | | | | | | ARM: SEV/WFE instructions are implemented starting from ARMv6K, use it directly.
| * MFC r306050:loos2016-09-271-4/+14
| | | | | | | | | | | | | | | | | | | | | | If present, honor the USB port mode (host or peripheral) set on DTS, if not, keep the beaglebone defaults: USB0 -> peripheral/gadget, USB1 -> host. This is only a workaround as in fact fact this hardware is capable of detect the USB port mode based on type of cable and act according with the detected mode. Unfortunately the driver does not handle that at moment. Sponsored by: Rubicon Communications, LLC (Netgate)
* | If present, honor the USB port mode (host or peripheral) set on DTS, if not,loos2016-09-201-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | keep the beaglebone defaults: USB0 -> peripheral/gadget, USB1 -> host. This is only a workaround as in fact fact this hardware is capable of detect the USB port mode based on type of cable and act according with the detected mode. Unfortunately the driver does not handle that at moment. MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate) (cherry picked from commit 4d828af2f5b1ea01fc109c4267cf54c1b5fe8104)
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-09-121-1/+1
|\ \ | |/
| * MFC r305492: Let knlist_add do the locking partgonzo2016-09-071-3/+1
| | | | | | | | | | | | | | 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@
| * MFC r305039:gonzo2016-09-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud