Commit Graph

77 Commits

Author SHA1 Message Date
Ian Lepore
88b80af731 Add -march=armv7a to the kernel compile for all ARM systems which are v7a.
Submitted by:	Michal Meloun <meloun@miracle.cz>
2014-12-21 23:48:32 +00:00
Luiz Otavio O Souza
667357dc9b Moves all the duplicate code to a single function.
Verify for invalid modes and unwanted flags before pass the new flags to
driver.
2014-11-18 17:22:08 +00:00
Luiz Otavio O Souza
8839e0e9f3 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.
2014-10-28 18:33:59 +00:00
Ian Lepore
752ba93078 Rename OF_xref_phandle() to OF_node_from_xref() and add a new function
that provides the inverse translation, OF_xref_from_node().

Discussed with:	nwhitehorn
2014-09-01 18:51:01 +00:00
Ruslan Bukin
484b4fd46c Rename i.MX I2C driver file. 2014-07-22 03:59:14 +00:00
Ruslan Bukin
b9402e3d56 Add very basic driver for 12-bit Analog to Digital Converter (ADC). 2014-06-15 12:08:33 +00:00
Ruslan Bukin
2aaaabd4c1 Add a driver for Serial Peripheral Interface (SPI). 2014-06-11 10:03:06 +00:00
Andrew Turner
27521ff8e4 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@
2014-05-17 11:27:36 +00:00
Ruslan Bukin
3d0bf6b1d0 Fix return value. Should be logic one or zero. 2014-05-15 10:06:59 +00:00
Ruslan Bukin
876ac29ddc Fix typo. 2014-05-14 14:19:57 +00:00
Ian Lepore
5e4e1d4995 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.
2014-03-10 18:10:09 +00:00
Ruslan Bukin
bcec4b54f3 - Export panel info to DTS
- Reset all the layers before setup first one
- Enable display
2014-03-07 16:14:51 +00:00
Ruslan Bukin
0c94becea6 Add driver for Port control and interrupts (PORT).
PORT is responsible for external interrupts management,
so move IRQ lines from GPIO driver.
2014-03-07 07:06:36 +00:00
Ruslan Bukin
9e04ee7729 Do not setup interrupt handler (polling is used). 2014-02-27 18:13:07 +00:00
Ruslan Bukin
6c68693129 Add driver for Inter-Integrated Circuit (I2C). 2014-02-27 09:59:15 +00:00
Ruslan Bukin
ee270bbca3 - 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
2014-02-25 17:02:11 +00:00
Ruslan Bukin
0beadc3c1c - Decrease buffer size.
- Handle eDMA interrupt on running channel only.
2014-02-16 19:21:44 +00:00
Ruslan Bukin
586a16c431 Add driver for Synchronous Audio Interface (SAI).
SAI supports full-duplex serial interfaces with frame
synchronization such as I2S, AC97, TDM, and codec/DSP
interfaces.
2014-02-16 16:49:54 +00:00
Ruslan Bukin
896fc918b1 Add function for configuring PLL4 (Audio) clock frequency output. 2014-02-13 06:38:01 +00:00
Ruslan Bukin
f3a72e40b5 Add drivers for:
- Enhanced Direct Memory Access Controller (eDMA)
- Direct Memory Access Multiplexer (DMAMUX)
2014-02-08 19:47:59 +00:00
Ruslan Bukin
8c7da46079 o Add prototype for tcon_bypass() used by dcu4
o Add register definition
2014-02-02 21:10:40 +00:00
Ruslan Bukin
bb8bc226d3 Add driver for Display Control Unit (DCU4). 2014-02-02 20:25:27 +00:00
Ian Lepore
add35ed5b8 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.
2014-02-02 19:17:28 +00:00
Ruslan Bukin
bf636ac469 o Expand device tree information
o Export iomuxc (pins) configuration to DTS
o Allow devices to assign clocks in DTS
2014-02-02 17:48:06 +00:00
Andrew Turner
979d76c948 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
2014-01-28 09:12:04 +00:00
Eitan Adler
7a22215c53 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.

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.

Discussed with:	-arch, rdivacky
Reviewed by:	cperciva
2013-11-30 22:17:27 +00:00
Ruslan Bukin
5c263f43ef Add support for Freescale Vybrid Family VF600 heterogeneous
ARM Cortex-A5/M4 SoC (M4 core is not used in this work).

Support includes device drivers for:
- NAND Flash Controller (NFC)
- USB Enhanced Host Controller Interface (EHCI)
- General-Purpose Input/Output (GPIO)
- Universal Asynchronous Receiver/Transmitter (UART)

Also supported:
- Generic Interrupt Controller (GIC)
- MPCore timer
- ffec ethernet driver

Reviewed by:	ray
Approved by:	cognet (mentor)
2013-11-12 18:02:56 +00:00