mtd: atmel_nand: avoid to report an error when lookup table offset is 0.

Before this patch, we assume the whole ROM code are mapping to memory. So
it is wrong if the lookup table offset is 0.

After this patch, we can map only the lookup table of ROM code to memory
intead of the whole ROM code (about 1M). In this case, one lookup table
offset can be 0.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
mtd: atmel_nand: make pmecc-cap, pmecc-sector-size in dts is optional.

If those two are not specified in dts file, driver will find ecc requirement
in NAND ONFI parameters.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
mtd: at91: atmel_nand: for PMECC, add code to check the ONFI parameter ECC requirement.

This patch will check NAND flash's ecc minimum requirement in ONFI parameter.

1. if pmecc-cap, pmecc-sector-size is set in dts. then use it. Driver will
   print out a WARNING if the values are different from ONFI parameters.
2. if pmecc-cap, pmecc-sector-size is not set in dts, then use the value
   from ONFI parameters.
    * If ONFI ECC parameters are in ONFI extended parameter page, since we are
      not support it, so assume the minimum ecc requirement is 2 bits in 512
      bytes.
    * For non-ONFI support nand flash, also assume the minimum ecc requirement is
      2 bits in 512 bytes.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
sama5d3: reduce the lookup table size for PMECC.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
ARM: at91: sama5d3: reduce TWI internal clock frequency

There are still I2C unexpected behaviors which are solved by reducing TWI
internal frequency.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Input: atmel_tsadcc: fix compilation as a module

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Change internal SRAM memory type to "MT_MEMORY_SO"

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>