5series: remove EMBEST from condition of revA cpu module

NAND flash was configured differently on revA modules. It was true for every
vendor and not just for Embest: we remove this condition from tests.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
RSTC_KEY_UNLOCK: use defined magic value

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
at91sam9x5ek: AT91C_DDRC2_EBISHARE bit cleared in DDR configuration

Comment about the use of AT91C_DDRC2_EBISHARE bit in DDR controller
configuration and the reason why it is cleared when considering the
AT91SAM9x5-EK board case.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
MMC: BUG: fix the operand of CMD1 command of MMC

The operand of CMD1 command should be the required VDD voltage window
as Table 41 - OCR register definitions of JESD84-A441

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Tested by: Ke Allen <Allen.Ke@atmel.com>
NAND Flash: add two hynix chip information to the nand_ids table

HY27UF082G2A: 0xadda
HY27UF162G2A: 0xadca

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
OneWire: Fix the OneWire Mapping of difference between at91sam9x5ek and sama5d3xek

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
OneWire: align the board revision print message to SAM-BA's

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
libgcc: remove the dependence to the toolchain's libgcc

For some toolchains, there are some compatibility issue with the toolchain's libgcc,

Because after importing this lib, for some toolchains such as the toolchain
comes with ubuntu 12.04(arm-linux-gnueabi-gcc),it builds OK without
warning and error, but for ek with "926ej-s" core, it fails to run on the board.

for some toolchains such as from Sourcery CodeBench Lite 2012.03-57,
it run on sama5d3xek, no print message output from DBGU. and so on.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Tested-by: Josh Wu <Josh.wu@atmel.com>
Add the div() and mod() division function.

Add the div() and mod() division function, to eliminate the below
compilation error which arose after removing the dependence to libgcc:

	undefined reference to `__aeabi_uidiv'
	undefined reference to `__aeabi_uidivmod'

For the division in udelay() function, since our own division function
which spends much run time, causes the delay time inaccuracy. So,
using shifting, change to implement the division.
In spite of changing "1000" to "1024" which causes some inaccuacy,
but it is acceptable for our application.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Tested-by: Josh Wu <Josh.wu@atmel.com>
Change some "switch-case" with "if-else"

To eliminate the below compilation error which arisen after removing
the dependence to the toolchain's libgcc.

	undefined reference to `__gnu_thumb1_case_uqi'

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Tested-by: Josh Wu <Josh.wu@atmel.com>
Rewrite the swap_uint32() function

To eliminate the below compilation error which arisen after removing
the dependence to the toolchain's libgcc.

	undefined reference to `__bswapsi2'

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Tested-by: Josh Wu <Josh.wu@atmel.com>
udelay: make sure the udelay() maximum delay time and correct the error invocation.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Tested-by: Josh Wu <Josh.wu@atmel.com>
defconfig/at91sam9260eknf: enable "CONFIG_NANDFLASH_RECOVERY"

Since removing the dependence to the toolchain's libgcc,
the binary size decrease, so enable the recovery function
for the at91sam9260ek nandflash default configuration.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Tested-by: Josh Wu <Josh.wu@atmel.com>
Fix BUG: Remove gcc options "-mthumb-interwork" for AT91SAMA5D3XEK with cortex-a5

Verified by "gcc version 4.6.3 (Sourcery CodeBench Lite 2012.03-57)"

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Tested-by: Josh Wu <Josh.wu@atmel.com>
OneWire: make display module compatible between sama5d3xek and sam9x5ek

By checking the specification field "Mapping Revision info" to figure out
the layout of OneWire of sama5d3xek and sam9x5ek.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
NAND Flash: add the Eon Silicon chip information to the nand_ids table

EN27LN1G08: Maker Code: 0x92, Device Code: 0xf1

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
lib/string: add strcat function

for future to acquire the dt filename.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
OneWire: Add get cpu module board id.

also rearrange the code.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
sdcard: dynamically achieve the dt filename from the OneWire information

for at91sam9x5ek: g15(_pda).dtb, g25(_pda).dtb, g35(_pda).dtb, x25(_pda).dtb, x35(_pda).dtb,
for sama5d3xek: d31(_pda).dtb, d33(_pda).dtb, d34(_pda).dtb, d35(_pda).dtb

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
android4sam: add default conf for booting Android

Add default configuration file for booting Android
  - eknf: ek board boot from NAND flash
  - eksd: ek board boot from SD card
  - pdanf: ek with PDA panel boot from NAND flash
  - pdasd: ek with PDA panel boot from SD card

Signed-off-by: Bo Shen <voice.shen@atmel.com>