aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Kaiser <nikai@nikai.net>2010-11-15 13:40:28 -0500
committerKevin Hilman <khilman@deeprootsystems.com>2010-12-10 10:33:51 -0500
commit12cdd3d71954c2cd6dd556eec25dd7d346735831 (patch)
tree2201eb4a1fea43603ef527321a8a7a83c46d7c67
parent1a07bfb5215e11227403f121097ed72187dc3241 (diff)
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>
-rw-r--r--arch/arm/mach-davinci/aemif.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-davinci/aemif.c b/arch/arm/mach-davinci/aemif.c
index 9c3f500fc12f..1ce70a91f2e9 100644
--- a/arch/arm/mach-davinci/aemif.c
+++ b/arch/arm/mach-davinci/aemif.c
@@ -90,7 +90,7 @@ int davinci_aemif_setup_timing(struct davinci_aemif_timing *t,
90 void __iomem *base, unsigned cs) 90 void __iomem *base, unsigned cs)
91{ 91{
92 unsigned set, val; 92 unsigned set, val;
93 unsigned ta, rhold, rstrobe, rsetup, whold, wstrobe, wsetup; 93 int ta, rhold, rstrobe, rsetup, whold, wstrobe, wsetup;
94 unsigned offset = A1CR_OFFSET + cs * 4; 94 unsigned offset = A1CR_OFFSET + cs * 4;
95 struct clk *aemif_clk; 95 struct clk *aemif_clk;
96 unsigned long clkrate; 96 unsigned long clkrate;