356110 |
27-Dec-2019 |
kevans |
MFC r355936, r356045: remove unused kbd drivers
r355936: Kill off dummy kbd drivers
As far as I can tell, these are an artifact of times when linker sets couldn't be empty, otherwise the kernel build would fail due to unresolved symbols. hselasky fixed this in r268138, and I've audited the kbd portions to make sure nothing would blow up due to the empty linker set and successfully compiled+ran a kernel with no keyboard support at all.
Kill them off now since they're no longer required.
r356045: terasic_mtl: kill off final dummy keyboard driver
The rest were removed in r355936, which speculated that the cause of this phenomenon was due to an inability to have an empty linker set. The comment included with this one shows that this was, in fact, not the reason.
Regardless, syscons no longer seems to have an issue with not having any keyboard drivers and in-fact ignores the keyboard probe anyways. |
346553 |
22-Apr-2019 |
ian |
MFC r342652:
Support the SPI mode and bus clock frequency parameters set by the devices requesting SPI transfers.
Reported by: SAITOU Toshihide <toshi@ruby.ocn.ne.jp> |
346524 |
22-Apr-2019 |
ian |
MFC r333073-r333074
r333073 by manu: arm: Fix duplicate ahci DRIVER_MODULE
Name each ahci driver uniquely. This remove the warning printed at each arm boot : module_register: cannot register simplebus/ahci from kernel; already loaded from kernel
r333074 by manu: arm: Fix duplicate ehci DRIVER_MODULE
Name each ehci driver uniquely. This remove the warning printed at each arm boot : module_register: cannot register simplebus/ehci from kernel; already loaded from kernel |
343504 |
27-Jan-2019 |
marius |
MFC: r342634 (partial)
o Don't allocate resources for SDMA in sdhci(4) if the controller or the front-end doesn't support SDMA or the latter implements a platform- specific transfer method instead. While at it, factor out allocation and freeing of SDMA resources to sdhci_dma_{alloc,free}() in order to keep the code more readable when adding support for ADMA variants.
o Base the size of the SDMA bounce buffer on MAXPHYS up to the maximum of 512 KiB instead of using a fixed 4-KiB-buffer. With the default MAXPHYS of 128 KiB and depending on the controller and medium, this reduces the number of SDHCI interrupts by a factor of ~16 to ~32 on sequential reads while an increase of throughput of up to ~84 % was seen.
Front-ends for broken controllers that only support an SDMA buffer boundary of a specific size may set SDHCI_QUIRK_BROKEN_SDMA_BOUNDARY and supply a size via struct sdhci_slot. According to Linux, only - unsupported in stable/11 anyway - Qualcomm MSM-type SDHCI controllers are affected by this, though.
Requested by: Shreyank Amartya (unconditional bump to 512 KiB)
o Introduce a SDHCI_DEPEND macro for specifying the dependency of the front-end modules on the sdhci(4) one and bump the module version of sdhci(4) to 2 via an also newly introduced SDHCI_VERSION in order to ensure that all components are in sync WRT struct sdhci_slot.
o In sdhci(4): - Make pointers const were applicable, and - replace a few device_printf(9) calls with slot_printf() for consistency. |
331907 |
03-Apr-2018 |
gonzo |
MFC r307943-r307944, r308698
r307943 by andrew: Remove the need for the delay to be zero when MULTIDELAY is undefined, it may be useful to only enable this in some configs.
Sponsored by: ABT Systems Ltd
r307944 by andrew: Add MULTIDELAY support to the am335x dmtimer. This will be useful for testing Cortex-A8 support in GENERIC.
Sponsored by: ABT Systems Ltd
r308698 by loos: After r308533, the platform compatible string must be an exact match.
Use "ti,am33xx" instead of "ti,am335x", which gives an exact match in every DTS we support.
This fixes the boot on TI SoCs after r308533.
Suggested by: gonzo Sponsored by: Rubicon Communications, LLC (Netgate) |
331893 |
02-Apr-2018 |
gonzo |
MFC r306263, r306268
r306263 by andrew: Move cpu_reset to be a platform method to allow multiple implementations.
Reviewed by: mmel Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D8010
r306268 by andrew: Also implement platform_cpu_reset on bcm2836 |
331722 |
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re) |
331506 |
24-Mar-2018 |
ian |
MFC r310017, r310229, r312289, r327260, r329539, r329544-r329546, r329620, r329729, r329911, r329999
r310017: [spi] reformat message
This commit corrects print of nomatch (newline was too early)
Submitted by: Hiroki Mori <yamori813@yahoo.co.jp> Reviewed by: ray, loos, mizhka Differential Revision: https://reviews.freebsd.org/D8749
r310229: ofw_spi: Parse property for the SPI mode and CS polarity. 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 Differential Revision: https://reviews.freebsd.org/D8614
r312289: [spibus] small code refactoring
Merge 3 sequential printf calls into one.
Reported by: rpokala Reviewed by: rpokala, adrian Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D8795
r327260: SPDX: fix wrong license ID tag in dev/spibus.
r329539: Provide public declarations for ofw_spibus_driver and ofw_spibus_devclass so other drivers can refer to them in DRIVER_MODULE() decls.
r329544: Add modules/spi as a gathering point for SPI-related modules, analagous to modules/i2c for i2c/iicbus modules. Build spibus as a module.
r329545: Add ofw_bus_if.h to SRCS.
r329546: Build at45d and mx25l SPI flash drivers as modules.
r329620: Add missing MODULE_DEPENDS().
r329729: Remove some files that snuck in via cut and paste.
Having these compiled into the module causes the kobj method descriptors to be resolved incorrectly (by the compile-time linker instead of the kernel linker), which then leads to hours of frustrating debugging.
r329911: Add a functional detach() routine, to make things kldunload-friendly.
r329999: Add a SPI driver for imx5 and imx6.
It can be compiled into the kernel with "device imx_spi" or loaded as a module, which is also named "imx_spi". |
330897 |
14-Mar-2018 |
eadler |
Partial merge of the SPDX changes
These changes are incomplete but are making it difficult to determine what other changes can/should be merged.
No objections from: pfg |
327658 |
07-Jan-2018 |
ian |
MFC r327367:
Make kernel option KERNVIRTADDR optional, remove it from std.<platform> files that can use the default value.
It used to be required that the low-order bits of KERNVIRTADDR matched the low-order bits of the physical load address for all arm platforms. That hasn't been a requirement for armv6 platforms since FreeBSD 10. There is no longer any relationship between load addr and KERNVIRTADDR except that both must be aligned to a 2 MiB boundary.
This change makes the default KERNVIRTADDR value 0xc0000000, and removes the options from all the platforms that can use the default value. The default is now defined in vmparam.h, and that file is now included in a few new places that reference KERNVIRTADDR, since it may not come in via the forced-include of opt_global.h on the compile command line. |
327595 |
05-Jan-2018 |
ian |
MFC r324185:
Enhance the interrupt capabilities of ti_pruss driver.
The existing ti_pruss driver for the PRUSS Hardware provided by the AM335x ARM CPU has basic interrupt capabilities. This updated driver provides some more options:
- Sysctl based configuration for the interrupts (for some examples, see the test plan in the phabricator review cited below).
- A device file (/dev/pruss0.irqN) for each enabled interrupt. This file can be read and the device blocks if no irq has happened or returns an uint64_t timestamp based on nanouptime().
- Each interrupt device file provides kqueue-based event notification, blocking read(), or select().
Submitted by: Manuel Stuhn <freebsdnewbie@freenet.de> Differential Revision: https://reviews.freebsd.org/D11959 |
323931 |
22-Sep-2017 |
ian |
MFC r323474, r323553, r323691
r323474: Add a default implementation that returns ENODEV for start, repeat_start, stop, read, and write methods. Some controllers don't implement these individual operations and have only a transfer method. In that case, we should return an indication that the device is present but doesn't support the method, as opposed to the kobj default error ENXIO which makes it look like the whole device is missing. Userland tools such as i2c(8) can use the differing return values to switch between the two different i2c IO mechanisms.
r323553: Defer attaching and probing iicbus and its children until interrupts are available, in i2c controller drivers that require interrupts for transfers.
This is the result of auditing all 22 existing drivers that attach iicbus. These drivers were the only ones remaining that require interrupts and were not using config_intrhook to defer attachment. That has led, over the years, to various i2c slave device drivers needing to use config_intrhook themselves rather than performing bus transactions in their probe() and attach() methods, just in case they were attached too early.
r323691: Give icee(4) a detach() method so it can be used as a module. Add a module makefile for it. |
323470 |
11-Sep-2017 |
ian |
MFC r322373:
Ensure the clocks driver is attached before any drivers that need to enable clocks in their attach(). |
318197 |
11-May-2017 |
marius |
MFC: r312939, r313250, r314811 (partial), r314887 (partial), r315760, 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. |
315366 |
16-Mar-2017 |
ian |
MFC r310189:
Fix sscanf() format string to match an argument. This also fixes kernel build after r310171. |
314514 |
01-Mar-2017 |
ian |
MFC r314064, r314060:
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). |
314512 |
01-Mar-2017 |
ian |
MFC r312859:
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. |
314508 |
01-Mar-2017 |
ian |
MFC r311734, r311735, r311951, r314071:
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. |
314506 |
01-Mar-2017 |
ian |
MFC r306262, r306267, r310021: (needed to avoid conflicts on later merges)
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. |
314503 |
01-Mar-2017 |
ian |
MFC r308640:
Use the correct OF_getencprop over OF_getprop + fdt32_to_cpu to read integer data from the device tree. |
312762 |
25-Jan-2017 |
loos |
MFC r312604 and r312605:
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) |
312761 |
25-Jan-2017 |
loos |
MFC r312411:
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) |
312757 |
25-Jan-2017 |
loos |
MFC r312408:
The port number and the to_port_en flag are valid only on SOP descriptor.
Sponsored by: Rubicon Communications, LLC (Netgate) |
311203 |
04-Jan-2017 |
loos |
Fixes the sensor initialization, always reset the digital outputs on start.
Obtained from: pfSense Sponsored by: Rubicon Communications, LLC (Netgate) |
310882 |
31-Dec-2016 |
loos |
MFC r309345:
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) |
310881 |
31-Dec-2016 |
loos |
MFC r309113:
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) |
310862 |
30-Dec-2016 |
loos |
MFC r308692:
Fix ti_gpio_detach() to avoid crashing if something goes wrong.
Sponsored by: Rubicon Communication, LLC (Netgate) |
310860 |
30-Dec-2016 |
loos |
MFC r306717:
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) |
310859 |
30-Dec-2016 |
loos |
MFC r306654:
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) |
310858 |
30-Dec-2016 |
loos |
MFC of r306388, r306510, r306511 and r306513:
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) |
310857 |
30-Dec-2016 |
loos |
MFC r306376:
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) |
310856 |
30-Dec-2016 |
loos |
MFC of r305114, r305115 and r305149:
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) |
310855 |
30-Dec-2016 |
loos |
MFC of r305112, r305113, r305119, r305141 and r305432:
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) |
310156 |
16-Dec-2016 |
manu |
MFC r309912:
CS ivar is uint32_t, not int. |
308401 |
07-Nov-2016 |
hselasky |
MFC r307518: 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 |
308333 |
05-Nov-2016 |
mmel |
MFC r304459,r305527:
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 |
308325 |
05-Nov-2016 |
mmel |
MFC r306902:
ARM: Remove unused includes. |
307775 |
22-Oct-2016 |
gonzo |
MFC r306530, r306531, r306532, r306579:
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> |
307762 |
22-Oct-2016 |
gonzo |
MFC r305708, r305719
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 |
307344 |
15-Oct-2016 |
mmel |
MFC r306756:
ARM: SEV/WFE instructions are implemented starting from ARMv6K, use it directly. |
306368 |
27-Sep-2016 |
loos |
MFC r306050:
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) |
305572 |
07-Sep-2016 |
gonzo |
MFC r305492: Let knlist_add do the locking part
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@ |
305308 |
02-Sep-2016 |
gonzo |
MFC r305039:
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 |
303772 |
05-Aug-2016 |
loos |
MFC r302988:
Fix a random memory overwrite at boot time, simplebus_init() and simplebus_add_device() expect a simplebus_softc structure associated with the device.
Add the simplebus_softc as first member in am335x_pwmss_softc structure.
Sponsored by: Rubicon Communications (Netgate) Approved by: re (gjb) |
302408 |
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
302394 |
07-Jul-2016 |
loos |
Fix a lockup in tx path for cspw.
Sometimes the software loses the race when appending more descriptors to the tx ring and the tx queue stops.
This commit detects this condition and restart the tx queue whenever it stall.
Tested by: sobomax@, Keith White <kwhite@site.uottawa.ca>, Paul Mather <paul@gromit.dlib.vt.edu> Sponsored by: Rubicon Communications (Netgate) Approved by: re (kib)
|
300769 |
26-May-2016 |
loos |
Only do the touch screen setup when the 'ti,wires' property is present.
While here fix a typo in a debug message.
|
300149 |
18-May-2016 |
andrew |
Return the struct intr_pic pointer from intr_pic_register. This will be needed in later changes where we may not be able to lock the pic list lock to perform a lookup, e.g. from within interrupt context.
Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation
|
299477 |
11-May-2016 |
gonzo |
Add OF_prop_free function as a counterpart for OF_*prop_alloc
- Introduce new OF API function OF_prop_free to free memory allocated by OF_getprop_alloc and OF_getencprop_alloc. Current code just calls free(9) with M_OFWPROP memory class which assumes knowledge about OF_*prop_alloc functions' internals and leads to unneccessary code coupling
- Convert some of the free(..., M_OFWPROP) instances to OF_prop_free
Files affected by this commit are the ones I was able to test on real hardware. The rest of free(..., M_OFWPROP) instances will be handled with idividual maintainers
Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D6315
|
299228 |
08-May-2016 |
skra |
INTRNG - update gpio pin capabilities according to r299166.
Note that the updated comment is valid only for INTRNG. This should not be a problem as not INTRNG code is left in place for debugging reasons only and should not be used anymore. It's anticipated that this old code will be removed soon.
|
299166 |
06-May-2016 |
skra |
INTRNG - support new interrupt mapping type INTR_MAP_DATA_GPIO introduced in r298738.
|
299165 |
06-May-2016 |
skra |
INTRNG - use gpio interrupt modes definitions added in r298738 and implement also GPIO_INTR_EDGE_BOTH mode. All reasonable interrupt modes are supported now.
|
299117 |
05-May-2016 |
skra |
INTRNG - redefine struct intr_map_data to avoid headers pollution. Each struct associated with some type defined in enum intr_map_data_type must have struct intr_map_data on the top of its own definition now. When such structs are used, correct type and size must be filled in.
There are three such structs defined in sys/intr.h now. Their definitions should be moved to corresponding headers by follow-up commits.
While this change was propagated to all INTRNG like PICs, pic_map_intr() method implementations were corrected on some places. For this specific method, it's ensured by a caller that the 'data' argument passed to this method is never NULL. Also, the return error values were standardized there.
|
299069 |
04-May-2016 |
pfg |
sys/arm: Minor spelling fixes.
Only affects comments: no functional change.
|
298854 |
30-Apr-2016 |
andrew |
Add a MULTIDELAY option to allow the ARM kernel to have multiple DELAY implementations. Early in the boot the kernel will use an approximate, however after the timer has been probed it will switch to a more accurate implementation.
Reviewed by: manu Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D5762
|
298802 |
29-Apr-2016 |
gonzo |
Add driver for AM33xx SoC touchscreen
Split ADC driver in two halves: ADC(analog ot digital) and TSC(touchscreen). Touchscreen driver is fully functional up to the point of reporting samples. This part will be added once FreeBSD has API for touchscreen.
Tested on: Beaglebone Black + 4DCAPE-43T Reviewed by: loos Differential Revision: https://reviews.freebsd.org/D5847
|
298627 |
26-Apr-2016 |
br |
Move arm's devmap to some generic place, so it can be used by other architectures.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D6091 Sponsored by: DARPA, AFRL Sponsored by: HEIF5
|
298352 |
20-Apr-2016 |
pfg |
Use our nitems() macro when param.h is available.
Replacements specific to arm, mips, pc98, powerpc and sparc64.
Discussed in: freebsd-current
|
298068 |
15-Apr-2016 |
andrew |
Rename ARM_INTRNG and MIPS_INTRNG to INTRNG. This will help with machine independent code that needs to know about INTRNG such as PCI drivers.
Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation
|
297943 |
13-Apr-2016 |
gonzo |
Fix UART3 and UART4 clock offsets.
Original values were copy-pasted from UART1 and UART2
PR: 197037 Submitted by: Scott Ellis <scott@jumpnowtek.com>
|
297584 |
05-Apr-2016 |
skra |
Fix typo. No functional change.
|
297541 |
04-Apr-2016 |
skra |
Rework TI gpio interrupt controller for INTRNG. It's used on PANDABOARD and BEAGLEBONE where INTRNG is already enabled by default.
Reviewed by: gonzo Differential Revision: https://reviews.freebsd.org/D5806
|
297540 |
04-Apr-2016 |
skra |
Rework am33xx interrupt controller for INTRNG and enable it on BEAGLEBONE by default.
Reviewed by: gonzo Differential Revision: https://reviews.freebsd.org/D5805
|
297539 |
04-Apr-2016 |
skra |
Remove FDT specific parts from INTRNG. Change its interface to make it universal.
(1) New struct intr_map_data is defined as a container for arbitrary description of an interrupt used by a device. Typically, an interrupt number and configuration relevant to an interrupt controller is encoded in such description. However, any additional information may be encoded too like a set of cpus on which an interrupt should be enabled or vendor specific data needed for setup of an interrupt in controller. The struct intr_map_data itself is meant to be opaque for INTRNG.
(2) An intr_map_irq() function is created which takes an interrupt controller identification and struct intr_map_data as arguments and returns global interrupt number which identifies an interrupt.
(3) A set of functions to be used by bus drivers is created as well as a corresponding set of methods for interrupt controller drivers. These sets take both struct resource and struct intr_map_data as one of the arguments. There is a goal to keep struct intr_map_data in struct resource, however, this way a final solution is not limited to that.
(4) Other small changes are done to reflect new situation.
This is only first step aiming to create stable interface for interrupt controller drivers. Thus, some temporary solution is taken. Interrupt descriptions for devices are stored in INTRNG and two specific mapping function are created to be temporary used by bus drivers. That's why the struct intr_map_data is not opaque for INTRNG now. This temporary solution will be replaced by final one in next step.
Differential Revision: https://reviews.freebsd.org/D5730
|
297419 |
30-Mar-2016 |
loos |
Bump up the read and write timeouts. The old value was too small for low speed transfers.
Sponsored by: Rubicon Communications (Netgate)
|
297395 |
29-Mar-2016 |
loos |
Add the SPI driver for am335x.
This driver works in PIO mode for now, interrupts are available only when FIFO is enabled. The FIFO cannot be used with arbitrary sizes which defeat its general use.
At some point we can add DMA transfers where the FIFO can be more useful.
Tested on uBMC (microBMC) and BBB.
Sponsored by: Rubicon Communications (Netgate)
|
297134 |
21-Mar-2016 |
loos |
Use the internal references for ADC, this fixes the ADC readings on uBMC.
Tested on BBB and uBMC.
Sponsored by: Rubicon Communications (Netgate)
|
297132 |
21-Mar-2016 |
loos |
Enable multicast addresses on vlan ports. Fixes the reception of broadcast packets on vlan aware mode.
Sponsored by: Rubicon Communications (Netgate)
|
297127 |
21-Mar-2016 |
ian |
Fix fallout from r292180 (Dec 2015)... ensure that every driver which has a DRIVER_MODULE() referencing mmc_driver has a MODULE_DEPEND() on mmc. This is because the kernel linker only searches for symbols in dependent modules, so loading sdhci_pci (and other bus-flavors of sdhci) would fail when mmc was not compiled into the kernel (even if you hand-loaded mmc first).
(Thanks to jilles@ for providing the vital clue about the kernel linker.)
|
297043 |
18-Mar-2016 |
loos |
Count the input and output packets.
Sponsored by: Rubicon Communications (Netgate)
|
297042 |
18-Mar-2016 |
loos |
Increase the arbitrary limit of TX segments.
Sponsored by: Rubicon Communications (Netgate)
|
297041 |
18-Mar-2016 |
loos |
Set the destination port in all TX segments.
Sponsored by: Rubicon Communications (Netgate)
|
296993 |
17-Mar-2016 |
loos |
Add support for dual emac mode.
In dual emac mode, the CPSW subsystem provides two independent ethernets.
This is implemented (as recommended by TI's TRM) with a mixture of switch settings (vlans) and specific features of CPSW subsystem.
The driver was splitted to accommodate the shared parts (RX and TX rings for example) while it still provides two independent ethernets.
Each of the ethernet ports driver has it's own set of MDIO registers among the other private settings.
Previously this driver always operate in promisc mode, now the Switch ALE (address table entry) is properly initialized and enabled.
The driver is also tested (and known to work) with both ports operating in single port mode (active_slave 0 or 1).
Tested on uBMC (dual emac mode, both ports in single mode, giga and fast ethernet) and BBB (single port, fast ethernet).
Sponsored by: Rubicon Communications (Netgate)
|
296980 |
17-Mar-2016 |
loos |
Fixes a few style(9) issues, remove extra blank lines.
No functional changes.
Sponsored by: Rubicon Comunications (Netgate)
|
296272 |
01-Mar-2016 |
jhb |
Remove taskqueue_enqueue_fast().
taskqueue_enqueue() was changed to support both fast and non-fast taskqueues 10 years ago in r154167. It has been a compat shim ever since. It's time for the compat shim to go.
Submitted by: Howard Su <howard0su@gmail.com> Reviewed by: sephe Differential Revision: https://reviews.freebsd.org/D5131
|
296100 |
26-Feb-2016 |
andrew |
Almost all copies of platform_mp_init_secondary just called intr_pic_init_secondary. Replace them with a direct call. On BCM2836 and ARMADA XP we need to add this function, but it can be empty.
Reviewed by: ian, imp Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D5460
|
296098 |
26-Feb-2016 |
andrew |
Remove platform_mp_probe as it's almost identical on most ARM SoCs, and slightly wrong on the others. We should just check if mp_ncpus is set to more than one CPU as we may wish to run on a single core even when SMP is available.
Reviewed by: ian Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D5458
|
296066 |
25-Feb-2016 |
andrew |
Remove platform_ipi_send, it's an unneeded as all implementations are identical.
Sponsored by: ABT Systems Ltd
|
295885 |
22-Feb-2016 |
skra |
Move ARM_L2_PIPT option to std.armv6 for all armv6 platforms. Only L2 PIPT cache is supported for __ARM_ARCH >= 6.
In fact, this is just a pure proclamation as this option is used only in armv4 specific files now.
|
295660 |
16-Feb-2016 |
skra |
Use EARLY_DRIVER_MODULE() for ti_scm driver to be attached before am335x_prcm driver which uses it. Used BUS_PASS_BUS is a quick pick for now and may be revised when other drivers start using multipass feature.
This is needed after an update of Linux dts files done in r295436.
|
295627 |
15-Feb-2016 |
skra |
Initial OMAP4 WUGEN pass-through driver. SPI interrupts are passed through WUGEN to GIC. Hardware initialization is left in state after reset as well as before.
This is needed after an update of Linux dts files.
|
295319 |
05-Feb-2016 |
mmel |
ARM: Use new ARMv6 naming conventions for cache and TLB functions in all but ARMv4 specific files. Expand ARMv6 compatibility stubs in cpu-v4.h. Use physical address in L2 cache functions if ARM_L2_PIPT is defined.
|
295128 |
01-Feb-2016 |
skra |
Remove not needed <machine/pte.h> includes.
|
295123 |
01-Feb-2016 |
mmel |
ARM: Rename remaining instances of cpufunc_id() to cpu_ident(), forgotten in r295096. Remove tlb_flushI/tlb_flushI_SE functions forgotten in r295122.
|
294561 |
22-Jan-2016 |
andrew |
Stop defining fdt_pic_table with ARM_INTRNG, it's unused.
|
292426 |
18-Dec-2015 |
adrian |
[intrng] Migrate the intrng code from sys/arm/arm to sys/kern/subr_intr.c.
The ci20 port (by kan@) is going to reuse almost all of the intrng code since the SoC in question looks suspiciously like someone took an ARM SoC design and replaced the ARM core with a MIPS core.
* migrate out the code; * rename ARM_ -> INTR_; * rename arm_ -> intr_; * move the interrupt flush routine from intr.c / intrng.c into arm/machdep_intr.c - removing the code duplication and removing the ARM specific bits from here.
Thanks to the Star Wars: The Force Awakens premiere line for allowing me a couple hours of quiet time to finish the universe builds.
Tested:
* make universe
TODO:
* The structure definitions in subr_intr.c still includes machine/intr.h which requires one duplicates all of the intrng definitions in the platform code (which kan has done, and I think we don't have to.)
Instead I should break out the generic things (function declarations, common intr structures, etc) into a separate header.
* Kan has requested I make the PIC based IPI stuff optional.
|
292424 |
18-Dec-2015 |
imp |
Create a simplebus PNP info wrapper.
Differential Review: https://reviews.freebsd.org/D4517
|
292180 |
14-Dec-2015 |
ian |
Move the DRIVER_MODULE() statements that declare mmc(4) to be a child of the various bridge drivers out of dev/mmc.c and into the bridge drivers.
Requested by: jhb (almost two years ago; better late than never)
|
291136 |
21-Nov-2015 |
andrew |
Move hdmi_if.m to files.arm so other kernel configs can use it.
|
291135 |
21-Nov-2015 |
andrew |
Create device options for the two common ARM timers.
Sponsored by: ABT Systems Ltd
|
291133 |
21-Nov-2015 |
andrew |
Move more bus_space_* files to be built by files.arm. This leaves the definition in a file.* file under sys/arm/arm in the few cases we need it for non-fdt platforms.
Sponsored by: ABT Systems Ltd
|
291110 |
20-Nov-2015 |
imp |
Makeoption ARM_LITLE_ENDIAN does nothing. Remove it since it isn't consistently used. It was a carry over from NetBSD that FreeBSD doesn't use.
|
291108 |
20-Nov-2015 |
andrew |
Remove bus_space_asm_generic.S from the per-SoC files.* files, it's already in files.arm.
Sponsored by: ABT Systems Ltd
|
291102 |
20-Nov-2015 |
andrew |
Stop setting {KERN,}PHYSADDR on armv6, it's unneeded.
Sponsored by: ABT Systems Ltd
|
290831 |
14-Nov-2015 |
gonzo |
Somewhat improve HDMI event API
- Pass device_t for HDMI framer as an argument for event hook - Use #define for event values, instead of opaque (and unused) 0
|
290815 |
14-Nov-2015 |
gonzo |
hdmi_if.m will be reused by iMX6 IPU code so move it to arm/arm
|
290814 |
14-Nov-2015 |
gonzo |
Move all HDMI-related stuff to hdmi_if.m, hdmi.h is not required
|
290726 |
12-Nov-2015 |
gavin |
Consistently capitalize "TI" as an abbreviation for Texas Instruments.
|
290547 |
08-Nov-2015 |
tijl |
Since r289279 bufinit() uses mp_ncpus, but some architectures set this variable during mp_start() which is too late. Move this to mp_setmaxid() where other architectures set it and move x86 assertions to MI code.
Reviewed by: kib (x86 part)
|
290465 |
06-Nov-2015 |
cognet |
Include opt_platform.h to get FDT defined.
|
289704 |
21-Oct-2015 |
ian |
Fix parsing of I2C addresses properties in fdt data. I2C address is represented in 7-bits format in DT files, but system expect it in 8-bit format. Also, fix two drivers that locally hack around this bug.
Submitted by: Michal Meloun <meloun@miracle.cz>
|
289532 |
18-Oct-2015 |
ian |
Enable ARM_INTRNG on the pandaboard platform.
Differential Revision: https://reviews.freebsd.org/D2048
|
289522 |
18-Oct-2015 |
ian |
Rename arm_init_secondary_ic() -> arm_pic_init_secondary(). The latter is the name the function will have when the new ARM_INTRNG code is integrated, and doing this rename first will make it easier to toggle the new interrupt handling code on/off with a config option for debugging.
|
288992 |
07-Oct-2015 |
andrew |
Move pmu.c to files.arm and rename the option to pmu. This is not hwpmc specific as we may use the pmu registers for other uses. No configs seem to currently build this.
This will allow for more use of this device.
Discussed with: bz Sponsored by: ABT Systems Ltd
|
288824 |
05-Oct-2015 |
br |
Attach interrupt controller device before other devices.
Sponsored by: University of Cambridge
|
286728 |
13-Aug-2015 |
ian |
Add a new PPS driver for AM335x (beaglebone) timer hardware. This can be used as a module or compiled-in.
|
286696 |
12-Aug-2015 |
ian |
Remove all dregs of the old PPS driver from this code, in preparation for redoing it as a separate driver. Now that each hardware timer is handled by a separate instance of the timer driver, it no longer makes sense to bundle the pps driver with the regular timecounter code. (When all 8 timers were handled by one driver there was no choice about this.)
Split the hardware register definitions out to their own file, so that the new pps driver (coming in a separate commit later) can share them.
With the PPS driver gone, the question of which hardware timer to use for what purpose becomes much easier (some instances can't do the PPS capture). Now we can just hardcore timer2 for eventtimer and timer3 for timecounter.
This also now only instantiates devices for the 2 hardware timers actually used to implement eventtimer and timecounter. This is required so that other drivers can come along and attach to other hardware timers to provide other functionality. (In addition to PPS, this hardware can also do PWM stuff, general pulse width and frequency measurements, etc. Maybe some day we'll have drivers for those things.)
|
286693 |
12-Aug-2015 |
ian |
Remove a bogus printf that whines every time loading a driver module triggers a fresh round of probing.
|
286692 |
12-Aug-2015 |
ian |
Add a MODULE_VERSION(), because other things MODULE_DEPEND() on this.
|
286678 |
12-Aug-2015 |
ian |
Add a routine to return the hardware instance/unit number from ti,hwmods, given the hardware name.
The ti,hwmods property is used (among other things) to associate an fdt node with a specific instance of some hardware. For example given a device node that contains the property ti,hwmods = "timer3", if you call this passing "timer" as the hwmod string to look for it would return 3.
|
286648 |
11-Aug-2015 |
ian |
Make this compile again when PPS_SYNC is defined. Also remove a couple comment blocks and constants that no longer apply.
|
286615 |
11-Aug-2015 |
pfg |
Clean out some externally visible "more then" grammar
MFC after: 3 days
|
286214 |
03-Aug-2015 |
gonzo |
Pass correct type of argument to ti_gpio_unmask_irq in ti_gpio_activate_resource
|
286165 |
01-Aug-2015 |
gonzo |
Set output pin initial value based on pin's pinmux pullup/pulldown setup
Some of FDT blobs for AM335x-based devices use pinmux pullup/pulldown flag to setup initial GPIO ouputp value, e.g. 4DCAPE-43 sets LCD DATAEN signal this way. It works for Linux because Linux driver does not enforce pin direction until after it's requested by consumer. So input with pullup flag set acts as output with GPIO_HIGH value
Reviewed by: loos
|
285868 |
25-Jul-2015 |
gonzo |
Fix color mapping for TDA19988. Values for VIP_CNTRL_1 and VIP_CNTRL_2 registers were mixed up
|
285867 |
25-Jul-2015 |
gonzo |
Synchronize PIN input/output modes with gnu/dts/include/dt-bindings/pinctrl/am33xx.h gpio driver requires exact value to match SoC pin mode with GPIO pin direction
|
285866 |
25-Jul-2015 |
gonzo |
If there is panel info in DTB do not wait for HDMI event and setup framebuffer immediately
|
284562 |
18-Jun-2015 |
gonzo |
Add missing driver for TDA19988 HDMI framer
|
284534 |
18-Jun-2015 |
gonzo |
Add HDMI support to Beaglebone Black:
- Add driver for TDA19988 HDMI framer - Add simple interface to communicate with HDMI sink: read EDID and set videomode - Add event-based API to notify LCD controller when HDMI sink is available - Add HDMI framer node and add refernce to it to lcdc node. This part of DTS tree is custom and does not match Linux DTS because Linux uses combination of pseudo-node in DTS and hardcoded driver information that does not map to our model.
|
284532 |
17-Jun-2015 |
gonzo |
- Add clk_set_source_freq field to struct ti_clock_dev so clock device consumers can configure clock frequency - Add ti_prcm_clk_set_source_freq wrapper for clk_set_source_freq - Add am335x_clk_set_arm_disp_freq function to control pixel clock frequency for LCD and HDMI output. Both of them are sensitive to frequency skews and we need to get pixel clock matching requested frequency as close to possible
|
284190 |
09-Jun-2015 |
sobomax |
"status_reg.acpwr ? 1 : 0" is now the same as just "status_reg.acpwr".
|
284189 |
09-Jun-2015 |
sobomax |
Fix a typo in a comment that has been carried over from am335x_pmic.c.
|
284183 |
09-Jun-2015 |
sobomax |
Use tab to do identation consistently.
|
284182 |
09-Jun-2015 |
sobomax |
Extend TPS65217 support to be able to pull and decode battery charger configuration and provide some basic control knobs to set charger voltage and dump config on boot. Two loader tunables have been added:
o hw.am335x_pmic.bootverbose set to 1 to get more info on the boot;
o hw.am335x_pmic.vo: set to charger voltage to be applied on kernel initialization time, supported values are "4.10V", "4.15V", "4.20V" and "4.25V".
Cleanup code a bit in general, move TPS65217 register definitions into a separate header, convert bit-banging defines into bitmap structures.
Also threat the case when power source is neither "AC" nor "USB" as "Battery", not "Unknown".
|
283503 |
25-May-2015 |
gonzo |
Rename fdt_find_child to ofw_bus_find_child. There is nothing FDT-specific in this function.
Suggested by: andrew@
|
283314 |
23-May-2015 |
andrew |
Remove an unused header.
|
283287 |
22-May-2015 |
andrew |
Add a miibus_statchg and use it to enable Gigabit mode when appropriate.
MFC after: 1 week
|
283276 |
22-May-2015 |
gonzo |
Switch TI platform support code from using FreeBSD's custom-baked DTS files to vendor-provided ones. It should make easier to adopt platform code to new revisions of hardware and to use DTS overlays for various Beaglebone extensions (shields/capes).
Original dts filenames were not changed, they're now wrappers over dts files provided by TI. So make sure you update .dtb files on your devices as part of kernel update
GPIO addressing was changed: instead of one global /dev/gpioc0 there are per-bank instances of /dev/gpiocX. Each bank has 32 pins so for instance pin 121 on /dev/gpioc0 in old addressing scheme is now pin 25 on /dev/gpioc3
On Pandaboard serial console devices was changed from /dev/ttyu0 to /dev/ttyu2 so you'll have to update /etc/ttys to get login prompt on serial port in multiuser mode. Single user mode serial console should work as-is
Differential Revision: https://reviews.freebsd.org/D2146 Reviewed by: rpaulo, ian, Michal Meloun, Svatopluk Kraus
|
283138 |
20-May-2015 |
rpaulo |
ti_pruss: pass the correct IRQ to userland.
Also, fix several problems with the kqueue notification.
Submitted by: Manuel Stühn freebsdnewbie at freenet.de
|
282827 |
13-May-2015 |
loos |
Add support for the power button on BeagleBone Black.
Shutdown and turn off the board when the power button is pressed.
Submitted by: Michal Meloun <meloun@miracle.cz> Relnotes: yes
|
282723 |
10-May-2015 |
andrew |
Use the new gic option on all configs that need it.
|
282675 |
09-May-2015 |
loos |
Pass the resources requests to the upper bus.
Submitted by: Michal Meloun <meloun@miracle.cz>
|
281092 |
04-Apr-2015 |
andrew |
Include vm/pmap.h for pmap_kextract.
|
281085 |
04-Apr-2015 |
andrew |
Stop using machine/fdt.h in the arm kernel code when we don't need it.
|
280831 |
29-Mar-2015 |
andrew |
Build the cpufunc_asm_* files based on the cpu type, not which config file we happen to be building.
|
280826 |
29-Mar-2015 |
andrew |
Remove cpufunc_asm_arm11.S from the ARMv7 configs, it's not used.
|
280810 |
29-Mar-2015 |
andrew |
Stop building unused cpuvunc_* files, we don't need anything from these.
|
279826 |
09-Mar-2015 |
ian |
Change the name of the dmtimer pps device from /dev/ppsN to /dev/dmtppsN.
ntpd is hard-coded to use /dev/ppsN, and typically when multiple PPS sources are available the sysadmin will symlink the right one(s) to /dev/ppsN, so it's best to not usurp those names directly.
|
279816 |
09-Mar-2015 |
ian |
Attach the prcm clock driver early, so it can set the mpcore timer frequency.
Submitted by: Svatopluk Kraus
|
279766 |
08-Mar-2015 |
ian |
Fix spurious interrupts on arm am335x (beaglebone), by doing the EOI in both the post-filter and post-thread callbacks.
Also eliminate a completely unecessary write to INTC_ISR_CLEAR register, which clears a software-generated interrupt that can only happen with a write to INTC_ISR_SET (which nothing does).
|
279312 |
26-Feb-2015 |
dim |
Fix a number of -Wcast-qual warnings under sys/arm. No functional change.
Submitted by: andrew MFC after: 3 days
|
279311 |
26-Feb-2015 |
dim |
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 after: 3 days
|
278216 |
04-Feb-2015 |
loos |
Fix a bug where an interrupt could be masked unintentionally when bus_config_intr() is called with the same interrupt type and polarity that is already set.
Pointy hat: loos
|
278061 |
02-Feb-2015 |
rpaulo |
am335x_clk_pruss_activate(): use the L3F clock.
The DISP DPLL clock is slower and was making the PRU programs slower on FreeBSD than on Linux.
Submitted by: Manuel Stuehn <freebsdnewbie at freenet.de> MFC after: 1 week
|
277996 |
31-Jan-2015 |
loos |
Implement GPIO_GET_BUS() method for all GPIO drivers.
Add helper routines to deal with attach and detach of gpiobus and gpioc devices that are common to all drivers.
|
277968 |
31-Jan-2015 |
loos |
Clean up and fix the device detach routine and the failure path on GPIO drivers.
This paves the way for upcoming work.
|
277958 |
31-Jan-2015 |
rpaulo |
ti_pruss: make sure the mmap'ed memory region is uncacheable.
MFC after: 1 week
|
277871 |
29-Jan-2015 |
gonzo |
Set LCDC clock frequency to 2*148500 KHz
Minimum LCDC is 2 so clock freq shouild be 2*max_pixel_clock. Maximum pixel clock for HDMI is 148500 (1920x1080). But AM335x can not run in this mode due to bandwidth and clock limitations
|
277835 |
28-Jan-2015 |
br |
Add ARMv7 performance monitoring counters.
Differential Revision: https://reviews.freebsd.org/D1687 Reviewed by: rpaulo Sponsored by: DARPA, AFRL
|
277720 |
26-Jan-2015 |
gonzo |
- Increase default i2c bus timeout to 5 seconds from 1 second. Sometimes 1 second is not enugh for TDA19988 HDMI framer (e.g. on Beaglebone Black) - Add per-device i2c_timout sysctl (dev.iichb.X.i2c_timeout) to control I2C bus timeout manually - Pass softc instead of device_t to all sysctl handlers
|
277716 |
25-Jan-2015 |
gonzo |
Add vt(4) support to AM335x LCDC driver
|
277632 |
24-Jan-2015 |
gonzo |
After interrupt read value from register to make sure it reached hardware. This should fix "Spurious inteerupt" message
Suggested by ian@
|
277522 |
22-Jan-2015 |
gonzo |
Write ACK for all kinds of LCDC interrupts
|
277502 |
21-Jan-2015 |
gonzo |
Remove "#define DEBUG" that conflicts with "option DEBUG" in kernel config
|
277472 |
21-Jan-2015 |
ian |
Rename bus_space-v6.c to bus_space_base.c, because it's not v6-specific and now some v5 Marvell systems are using it. Only define fdt_bus_tag if option FDT is defined.
|
277405 |
20-Jan-2015 |
gonzo |
Properly clear IRQ status in order to fix "Spurious IRQ" message from AINT.
This register is not documented in TRM but that's what linux driver does
|
277313 |
18-Jan-2015 |
gonzo |
Fix programming timing parameters to LCDC. Actual value used for HBP, HFP, HSW, VSW is register's programmed value + 1.
|
277209 |
15-Jan-2015 |
bz |
Fix cpsw(4) after r277203 which folded 'struct m_hdr' into 'struct mbuf'. While in theory this should have been a transparent change (and was for all other drivers), cpsw(4) never used the proper accessor macros in a few places but spelt the indirect m_hdr.mh_* out itself. Convert those to use m_len and m_data and unbreak the driver build.
|
277042 |
12-Jan-2015 |
loos |
Add support to turn off Beaglebone with poweroff(8) or shutdown(8) -p.
To cut off the power we need to start the shutdown sequence by writing the OFF bit on PMIC.
Once the PMIC is programmed the SoC needs to toggle the PMIC_PWR_ENABLE pin when it is ready for the PMIC to cut off the power. This is done by triggering the ALARM2 interrupt on SoC RTC.
The RTC driver only works in power management mode which means it won't provide any kind of time keeping functionality. It only implements a way to trigger the ALARM2 interrupt when requested.
Differential Revision: https://reviews.freebsd.org/D1489 Reviewed by: rpaulo MFC after: 2 weeks
|
276984 |
11-Jan-2015 |
andrew |
Rename gic_init_secondary to arm_init_secondary_ic to help with the merge of the arm_intrng project branch.
|
276717 |
05-Jan-2015 |
hselasky |
Add 64-bit DMA support in the XHCI controller driver. - Fix some comments and whitespace while at it.
MFC after: 1 month Submitted by: marius@
|
276520 |
01-Jan-2015 |
ian |
Remove -Wa,-march=armv7a from arm kernel configs, it makes clang 3.5 sad and apparently isn't needed now that we're using the integrated assembler.
|
276316 |
27-Dec-2014 |
loos |
Remove unnecessary code and, instead, use the provided iicbus_null_callback callback.
|
276315 |
27-Dec-2014 |
loos |
Fix a off-by-one bug.
Pointy hat to: loos
|
276249 |
26-Dec-2014 |
loos |
Fix the musb initialization sequence on AM335x.
According to http://e2e.ti.com/support/arm/sitara_arm/f/791/t/210729 the USB reset pulse has an undocumented duration of 200ns and during this period the module must not be acessed.
We wait for 100us to take into account for some imprecision of the early DELAY() loop.
This fixes the eventual 'External Non-Linefetch Abort (S)' that happens at boot while resetting the musb subsystem.
While here, enable the USB subsystem clock before the first access.
Discussed with: ian, adrian MFC after: 2 weeks
|
276245 |
26-Dec-2014 |
ian |
Squelch a (bogus) gcc use-before-init warning.
|
276207 |
25-Dec-2014 |
loos |
Add interrupt support for GPIO pins on OMAP4 and AM335x.
This enables the use of GPIO pins as interrupt sources for kernel devices directly attached to gpiobus (userland notification will be added soon).
The use of gpio interrupts for other kernel devices will be possible when intrng is complete.
All GPIO pins can be set to trigger on:
- active-low; - active-high; - rising edge; - falling edge.
Tested on: Beaglebone-black
|
276173 |
24-Dec-2014 |
loos |
Bring in the last round of updates before adding the interrupt support.
Fix the following issues:
- Removed revision from device softc, it isn't used anywhere else out of device attach routine;
- Move the duplicated code for verification of valid banks (and pins) to a single function;
- Use some macros to simplify the handling of some constants;
- Update some stale comments.
|
276151 |
23-Dec-2014 |
loos |
Do not return the total number of available pins but the maximum pin number we can cope.
Previously the returned value could prevent access to some of the pins.
|
276060 |
22-Dec-2014 |
loos |
Remove some leftovers from OMAP3 support.
|
276059 |
22-Dec-2014 |
loos |
Simplify the use of locks where possible, remove the locking when it is not required.
Simplify the code a little bit.
Reviewed by: andrew (previous version)
|
276049 |
22-Dec-2014 |
ian |
Replace the clock divisor terms with values that also result in a 1 MHz clock, but actually work on real hardware, unlike the original set of values I chose.
PR: 195009 Submitted by: Scott Ellis <jumpnowtek@gmail.com>
|
276047 |
21-Dec-2014 |
ian |
Add -march=armv7a to the kernel compile for all ARM systems which are v7a.
Submitted by: Michal Meloun <meloun@miracle.cz>
|
276029 |
21-Dec-2014 |
ian |
Remove a volatile qualifier on return type that is ignored and results in a -Wreturn-type warning when compiled with gcc.
|
276021 |
21-Dec-2014 |
andrew |
Reduce the diff in the Ti aintc between head and arm_intrng
|
275950 |
20-Dec-2014 |
ian |
Add a new sdhci quirk, SDHCI_QUIRK_WAITFOR_RESET_ASSERTED, to work around TI OMAP controllers which will return the reset-in-progress bit as zero if you read the status register too fast after setting the reset bit.
The zero is apparently from a stale snapshot of the internal state presented in the interface register, and leads to a false indication that the reset is complete when it either hasn't started yet or is in-progress. The workaround is to first loop until the bit is seen as asserted, then do the normal loop waiting to see it de-asserted.
Submitted by: Michal Meloun <meloun@miracle.cz>
|
275946 |
19-Dec-2014 |
ian |
Rewrap long lines; no functional changes.
Submitted by: Michal Meloun <meloun@miracle.cz>
|
275944 |
19-Dec-2014 |
ian |
Add code to set and reset open-drain mode on the bus when requested.
Submitted by: Michal Meloun <meloun@miracle.cz>
|
275524 |
05-Dec-2014 |
andrew |
Switch to a .cpu directive. These will work when clang 3.5 is imported where the .arch directive is a nop.
MFC after: 1 week Sponsored by: ABT Systems Ltd
|
275376 |
01-Dec-2014 |
rpaulo |
Allow multiple devices to mmap. It's impossible to prevent this with checks on the open/close functions.
MFC after: 1 week
|
274670 |
18-Nov-2014 |
loos |
Moves all the duplicate code to a single function.
Verify for invalid modes and unwanted flags before pass the new flags to driver.
|
274668 |
18-Nov-2014 |
imp |
opt_global.h is included automatically in the build. No need to explicitly include it in these places.
Sponsored by: Netflix
|
274644 |
18-Nov-2014 |
ian |
Fix the i2c bus speed divisors for TI OMAP4 and AM335x.
For OMAP4, the old values for 1MHz gave a bus frequency of about 890KHz. The new numbers hit 1MHz exactly.
For AM335x the prescaler values are adjusted to give a 24MHz clock for all 3 standard speeds, as the manual recommends (as near as we can tell, there are errors and typos apparent in the document). Also, 1MHz speed is added, and has been tested successfully on a BeagleboneWhite board.
PR: 195009
|
274641 |
18-Nov-2014 |
ian |
Allow i2c bus speed to be configured via hints, FDT data, and sysctl.
The current support for controlling i2c bus speed is an inconsistant mess. There are 4 symbolic speed values defined, UNKNOWN, SLOW, FAST, FASTEST. It seems to be universally assumed that SLOW means the standard 100KHz rate from the original spec. Nothing ever calls iicbus_reset() with a speed of FAST, although some drivers would treat it as the 400KHz standard speed. Mostly iicbus_reset() is called with the speed set to UNKNOWN or FASTEST, and there's really no telling what any individual driver will do with those.
The speed of an i2c bus is limited by the speed of the slowest device on the bus. This means that generally the bus speed needs to be configured based on the board/system and the components within it. Historically for i2c we've configured with device hints. Newer systems use FDT data and it documents a clock-frequency property for i2c busses. Hobbyists and developers are likely to want on the fly changes. These changes provide all 3 methods, but do not require any existing drivers to change to use the new facilities.
This adds an iicbus method, iicbus_get_frequency(dev, speed) that gets the frequency for the requested symbolic speed. If the symbolic speed is SLOW or if there is no speed configured for the bus, the returned value is 100KHz, always. Otherwise, if bus speed is configured by hints, fdt, tunable, or sysctl, that speed is returned. It also adds a helper function, iicbus_init_frequency() that any bus driver subclassed from iicbus can initialize the frequency from some other source of info.
Initial driver implementations are provided for Freescale and TI.
Differential Revision: https://reviews.freebsd.org/D1174 PR: 195009
|
273799 |
28-Oct-2014 |
loos |
Make the GPIO children attach to the first unit available and not only to unit 0.
It seems that this 'simplification' was copied to all GPIO drivers in tree.
This fix a bug where a GPIO controller could fail to attach its children (gpioc and gpiobus) if another GPIO driver attach first.
|
273606 |
24-Oct-2014 |
loos |
Fix cpsw_detach() to not panic when called from cpsw_attach().
For an unkown reason (at moment), sometimes if_cpsw cannot read from PHY and fails to attach calling cpsw_detach() which end up in a panic.
Fix it by doing the proper check before detach the miibus and also fix the leak of few variables.
And to actually make it work, ether_ifattach() has to be moved to the end of cpsw_attach() to avoid a race where calling ether_ifdetach() before domain_init() (which will only run later on) would make it crash at INP_INFO_RLOCK() on in_pcbpurgeif0().
Tested on: BBB (am335x) MFC after: 1 week
|
273281 |
19-Oct-2014 |
rpaulo |
Style changes as pointed out by stas@.
MFC after: 1 week
|
273263 |
18-Oct-2014 |
loos |
Fix the chan address for mtx_sleep() on bus wait. Without this fix the threads waiting for the bus would never wake.
X-MFC-With: r270230
|
273262 |
18-Oct-2014 |
andrew |
Rework the Ti GPIO code to allow for both the OMAP4 and AM335X attachments to be present. Thsi creates a new per-SoC driver that handles probe and setting/getting the gpio flags.
Differential Revision: https://reviews.freebsd.org/D943 Reviewed by: loos, rpaulo MFC after: 1 week
|
273261 |
18-Oct-2014 |
rpaulo |
Remove an unused mutex.
MFC after: 1 week
|
273258 |
18-Oct-2014 |
rpaulo |
Make the ti_mbox and ti_pruss drivers optional.
MFC after: 1 week
|
273257 |
18-Oct-2014 |
rpaulo |
Add a driver for the TI watchdog.
The TI watchdog timer is present on BeagleBone's. Since 2014, U-Boot has been booting the BeagleBone with the watchdog enabled. We need to disable it on boot to avoid a spurious reset. The timer isn't exactly precise, but it will do as a watchdog. This is also a reflection of the watchdog(9) API.
In the future, we could handle interrupts, but the watchdog(9) API needs to be a bit smarter before that can happen.
Differential Revision: https://reviews.freebsd.org/D965 Reviewed by: andrew MFC after: 1 week Relnotes: yes
|
273086 |
14-Oct-2014 |
andrew |
Make the ti_padstate_devmap arrays ststic, they are only used with the file where they are defined.
|
273055 |
13-Oct-2014 |
andrew |
Move the sdhci option to files.ti, it's common to both SoCs.
|
273054 |
13-Oct-2014 |
andrew |
Remove the omap3 directory that should have happened in r273041.
|
273052 |
13-Oct-2014 |
andrew |
Use a switch on ti_chip() to find which SoC we are on. This allow us t only enable support for the SoCs we are built for.
|
273049 |
13-Oct-2014 |
andrew |
Remove ti_mmchs.c, it has been replaced by ti_sdhci.c.
|
273047 |
13-Oct-2014 |
andrew |
Remove the need for files.beaglebone and std.beaglebone by moving the one option they defined into files.am335x.
|
273045 |
13-Oct-2014 |
andrew |
Sort the files in the am355x directory.
|
273041 |
13-Oct-2014 |
andrew |
Start removing the omap3 support. In base it was only ever a header and a few changes to drivers, no kernel config was added. As the SoCs are quite old and the code is unmaintained start the process of removing support by deleting the header file and code that depends on it along with the macro SOC_OMAP3. Other Ti SoCs shouldn't be affected, other than for us to have less code to maintain.
Differential Revision: https://reviews.freebsd.org/D936 Reviewed by: rpaulo, loos
|
271859 |
19-Sep-2014 |
glebius |
Mechanically convert to if_inc_counter().
|
270948 |
01-Sep-2014 |
ian |
sdhci.h has grown a dependency on sysctl.h, include the latter where needed.
|
270230 |
20-Aug-2014 |
loos |
Rewrite of ti_i2c based on gonzo's patch, fix the following bugs/problems:
. interrupt storm detected on "intr70:"; throttling interrupt source;
. Added access serialization on iicbus_transfer(), previously there was no such protection and a new transfer could easily confuse the controller;
. Add error checkings (i.e. stop the transfer when a error is detected and do _not_ overwrite the previous error);
. On command done interrupt do not assume that the transfer was finished sucessfully as we will receive the command done interrupt even after errors;
. Simplify the FIFO handling;
. Reset the FIFO between the transfers as the FIFO may contain data from the last (failed) transfer;
. Fix the iicbus speed for AM335x, which in turn will make better use of the I2C noise filter (set to one internal clock cycle);
. Move the read and write handler to ithread instead of notifying the requesting thread with wakeup(9);
. Fix the comments based on OMAP4 TRM.
The above changes allows me to read the EDID from my HDMI monitor on BBB with gonzo's patches to support TDA19988 (which does 128 bytes reads) and repeatedly scan the iicbus (with a modified i2c(8)) without lock up the bus.
Phabric: D465
|
269395 |
01-Aug-2014 |
ian |
Tell the assembler we're building for armv7a with security extensions, so that the 'smc' (secure monitor call) opcode is valid.
Submitted by: Stepan Dyatkovskiy <stpworld@narod.ru>
|
267171 |
06-Jun-2014 |
kevlo |
Remove extra semicolons.
|
267021 |
03-Jun-2014 |
loos |
FreeBSD, historically, has always used 8-bit addresses for i2c devices (7-bit device address << 1), always leaving the room for the read/write bit.
This commit convert ti_i2c and revert r259127 on bcm2835_bsc to make them compatible with 8-bit addresses. Previous to this commit an i2c device would have different addresses depending on the controller it was attached to (by example, when compared to any iicbb(4) based i2c controller), which was a pretty annoying behavior.
Also, update the PMIC i2c address on beaglebone* DTS files to match the new address scheme.
Now the userland utilities need to do the correct slave address shifting (but it is going to work with any i2c controller on the system).
Discussed with: ian MFC after: 2 weeks
|
267009 |
03-Jun-2014 |
loos |
Remove the unnecessary i2c slave address assignment.
The ti_i2c controller only works in the master mode and the i2c address passed on iicbus_reset() is used to set the controller slave address when operating as an i2c slave (which isn't currently supported).
When talking to a slave, the slave address is correctly provided to ti_i2c_tranfer().
|
266960 |
02-Jun-2014 |
loos |
Configure the analog input 7 which, on BBB, is connected to the 3V3B rail through a voltage divisor (R163 and R164 on page 4 of BBB schematic).
Add a note about this on ti_adc(4) man page. The ti_adc(4) man page will first appear on 10.1-RELEASE.
MFC after: 1 week Suggested by: Sulev-Madis Silber (ketas) Manual page reviewed by: brueffer (D127)
|
266937 |
01-Jun-2014 |
loos |
Export two new settings for the AM335x PWM, the clock prescaler (clkdiv) and the actual PWM frequency.
Enforce the maximum value for the period sysctl.
The frequency systcl now allows the direct setting of the PWM frequency (it will try to find the better clkdiv and period for a given frequency, i.e. the ones that will give the better PWM resolution).
This allows the use lower frequencies on the PWM. Without changing the clock prescaler the minimum PWM frequency was 1.52kHz.
PWM frequencies checked with an osciloscope.
PWM output tested with some R/C servos at 50Hz.
|
266707 |
26-May-2014 |
andrew |
Rework the Ti GPIO driver to work on multiple SoCs. At the moment it could work with OMAP4 and AM335x without needing to recompile.
Reviewed by: loos
|
266649 |
25-May-2014 |
andrew |
Make ti_padconf_devmap static in both places it is defined.
|
266648 |
25-May-2014 |
andrew |
Allow the OMAP4 and AM335x prcm drivers to be compiled in the same kernel by renaming the structures used.
|
266621 |
24-May-2014 |
ian |
Eliminate one of the causes of spurious interrupts on armv6. The arm weak memory ordering model allows writes to different devices to complete out of order, leading to a situation where the write that clears an interrupt source at a device can complete after a write that unmasks and EOIs the interrupt at the interrupt controller, leading to a spurious re-interrupt.
This adds a generic barrier function specific to the needs of interrupt controllers, and calls that function from the GIC and TI AINTC controllers. There may still be other soc-specific controllers that need to make the call.
Reviewed by: cognet, Svatopluk Kraus <onwahe@gmail.com> MFC after: 3 days
|
266336 |
17-May-2014 |
andrew |
Allow us to compile the Ti iic driver for both OMAP4 and AM335x.
MFC after: 1 week
|
266334 |
17-May-2014 |
andrew |
Move the Ti SoCs to use the ARM platform. This should help allowing a single kernel to work on both PandaBoard and BeagleBone.
|
266301 |
17-May-2014 |
andrew |
Add the start of the ARM platform code. This is based on the PowerPC platform code, it is expected these will be merged in the future when the ARM code is more complete.
Until more boards can be tested only use this with the Raspberry Pi and rrename the functions on the other SoCs.
Reviewed by: ian@
|
265035 |
27-Apr-2014 |
ian |
Move duplicated code to print l2 cache config into the common code.
|
264197 |
06-Apr-2014 |
loos |
Partially revert r264083.
While it is the recommended initialization procedure, it hangs on the reset of the second GPIO module on pandaboard.
Removes the module reset for now as more investigation would be needed.
Reported by: jceel
|
264153 |
05-Apr-2014 |
loos |
- Fix the setup of interrupts for banks 2 and 3 on AM335x.
On AM335x each one of the four GPIO banks has two physical interrupt lines, so we now allocate resources and setup our interrupt handler for all the (8) available interrupts.
On OMAP3 and OMAP4 there is only one interrupt for each GPIO bank (6 banks, 6 interrupts), but there are two set of registers where the first one is used to setup the delivery of interrupts to the MPU and the second set, setup the delivery of interrupts to the DSP.
On AM335x, each set of registers controls each one of the interrupt lines.
- Remove nonexistent registers for OMAP4 and AM335x, replace their use with the correct ones for these SoCs.
- Remove stray whitespace.
Based on OMAP3, OMAP4 and AM335x TRMs.
Tested on Beaglebone-black.
|
264119 |
04-Apr-2014 |
ian |
Adjust the comments about translating clock divisor bits to match recent code changes.
|
264102 |
04-Apr-2014 |
ian |
Let's try having just one mmc/sd controller driver.
Pointed out by: gjb
|
264100 |
04-Apr-2014 |
ian |
Switch OMAP4 (Pandaboard et. al.) to use the ti_sdhci driver.
|
264099 |
04-Apr-2014 |
ian |
Fix the logic for translating between MMCHS and SDHCI clock divisors.
Submitted by: Svatopluk Kraus <onwahe@gmail.com>
|
264096 |
04-Apr-2014 |
ian |
Various fixes to the ti_sdhci driver, mostly to make it work on Pandaboard.
- Don't allow high-speed mode on OMAP4 due to hardware erratum. - Check the proper bit in the status register when waiting for the controller to come out of reset. - Add handling for the "non-removable" fdt property by always returning "card is present" status. - Add the non-removable property for the MMC card on a Beaglebone Black. - Add the non-removable property for Pandaboard as a workaround.
For Pandaboard the card detect pin is handled by the twl6030 fpga device which gets an interrupt on pin change and then has to query the fpga for the actual status. We don't have code to do that yet.
Submitted by: Svatopluk Kraus <onwahe@gmail.com>
|
264083 |
03-Apr-2014 |
loos |
Move the GPIO bank initialization to a new function to make easier to detect errors.
Reset the GPIO module during the initialization. This is guaranteed to be the same as a hardware reset. Tested on AM335x (BBB) and checked against the omap3 and omap4 TRM.
Do a better job freeing resources when there are errors and on ti_gpio_detach().
|
264051 |
02-Apr-2014 |
ian |
Trivial changes/forced-commit to document previous change r264050 whose description was eaten by the dog (or an editor crash or something).
Add variable-frequency support to the arm mpcore eventtimer driver.
This allows a platform's early init code to tell the mpcore driver that the clock frequency can vary. That causes the mpcore driver to register an eventtimer, but not a timecounter. The platform has to provide a time counter using some other fixed-frequency clock, but can still use the per-cpu goodness of the mpcore hardware for event timers.
When the platform support code does something to change the frequency of the CPU clocks (power saving, thermal management) it must tell the mpcore driver code about it using arm_tmr_change_frequency().
|
264050 |
02-Apr-2014 |
ian |
|
264019 |
01-Apr-2014 |
loos |
Fix some of the style(9) problems on ti_gpio. Note that this commit does not fix all the style(9) problems, but will open room for the next commits.
Remove redundant code and declarations.
No functional changes.
|
263693 |
24-Mar-2014 |
loos |
Adds the ADC driver for TI AM3xxx SoC family.
The ADC has a 12bit resolution and its raw output can be read via sysctl(8) interface.
The driver allows the setup of ADC clock, samples average and open delay (the number of clock cycles to wait before start the conversion).
The TSC_ADC module is set in the general purpose mode (no touchscreen support).
Tested on Beaglebone-black.
Written based on AM335x TRM.
Reviewed by: rpaulo Approved by: adrian (mentor) Tested by: me, Brian J. McGovern, Sulev-Madis Silber (ketas)
|
262979 |
10-Mar-2014 |
ian |
Eliminate irq_dispatch.S. Move the data items it contained into arm/intr.c and the functionality it provided into arm/exception.S. Rename the main irq handling routine from arm_handler_execute() to arm_irq_handler() to make it more congruent with how other exception handlers are named, and also update its signature to reflect what has long been reality: it is passed just a trapframe pointer, no interrupt number argument.
|
262916 |
08-Mar-2014 |
imp |
Move all the files named foo/common.c to foo/foo_common.c, as appropriate for each of the 'foo' in the tree. This will allow us to compile them together (although symbol conflicts prevent us from doing that today, this just fixes the file name collision).
|
262870 |
06-Mar-2014 |
cognet |
When calculating the MPU freq, make sure not to overflow by using a uint64_t.
PR: arm/187223 Submitted by: Svatopluk Kraus <onwahe@gmail.com>
|
262534 |
26-Feb-2014 |
ian |
Replace many pasted identical definitions of cpu_initclocks() with a common implementation in arm/machdep.c. Most arm platforms either don't need to do anything, or just need to call the standard eventtimer init routines. A generic implementation that does that is now provided via weak linkage. Any platform that needs to do something different can provide a its own implementation to override the generic one.
|
262409 |
23-Feb-2014 |
ian |
Move the declaration for mpentry() into a header file instead of pasting it into a bunch of different .c files. Remove declarations for the unused mptramp() function from everywhere except AramadaXP (and I think it's really not used there either, because the code that references it appears to be insanely does-nothing in nature).
|
262408 |
23-Feb-2014 |
ian |
Eliminate an unused-var warning by wrapping #if 0 around some tables of values that were probably entered "for completeness" from a datasheet, and for all I know may be useful/necessary some day.
|
261845 |
13-Feb-2014 |
loos |
Allow the use of the OFW GPIO bus for ti_gpio and bcm2835_gpio. With this change the gpio children can be described as directly connected to the GPIO controller without the need of describing the OFW GPIO bus itself on the DTS file.
With this commit the OFW GPIO bus is fully functional on BBB and RPi.
GPIO controllers which want to use the OFW GPIO bus will need similar changes.
Approved by: adrian (mentor, implicit)
|
261459 |
04-Feb-2014 |
imp |
Remove trailing tabs causing false grep positives
|
261414 |
02-Feb-2014 |
cognet |
Don't call device_set_ivars() for the mmchs, it doesn't seem to be used, and it overrides the ivars set by the simplebus.
|
261410 |
02-Feb-2014 |
ian |
Follow r261352 by updating all drivers which are children of simplebus to check the status property in their probe routines.
Simplebus used to only instantiate its children whose status="okay" but that was improper behavior, fixed in r261352. Now that it doesn't check anymore and probes all its children; the children all have to do the check because really only the children know how to properly interpret their status property strings.
Right now all existing drivers only understand "okay" versus something- that's-not-okay, so they all use the new ofw_bus_status_okay() helper.
|
261227 |
28-Jan-2014 |
andrew |
Remove STARTUP_PAGETABLE_ADDR from the ARM configs and replace it with memory at the end of the kernel.
This helps reduce the SoC and board specific configuration required.
Reviewed by: bsdimp Tested by: jmg (armeb), br
|
261211 |
27-Jan-2014 |
jmg |
fix args to mtx_init
Note that this commit hasn't been compile tested because these files are not hooked up to the build...
PR: 186129 Submitted by: Takanori Sawada Approved by: rpaulo
|
260294 |
04-Jan-2014 |
ian |
Doh! Use C comments, not C++.
|
260292 |
04-Jan-2014 |
ian |
Convert static device mapping to use the new arm_devmap_add_entry(), and add static mappings that cover most of the on-chip peripherals with 1MB section mappings. This adds about 220MB or so available kva space by not using a hard-coded 0xF0000000 as the mapping address.
|
260245 |
03-Jan-2014 |
ian |
Fix a typo that caused a loop to run beyond the end of the array it was searching. If you didn't configure a timer capture pin you'd get a data abort as it wandered into the weeds, now you get a nice warning message about your config, as originally intended.
|
259750 |
22-Dec-2013 |
ian |
Add PPS support to the am335x timer driver. This uses the timer hardware's capture mode together with the timecounter's PPS polling feature to get very accurate PPS capture without any interrupt processing (or latency).
Hardware timers 4 through 7 have associated capture-trigger input pins. When the PPS support is compiled in the code automatically chooses the first timer it finds that has the capture-trigger pin set to input mode (this is configured via the fdt data).
|
259744 |
22-Dec-2013 |
ian |
A variety of cleanups... - Use named constants for register bits, instead of mystery numebrs scattered around in the code. - Use inline functions for bus space read/write, instead of macros that rely on global variables. - Move the timecounter struct into the softc instead of treating it as a global variable. Backlink from it to the softc. - This leaves a pointer to the softc as the only static/global variable and it's now used only by DELAY().
|
259743 |
22-Dec-2013 |
ian |
Map out all the timer-related registers, and define named constants for the bits within the registers.
|
259739 |
22-Dec-2013 |
ian |
Shorten the DMTIMER_ prefix used for register names to DMT_. This is in preparation for adding more complete register defintions, some of which have fairly long names.
|
259270 |
12-Dec-2013 |
loos |
After r256961 ofw_iicbuc.c will be built for any kernel which includes options 'iicbus' and 'fdt'. Remove the (now) unnecessary entries.
Verified on BBB (am335x), EFIKA_MX (imx51 - by ray@), DIGI-CCWMX53 (imx53 - kernel build).
Approved by: adrian (mentor)
|
259126 |
09-Dec-2013 |
loos |
Activate the device before attempt to access any of its registers. Without this change we may end up with a panic (Fatal kernel mode data abort: 'External Non-Linefetch Abort (S)') as described in http://e2e.ti.com/support/arm/sitara_arm/f/791/t/276862.aspx.
It is now possible to bring up I2C1 and I2C2 on BBB.
Approved by: adrian (mentor)
|
259125 |
09-Dec-2013 |
loos |
Fix a few typos on the scm (control module) pin mux definitions.
Approved by: adrian (mentor)
|
259099 |
08-Dec-2013 |
loos |
Similar to r255816, fix the math for the DELAY() calculation. It was off by a really small amount because of the higher timer resolution.
Approved by: adrian (mentor) Verified on: BBB
|
259037 |
06-Dec-2013 |
loos |
Fix the pin value reading on AM335x. Because of the inverted logic it was always returning '0' for all the reads, even for the outputs. It is now known to work with gpioiic(4) and gpioled(4).
Approved by: adrian (mentor) Tested on: BBB
|
258356 |
19-Nov-2013 |
ian |
Bugfixes... the host capabilties from FDT data are stored in host.caps, not host.host_ocr, examine the correct field when setting up the hardware. Also, the offset for the capabilties register should be 0x140, not 0x240.
Submitted by: Ilya Bakulin <ilya@bakulin.de> Pointy hat to: me
|
258211 |
16-Nov-2013 |
rpaulo |
Enable the ti_mbox and ti_pruss drivers.
|
258210 |
16-Nov-2013 |
rpaulo |
Add a driver for the TI Programmable Realtime Unit Subsystem.
This is only a userland accessibility driver. It mmaps the hardware region to userland and posts interrupt notifications via kqueue.
|
258209 |
16-Nov-2013 |
rpaulo |
Add a driver for the Texas Instruments Mailbox hardware.
|
257775 |
07-Nov-2013 |
ian |
Switch to the new common bus_space-v6.c, remove the local one.
|
257669 |
05-Nov-2013 |
ian |
Call initarm_lastaddr() later in the init sequence, after establishing static device mappings, rather than as the first of the initializations that a platform can hook into. This allows a platform to allocate KVA from the top of the address space downwards for things like static device mapping, and return the final "last usable address" result after that and other early init work is done.
Because some platforms were doing work in initarm_lastaddr() that needs to be done early, add a new initarm_early_init() routine and move the early init code to that routine on those platforms.
Rename platform_devmap_init() to initarm_devmap_init() to match all the other init routines called from initarm() that are designed to be implemented by platform code.
Add a comment block that explains when these routines are called and the type of work expected to be done in each of them.
|
257660 |
04-Nov-2013 |
ian |
Move remaining code and data related to static device mapping into the new devmap.[ch] files. Emphasize the MD nature of these things by using the prefix arm_devmap_ on the function and type names (already a few of these things found their way into MI code, hopefully it will be harder to do by accident in the future).
|
257519 |
01-Nov-2013 |
ian |
The ability to do 8-bit implies 4-bit capability too. Rearrange the cases and add a fallthrough comment to make that happen.
|
257518 |
01-Nov-2013 |
ian |
TI sdhci driver improvements, mostly related to fdt data...
Use the published compatible strings (our own invention, "ti,mmchs" is still accepted as well, for now).
Don't blindly turn on 8-bit bus mode, because even though the conroller supports it, the board has to be wired appropriately as well. Use the published property (bus-width=<n>) and honor all the valid values (1,4,8).
The eMMC device on a Beaglebone Black is wired for 8-bit, update the dts.
The mmchs controller can inherently do both 1.8v and 3.0v on the first device and 1.8v only on other devices, unless an external transceiver is used. Set the voltage automatically for the first device and honor the published fdt property (ti,dualvolt) for other devices.
Thanks go to Ilya Bakulin for figuring out the voltage compatibility stuff.
|
257258 |
28-Oct-2013 |
ian |
Sweep up a bit of arm-land fallout after r257244; include necessary headers directly that are no longer available via accidental include.
|
257201 |
27-Oct-2013 |
ian |
Retire arm_remap_nocache() and the data and constants associated with it.
The only remaining user was the code that allocates bounce pages for armv4 busdma. It's not clear why bounce pages would need uncached memory, but if that ever changes, kmem_alloc_attr() would be the way to get it.
|
257200 |
27-Oct-2013 |
ian |
Remove #include <machine/frame.h> from all the arm code that doesn't really need it. That would be almost everywhere it was included. Add it in a couple files that really do need it and were previously getting it by accident via another header.
|
257199 |
27-Oct-2013 |
ian |
Remove all #include <machine/pmap.h> from arm code. It's already included by vm/pmap.h, which is a prerequisite for arm/machine/pmap.h so there's no reason to ever include it directly.
Thanks to alc@ for pointing this out.
|
254598 |
21-Aug-2013 |
ian |
Add support for uarts other than the serial console in TI OMAP SoCs.
The TI uart hardware is ns16550-compatible, except that before it can be used the clocks and power have to be enabled and a non-standard mode control register has to be set to put the device in uart mode (as opposed to irDa or other serial protocols). This adds the extra code in an extension to the standard ns8250 probe routine, and the rest of the driver is just the standard ns8250 code.
|
254593 |
21-Aug-2013 |
ian |
Make the noop clock successfully do nothing, because doing nothing and returning an error status (which the NULL method pointers caused) isn't nearly as useful.
|
254592 |
21-Aug-2013 |
ian |
Define the uart clocks so that they can be en/disabled at runtime.
|
254559 |
20-Aug-2013 |
ian |
Make the standard sdhci(4) driver work for the TI OMAP family SoCs. The MMCHS hardware is pretty much a standard SDHCI v2.0 controller with a couple quirks, which are now supported by sdhci(4) as of r254507.
This should work for all TI SoCs that use the MMCHS hardware, but it has only been tested on AM335x right now, so this enables it on those platforms but leaves the existing ti_mmchs driver in place for other OMAP variants until they can be tested.
This initial incarnation lacks DMA support (coming soon). Even without it this improves performance pretty noticibly over the ti_mmchs driver, primarily because it now does multiblock IO.
|
253971 |
05-Aug-2013 |
cognet |
Let the platform calculate the timer frequency at runtime, and use that for the omap4, instead of relying on the (wrong) value provided in the dts.
|
253830 |
31-Jul-2013 |
rpaulo |
Initialisation routines for the mailbox, spinlock and PRU-ICSS clocks.
|
253053 |
09-Jul-2013 |
rpaulo |
Improve a comment.
|
253025 |
08-Jul-2013 |
gonzo |
Add IDs for TPS65217C and TPS65217D
|
253023 |
08-Jul-2013 |
gonzo |
- AM335x requires updated soft-reset logic too
|
252913 |
07-Jul-2013 |
gonzo |
- Add USBSS driver for AM335x SoC. Driver is a wrapper around Mentors Graphic USB OTG core.
|
252863 |
06-Jul-2013 |
rpaulo |
Don't clear the SYSCONFIG register on boot.
This follows section 18.4.2.2 SD Soft Reset Flow in the TI AM335x Technical Reference Manual and seems to fix the "ti_mmchs0: Error: current cmd NULL, already done?" messages.
|
252722 |
04-Jul-2013 |
gonzo |
Add support for ePWM submodule of PWMSS
ePWM is controlled by sysctl nodes dev.am335x_pwm.N.period, dev.am335x_pwm.N.dutyA and dev.am335x_pwm.N.dutyB that controls PWM period and duty cycles for channels A and B respectively.
Period and duty cycle are measured in clock ticks. Default clock frequency for AM335x PWM subsystem is 100MHz
|
252282 |
27-Jun-2013 |
gonzo |
- Request non-cached memory for framebuffer - Properly probe/initialize syscons
|
252229 |
26-Jun-2013 |
rpaulo |
Print the 'setting internal ...' message only with bootverbose.
|
251586 |
09-Jun-2013 |
cognet |
Increase the maximum KVM available on TI chips. Not sure why we suddenly need that much, but that lets me boot with 1GB of RAM.
|
251018 |
27-May-2013 |
gonzo |
AM335x LCD controller driver with syscons support
Limitations: - Raster mode only - 24 and 32 bpp only
|
251017 |
27-May-2013 |
gonzo |
Add PWM module driver for AM335x. Only eCAS subsystem is supported
Export function to configure eCAS submodule from another drivers. It's used to control LCD panel backlight on AM335x EVM.
|
251016 |
27-May-2013 |
gonzo |
Add SCM registers definitions for AM335x platform
|
251015 |
27-May-2013 |
gonzo |
Add clock definitions for LCD controller and PWM module
|
250791 |
18-May-2013 |
kientzle |
Back out r250768 until I can further investigate why it might be causing problems with the BeagleBone Black boot.
|
250768 |
18-May-2013 |
kientzle |
Label the mmc child after the parent.
|
249586 |
17-Apr-2013 |
gabor |
- Correct mispellings of word resource
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
|
249181 |
06-Apr-2013 |
gonzo |
Properly clean "spurious interrupt" state
Suggested by: Ian Lepore
|
248407 |
17-Mar-2013 |
ian |
Add a macro that gets the physical address of a memory mapped device register from a bus space resource.
Note that this macro is just for ARM, and is intended to have a short lifespan. The DMA engines in some SoCs need the physical address of a memory-mapped device register as one of the arguments for the transfer. Several scattered ad-hoc solutions have been converted to use this macro, which now also serves to mark the places where a more complete fix needs to be applied (after that fix has been designed).
|
247463 |
28-Feb-2013 |
mav |
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.
|
247391 |
27-Feb-2013 |
gonzo |
Fix typo
|
247390 |
27-Feb-2013 |
gonzo |
- Initialize GPIO_OE register based on pinmux configuration
Although AM335x TRM states that GPIO_OE register is not used and just reflects pads configuration in practice it does control pin behavior and shoiuld be set in addition to pinmux setup
|
247259 |
25-Feb-2013 |
gonzo |
Fix off-by-one error in sanity checks
|
247252 |
25-Feb-2013 |
gonzo |
- Fix off-by-one error when returning max pin number - Fix GPIOGET for output pins. Requesting state for output pin is valid operation, get the state from TI_GPIO_DATAOUTX register
|
246850 |
15-Feb-2013 |
gonzo |
Fix copy-paste error in bus_space_unmap argument
While I'm at it - fix some style(9) issues
Submitted by: Mikael Urankar
|
246276 |
03-Feb-2013 |
kientzle |
Another overhaul of the CPSW driver for BeagleBone
Major changes: * Finally tracked down the flow control setting that seems to have been causing TX stalls and watchdog timeouts * RX and TX paths now share a lot more code * TX interrupt is no longer used; we instead GC finished tx queue entries at the bottom of the start routine. * TX start now queues fragmented packets directly; it only invokes defrag() for occasional very fragmented packets. * "sysctl dev.cpsw" dumps controller statistics and queue counts * Host Error Interrupt will give extensive debugging information if the controller chokes on the queued data.
|
246025 |
28-Jan-2013 |
dmarion |
Fix case for some signal names.
Submitted by: Emmanuel Vadot <elbarto@megadrive.org>
|
246024 |
28-Jan-2013 |
dmarion |
Filled in missing pads for AM335x / Beaglebone.
Submitted by: Emmanuel Vadot <elbarto@megadrive.org>
|
245672 |
19-Jan-2013 |
kientzle |
Clarify the error messages for unrecognized pins and muxtypes.
|
245203 |
09-Jan-2013 |
cognet |
Define IPI_IRQ_START and IPI_IRQ_END.
|
245137 |
07-Jan-2013 |
gonzo |
- Identify more devices for OMAP4 SoC (up to OMAP4470) - Whitespace fixes
|
245070 |
05-Jan-2013 |
kientzle |
Shuffle the TX underrun to work the same way as the RX underrun, as suggested by YongHyeon PYUN.
|
245064 |
05-Jan-2013 |
kientzle |
While trying to track down the root cause for TX stalls in this driver, I've also had some time to evaluate the effectiveness of different watchdog strategies.
This is the latest attempt, which consolidates all of the watchdog logic in one place and consistently detects TX stalls and resets within a couple of seconds.
|
244939 |
01-Jan-2013 |
kientzle |
Overhauled CPSW driver for TI CPSW Ethernet module (as used in AM335x SoC for BeagleBone).
Among other things: * Watchdog reset doesn't hang the driver. * Disconnecting cable doesn't hang the driver. * ifconfig up/down doesn't hang the driver * Out-of-memory no longer panics the driver.
Known issues: * Doesn't have good support for fragmented packets (calls m_defrag() on TX, assumes RX packets are never fragmented) * Promisc and allmulti still unimplimented * addmulti and delmulti still unimplemented * TX queue still stalls (but watchdog now consistently recovers in ~5s) * No sysctl monitoring * Only supports port0 * No switch configuration support * Not tested on anything but BeagleBone
Committed from: BeagleBone
|
244914 |
31-Dec-2012 |
gonzo |
PL310 driver update:
- Add pl310.disable tunable to disable L2 cache altogether. In order to make sure that it's 100% disabled we use cache event counters for cache line eviction and read allocate events and panic if any of these counters increased. This is purely for debugging purpose - Direct access DEBUG_CTRL and CTRL might be unavailable in unsecure mode, so use platform-specific functions for these registers - Replace #if 1 with proper erratum numbers - Add erratum 753970 workaround - Remove wait function for atomic operations - Protect cache operations with spin mutex in order to prevent race condition - Disable instruction cache prefetch and make sure data cache prefetch is enabled in OMAP4-specific intialization
|
243882 |
05-Dec-2012 |
glebius |
Mechanically substitute flags from historic mbuf allocator with malloc(9) flags within sys.
Exceptions:
- sys/contrib not touched - sys/mbuf.h edited manually
|
243523 |
25-Nov-2012 |
kientzle |
Fix spelling.
|
243462 |
23-Nov-2012 |
imp |
Strip trailing newline.
|
242531 |
03-Nov-2012 |
andrew |
Merge the FDT versions of initarm.
The copies of initarm used on platforms with FDT support were almost identical. The differences were pulled out into separate functions that were called by initarm.
This change merges the, now identical, copies of initarm and a few of it's support functions. This is a step towards a common kernel on ARMv6.
|
242362 |
30-Oct-2012 |
cognet |
Fix SMP build for omap4
Submitted by: Giovanni Trematerra <gianni at freebsd DOT org>
|
242191 |
27-Oct-2012 |
kientzle |
Missing paren.
Pointy hat:me
|
242125 |
26-Oct-2012 |
kientzle |
set the kernelname from the boot loader environment. This fixes kern.bootfile sysctl.
Submitted by: Giovanni Trematerra
|
242068 |
25-Oct-2012 |
kientzle |
Do proper padding of runt packets using code copied from bge(4).
Reviewed by: gnn
|
242067 |
25-Oct-2012 |
kientzle |
Refer to headers locally. This makes it a lot easier to build this driver out-of-tree.
|
241844 |
22-Oct-2012 |
eadler |
remove duplicate semicolons where possible.
Approved by: cperciva MFC after: 1 week
|
241831 |
22-Oct-2012 |
kientzle |
Don't repeat the POSTREAD dma sync.
|
241721 |
19-Oct-2012 |
kientzle |
Replace deprecated M_DONTWAIT with M_NOWAIT.
|
241572 |
15-Oct-2012 |
kientzle |
Fix an mbuf leak in cpsw driver, clean up mbuf management: * Record TX mbufs when we get them so we can release them. * Set TX/RX mbuf slots to NULL when we are no longer responsible for them * Move dma sync on RX into RX intr routine
|
241564 |
14-Oct-2012 |
kientzle |
Cut-and-paste dropped semicolon.
|
241563 |
14-Oct-2012 |
kientzle |
Name cpsw_stop to cpsw_stop_locked consistently with other functions in this file that assume locks are already held.
|
241562 |
14-Oct-2012 |
kientzle |
Return correct packet size.
|
241081 |
01-Oct-2012 |
andrew |
Remove unused variables from the OMAP ehci code.
|
240846 |
23-Sep-2012 |
andrew |
Pull out the SoC specific parts of initarm into separate functions
|
240845 |
23-Sep-2012 |
andrew |
Update different versions of physmap_init to be identical in preparation for merging them.
|
240844 |
22-Sep-2012 |
andrew |
Reduce the diff between the FDT implementations of initarm. This only touches whitespace and comments.
|
240802 |
22-Sep-2012 |
andrew |
Create a common set_stackptrs in sys/arm/machdep.c.
On single core devices set_stackptrs is only ever called with cpu = 0 in initarm and will be identical to the existing function. On SMP this needs to be implemented for sys/arm/mp_machdep.c, but the implementations are identical for each SoC.
|
240571 |
16-Sep-2012 |
jmg |
remove some unnecessary debugging statements, dead code and incorrect comment...
Reviewed by: gnn, imp
|
240518 |
14-Sep-2012 |
eadler |
Correct double "the the"
Approved by: cperciva MFC after: 3 days
|
239722 |
27-Aug-2012 |
kientzle |
Correctly fetch the MAC address.
Break down the bytes directly into the softc; the intermediate buffer isn't needed here. Break down the bytes in the correct order.
|
239690 |
25-Aug-2012 |
gonzo |
Style cleanup
|
239553 |
22-Aug-2012 |
kientzle |
After r239366, fix the ti_edma3.c driver to use the exact name as used in the FDT.
|
239362 |
18-Aug-2012 |
andrew |
Set machine correctly on ARM. This allows universe to use the correct world when building each kernel.
Reviewed by: imp
|
239283 |
15-Aug-2012 |
gonzo |
Specify architecture for assembler
|
239281 |
15-Aug-2012 |
gonzo |
Merging of projects/armv6, part 10
- Support for Texas Instruments SoCs: - AM335x - OMAP4
- Kernel configs, DTS for Beaglebone and Pandaboard
Submitted by: Ben Gray, Damjan Marion
|