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:02:45 +0000 (10:02 +0800)
commit1f2ca141ec53a9c43ea0852f013907d19c435986
tree40f88c5aa8382c1e0e121b84b875e7c79874173a
parentb2b0f6ffd3f97953044e909ca311d2a580ae8575
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