Re: [PATCH 2/7] memory: atmel-ebi: Simplify SMC config code

2017-07-25 Thread Alexander Dahl
Hello Boris, Am Montag, 24. Juli 2017, 21:21:09 schrieb Boris Brezillon: > There is a good reason for this "- 1": the doc says the exact number > of tDF cycles is TDF_CYCLES + 1. When you are expressing timings in > ns it does matter, because you don't want to wait more than > necessary. Say the

Re: [PATCH 2/7] memory: atmel-ebi: Simplify SMC config code

2017-07-25 Thread Alexander Dahl
Hello Boris, Am Montag, 24. Juli 2017, 21:21:09 schrieb Boris Brezillon: > There is a good reason for this "- 1": the doc says the exact number > of tDF cycles is TDF_CYCLES + 1. When you are expressing timings in > ns it does matter, because you don't want to wait more than > necessary. Say the

Re: [PATCH 2/7] memory: atmel-ebi: Simplify SMC config code

2017-07-24 Thread Boris Brezillon
Hi Alexander, Le Mon, 24 Jul 2017 11:12:18 +0200, Alexander Dahl a écrit : > Hello Boris, > > while testing v4.13-rc2 on an at91sam9g20 baed platform I'm coming back > to this topic. Meanwhile the whole new SMC and NAND below EBI stuff is > in mainline, this TDF bug however

Re: [PATCH 2/7] memory: atmel-ebi: Simplify SMC config code

2017-07-24 Thread Boris Brezillon
Hi Alexander, Le Mon, 24 Jul 2017 11:12:18 +0200, Alexander Dahl a écrit : > Hello Boris, > > while testing v4.13-rc2 on an at91sam9g20 baed platform I'm coming back > to this topic. Meanwhile the whole new SMC and NAND below EBI stuff is > in mainline, this TDF bug however is still in

Re: [PATCH 2/7] memory: atmel-ebi: Simplify SMC config code

2017-07-24 Thread Alexander Dahl
Hello Boris, while testing v4.13-rc2 on an at91sam9g20 baed platform I'm coming back to this topic. Meanwhile the whole new SMC and NAND below EBI stuff is in mainline, this TDF bug however is still in there. See below (all quoted code parts from v4.13-rc2): Am Donnerstag, 2. März 2017,

Re: [PATCH 2/7] memory: atmel-ebi: Simplify SMC config code

2017-07-24 Thread Alexander Dahl
Hello Boris, while testing v4.13-rc2 on an at91sam9g20 baed platform I'm coming back to this topic. Meanwhile the whole new SMC and NAND below EBI stuff is in mainline, this TDF bug however is still in there. See below (all quoted code parts from v4.13-rc2): Am Donnerstag, 2. März 2017,

Re: [PATCH 2/7] memory: atmel-ebi: Simplify SMC config code

2017-03-02 Thread Boris Brezillon
Hi Alexander, On Thu, 02 Mar 2017 13:02:16 +0100 Alexander Dahl wrote: > Hei hei, > > With > > #define ATMEL_SMC_MODE_TDF(x) (((x) - 1) << 16) > > from include/linux/mfd/syscon/atmel-smc.h you added this: > > > + ret = of_property_read_u32(np,

Re: [PATCH 2/7] memory: atmel-ebi: Simplify SMC config code

2017-03-02 Thread Boris Brezillon
Hi Alexander, On Thu, 02 Mar 2017 13:02:16 +0100 Alexander Dahl wrote: > Hei hei, > > With > > #define ATMEL_SMC_MODE_TDF(x) (((x) - 1) << 16) > > from include/linux/mfd/syscon/atmel-smc.h you added this: > > > + ret = of_property_read_u32(np, "atmel,smc-tdf-ns", ); > > + if

Re: [PATCH 2/7] memory: atmel-ebi: Simplify SMC config code

2017-03-02 Thread Alexander Dahl
Hei hei, With #define ATMEL_SMC_MODE_TDF(x) (((x) - 1) << 16) from include/linux/mfd/syscon/atmel-smc.h you added this: > + ret = of_property_read_u32(np, "atmel,smc-tdf-ns", ); > + if (!ret) { > + required = true; > + ncycles = DIV_ROUND_UP(val,

Re: [PATCH 2/7] memory: atmel-ebi: Simplify SMC config code

2017-03-02 Thread Alexander Dahl
Hei hei, With #define ATMEL_SMC_MODE_TDF(x) (((x) - 1) << 16) from include/linux/mfd/syscon/atmel-smc.h you added this: > + ret = of_property_read_u32(np, "atmel,smc-tdf-ns", ); > + if (!ret) { > + required = true; > + ncycles = DIV_ROUND_UP(val,

[PATCH 2/7] memory: atmel-ebi: Simplify SMC config code

2017-02-20 Thread Boris Brezillon
New helpers/macros have been to atmel-smc.h introduced to simplify SMC regs manipulation. Rework the code to use those helpers, and simplify the ->xlate_config(), ->get_config() and ->apply_config() implementations. SMC configs are now stored in a struct atmel_smc_cs_conf object that directly

[PATCH 2/7] memory: atmel-ebi: Simplify SMC config code

2017-02-20 Thread Boris Brezillon
New helpers/macros have been to atmel-smc.h introduced to simplify SMC regs manipulation. Rework the code to use those helpers, and simplify the ->xlate_config(), ->get_config() and ->apply_config() implementations. SMC configs are now stored in a struct atmel_smc_cs_conf object that directly