Add support for Wandboard Quad

Add support for the Quad version of Wandboard; fix compile warning resulting
from having 2G of memory.

Signed-off-by: Tapani Utriainen <tapani@technexion.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Stefano Babic <sbabic@denx.de>
spi: mxc_spi: Fix pre and post divider calculation

Fix two issues with the calculation of pre_div and post_div:

1. pre_div: While the calculation of pre_div looks correct, to set the
CONREG[15-12] bits pre_div needs to be decremented by 1:

The i.MX 6Dual/6Quad Applications Processor Reference Manual (IMX6DQRM
Rev. 0, 11/2012) states:

CONREG[15-12]: PRE_DIVIDER
0000 Divide by 1
0001 Divide by 2
0010 Divide by 3
...
1101 Divide by 14
1110 Divide by 15
1111 Divide by 16

I.e. if we want to divide by 2, we have to write 1 to CONREG[15-12].

2. In case the post divider becomes necessary, pre_div will be divided by
16. So set pre_div to 16, too. And not 15.

Both issues above are tested using the following examples:

clk_src = 60000000 (60MHz, default i.MX6 ECSPI clock)

a) max_hz == 23000000 (23MHz, max i.MX6 ECSPI read clock)

-> pre_div =  3 (divide by 3 => CONREG[15-12] == 2)
-> post_div = 0 (divide by 1 => CONREG[11- 8] == 0)
               => 60MHz / 3 = 20MHz SPI clock

b) max_hz == 2000000 (2MHz)

-> pre_div =  16 (divide by 16 => CONREG[15-12] == 15)
-> post_div = 1  (divide by  2 => CONREG[11- 8] == 1)
               => 60MHz / 32 = 1.875MHz SPI clock

c) max_hz == 1000000 (1MHz)

-> pre_div =  16 (divide by 16 => CONREG[15-12] == 15)
-> post_div = 2  (divide by  4 => CONREG[11- 8] == 2)
               => 60MHz / 64 = 937.5kHz SPI clock

d) max_hz == 500000 (500kHz)

-> pre_div =  16 (divide by 16 => CONREG[15-12] == 15)
-> post_div = 3  (divide by  8 => CONREG[11- 8] == 3)
               => 60MHz / 128 = 468.75kHz SPI clock

Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
spi: mxc_spi: Update pre and post divider algorithm

The spi clock divisor is of the form x * (2**y),  or  x  << y, where x is
1 to 16, and y is 0 to 15. Note the similarity with floating point numbers.
Convert the desired divisor to the smallest number which is >= desired divisor,
and can be represented in this form. The previous algorithm chose a divisor
which could be almost twice as large as needed.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
dwc_ahsata: Allow use with dcache enabled

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
imx6: fix GPR2 wrong definition

Signed-off-by: Pierre Aubert <p.aubert@staubli.com>
CC: Stefano Babic <sbabic@denx.de>
Acked-by: Dirk Behme <dirk.behme@gmail.com>
imx: Complete the pin definitions for the i.MX6DL / i.MX6Solo

Signed-off-by: Pierre Aubert <p.aubert@staubli.com>
CC: Stefano Babic <sbabic@denx.de>
imx: Add support for the SabreSD shipped with i.MX6DL

The SabreSD platform is available with i.MX6Q or i.MX6DL. This patch adds the
support of the i.MX6DL. The config file and the board directory are renamed
to remove the reference to the MX6Q.

Signed-off-by: Pierre Aubert <p.aubert@staubli.com>
CC: Stefano Babic <sbabic@denx.de>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
mx27: add function enable_caches

Signed-off-by: Philippe Reynes <tremyfr@yahoo.fr>
mx27: add i2c clock

Signed-off-by: Eric Jarrige <eric.jarrige@armadeus.org>
Signed-off-by: Philippe Reynes <tremyfr@yahoo.fr>
imx: nitrogen6x: Enabled data cache

Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com>
imx: nitrogen6x: Enable bootz

Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com>
imx: nitrogen6x: Enable raw initrd

Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com>
imx: nitrogen6x: Enable filesystem generic commands

Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com>
README: mx28_common: Keep the text within 80 columns

In order to improve readability keep the text within 80 columns.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
README: mx28_common: Do not hardcode the SSP port

MX28 can boot from SSP0 or SSP1, so it is better not to hardcode the SSP port
in the instructions.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
README: mx28_common: Fix structure of sentence

Re-structure the sentence a bit so that it can clearer.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
README: mxs: Introduce README.mxs

Create a README.mxs file that contains instructions on how to use U-boot for
both MX23 and MX28.

As boot from NAND has only been tested on mx28, make it clear that it only
applies to MX28.

While at it, do some small cleanups for the sake of consistency:
- Use "MX28" instead of "i.MX28"
- Use "section" instead of "chapter" when referring to specific parts of the
reference manual chapters.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
mx28evk: Move README file inside board directory

Board specific READMEs should be located inside the respective board directory.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
m28evk: Move README file inside board directory

Board specific READMEs should be located inside the respective board directory.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
MAINTAINERS: Add an entry to the mx6q wandboard variant

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>