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
cpu/arm/k60: Add switchable support for silicon version 1.x

The file config-board.h shall define K60_CPU_REV which can be
either 1 or 2 to switch between the different CPU headers.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
cpu/arm/k60: Add clock initialization code.

This is a simple implementation of using the RTC 32k crystal
for clocking the FLL.

The clocks can be configured in config-clocks.h in the platform
directory, however, there are still several hard coded delay
constants that will be off if the frequency is changed.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
examples/mulle-clocks: Simple clock debug helper.

Useful for inspecting the clocks with an oscilloscope.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
cpu/arm/k60: Add configurable parameter for debug UART baud rate.

The parameter K60_DEBUG_BAUD in config-board.h is used in the UART
driver to determine the correct divisor and fine adjust parameters
for the UART1 module.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
cpu/arm/k60: Split UART SBR, BRFA from uart.c

Defined as macro functions UART_SBR, UART_BRFA in K60.h now.

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

Use F_BUS to compute the right timer value when waiting.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
Merge branch 'k60-cpu-cleanup' into mulle-2-7

Clean up of the Mulle platform files.
cpu/arm/k60: Add 1-wire bus driver using UART.

The driver uses UART4 but this is configurable via preprocessor
defines in onewire.c.
The driver is currently very non-thread-safe, doing simultaneous
calls to the read and write functions will make the wrong data end
up on the bus.

Supports the following 1-wire ROM commands:

 * SKIP ROM (ow_skip_rom())
 * READ ROM (ow_read_rom())
 * MATCH ROM (ow_match_rom(rom_code))

Not supported yet:

 * SEARCH ROM
 * ALARM SEARCH

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
tools/crc: Simple tool to generate CRC lookup tables.

This tool was used to generate the lookup table in the 1-wire driver in
cpu/arm/k60/drivers/onewire-crc-table.h.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
ds18b20: A driver for Dallas/Maxim DS18B20 temperature sensors using the 1-wire bus.

Currently only supports two commands:

 * CONVERT TEMPERATURE
 * READ SCRATCHPAD

Look at the datasheet on how to get the temperature from the
scratchpad data (hint: First two bytes, 2's complement, 16 bit, little
endian).

This driver is currently living in the cpu/arm/k60 directory, but
contains no platform specific code and should be able to move to
core.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>