RT71635 Changes in the SmartFusion SPI driver to make it work on A2F500.
Also, enhance the platform- & board-specific SPI device registration.
RT71635 Changes in the SmartFusion SPI device driver to make use
of readl/writel instead of direct accesses to hardware registers.
RT71635 While testing the updated SmartFusion SPI driver on the A2F200,
discovered a certain defect in the code. Fixed it.
RT80778 Disable CONFIG_MPU on K70.
RT80459 Minor cosmetic change in the SmartFusion I2C driver.
RT79296. lpc178x: Fix build of SD card driver (drivers/mmc/host/mmci.c)

The macro "_BIT" defined in mach/hardware.h is used in dmac.h.
RT80495. kinetis power: Export function kinetis_periph_enable() to call it from kernel modules

We want to call the function kinetis_periph_enable() from the Kinetis
ADC driver (drivers/char/kinetis_adc.c) which can be built as a loadable
kernel module.
RT80495. kinetis: Add ADC driver for one-shot measurements

 * Put all the driver code in linux/drivers/char/kinetis_adc.c.
 * It is possible to build the driver as a kernel module
(kinetis_adc.ko). Set CONFIG_KINETIS_ADC=m (instead of =y) in
the kernel configuration to build the ADC as a kernel module.
 * A single character device (/dev/adc) will be used to access any of
the 4 ADC modules (ADC0, ADC1, ADC2, ADC3).
 * Use the "misc device" kernel framework to register the device file
for the ADC. The "misc device" class already implements default
open() and close() system calls for struct file_operations, so that
our driver does not need to implement them.
 * The fixed character device numbers 10:245 (major=10, minor=245) will
be used for the device-based interface to the ADCs. We do not use
dynamic device number allocation, because it would require dynamic
creation of device files in /dev/*.
 * To identify all analog inputs that can be possibly connected to an ADC
module, we introduce a logical channel index built of:
    1. The 5-bit ADC channel index (SC1n[ADCH]). We store these 5 bits
in the least-significant 5 bits of the logical channel index.
    2. The selection between ADxxa and ADxxb channels that can be coded
in one bit - 0 stands for ADxxa, 1 stands for ADxxb. This bit will be
written to the register field ADCx_CFG2[MUXSEL] by the ADC driver. We
store this single bit in the 5th bit of the logical channel index.
 * All ADC operations are done using ioctl() system calls from the
user-space. The following ioctl() commands are available:
    1. IOCTL_KINETISADC_ENABLE_ADC/IOCTL_KINETISADC_DISABLE_ADC. Enable
or disable a given ADC module (ADC0, ADC1, ADC2 or ADC3). When enabling
an ADC module, it will be automatically calibrated by the ADC driver.
    2. IOCTL_KINETISADC_MEASURE. Make a single (one-shot) measurement
of a given analog input signal (identified by logical channel index, 0..63)
using a given ADC module (identified by the ADC module index, 0..3).
Return the measurement result to the user-space. The ADC module must be
previously enabled.
 * When making a measurement using the ioctl() call, the call will block
until the measurement result is ready.
 * The measurement result will be returned to the user-space in 16-bit
binary format.
 * Only one-shot software triggering of ADC are used, because we
only need to make single measurement at the time of ADC requests from
the user-space. Therefore, the PDB (Programmable Delay Block) of the
Kinetis K70 is not be used.
 * Only single-ended (i.e. relative to the MCU's analog ground) signal
measurement, no support for differential ADC input signals.
 * The channel B of ADC modules is never used by the driver.
 * Do not use interrupts from ADC modules, use busy loops instead. This
is OK, because ADC module calibration takes a few milliseconds, and a
single measurement takes a fraction of a millisecond (when ADC clock
is set the 1/8 of Bus clock; 32-sample averaging is enabled).
 * We use the Bus Clock (Peripheral Clock) as the source clock for ADC
modules. The Bus Clock rate is 60MHz on 120MHz MCUs and 75MHz on
150MHz MCU. We have to divide it by 8 (see register field
ADCx_CFG1[ADIV]), otherwise the ADC clock will exceed the maximum
rate of 12MHz.
 * We enable the "Long sample time" configuration (see the register field
ADCx_CFG1[ADLSMP]) for better accuracy.
 * We disable "Low-power configuration" (ADCx_CFG1[ADLPC]) and enable "High
speed configuration" (ADCx_CFG2[ADHSC]), because these options are
required for measurements at high ADC clock rates.
 * The ADC module calibration algorithm is described in the K70
Reference Manual in section Calibration function.
 * No support for the Programmable Gain Amplifier (PGA).
RT80044. kinetis clock: Fix LCD clock rate approximation algorithm

This algorithm was failing for {base=150MHz, clock=10MHz} - it returned
"1/15" instead of "15/1".
RT81519. a2f timer: Compact the structure "mss_timer"
RT81519. a2f debug-macro.S: Load MSS_UART0_BASE to CPU register as indirect constant

The former "mov" instruction does not work for non-trivial constants
like 0x40010000.
RT81519. Basic M2S-SOM support (merge from draft tree).
RT81519. m2s timer: Fix IRQ number for Timer1
RT81519. m2s timer: Enable MSS timers before initializing them

This change is required to make the timers work. Linux kernel did not
boot up without this change.
RT81519. m2s: Update the machine type ID for SmartFusion2
RT81519. SF2 SPI: preliminary driver implementation

Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
RT81519. m2s-som: MTD partitions on SPI Flash

Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
RT81519. SF2 SPI: fix-up xfers of >=64KB size

Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
RT81519. SF2 SPI: fix-up 'Section mismatch' compilation warning

Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
RT81519. m2s: Add eNVM driver for SmartFusion2

 * eNVM size is 256KB on M2S050, therefore it is not necessary to
support the eNVM1 controller (which is missing on our chip) for now.
 * Reuse drivers/char/envm_if.c from A2F.
 * Create drivers/char/m2s_mss_envm.c as a copy of
drivers/char/mss_envm.c. Import code for writing to eNVM from U-Boot
(u-boot/cpu/arm_cortexm3/m2s/envm.c).
 * When built as a kernel module, the eNVM driver will be named
envm_m2s.ko.