Permalink
Browse files

Add defines to set config options in GPMC per CS control registers.

  • Loading branch information...
1 parent b64c340 commit de8560a40f91bcabeb42ceea1851266bf75e6bad Philip Balister committed with Philip Balister Feb 17, 2010
Showing with 29 additions and 0 deletions.
  1. +29 −0 arch/arm/plat-omap/include/plat/gpmc.h
@@ -79,6 +79,35 @@
#define GPMC_PREFETCH_STATUS_FIFO_CNT(val) ((val >> 24) & 0x7F)
#define GPMC_PREFETCH_STATUS_COUNT(val) (val & 0x00003fff)
+#define GPMC_CONFIG2_CSWROFFTIME(val) ((val & 31) << 16)
+#define GPMC_CONFIG2_CSRDOFFTIME(val) ((val & 31) << 8)
+#define GPMC_CONFIG2_CSEXTRADELAY (1 << 7)
+#define GPMC_CONFIG2_CSONTIME(val) (val & 15)
+
+#define GPMC_CONFIG3_ADVWROFFTIME(val) ((val & 31) << 16)
+#define GPMC_CONFIG3_ADVRDOFFTIME(val) ((val & 31) << 8)
+#define GPMC_CONFIG3_ADVEXTRADELAY (1 << 7)
+#define GPMC_CONFIG3_ADVONTIME(val) (val & 15)
+
+#define GPMC_CONFIG4_WEOFFTIME(val) ((val & 31) << 24)
+#define GPMC_CONFIG4_WEEXTRADELAY (1 << 23)
+#define GPMC_CONFIG4_WEONTIME(val) ((val & 15) << 16)
+#define GPMC_CONFIG4_OEOFFTIME(val) ((val & 31) << 8)
+#define GPMC_CONFIG4_OEEXTRADELAY (1 << 7)
+#define GPMC_CONFIG4_OEONTIME(val) (val & 15)
+
+#define GPMC_CONFIG5_PAGEBURSTACCESSTIME(val) ((val & 15) << 24)
+#define GPMC_CONFIG5_RDACCESSTIME(val) ((val & 31) << 16)
+#define GPMC_CONFIG5_WRCYCLETIME(val) ((val & 31) << 8)
+#define GPMC_CONFIG5_RDCYCLETIME(val) (val & 31)
+
+#define GPMC_CONFIG6_WRACCESSTIME(val) ((val & 31) << 24)
+#define GPMC_CONFIG6_WRDATAONADMUXBUS(val) ((val & 15) << 16)
+#define GPMC_CONFIG6_CYCLE2CYCLEDELAY(val) ((val & 15) << 8)
+#define GPMC_CONFIG6_CYCLE2CYCLESAMECSEN (1 << 7)
+#define GPMC_CONFIG6_CYCLE2CYCLEDIFFCSEN (1 << 6)
+#define GPMC_CONFIG6_BUSTURNAROUND(val) (val & 15)
+
/*
* Note that all values in this struct are in nanoseconds except sync_clk
* (which is in picoseconds), while the register values are in gpmc_fck cycles.

0 comments on commit de8560a

Please sign in to comment.