memory: atmel-ebi: Fix smc cycle xlate converter
authorAlexander Dahl <ada@thorsis.com>
Tue, 25 Jul 2017 12:00:24 +0000 (14:00 +0200)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Wed, 26 Jul 2017 20:37:54 +0000 (22:37 +0200)
The converter function for translating ns timings in register values was
initialized with a wrong function pointer. This resulted in wrong
register values also for the setup and pulse registers when configuring
the EBI interface trough dts.

Includes a small fix in a comment of the smc driver, which was probably
just a copy'n'paste mistake.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/memory/atmel-ebi.c
drivers/mfd/atmel-smc.c

index f8a01ae..ebf69ff 100644 (file)
@@ -72,7 +72,7 @@ struct atmel_smc_timing_xlate {
        { .name = nm, .converter = atmel_smc_cs_conf_set_pulse, .shift = pos}
 
 #define ATMEL_SMC_CYCLE_XLATE(nm, pos) \
-       { .name = nm, .converter = atmel_smc_cs_conf_set_setup, .shift = pos}
+       { .name = nm, .converter = atmel_smc_cs_conf_set_cycle, .shift = pos}
 
 static void at91sam9_ebi_get_config(struct atmel_ebi_dev *ebid,
                                    struct atmel_ebi_dev_config *conf)
index 954cf0f..20cc0ea 100644 (file)
@@ -206,7 +206,7 @@ EXPORT_SYMBOL_GPL(atmel_smc_cs_conf_set_pulse);
  *          parameter
  *
  * This function encodes the @ncycles value as described in the datasheet
- * (section "SMC Pulse Register"), and then stores the result in the
+ * (section "SMC Cycle Register"), and then stores the result in the
  * @conf->setup field at @shift position.
  *
  * Returns -EINVAL if @shift is invalid, -ERANGE if @ncycles does not fit in