Skip to content

Commit 3fb3b3c

Browse files
LeSpockyalexandrebelloni
authored andcommitted
memory: atmel-ebi: Fix smc cycle xlate converter
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>
1 parent 1f6b539 commit 3fb3b3c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/memory/atmel-ebi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ struct atmel_smc_timing_xlate {
7272
{ .name = nm, .converter = atmel_smc_cs_conf_set_pulse, .shift = pos}
7373

7474
#define ATMEL_SMC_CYCLE_XLATE(nm, pos) \
75-
{ .name = nm, .converter = atmel_smc_cs_conf_set_setup, .shift = pos}
75+
{ .name = nm, .converter = atmel_smc_cs_conf_set_cycle, .shift = pos}
7676

7777
static void at91sam9_ebi_get_config(struct atmel_ebi_dev *ebid,
7878
struct atmel_ebi_dev_config *conf)

‎drivers/mfd/atmel-smc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ EXPORT_SYMBOL_GPL(atmel_smc_cs_conf_set_pulse);
206206
* parameter
207207
*
208208
* This function encodes the @ncycles value as described in the datasheet
209-
* (section "SMC Pulse Register"), and then stores the result in the
209+
* (section "SMC Cycle Register"), and then stores the result in the
210210
* @conf->setup field at @shift position.
211211
*
212212
* Returns -EINVAL if @shift is invalid, -ERANGE if @ncycles does not fit in

0 commit comments

Comments
 (0)