lm4f: Add lm4f support files copied from lm3s

Create lm4f code infrastructure from the lm3s infrastructure.

As far as the interrupt table is concerned, don't create an irq.yaml. Just
include the LM3S nvic.h. The LM3S vector table seems to be compatible with the
LM4F

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
lm4f: Add exammple for Stellaris Launchpad board

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
lm4f: Remove erroneous references to lm3s

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
lm4f: Fix problems with example Makefile.include

Fix three distinct issues were present with
examples/lm4f/Makefile.include:
1. Architecture flags were not being passed to the linker. This caused the linker
to link against the wrong libraries when trying to use any C library, causing
hard faults.
2. -lc and -lnosys were not linked against. Try using printf() without -lnosys
3. The makefile erroneously specified -mcpu=cortex-m3 instead of m4.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
lm4f: Compile with FPU support

Specify the -mfloat-abi=hard and -mfpu=fpv4-sp-d16 flags so that FPU
is enabled by default.
While this compiles with FPU support, in order to use the floating point types,
the FPU must be explicitly enabled at runtime.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
lm4f: Compile in the interrupt vector table

Add an "#ifdef(LM4F)" clause to include/libopencm3/dispatch/nvic.h
and lib/dispatch/vector_nvic.c. This compiles in the vector table
and allows interrupts to be used.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
lm4f: Add system control register definitions

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
lm4f: Update stellaris example to new LM4F registers

The LM4F provides new registers for system control. Each peripheral
now has its own clock gating control register. The LM4F still supports
the legacy registers for backwards compatibility.

Use SYSCTL_RCGCGPIO instead of SYSCTL_RCGC to enable the GPIO.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
lm4f: Add API for enabling/disabling peripherals clock source

The enum definitions are specified in the form
 31:5 register offset from SYSCTL_BASE for the clock register
 4:0  bit offset for the given peripheral

The names have the form [clock_type]_[periph_type]_[periph_number]
Where clock_type is
     RCC for run clock
     SCC for sleep clock
     DCC for deep-sleep clock

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
lm4f: Add UART register definitions

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
lm4f: Add UART function prototypes

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
lm4f: Add UART "convenience" macros

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
lm4f: Add basic UART implementation

Add basic functionality needed to setup the UART and send/recieve
data.
Interrupts, DMA, and more advanced features are not implemented in
this patch.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
lm4f: Add basic UART echo example

Nothing fancy, just a demonstration of the blocking send and
recieve.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
lm4f: Use typedef's enum for UART parameters

typedef the enums used for the uart.
For example, change
enum uart_flowctl {
	UART_FLOWCTL_NONE,
	UART_FLOWCTL_SOFT,
	UART_FLOWCTL_HARD,
};

to:
typedef enum  {
	UART_FLOWCTL_NONE,
	UART_FLOWCTL_SOFT,
	UART_FLOWCTL_HARD,
} uart_flowctl_t;

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
lm4f: Modify uart example to use new clock API

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
lm4f: Fix UART bit definitions

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
lm4f: Implement UART Rx and Tx interrupt enable/disable

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
lm4f: Add USB register definitions

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>