Commit Graph

2 Commits (4660720df61321f9746353ad3188bf4de2408b67)

Author SHA1 Message Date
Nicolas Kaiser 12cdd3d719 davinci: aemif: signedness bug in davinci_aemif_setup_timing()
aemif_calc_rate() can return a negative error value, so all the
variables that get tested for this value need to be signed.

The maximum bit width of WSETUP(WSETUP_MAX) appears to be 30 bits
(0xf << 26). Using a signed instead of an unsigned integer
shouldn't make a difference here.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-12-10 07:33:51 -08:00
Sekhar Nori 8060ef4da9 davinci: add support for aemif timing configuration
This patch adds support to configure the AEMIF interface
with supplied timing values.

Since this capability is useful both from NOR and NAND
flashes, it is provided as a new interface and in a file
of its own.

AEMIF timing configuration is required in cases:

1) Where the AEMIF clock rate can change at runtime (a side
   affect of cpu frequency change).

2) Where U-Boot does not support NAND/NOR but supports other
   media like SPI Flash or MMC/SD and thus does not care about
   setting up the AEMIF timing for kernel to use.

3) Where U-Boot just hasn't configured the timing values and
   cannot be upgraded because the box is already in the field.

Since there is now a header file for AEMIF interface, the
common (non-NAND specific) defines for AEMIF registers have
been moved from nand.h into the newly created aemif.h

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-09-24 07:40:26 -07:00