omap2/gpmc updates
Subsystems (5)
PATCH 1/1 omap2/gpmc updates
GPMC updates:
- bugfixes: wrong/missing flags, omitted write, wrong test
- don't map memory segments starting at zero
- improve debug messaging
- export gpmc_get_fclk_period() since it's needed to calc timings
- expect gpmc_cs_set_timings() caller to have initialized sync vs async
Note that this API is glitchy; likely the best fix would be to add a member to "struct gpmc_timings" to hold GPMC_CONFIG1, since that holds one key aspect of the GPMC timings (the gpmc_fclk divisor, and sync vs. async == whether that divisor matters).
include/asm/arch/gpmc.h +2 -1
@@ -23,9 +23,10 @@#define GPMC_CS_NAND_DATA 0x24#define GPMC_CONFIG1_WRAPBURST_SUPP (1 << 31) -#define GPMC_CONFIG1_READMULTIPLE_SUPP (1 << 20) +#define GPMC_CONFIG1_READMULTIPLE_SUPP (1 << 30)#define GPMC_CONFIG1_READTYPE_ASYNC (0 << 29)#define GPMC_CONFIG1_READTYPE_SYNC (1 << 29) +#define GPMC_CONFIG1_WRITEMULTIPLE_SUPP (1 << 28)#define GPMC_CONFIG1_WRITETYPE_ASYNC (0 << 27)#define GPMC_CONFIG1_WRITETYPE_SYNC (1 << 27)#define GPMC_CONFIG1_CLKACTIVATIONTIME (val) ((val & 3) << 25)
arch/arm/mach-omap2/gpmc.c +26 -24
88 lines not on this page · raw message
Quoted 4 lines · David Brownell
Note that this API is glitchy; likely the best fix would be to add a member to "struct
gpmc_timings" to holdGPMC_CONFIG1, since that holds one key aspect of the GPMC timings (thegpmc_fclkdivisor, and sync vs. async == whether that divisor matters).
Something like that would be useful. Also currently you can only calculate the timings in nanosecond precision. This is not enough in some cases e.g. when calculating sync. timings and the tick length is not multiple of nanosecond. We need picosecond precision or the possiblity to configure ticks directly.
Cheers,
Timo
Quoted 7 lines · Timo Teras
Quoted 4 lines · David Brownell
Note that this API is glitchy; likely the best fix would be to add a member to "struct
gpmc_timings" to holdGPMC_CONFIG1, since that holds one key aspect of the GPMC timings (thegpmc_fclkdivisor, and sync vs. async == whether that divisor matters).Something like that would be useful.
More of a cleanup IMO. But one of several that seems needed. :)
Quoted 5 lines
Also currently you can only calculate
the timings in nanosecond precision. This is not enough in some cases e.g. when calculating sync. timings and the tick length is not multiple of nanosecond. We need picosecond precision or the possiblity to configure ticks directly.
Right now I'm working with an H4 board where those timings come out neatly ... multiples of 10 nsec. Agreed that there are situations where the numbers aren't so neat. Of course there aren't _yet_ any examples of code needing/using those GPMC calls in the tree ...
- Dave
Tony Lindgren
maintainerQuoted 11 lines · David Brownell
GPMC updates:
- bugfixes: wrong/missing flags, omitted write, wrong test
- don't map memory segments starting at zero
- improve debug messaging
- exportgpmc_get_fclk_period()since it's needed to calc timings
- expectgpmc_cs_set_timings()caller to have initialized sync vs asyncNote that this API is glitchy; likely the best fix would be to add a member to "struct
gpmc_timings" to holdGPMC_CONFIG1, since that holds one key aspect of the GPMC timings (thegpmc_fclkdivisor, and sync vs. async == whether that divisor matters).
Pushing this today.
Tony