aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/omap-gpmc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/omap-gpmc.h')
-rw-r--r--include/linux/omap-gpmc.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/linux/omap-gpmc.h b/include/linux/omap-gpmc.h
index edfa280c3d56..053feb41510a 100644
--- a/include/linux/omap-gpmc.h
+++ b/include/linux/omap-gpmc.h
@@ -25,15 +25,43 @@ struct gpmc_nand_ops {
25 25
26struct gpmc_nand_regs; 26struct gpmc_nand_regs;
27 27
28struct gpmc_onenand_info {
29 bool sync_read;
30 bool sync_write;
31 int burst_len;
32};
33
28#if IS_ENABLED(CONFIG_OMAP_GPMC) 34#if IS_ENABLED(CONFIG_OMAP_GPMC)
29struct gpmc_nand_ops *gpmc_omap_get_nand_ops(struct gpmc_nand_regs *regs, 35struct gpmc_nand_ops *gpmc_omap_get_nand_ops(struct gpmc_nand_regs *regs,
30 int cs); 36 int cs);
37/**
38 * gpmc_omap_onenand_set_timings - set optimized sync timings.
39 * @cs: Chip Select Region
40 * @freq: Chip frequency
41 * @latency: Burst latency cycle count
42 * @info: Structure describing parameters used
43 *
44 * Sets optimized timings for the @cs region based on @freq and @latency.
45 * Updates the @info structure based on the GPMC settings.
46 */
47int gpmc_omap_onenand_set_timings(struct device *dev, int cs, int freq,
48 int latency,
49 struct gpmc_onenand_info *info);
50
31#else 51#else
32static inline struct gpmc_nand_ops *gpmc_omap_get_nand_ops(struct gpmc_nand_regs *regs, 52static inline struct gpmc_nand_ops *gpmc_omap_get_nand_ops(struct gpmc_nand_regs *regs,
33 int cs) 53 int cs)
34{ 54{
35 return NULL; 55 return NULL;
36} 56}
57
58static inline
59int gpmc_omap_onenand_set_timings(struct device *dev, int cs, int freq,
60 int latency,
61 struct gpmc_onenand_info *info)
62{
63 return -EINVAL;
64}
37#endif /* CONFIG_OMAP_GPMC */ 65#endif /* CONFIG_OMAP_GPMC */
38 66
39extern int gpmc_calc_timings(struct gpmc_timings *gpmc_t, 67extern int gpmc_calc_timings(struct gpmc_timings *gpmc_t,