summaryrefslogtreecommitdiffstats
path: root/sys/arm/lpc
Commit message (Collapse)AuthorAgeFilesLines
* MFC r273799:loos2015-02-141-2/+2
| | | | | | | | Make the GPIO children attach to the first unit available and not only to unit 0. This fix a bug where a GPIO controller could fail to attach its children (gpioc and gpiobus) if another GPIO driver attach first.
* MFC r277454, r277460, r277465, r277466, r277467, r277469, r277470, r277471,ian2015-02-132-148/+1
| | | | | | | | | | | | | | | | | | | | | r277472, r277473, r277474, r277475, r277476, r277477, r277478, r277479, r277480, r277512, r277516: Add inline implementations of arm bus_space_read/write_N(). Revise the arm bus_space implementation to avoid dereferencing the tag on every operation to retrieve the bs_cookie value almost nothing actually uses. Use the explicit member initializer style to init the bus_space struct. Use arm/bus_space-v6.c for all armv6 systems Consolidate many identical implementations of bus_space to a single common tag and implementation shared by armv4 and armv6. Micro-optimize the new arm inline bus_space implementation by grouping all the data the inline functions access together at the start of the bus_space struct so that they all fit in a single cache line.
* MFC r266969 and r276717:hselasky2015-02-051-0/+1
| | | | | | Add 64-bit DMA support in the XHCI controller driver. - Fix some comments and whitespaces while at it. - Add support for PAE.
* MFC 262952, 262958, 262966, 262979, 262980, 262986, 262987, 262995, 262997,ian2014-05-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 263030, 263033, 263034, 263056, 263057, Remove all the redundant external declarations of exception vectors and runtime setting of the pointers that's scattered around various places. Remove all traces of support for ARM chips prior to the arm9 series. Make the default exception handler vectors point to where I thought they were already pointing: the default handlers (not a panic that says there is no default handler). Eliminate irq_dispatch.S. Move the data items it contained into arm/intr.c and the functionality it provided into arm/exception.S. Move the exception vector table (so-called "page0" data) into exception.S and eliminate vectors.S. Change the way the asm GET_CURTHREAD_PTR() macro is defined so that code using it doesn't have to have an "AST_LOCALS" macro somewhere in the file. Arrange for arm fork_trampoline() to return to userland via the standard swi_exit code in exception.S instead of having its own inline expansion of the DO_AST and PULLFRAME macros. Now that the PUSHFRAME and PULLFRAME macros are used only in the swi entry/exit code, they don't need to be macros. Except that didn't work and the whole change was reverted. Remove some unnecessary indirection and jump right to the handler functions. Use panic rather than printf to "handle" an arm26 address exception (should never happen on arm32). Remove the unreferenced DATA() macro. Remove #include <machine/asmacros.h> from files that don't need it.
* MFC r262534, r262548, r262549, r262552, r262568, r262581, r262583, r262584,ian2014-05-161-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | r262585, r262587, r262696, r262712 Replace many pasted identical definitions of cpu_initclocks() with a common implementation in arm/machdep.c. aicasm: Don't complain about missing prototypes to ease bootstrap issues. Vybrid: Add driver for Inter-Integrated Circuit (I2C). imx6: Initialize the Low Power Mode bits to keep the ARM cores running during WFI. All our current ARM multi-core systems have all cores in one package with a shared L2 cache, reflect that in the common cpu_topo() routine. mpcore timer: Supply a DELAY() implementation via weak linkage, so that SoC-specific code can supply a better implementation. imx6: Add some rudimentary voltage control. Add an armv7 implementation of cpu_sleep(). Add __used attribute so that the DELAY implementation doesn't get optimized away as unreferenced, causing linker errors when trying to resolve the weak reference to the missing function.
* MFC r261410ian2014-05-1511-0/+39
| | | | | Follow r261352 by updating all drivers which are children of simplebus to check the status property in their probe routines.
* MFC r261252, r261279, r261304, r261305, r261322, r261336, r261337, r261338,ian2014-05-151-1/+0
| | | | | | | | | | | | | | | | | r261353 Fix the name of the dts file for the HL201... When mapping an address, the bsh needs the same offset we do for other things. Add explicit depends on bus_if.h and device_if.h to avoid a chicken and egg problem in some compilation environments. Switch to using PAs rather than VAs for the addresses we map for devices. This is a nop, except for what's reported by atmelbus for the resources. Comment cleanups. Move things around for diff reduction against FDT work.
* MFC r257738, r259202, r258410, r260288, r260292, r260294, r260320, r260323,ian2014-05-144-38/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 r258779,r258780,r258787,r258822:eadler2014-02-042-4/+4
| | | | | | | | | | | | | 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 r257127:loos2014-01-232-6/+0
| | | | | | | Remove all the instances of '#undef DEBUG' from kernel. Suggested by: rpaulo Approved by: adrian (mentor)
* MFC r257669, r257672, r257673, r257676, r257678:ian2013-12-141-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-131-2/+3
| | | | | | | | | | | | | | | | | 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 r257258, r257265: Include headers (if_var.h and others) where needed.ian2013-12-131-0/+1
| | | | | | The change that triggered the need for this on head was r257244. That hasn't been MFC'd yet, but there's no harm in paving the way for it with this MFC.
* MFC r257201, r257202ian2013-12-131-1/+1
| | | | Retire arm_remap_nocache() and the data and constants associated with it.
* MFC r257199, r257200, r257217:ian2013-12-136-7/+0
| | | | | | | | | | | | | | | 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. 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. Remove the last dregs of trapframe_t. It turns out only arm was using this type, so remove it to make arm code more consistant with other platforms.
* MFcalloutng:mav2013-02-281-20/+12
| | | | | | | 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.
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-051-1/+1
| | | | | | | | | malloc(9) flags within sys. Exceptions: - sys/contrib not touched - sys/mbuf.h edited manually
* Fix typo; s/ouput/outputkevlo2012-11-071-1/+1
|
* Merge the FDT versions of initarm.andrew2012-11-031-503/+9
| | | | | | | | | 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.
* Merge r242125 into the other ARMv6 copies of initarm.andrew2012-10-311-0/+5
|
* Move the call to platform_gpio_init() into initarm_gpio_init() to reduceandrew2012-10-301-5/+5
| | | | the diff to the other FDT versions of initarm.
* Create the new initarm_ functions to reduce the diff to the other FDTandrew2012-09-261-11/+25
| | | | versions of initarm
* Use arm_dump_avail_init to build the dump_avail arrayandrew2012-09-261-6/+1
|
* Start to clean up the lpc initarm as it also uses FDT.andrew2012-09-261-12/+18
|
* Update different versions of physmap_init to be identical in preparationandrew2012-09-231-3/+13
| | | | for merging them.
* Reduce the diff between the FDT implementations of initarm.andrew2012-09-221-4/+4
| | | | This only touches whitespace and comments.
* Create a common set_stackptrs in sys/arm/machdep.c.andrew2012-09-221-11/+2
| | | | | | | 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.
* Set machine correctly on ARM. This allows universe to use the correct worldandrew2012-08-181-0/+1
| | | | | | when building each kernel. Reviewed by: imp
* Switch lpc initarm() to use struct arm_boot_params and therefore fixjceel2012-08-151-33/+7
| | | | | | EA3250 kernel build. Approved by: gonzo
* Merging of projects/armv6, part 8gonzo2012-08-1520-0/+6692
r235162: Initial LPC32x0 support. Includes DTS file for Embedded Artists EA3250 board. Peripherals currently supported: - Serial ports - Interrupt controller - Timers - Ethernet - USB host - Framebuffer (in conjunction with SSD1289 LCD controller) - RTC - SPI - GPIO Submitted by: Jakub Wojciech Klama <jceel@freebsd.org>
OpenPOWER on IntegriCloud