platform/mulle/tools: rename scan_fdti -> scan_ftdi

Fixed typo in directory name.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
Merge pull request #1 from gebart/scan-ftdi-typo

platform/mulle/tools: rename scan_fdti -> scan_ftdi
Merge remote-tracking branch 'eistec/mulle-2-7' into mulle-2-7
platform/mulle: scan_ftdi build fix.

Added missing #include <stdlib.h> for EXIT_SUCCESS and EXIT_FAILURE.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
.gitignore: Add *.mulle for ignoring Mulle binaries.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
platform/mulle: Add LIS3DH accelerometer driver.

This driver is split into two parts, one platform specific part
in lis3dh-arch.c, and one platform independent part in lis3dh.c

Both parts currently live inside the platform/mulle/dev directory
but it should be possible to move the lis3dh.[ch] to a more general
directory.

Included are two examples for reading the data from the accelerometer.

- examples/lis3dh-poll is the minimal example for initializing the
   hardware and to read live samples.

- examples/lis3dh-fifo is an example for using the builtin FIFO
   for reading multiple samples in quick succession. This example
   also computes some statistics on the accelerometer data.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
platform/mulle/lis3dh: Clean up header.

Remove lis3dh_{enable,disable}_adc() which have been replaced by
lis3dh_set_aux_adc().
Add declarations of lis3dh_read_aux_adc{1,2,3} for reading the
auxiliary ADC values.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
platform/mulle/power-control: New power control API.

The power-control API provides simple wrappers to turn on and off
auxiliary power on the Mulle board.

The auxiliary power lines currently controlled by this library are:
- Vperiph
- Vsec
- Analog VDD

Vperiph is only used for onboard peripherals while AVDD and VSEC are
available in the expansion port.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
platform/mulle: Use power-control API in LIS3DH driver.

This patch replaces the explicit GPIO writes with power
control library calls to turn on Vperiph during LIS3DH
initialization.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
platform/mulle/power-control: Move board definitions into separate file.

power-control-board.h now contains all the hardware specific register names
and addresses.
power-control.h only contains the function declarations.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
platform/mulle: Move Vperiph power on from device driver to platform bring up.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
platform/mulle/contiki-conf.h: add parentheses.

Avoids silly build failures.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
platform/mulle: Move K60 cpu into ARM cpu directory.

Attempting to follow the layout of the rest of Contiki.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
cpu/arm/k60/mulle.ld: Cleaned up and added C++ sections.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
cpu/arm/k60: C version of startup code.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
cpu/arm/k60: Use C startup instead of ASM.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
cpu/arm/k60: Add Makefile support for different CPU part numbers.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
cpu/arm/k60: Clean up UART PORT initialization.

Fixes a bug where the values were copied from the wrong register
instead of clearing and setting bits within the same register.

Uses PORT_PCR_MUX macro instead of magic numbers.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
platform/mulle/lis3dh: minor comment wording change

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
cpu/arm/k60: Update CPU header with the latest available version.

Header file taken from [1]. The new revision contains some updated
register definitions that will be needed in the future.

[1]: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=K60_100