memory/atmel-ebi: Fix ns <-> cycles conversions
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Mon, 28 Nov 2016 15:17:56 +0000 (16:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Mar 2017 02:20:11 +0000 (10:20 +0800)
commit8a915b3ccbb255eb71bc5bbf263cad672c964660
tree5ddf47acced921e255193aa555f73734e2882ca9
parenta4755943204e4eab9fd456926f1607f5238727e4
memory/atmel-ebi: Fix ns <-> cycles conversions

commit ee194289502a6901cc77dc9a893bf2afd351ac5e upstream.

at91sam9_ebi_get_config() is incorrectly converting timings in clock
cycles into timings in nanoseconds by multiplying the cycle values by
the clk rate instead of the clk period.

at91sam9_ebi_xslate_config() has the same problem for the
tdf_ns -> tdf_cycles conversion.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reported-by: Chris Leahy <leahycm@gmail.com>
Fixes: 6a4ec4cd0888 ("memory: add Atmel EBI (External Bus Interface) driver")
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/memory/atmel-ebi.c