Skip to content

Commit

Permalink
memory: atmel-ebi: Fix smc cycle xlate converter
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Boris Brezillon <[email protected]>
Acked-by: Lee Jones <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
  • Loading branch information
LeSpocky authored and alexandrebelloni committed Jul 26, 2017
1 parent 1f6b539 commit 3fb3b3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/memory/atmel-ebi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/atmel-smc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3fb3b3c

Please sign in to comment.