···1414#define GPMC_IRQ_FIFOEVENTENABLE 0x011515#define GPMC_IRQ_COUNT_EVENT 0x0216161717-#define GPMC_BURST_4 4 /* 4 word burst */1818-#define GPMC_BURST_8 8 /* 8 word burst */1919-#define GPMC_BURST_16 16 /* 16 word burst */2020-#define GPMC_DEVWIDTH_8BIT 1 /* 8-bit device width */2121-#define GPMC_DEVWIDTH_16BIT 2 /* 16-bit device width */2222-#define GPMC_MUX_AAD 1 /* Addr-Addr-Data multiplex */2323-#define GPMC_MUX_AD 2 /* Addr-Data multiplex */2424-2525-/* bool type time settings */2626-struct gpmc_bool_timings {2727- bool cycle2cyclediffcsen;2828- bool cycle2cyclesamecsen;2929- bool we_extra_delay;3030- bool oe_extra_delay;3131- bool adv_extra_delay;3232- bool cs_extra_delay;3333- bool time_para_granularity;3434-};3535-3636-/*3737- * Note that all values in this struct are in nanoseconds except sync_clk3838- * (which is in picoseconds), while the register values are in gpmc_fck cycles.3939- */4040-struct gpmc_timings {4141- /* Minimum clock period for synchronous mode (in picoseconds) */4242- u32 sync_clk;4343-4444- /* Chip-select signal timings corresponding to GPMC_CS_CONFIG2 */4545- u32 cs_on; /* Assertion time */4646- u32 cs_rd_off; /* Read deassertion time */4747- u32 cs_wr_off; /* Write deassertion time */4848-4949- /* ADV signal timings corresponding to GPMC_CONFIG3 */5050- u32 adv_on; /* Assertion time */5151- u32 adv_rd_off; /* Read deassertion time */5252- u32 adv_wr_off; /* Write deassertion time */5353- u32 adv_aad_mux_on; /* ADV assertion time for AAD */5454- u32 adv_aad_mux_rd_off; /* ADV read deassertion time for AAD */5555- u32 adv_aad_mux_wr_off; /* ADV write deassertion time for AAD */5656-5757- /* WE signals timings corresponding to GPMC_CONFIG4 */5858- u32 we_on; /* WE assertion time */5959- u32 we_off; /* WE deassertion time */6060-6161- /* OE signals timings corresponding to GPMC_CONFIG4 */6262- u32 oe_on; /* OE assertion time */6363- u32 oe_off; /* OE deassertion time */6464- u32 oe_aad_mux_on; /* OE assertion time for AAD */6565- u32 oe_aad_mux_off; /* OE deassertion time for AAD */6666-6767- /* Access time and cycle time timings corresponding to GPMC_CONFIG5 */6868- u32 page_burst_access; /* Multiple access word delay */6969- u32 access; /* Start-cycle to first data valid delay */7070- u32 rd_cycle; /* Total read cycle time */7171- u32 wr_cycle; /* Total write cycle time */7272-7373- u32 bus_turnaround;7474- u32 cycle2cycle_delay;7575-7676- u32 wait_monitoring;7777- u32 clk_activation;7878-7979- /* The following are only on OMAP3430 */8080- u32 wr_access; /* WRACCESSTIME */8181- u32 wr_data_mux_bus; /* WRDATAONADMUXBUS */8282-8383- struct gpmc_bool_timings bool_timings;8484-};8585-8686-/* Device timings in picoseconds */8787-struct gpmc_device_timings {8888- u32 t_ceasu; /* address setup to CS valid */8989- u32 t_avdasu; /* address setup to ADV valid */9090- /* XXX: try to combine t_avdp_r & t_avdp_w. Issue is9191- * of tusb using these timings even for sync whilst9292- * ideally for adv_rd/(wr)_off it should have considered9393- * t_avdh instead. This indirectly necessitates r/w9494- * variations of t_avdp as it is possible to have one9595- * sync & other async9696- */9797- u32 t_avdp_r; /* ADV low time (what about t_cer ?) */9898- u32 t_avdp_w;9999- u32 t_aavdh; /* address hold time */100100- u32 t_oeasu; /* address setup to OE valid */101101- u32 t_aa; /* access time from ADV assertion */102102- u32 t_iaa; /* initial access time */103103- u32 t_oe; /* access time from OE assertion */104104- u32 t_ce; /* access time from CS asertion */105105- u32 t_rd_cycle; /* read cycle time */106106- u32 t_cez_r; /* read CS deassertion to high Z */107107- u32 t_cez_w; /* write CS deassertion to high Z */108108- u32 t_oez; /* OE deassertion to high Z */109109- u32 t_weasu; /* address setup to WE valid */110110- u32 t_wpl; /* write assertion time */111111- u32 t_wph; /* write deassertion time */112112- u32 t_wr_cycle; /* write cycle time */113113-114114- u32 clk;115115- u32 t_bacc; /* burst access valid clock to output delay */116116- u32 t_ces; /* CS setup time to clk */117117- u32 t_avds; /* ADV setup time to clk */118118- u32 t_avdh; /* ADV hold time from clk */119119- u32 t_ach; /* address hold time from clk */120120- u32 t_rdyo; /* clk to ready valid */121121-122122- u32 t_ce_rdyz; /* XXX: description ?, or use t_cez instead */123123- u32 t_ce_avd; /* CS on to ADV on delay */124124-125125- /* XXX: check the possibility of combining126126- * cyc_aavhd_oe & cyc_aavdh_we127127- */128128- u8 cyc_aavdh_oe;/* read address hold time in cycles */129129- u8 cyc_aavdh_we;/* write address hold time in cycles */130130- u8 cyc_oe; /* access time from OE assertion in cycles */131131- u8 cyc_wpl; /* write deassertion time in cycles */132132- u32 cyc_iaa; /* initial access time in cycles */133133-134134- /* extra delays */135135- bool ce_xdelay;136136- bool avd_xdelay;137137- bool oe_xdelay;138138- bool we_xdelay;139139-};140140-141141-struct gpmc_settings {142142- bool burst_wrap; /* enables wrap bursting */143143- bool burst_read; /* enables read page/burst mode */144144- bool burst_write; /* enables write page/burst mode */145145- bool device_nand; /* device is NAND */146146- bool sync_read; /* enables synchronous reads */147147- bool sync_write; /* enables synchronous writes */148148- bool wait_on_read; /* monitor wait on reads */149149- bool wait_on_write; /* monitor wait on writes */150150- u32 burst_len; /* page/burst length */151151- u32 device_width; /* device bus width (8 or 16 bit) */152152- u32 mux_add_data; /* multiplex address & data */153153- u32 wait_pin; /* wait-pin to be used */154154-};155155-15617extern int gpmc_calc_timings(struct gpmc_timings *gpmc_t,15718 struct gpmc_settings *gpmc_s,15819 struct gpmc_device_timings *dev_t);
+142
include/linux/platform_data/gpmc-omap.h
···1515/* Maximum Number of Chip Selects */1616#define GPMC_CS_NUM 817171818+/* bool type time settings */1919+struct gpmc_bool_timings {2020+ bool cycle2cyclediffcsen;2121+ bool cycle2cyclesamecsen;2222+ bool we_extra_delay;2323+ bool oe_extra_delay;2424+ bool adv_extra_delay;2525+ bool cs_extra_delay;2626+ bool time_para_granularity;2727+};2828+2929+/*3030+ * Note that all values in this struct are in nanoseconds except sync_clk3131+ * (which is in picoseconds), while the register values are in gpmc_fck cycles.3232+ */3333+struct gpmc_timings {3434+ /* Minimum clock period for synchronous mode (in picoseconds) */3535+ u32 sync_clk;3636+3737+ /* Chip-select signal timings corresponding to GPMC_CS_CONFIG2 */3838+ u32 cs_on; /* Assertion time */3939+ u32 cs_rd_off; /* Read deassertion time */4040+ u32 cs_wr_off; /* Write deassertion time */4141+4242+ /* ADV signal timings corresponding to GPMC_CONFIG3 */4343+ u32 adv_on; /* Assertion time */4444+ u32 adv_rd_off; /* Read deassertion time */4545+ u32 adv_wr_off; /* Write deassertion time */4646+ u32 adv_aad_mux_on; /* ADV assertion time for AAD */4747+ u32 adv_aad_mux_rd_off; /* ADV read deassertion time for AAD */4848+ u32 adv_aad_mux_wr_off; /* ADV write deassertion time for AAD */4949+5050+ /* WE signals timings corresponding to GPMC_CONFIG4 */5151+ u32 we_on; /* WE assertion time */5252+ u32 we_off; /* WE deassertion time */5353+5454+ /* OE signals timings corresponding to GPMC_CONFIG4 */5555+ u32 oe_on; /* OE assertion time */5656+ u32 oe_off; /* OE deassertion time */5757+ u32 oe_aad_mux_on; /* OE assertion time for AAD */5858+ u32 oe_aad_mux_off; /* OE deassertion time for AAD */5959+6060+ /* Access time and cycle time timings corresponding to GPMC_CONFIG5 */6161+ u32 page_burst_access; /* Multiple access word delay */6262+ u32 access; /* Start-cycle to first data valid delay */6363+ u32 rd_cycle; /* Total read cycle time */6464+ u32 wr_cycle; /* Total write cycle time */6565+6666+ u32 bus_turnaround;6767+ u32 cycle2cycle_delay;6868+6969+ u32 wait_monitoring;7070+ u32 clk_activation;7171+7272+ /* The following are only on OMAP3430 */7373+ u32 wr_access; /* WRACCESSTIME */7474+ u32 wr_data_mux_bus; /* WRDATAONADMUXBUS */7575+7676+ struct gpmc_bool_timings bool_timings;7777+};7878+7979+/* Device timings in picoseconds */8080+struct gpmc_device_timings {8181+ u32 t_ceasu; /* address setup to CS valid */8282+ u32 t_avdasu; /* address setup to ADV valid */8383+ /* XXX: try to combine t_avdp_r & t_avdp_w. Issue is8484+ * of tusb using these timings even for sync whilst8585+ * ideally for adv_rd/(wr)_off it should have considered8686+ * t_avdh instead. This indirectly necessitates r/w8787+ * variations of t_avdp as it is possible to have one8888+ * sync & other async8989+ */9090+ u32 t_avdp_r; /* ADV low time (what about t_cer ?) */9191+ u32 t_avdp_w;9292+ u32 t_aavdh; /* address hold time */9393+ u32 t_oeasu; /* address setup to OE valid */9494+ u32 t_aa; /* access time from ADV assertion */9595+ u32 t_iaa; /* initial access time */9696+ u32 t_oe; /* access time from OE assertion */9797+ u32 t_ce; /* access time from CS asertion */9898+ u32 t_rd_cycle; /* read cycle time */9999+ u32 t_cez_r; /* read CS deassertion to high Z */100100+ u32 t_cez_w; /* write CS deassertion to high Z */101101+ u32 t_oez; /* OE deassertion to high Z */102102+ u32 t_weasu; /* address setup to WE valid */103103+ u32 t_wpl; /* write assertion time */104104+ u32 t_wph; /* write deassertion time */105105+ u32 t_wr_cycle; /* write cycle time */106106+107107+ u32 clk;108108+ u32 t_bacc; /* burst access valid clock to output delay */109109+ u32 t_ces; /* CS setup time to clk */110110+ u32 t_avds; /* ADV setup time to clk */111111+ u32 t_avdh; /* ADV hold time from clk */112112+ u32 t_ach; /* address hold time from clk */113113+ u32 t_rdyo; /* clk to ready valid */114114+115115+ u32 t_ce_rdyz; /* XXX: description ?, or use t_cez instead */116116+ u32 t_ce_avd; /* CS on to ADV on delay */117117+118118+ /* XXX: check the possibility of combining119119+ * cyc_aavhd_oe & cyc_aavdh_we120120+ */121121+ u8 cyc_aavdh_oe;/* read address hold time in cycles */122122+ u8 cyc_aavdh_we;/* write address hold time in cycles */123123+ u8 cyc_oe; /* access time from OE assertion in cycles */124124+ u8 cyc_wpl; /* write deassertion time in cycles */125125+ u32 cyc_iaa; /* initial access time in cycles */126126+127127+ /* extra delays */128128+ bool ce_xdelay;129129+ bool avd_xdelay;130130+ bool oe_xdelay;131131+ bool we_xdelay;132132+};133133+134134+#define GPMC_BURST_4 4 /* 4 word burst */135135+#define GPMC_BURST_8 8 /* 8 word burst */136136+#define GPMC_BURST_16 16 /* 16 word burst */137137+#define GPMC_DEVWIDTH_8BIT 1 /* 8-bit device width */138138+#define GPMC_DEVWIDTH_16BIT 2 /* 16-bit device width */139139+#define GPMC_MUX_AAD 1 /* Addr-Addr-Data multiplex */140140+#define GPMC_MUX_AD 2 /* Addr-Data multiplex */141141+142142+struct gpmc_settings {143143+ bool burst_wrap; /* enables wrap bursting */144144+ bool burst_read; /* enables read page/burst mode */145145+ bool burst_write; /* enables write page/burst mode */146146+ bool device_nand; /* device is NAND */147147+ bool sync_read; /* enables synchronous reads */148148+ bool sync_write; /* enables synchronous writes */149149+ bool wait_on_read; /* monitor wait on reads */150150+ bool wait_on_write; /* monitor wait on writes */151151+ u32 burst_len; /* page/burst length */152152+ u32 device_width; /* device bus width (8 or 16 bit) */153153+ u32 mux_add_data; /* multiplex address & data */154154+ u32 wait_pin; /* wait-pin to be used */155155+};156156+18157/* Data for each chip select */19158struct gpmc_omap_cs_data {20159 bool valid; /* data is valid */21160 bool is_nand; /* device within this CS is NAND */161161+ struct gpmc_settings *settings;162162+ struct gpmc_device_timings *device_timings;163163+ struct gpmc_timings *gpmc_timings;22164 struct platform_device *pdev; /* device within this CS region */23165 unsigned int pdata_size;24166};