summaryrefslogtreecommitdiffstats
path: root/sys/arm
Commit message (Collapse)AuthorAgeFilesLines
* MFC r256839, r256948, r256950, r257299, r257414, r258057, r259090ian2014-05-1421-220/+3428
| | | | | | | | | | | | | | | Add configuration for the Freescale i.MX53 Quick Start Board. Add the Raspberry Pi BSC (I2C compliant) controller driver. Add Radxa Rock board (by radxa.com) support. Digi-CCWMX53: enable ffec and uart, USB. Add support for Freescale Vybrid Family VF600 Move and rename dwc otg driver to more generic one as it appears to work for rk3188 SoC based board too.
* MFC r257738, r259202, r258410, r260288, r260292, r260294, r260320, r260323,ian2014-05-1426-233/+458
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r260326, r260327, r260331, r260333, r260340, r260371, r260372, r260373, r260374, r260375 Add common bus_space tag definition shared for most supported ARMv6/v7 SoCs. Correct license statements to reflect the fact that these files were all derived from sys/arm/mv/bus_space.c. In pmap_unmapdev(), remember the size, and use that as an argument to kva_free(), or we'd end up always passing it a size of 0 In pmap_mapdev(), first check whether a static mapping exists, Convert TI static device mapping to use the new arm_devmap_add_entry(), Use the common armv6 fdt_bus_tag defintion for tegra instead of a local copy. Eliminate use of fdt_immr_addr(), it's not needed for tegra Convert lpc from using fdt_immr style to arm_devmap_add_entry() to make static device mappings. Retire machine/fdt.h as a header used by MI code, as its function is now obsolete. This involves the following pieces: - Remove it entirely on PowerPC, where it is not used by MD code either - Remove all references to machine/fdt.h in non-architecture-specific code (aside from uart_cpu_fdt.c, shared by ARM and MIPS, and so is somewhat non-arch-specific). - Fix code relying on header pollution from machine/fdt.h includes - Legacy fdtbus.c (still used on x86 FDT systems) now passes resource requests to its parent (nexus). This allows x86 FDT devices to allocate both memory and IO requests and removes the last notionally MI use of fdtbus_bs_tag. - On those architectures that retain a machine/fdt.h, unused bits like FDT_MAP_IRQ and FDT_INTR_MAX have been removed. Add #include <machine/fdt.h> to a few files that used to get it via pollution Enable the mv cesa security/crypto device by providing the required property in the dts source, and adding the right devices to the kernel config. Remove dev/fdt/fdt_pci.c, which was code specific to Marvell ARM SoCs, related to setting up static device mappings. Since it was only used by arm/mv/mv_pci.c, it's now just static functions within that file, plus one public function that gets called only from arm/mv/mv_machdep.c. Switch RPi to using arm_devmap_add_entry() to set up static device mapping. Allow 'no static device mappings' to potentially work. Don't try to find a static mapping before calling pmap_mapdev(), that logic is now part of pmap_mapdev() and doesn't need to be duplicated here. Switch a10 to using arm_devmap_add_entry() to set up static device mapping.
* MFC r260281, r260282, r260283, r260285ian2014-05-141-14/+81
| | | | | | | | | | | | | Implement OFW_BUS_MAP_INTR() in terms of the FDT PIC table Reimplement fdt_intr_to_rl() in terms of OFW_BUS_MAP_INTR() and OFW_BUS_CONFIG_INTR(). Use bus_space_map() rather than pmap_mapdev() in nexus_activate_resource(), when running on FDT systems. Unmap memory in nexus_deactivate_resource(). Remove fdt_pic_table code from MIPS, PowerPC, and x86, as it is no longer used by anything.
* MFC r260161, r260163, r260165, r260166, r260189ian2014-05-145-17/+123
| | | | | | | | | | Add polarity and level support to ARM GIC Do not attach to PCI bridges in AHCI driver Use only mapped BIOs on ARM Fix race condition in DELAY for SP804 timer.
* MFC r260092, r260093, r260121, r260180,ian2014-05-141-1/+1
| | | | | | | | | | Allow AT91_MCI_ALLOW_OVERCLOCK to be an option in kernel config files. Set the SoC name for the atmelbus name. Add support for Samsung K9F2G08U0A (256MiB SLC) NAND Comment updates.
* MFC r258359, r258742, r258845, r259936, r259640ian2014-05-1411-32/+44
| | | | | | | | | | | Apply access flags for managed and unmanaged pages properly on ARMv6/v7 Set the PGA_WRITEABLE flag when the protections indicate write access, not just when the current access is a write. Enable missing Access Flag for secondary cores on ARMv6/v7 Add identification and necessary type checks for Krait CPU cores.
* MFC r256707, r256708, r257291, r258358ian2014-05-143-12/+25
| | | | | | | | | | | | | | | | | Switch to use WBWA mappings for page tables on armv6, this is needed for SMP. Fix PTE_SYNC() for PIPT L2 caches, using the virtual address wasn't so useful. Use PTE_SYNC() for >= armv6 Spell cpu_l2cache_wb_range correctly. Fix condition that determines PMAP_NEEDS_PTE_SYNC value for ARM Use values of the correct defines to determine statement's result. ARM_ARCH_ symbols are always defined, hence only values are relevant. Avoid clearing EXEC permission bit when setting the page RW on ARMv6/v7 When emulating modified bit the executable attribute was cleared by mistake when calling pmap_set_prot().
* MFC r257170, r257171, r257172, r257240, r257278, r257279, r257280, r257281,ian2014-05-1412-280/+100
| | | | | | | | | | | | | | | | | | | | | | | | | r257282, r257332 Wait for DesignWare UART transfers completion before accessing line control Enable UART busy detection handling for Armada XP - based board Enable SATA interface on Armada XP Run mvs SATA driver on Armada XP instead of old mv_sata Retire arm_remap_nocache() and the data and constants associated with it. Remove hard-coded mappings related to Armada XP support Fix-up DTB for Armada XP registers' base according to the actual settings Change Armada XP kernel load address to the u-boot's end address Remove not working and deprecated PJ4Bv6 support Switch off explicit broadcasting of the TLB flush operations for PJ4B CPU Add missing ARMv6 CPU functions to ARM Makefile
* MFC r259517, r259518ian2014-05-143-1/+319
| | | | Add vt support for RPi. (No early stage yet.)
* MFC r258800, r258802, r258805, r258806, r258807, r258851, r258857,ian2014-05-141-28/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r259199, r259484, r259513, r259514, r259516 The kernel stack guard pages are only below the stack pointer, not above. Remove unnecessary double-setting of the thread's onfault state in copyinstr(). Open Firmware mandates that certain cross-references, in particular those in /chosen, be ihandles. The ePAPR spec makes those cross-reference phandles, since FDT has no concept of ihandles. Have the OF FDT CI module interpret queries about ihandles as cross-reference phandles. Real OF systems have an ihandle under /chosen/stdout, not a phandle. Use the right type. Rearchitect platform memory map parsing to make it less Open Firmware-centric. Remove fdtbus_bs_tag definition, which is now obsolete. The remainder of this file is also slated for future demolition. Return the correct IEEE 1275 code for "nextprop". Use the common Open Firmware PCI interrupt routing code instead of the duplicate version in dev/fdt. Configure interrupt sense based on device tree information. Simplify the ofw_bus_lookup_imap() API slightly: make it allocate maskbuf internally instead of requiring the caller to allocate it.
* MFC r257702, r257745, r257746, r257747, r257751, r257791, r257793,ian2014-05-145-35/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r257794, r257795, r257992 Teach nexus(4) about Open Firmware (e.g. FDT) on ARM and MIPS, retiring fdtbus in most cases. Make OF_nextprop() work correctly for FDT by using the libfdt fdt_next_property_offset() API. Do not panic if pmap_mincore() is called. An addendum: it is possible, though of questionable utility, for a node to have no properties at all. Add definition for the Atheros 8021 gigabit PHY. Consolidate Apple firmware hacks and improve them by switching on the presence of mac-io devices in the tree, which uniquely identifies Apple hardware. Allow OF_decode_addr() to also be able to map resources on big-endian devices. Make tsec work with the device tree present on the RB800. Be more flexible about which compatible strings to accept. This brings up the PCI Express bus on the RB800 using the firmware device tree. Rename the "bare" platform "mpc85xx", which is what it actually is, and add actual platform probing based on PVR.
* MFC r257334, r257336, r257337, r257338, r257341, r257342, r257343, r257370,ian2014-05-146-7/+8
| | | | | | | r257368, r257416 Hints-only devices should return BUS_PROBE_NOWILDCARD from their probe methods.
* MFC r256932, r256938, r256966, r256953, r256967, r256969, r257015:ian2014-05-131-4/+1
| | | | | | | | | Add a new function (OF_getencprop()) that undoes the transformation applied by encode-int. Specifically, it takes a set of 32-bit cell values and changes them to host byte order. Most non-string instances of OF_getprop() should be using this function, which is a no-op on big-endian platforms. Use the new function all over the place.
* MFC r259750, r260245: Add PPS support to the am335x timer driver.ian2014-05-121-54/+333
|
* MFC r259744, cleanups to move global vars into softc, use named values, etc.ian2014-05-121-107/+128
|
* MFC r259739, r259743: Shorten DMTIMER_->DMT_, #define all register constants.ian2014-05-121-37/+60
|
* MFC r259099: Fix a small error in calculating length of DELAY().ian2014-05-121-1/+1
|
* MFC r259126:rpaulo2014-05-101-8/+8
| | | | | | | | | 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.
* Merge r264984scottl2014-05-071-1/+0
| | | | | | | | | Retire smp_active. It was racey and caused demonstrated problems with the cpufreq code. Replace its use with smp_started. There's at least one userland tool that still looks at the kern.smp.active sysctl, so preserve it but point it to smp_started as well. Obtained from: Netflix, Inc.
* MFC r263998:tijl2014-04-151-2/+2
| | | | | Rename __wchar_t so it no longer conflicts with __wchar_t from clang 3.4 -fms-extensions.
* MFC r262408 (by ian):dim2014-03-211-0/+2
| | | | | | 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.
* MFC r262393 (by ian):dim2014-03-201-1/+1
| | | | Fix a typo _IMX51_TZICRREG_H_ -> _IMX51_TZICREG_H_ (extra R)
* MFC r262020:jhay2014-03-111-0/+2
| | | | | | | | | | | | | Make it possible to use the env kernel config file option for AVILA and CAMBRIA boards that does not use loader to load the kernel. This is basically how it was done for i386. This way tunables can also be set. For example in config file: env "/conf/AVILA.env" And in AVILA.env: vfs.unmapped_buf_allowed=0
* MRC: r260886imp2014-03-021-16/+23
| | | | | | | | | Merge only the uart_dev_at91usart.c part of this revision, since it has nothing to do with the commit log and was included by mistake there. This connects the new grab/ungrab upcalls that were revised in uart to fix mountroot>.
* MFC: r260889, r260890, r260911:imp2014-03-013-4/+75
| | | | | | | | | | | | | | | | | r260911 | imp | 2014-01-20 10:45:36 -0700 (Mon, 20 Jan 2014) | 5 lines Don't lock in the generic grab just to lock again in the specific grabs. r260890 | imp | 2014-01-19 12:39:13 -0700 (Sun, 19 Jan 2014) | 11 lines Introduce grab and ungrab upcalls. When the kernel desires to grab the console, it calls the grab functions. These functions should turn off the RX interrupts, and any others that interfere. This makes mountroot prompt work again. If there's more generalized need other than prompting, many of these routines should be expanded to do those new things. Reviewed by: bde (with reservations)
* MFC: r261884brueffer2014-02-281-1/+1
| | | | | | | Correct the order of arguments to mtx_init(). PR: 186701 Submitted by: Takanori Sawada <tak.swd at gmail.com>
* MFC r258787:eadler2014-02-041-1/+1
| | | | r258780 should not have applied to .S files.
* MFC r258779,r258780,r258787,r258822:eadler2014-02-0416-23/+23
| | | | | | | | | | | | | Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this shifts into the sign bit. Instead use (1U << 31) which gets the expected result. Similar to the (1 << 31) case it is not defined to do (2 << 30). This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases. A similar change was made in OpenBSD.
* MFC r256959:loos2014-01-235-0/+626
| | | | | | | | | | | | | | | | | | | | | | | Add the Raspberry Pi BSC (I2C compliant) controller driver. Reviewed by: rpaulo MFC r256961: Enable the build of OFW I2C bus for FDT systems. MFC r258045: As all the IIC controllers on system uses the same 'iichb' prefix we cannot rely only on checking the device unit to indentify the BSC unit we are attaching to. Make use of the device base address to identify our BSC unit. MFC r259127: Bring the RPi I2C driver in line with ti_i2c. Make it treat any slave address as a 7-bit address. Approved by: adrian (mentor)
* MFC r257127:loos2014-01-233-8/+0
| | | | | | | Remove all the instances of '#undef DEBUG' from kernel. Suggested by: rpaulo Approved by: adrian (mentor)
* Revert r252694 from stable/10 to fix instabilities seen with jemalloc + ↵adrian2013-12-271-7/+2
| | | | | | | | | dhclient/sshd. This is a direct commit to stable/10 as the VM code has changed since the stable/10 branch. PR: kern/185046
* MFC 258177:jhb2013-12-242-6/+0
| | | | | Remove an incorrectly copied and pasted clause from these license statements.
* MFC r259685:imp2013-12-231-0/+16
| | | | | | | | | | | | | | | | | | Plumb the cn_grab and cn_ungrab routines down into the uart clients. Mask RX interrupts while grabbed on the atmel serial driver. This UART interrupts every character. When interrupts are enabled at the mountroot> prompt, this means the ISR eats the characters. Rather than try to create a cooperative buffering system for the low level kernel console, instead just mask out the ISR. For NS8250 and decsendents this isn't needed, since interrupts only happen after 14 or more characters (depending on the fifo settings). Plumb such that these are optional so there's no change in behavior for all the other UART clients. ddb worked on this platform because all interrupts were disabled while it was running, so this problem wasn't noticed. The mountroot> issue has been around for a very very long time. Approved by: re@ (gjb@)
* MFC r257228:kib2013-12-172-0/+21
| | | | | Add bus_dmamap_load_ma() function to load map with the array of vm_pages.
* MFC r259212, r259220:ian2013-12-141-14/+23
| | | | | | | | | | | Fix one race and one fence post error. When the TX buffer was completely full, we'd not complete any of the mbufs due to the fence post error (this creates a large leak). When this is fixed, we still leak, but at a much smaller rate due to a race between ateintr and atestart_locked as well as an asymmetry where atestart_locked is called from elsewhere. Ensure that we free in-flight packets that have completed there as well. Also remove needless check for NULL on mb, checked earlier in the loop and simplify a redundant if.
* MFC r259038, r259039:ian2013-12-141-1/+2
| | | | | | | | | | | | | | | Bump the maximum VM space from 3 * memory size to a fixed 256MB. That's all we have room for since we map the hardware registers starting at 0xd0000000. This allows my 64MB AT91SAM9G20 to boot again after the unmmaped I/O changes were MFC'd at r251897. Other subplatforms may need similar treatment. Although not strictly required to boot a 64MB board, bump vm_max_virtual_address to be KERNVIRTADDR + 256MB. This allows some future shock protection since the KVA requirements have gone up since the unmapped changes have gone in, as well as preventing us from overlapping with the hardware devices, which we map at 0xd0000000, which we'd hit with anything more than 85MB...
* MFC r258828:ian2013-12-141-1/+1
| | | | | Add a nand flash controller driver for Atmel at91 family. Tested only on at91rm9200 so far.
* MFC r258820: Add definitions for the PIO pins found on recent AT91 SoCs.ian2013-12-141-0/+64
|
* MFC r258392, r258412:ian2013-12-1410-1/+19
| | | | | | | | | | | | Call cpu_setup() immediately after the page tables are installed. This enables data cache and other chip-specific features. It was previously done via an early SYSINIT, but it was being done after pmap and vm setup, and those setups need to use mutexes. On some modern ARM platforms, the ldrex/strex instructions that implement mutexes require the data cache to be enabled. Call cpu_setup() from the initarm() routine on platforms that don't use the common FDT-aware initarm() in arm/machdep.c.
* MFC r258393:ian2013-12-141-0/+1
| | | | Add USB_HOST_ALIGN=64; the cache line size on the am335x is 64 bytes.
* MFC r258356:ian2013-12-141-3/+3
| | | | | | 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.
* MFC r258240:ian2013-12-141-1/+2
| | | | | In the data abort handler, don't panic if kdb is available and says it handled the condition.
* MFC r257924:ian2013-12-141-4/+4
| | | | | Apparently with "const uint32_t foo = 0x60;" gcc doesn't consider 'foo' to be a constant integer suitable for use in a case label, so use #defines.
* MFC r257669, r257672, r257673, r257676, r257678:ian2013-12-1419-155/+330
| | | | | | | | | | | | | | | | | | | | | | | | | | 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. Make PTE_DEVICE a synonym for PTE_NOCACHE on armv4, to make it easier to share the same code on both architectures. Add new helper routines for arm static device mapping. The new code allocates kva space from the top down for the device mappings and builds entries in an internal table which is automatically used later by arm_devmap_bootstrap(). The platform code just calls the new arm_devmap_add_entry() function as many times as it needs to (up to 32 entries allowed; most platforms use 2 or 3 at most). Remove imx local devmap code and use the essentially identical common code that got moved from imx_machdep.c to arm/devmap.c.
* MFC r257648, r257649, r257660:ian2013-12-1333-351/+384
| | | | | | | | | | | | | | | | | Begin reducing code duplication in arm pmap.c and pmap-v6.c by factoring out common code related to mapping device memory into a new devmap.c file. Remove the growing duplication of code that used pmap_devmap_find_pa() and then did some math with the returned results to generate a virtual address, and likewise in reverse to get a physical address. Now there are a pair of functions, arm_devmap_vtop() and arm_devmap_ptov(), to do that. The bus_space_map() implementations are rewritten in terms of these. 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).
* MFC r257639:ian2013-12-132-91/+8
| | | | | | | Remove the duplicated implementations of some bus_space functions and use the essentially identical generic implementations instead. The generic implementations differ only in the spelling of a couple variable names and some formatting differences.
* MFC r257603, r257604:ian2013-12-134-3/+3
| | | | | | | | Rename WANDBOARD-COMMON to WANDBOARD.common and adjust the configs that include it accordingly. The build machinery for universe and tinderbox tries to build every kernel config whose name begins and ends with [A-Z0-9] and the common include file that has most of the options isn't buildable by itself, so the new lowercase .common will avoid building it.
* MFC r257595: Comments and style(9) only, no functional changes.ian2013-12-131-16/+15
|
* MFC r257561:ian2013-12-131-6/+2
| | | | | Bugfix: the attach routine needs to use the same table of fdt compat strings that the probe routine used.
* MFC r257557: Add a missing register definition.ian2013-12-131-0/+11
|
OpenPOWER on IntegriCloud