r262482, r262483, r262531,
Move the declaration for mpentry() into a header file instead of pasting
it into a bunch of different .c files.
If the L2 cache type is PIPT, pass a physical address for a flush.
Actually set the proper bit to indicate TTB shared memory.
Add a new cache maintenance function, idcache_inv_all, to the table, and
implementations for each of the chips we support.
Invalidate caches immediately upon entry to init_secondary(). Also set
the Bufferable bit in the PDE entries of the secondary processor startup
pagetables.
Add the bits needed to run SMP on imx6.
Invalidate the SCU cache tag ram on all 4 cores, not just 1-3.
Minor tweaks to the imx GPT timer
Vybrid enhancements...
- Pin configuration is a complete iomux register now and includes
drive strength, pull mode, mux mode, speed, etc.
- Add i2c devices to the tree
- Add IPG clock
- Add support for Quartz Module.
- Pin configuration is a complete iomux register now and includes
drive strength, pull mode, mux mode, speed, etc.
- Add i2c devices to the tree
- Add IPG clock
r262355, r262419,
Add Vybrid driver for Synchronous Audio Interface (SAI).
Decrease SAI buffer size. Handle eDMA interrupt on running channel only.
Give the physmem fdt helper routines static linkage since no global
definition of them is provided anywhere.
Add imx6 early printf support, wrapped in #if 0 because it's rarely needed.
Add basic cpu frequency control and temperature monitoring to imx6_anatop.
Add the FREEBSD_BOOT_LOADER option so that a loaded DTB passed in from
ubldr will actually get used.
Create a generic IMX6 kernel config, then fix it to have an ident line.
Don't force imx6 bootverbose on anymore, it can be set from ubldr now.
r261955, r261958,
Add a driver to provide access to imx6 on-chip one-time-programmble data.
Make it possible to access the ocotp registers before the ocotp device
is attached, by establishing a temporary mapping of the registers when
necessary.
It turns out Freescale cleverly made the ocotp device compatible across
several different families of SoCs, so move it to the freescale directory
and prefix everything with fsl rather than imx6.
Convert the imx6 sdhci "R1B fix" from a busy-loop in the interrupt handler
to a callout.
Increase the wait time for acquiring the SD bus from 10 to 250ms.
If no compatible cards were found after probing the SD bus, say so.
Add timeout logic to sdhci, separate from the timeouts done by the hardware.
After a timeout, reset the controller using SDHCI_RESET_CMD|SDHCI_RESET_DATA
rather than SDHCI_RESET_ALL; the latter turns off clocks and power, removing
any possibility of recovering from the error.
Add a helper routine to depth-search the device tree for a node with a
matching 'compatible' property.
Always clear L1 PTE descriptor when removing superpage on ARM
Invalidate L1 PTE regardles of existance of the corresponding l2_bucket.
Ensure proper TLB invalidation on superpage promotion and demotion on ARM
Base pages within newly created superpage need to be invalidated so that
new mapping is "visible" immediately after creation.
Fix superpage promotion on ARM with respect to RO/RW and wired attributes
Avoid redundant superpage promotion attempts on ARM
Remove spurious assertion from pmap_extract_locked() on ARM
Handle pmap_enter() on already promoted mappings for ARMv6/v7
r261848, r261855
On armv6 and later, use the WriteNotRead bit of the fault status register
to decide what protections are required by the faulting access.
Use the right symbols for determining arm architecture. Include the
necessary header file which has the new FAULT_WNR symbol defined in it.
Allow the kernel to be loaded at any 1MiB address. This requirement is
because we use the 1MiB section maps as they only need a single pagetable.
Add function for configuring Vybrid PLL4 (Audio) clock frequency output.
imx6 changes ...
- Fix the definition of the SDHCI_STATE_DAT and SDHCI_STATE_CMD fields,
and add SDHCI_RETUNE_REQUEST. None of these are actually used in the
code yet.
- Write translation code for the SDHCI_PRESENT_STATE register.
Freescale moved some bits around in their version of the register,
adjust things so that the sdhci code sees the standard layout.
- Add standard non-removable and cd-gpios properties to the usdhc
devices. That generates references to gpio devices, so uncomment them
even though there isn't a gpio driver to do anything with them yet.
- Add handling of standard "non-removable" property, and also some
workaround code so that if card detect is wired to a gpio pin, for now
we just treat it the same as non-removable (because there isn't a gpio
driver yet).
- Enable both sdcard slots, but not the sdio-based wifi that we don't
yet have a driver for.
- Remove a couple obsolete function declarations.
Rework the EARLY_PRINTF mechanism. Instead of defining a special eprintf()
routine, now a platform can provide a pointer to an early_putc() routine
which is used instead of cn_putc(). Control can be handed off from early
printf support to standard console support by NULLing out the pointer
during standard console init.
Convert two while(1); statements into proper panics.
r261689, r261690, r261783, r261791, r261836, r261837, r261841,
Add FDT matching code to AT91 device drivers.
Better nomatch messages: include compat string. Also, flag devices as
disabled in the successful probe message, but leave what that means to
the actual driver (no semantic changes).
Fix Embest board name and id.
Honor the disabled status by only grabbing resources and returning
when running under FDT in the AT91 SPI driver.
r261676, r261677, r261698, r261778
Consolidate code related to setting up physical memory configuration into
a new physmem.c file.
Replace compile-time constant KERNPHYSADDR with abp_physaddr
Calculate the kernel's load address from the PC in the elf / gzip
trampoline instead of relying on KERNPHYSADDR as a compile-time constant.
It turns out a global variable is the only straightforward way to
communicate the kernel's physical load address from where it's known in
initarm() into cpu_mp_start() which is called from non-arm code and
takes no parameters.
Remove the now unused MMU_INIT macro.
Use vm_paddr_t, not vm_offset_t, when dealing with physical addresses.
No need to set physmem in each initarm() instance anymore, it's handled
in common code now.
Pass the pagetable used from locore.S to initarm to allow it to map data
in as required.
Fix the physmem exclude-region clipping logic for the edge-trim case.
Add some extra debugging output when DEBUG is defined.
Update legacy platforms to use new arm_physmem helper routines.
Don't create a distinct free page pool for segregating allocations that are
accessed through the direct map unless the kernel configuration actually
includes a direct map. Only a few configurations do, and for the rest the
unnecessary free page pool is a small pessimization.
Remove the ARM_USE_SMALL_ALLOC option and code related to it.
Remove FreeBSD 6 support from atmel usb controllers.
Add Vybrid drivers for:
- Enhanced Direct Memory Access Controller (eDMA)
- Direct Memory Access Multiplexer (DMAMUX)
In cf_get_method, when we don't already know what clock speed the CPU is
running at, guess the nearest value instead of looking for a value within
25 MHz of the observed frequency.
Prior to this change, if a system booted with Intel Turbo Boost enabled,
the dev.cpu.0.freq sysctl is nonfunctional, since the ACPI-reported
frequency for Turbo Boost states does not match the actual clock frequency
(and thus no levels are within 25 MHz of the observed frequency) and the
current performance level is read before a new level is set.
Relnotes: Bug fix in power management on CPUs with Intel Turbo Boost
r256871:
Implement watchdog function and register it with watchdog list.
r259034:
Make the sysctl node read-only.
r266010:
Remove extra newlines.
No functional changes.
Revert r260440 (add USB_HOST_ALIGN to all configs, it's only needed for
platforms with a 64-byte cacheline size).
Add option USB_HOST_ALIGN=64 for all SoCs that have 64 byte cache lines.
r261596, r261606
Add the imx sdhci controller.
Move Open Firmware device root on PowerPC, ARM, and MIPS systems to
a sub-node of nexus (ofwbus) rather than direct attach under nexus. This
fixes FDT on x86 and will make coexistence with ACPI on ARM systems easier.
SPARC is unchanged.
Add the missing ')' at end of sentence. Reword it to use a more common idiom.
Pass the kernel physical address to initarm through the boot param struct.
Make functions only used in vfp.c static, and remove vfp_enable.
Fix __syscall on armeb EABI. As it returns a 64-bit value it needs to
place 32-bit data in r1, not r0. 64-bit data is already packed correctly.
Use abp_physaddr for the physical address over KERNPHYSADDR. This helps us
remove the need to load the kernel at a fixed address.
Remove references to PHYSADDR where it's used only in debugging output.
Dynamically generate the page table. This will allow us to detect the
physical address we are loaded at to change the mapping.
Don't call device_set_ivars() for the mmchs
Change the way pcpu and curthread are stored per-core
Invalidate cachelines for bounce pages on PREREAD too, there may still be
stale entries from a previous transfer.
Only use the CPU ID register if SMP is defined. Some non-MPCore armv6 cpu,
such as the one found in the RPi, don't have it, and just hang when we try
to access it.
Add support for Colibri VF50 Evaluation Board.
Add driver for Display Control Unit (DCU4).
Add prototype for tcon_bypass() used by dcu4.
Add register definition.
r259125:
Fix a few typos on the scm (control module) pin mux definitions.
r264019:
Fix some of the style(9) problems on ti_gpio.
Remove redundant code and declarations.
r264083:
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().
r264153:
- 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.
r264197:
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 is needed.
o Expand device tree information
o Export iomuxc (pins) configuration to DTS
o Allow devices to assign clocks in DTS
o Split kernel configuration to chip common and board specific parts.
r265012:
Fix the gpio-specifier decoding by respecting the GPIO controller's
#gpio-cells property.
Add a new ofw_bus method (OFW_BUS_MAP_GPIOS()) that allows the GPIO
controller to implement its own mapping to deal with gpio-specifiers,
allowing the decoding of gpio-specifiers to be controller specific.
The default ofw_bus_map_gpios() decodes the linux standard (#gpio-cells =
<2>) and the FreeBSD standard (#gpio-cells = <3>).
It pass the gpio-specifier flag field to the children as an ivar variable so
they can act upon.
r265191:
Remove unnecessary headers. Sort out the headers. Add a missing header on
ofw_gpiobus.c (it was working because of sys/libkern.h).
r265289:
eally sort out the headers.
sys/systm.h must always come after sys/param.h.
Remove sys/types.h which should never be included together with sys/param.h.
Add sys/malloc.h for correctness even if it seems to don't be needed.
Remove more unused headers found by unusedinc (from bde@).
r265310:
Move gpiobus routines to dev/gpio. Avoid polluting ofw_bus with bus
specific parts.
r261405
Open Firmware interrupt specifiers can consist of arbitrary-length byte
strings and include arbitrary information (IRQ line/domain/sense). When the
ofw_bus_map_intr() API was introduced, it assumed that, as on most systems,
these were either 1 cell, containing an interrupt line, or 2, containing
a line number plus a sense code. It turns out a non-negligible number of
ARM systems use 3 (or even 4!) cells for interrupts, so make this more
general.
Provide a simpler and more standards-compliant simplebus implementation to
get the Routerboard 800 up and running with the vendor device tree. This
does not implement some BERI-specific features (which hopefully won't be
necessary soon), so move the old code to mips/beri, with a higher attach
priority when built, until MIPS interrupt domain support is rearranged.
Allow nesting of simplebuses.
Add a set of helpers (ofw_bus_get_status() and ofw_bus_status_okay()) to
process "status" properties of OF nodes.
Fix one remnant endian flaw in nexus.
Add the ability to set a minimum ashift size for ZFS pool creation or root level
vdev addition.
Change max_auto_ashift sysctl to error when an invalid value is requested instead
of silently limiting it.
Sponsored by: Multiplay
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.
r261844, r261845, r261846, r262194, r262522, r262559
r258046:
Fix a typo on a comment in ofw_bus_if.m, the default method will return -1
when a node doesn't exist.
r258047:
Move the KASSERT() check to the point before the increase of number of pins.
r258050:
Fix gpiobus to return BUS_PROBE_GENERIC insted of BUS_PROBE_SPECIFIC (0) so
it can be overriden by its OFW/FDT version.
Give a chance for GPIO devices that implement the device_identify method to
attach.
r259035:
Remove unnecessary includes and an unused softc variable. While here apply
two minor style(9) fixes.
r259036:
Move the GPIOBUS_SET_PINFLAGS(..., ..., pin, GPIO_PIN_OUTPUT) to led(4)
control callback function. This makes gpioled(4) works even if the pin
is accidentally set to an input.
r259037:
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).
r261842:
Add an OFW GPIO compatible bus. This allows the use of the DTS files to
describe GPIO bindings in the system.
Move the GPIOBUS lock macros to gpiobusvar.h as they are now shared between
the OFW and the non OFW versions of GPIO bus.
Export gpiobus_print_pins() so it can also be used on the OFW GPIO bus.
r261843:
Add OFW support to the in tree gpio compatible devices: gpioiic(4) and
gpioled(4).
Tested on RPi and BBB (using the hardware I2C controller and gpioiic(4) for
the I2C tests). It was also verified for regressions on RSPRO (MIPS/ar71xx)
used as reference for a non OFW-based system.
Update the gpioled(4) and gpioiic(4) man pages with some details and
examples about the FDT/OFW support.
Some compatibility details pointed out by imp@ will follow in subsequent
commits.
r261844:
Allow the use of OFW I2C bus together with iicbb(4) on OFW-based systems.
This change makes ofw_iicbus attach to iicbb(4) controllers in addition to
the already supported i2c host bridges (iichb).
On iicbb(4) allow the direct access of the OFW parent node by its children,
so they can be directly attached to iicbb(4) node on the DTS without the
need of describing the i2c bus.
r261845:
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.
r261846:
Make the gpioled(4) work out of the box on BBB.
Add gpioled(4) to BEAGLEBONE kernel and add the description of the four
on-board leds of beaglebone-black to its DTS file.
r262194:
Remove an unnecessary header.
r262522:
Fix make depend for iicbus.
r262559:
Inspired by r262522, fix make depend. This fixes the build of gpio modules.
Fix gcc with -Wstrict-prototypes by telling it bi_emac takes no
parameters.
Bus space handles need to be the VA of the requested resource, not the
rounded page VA. Correct so the DBGU device can be mapped for FDT
console since it isn't on a page boundary.
Make early printf output nicer by inserting a carriage return before
any linefeeds that are output.
Before resetting the USART, delay a bit to allow the transmitter to
finish the current character to drain to avoid glitching. Also,
simplify the code a smidge.
Remove extra parens to silence clang warning.
Add Atmel serial drivers.
uart clock-frequency is a FreeBSD-specific extention. Make it optional and
allow the client uart drivers to decide if a frequency is required.
Remove redundant declaration for uart devclass.
Commit some unrelated, but harmless, FDT ifdefs.
Add at91 NAND support, Fix comment.
Remove obsolete options and fix comments
Provide a simplified way to specify GPIO pins for the Atmel port.
Add at91 data so we can convert a PIO unit number into a base address.
Add at91 standard memory controller helper functions.
Generalize AT91 NAND support a bit.
Connect NAND for the SAM9260EK eval board, as well as the HotE HL-201.
Add nand device and NANDFS into the mix for those at91 boards that have
support for it at the moment.
Add option USB_HOST_ALIGN to configs that contain 'device usb'.
Update dts files of Cubieboard1,2 to use 1GB memory.
Add a function to print the contents of the static device mapping table,
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.
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.
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.
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.
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.
Delete echoed doesn't rub out the previous character, so always
use <backspace> <space> <backspace> instead. This fixes hitting
DELETE instead of BACKSPACE at mountroot> prompt.
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.
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().
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