Skip to content

Commit

Permalink
davinci: aemif: signedness bug in davinci_aemif_setup_timing()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Sekhar Nori <[email protected]>
Signed-off-by: Kevin Hilman <[email protected]>
  • Loading branch information
nikai3d authored and metaliveblog committed Dec 10, 2010
1 parent 1a07bfb commit 12cdd3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mach-davinci/aemif.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ int davinci_aemif_setup_timing(struct davinci_aemif_timing *t,
void __iomem *base, unsigned cs)
{
unsigned set, val;
unsigned ta, rhold, rstrobe, rsetup, whold, wstrobe, wsetup;
int ta, rhold, rstrobe, rsetup, whold, wstrobe, wsetup;
unsigned offset = A1CR_OFFSET + cs * 4;
struct clk *aemif_clk;
unsigned long clkrate;
Expand Down

0 comments on commit 12cdd3d

Please sign in to comment.