H A D | omap-gpmc.c | 31 #include <linux/omap-gpmc.h> 40 #define DEVICE_NAME "omap-gpmc" 207 /* Structure to save gpmc cs context */ 220 * Structure to save/restore gpmc context 415 * @name: DTS node name, w/o "gpmc," 419 * raw format: gpmc,name = <value> 420 * tick format: gpmc,name = <value> /‍* x ns -- y ns; x ticks *‍/ 460 pr_info("gpmc,%s = <%u> /* %u ns - %u ns; %i ticks%s*/\n", get_gpmc_timing_reg() 465 pr_info("gpmc,%s = <%u>%s\n", name, l, get_gpmc_timing_reg() 492 pr_info("gpmc cs%i %s:\n", cs, desc); gpmc_show_regs() 502 * Note that gpmc,wait-pin handing wrongly assumes bit 8 is available, 509 pr_info("gpmc cs%i access configuration:\n", cs); gpmc_cs_show_timings() 522 GPMC_GET_RAW_BOOL(GPMC_CS_CONFIG1, 29, 29, "gpmc,sync-read"); gpmc_cs_show_timings() 536 pr_info("gpmc cs%i timings configuration:\n", cs); gpmc_cs_show_timings() 706 * Calculate GPMCFCLKDIVIDER independent of gpmc,sync-clk-ps in DT for gpmc_cs_set_timings() 846 struct gpmc_cs_data *gpmc = &gpmc_cs[cs]; gpmc_cs_set_reserved() local 848 gpmc->flags |= GPMC_CS_RESERVED; gpmc_cs_set_reserved() 853 struct gpmc_cs_data *gpmc = &gpmc_cs[cs]; gpmc_cs_reserved() local 855 return gpmc->flags & GPMC_CS_RESERVED; gpmc_cs_reserved() 860 struct gpmc_cs_data *gpmc = &gpmc_cs[cs]; gpmc_cs_set_name() local 862 gpmc->name = name; gpmc_cs_set_name() 867 struct gpmc_cs_data *gpmc = &gpmc_cs[cs]; gpmc_cs_get_name() local 869 return gpmc->name; gpmc_cs_get_name() 888 struct gpmc_cs_data *gpmc = &gpmc_cs[cs]; gpmc_cs_insert_mem() local 889 struct resource *res = &gpmc->mem; gpmc_cs_insert_mem() 904 struct gpmc_cs_data *gpmc = &gpmc_cs[cs]; gpmc_cs_delete_mem() local 905 struct resource *res = &gpmc->mem; gpmc_cs_delete_mem() 962 struct gpmc_cs_data *gpmc = &gpmc_cs[cs]; gpmc_cs_request() local 963 struct resource *res = &gpmc->mem; gpmc_cs_request() 1008 struct gpmc_cs_data *gpmc = &gpmc_cs[cs]; gpmc_cs_free() local 1009 struct resource *res = &gpmc->mem; gpmc_cs_free() 1027 * gpmc_configure - write request to configure gpmc 1162 gpmc_irq_chip.name = "gpmc"; gpmc_setup_irq() 1189 return request_irq(gpmc_irq, gpmc_handle_irq, 0, "gpmc", NULL); gpmc_setup_irq() 1655 { .compatible = "ti,omap2420-gpmc" }, 1656 { .compatible = "ti,omap2430-gpmc" }, 1657 { .compatible = "ti,omap3430-gpmc" }, /* omap3430 & omap3630 */ 1658 { .compatible = "ti,omap4430-gpmc" }, /* omap4430 & omap4460 & omap543x */ 1659 { .compatible = "ti,am3352-gpmc" }, /* am335x devices */ 1665 * gpmc_read_settings_dt - read gpmc settings from device-tree 1666 * @np: pointer to device-tree node for a gpmc child device 1667 * @p: pointer to gpmc settings structure 1678 p->sync_read = of_property_read_bool(np, "gpmc,sync-read"); gpmc_read_settings_dt() 1679 p->sync_write = of_property_read_bool(np, "gpmc,sync-write"); gpmc_read_settings_dt() 1680 of_property_read_u32(np, "gpmc,device-width", &p->device_width); gpmc_read_settings_dt() 1681 of_property_read_u32(np, "gpmc,mux-add-data", &p->mux_add_data); gpmc_read_settings_dt() 1683 if (!of_property_read_u32(np, "gpmc,burst-length", &p->burst_len)) { gpmc_read_settings_dt() 1684 p->burst_wrap = of_property_read_bool(np, "gpmc,burst-wrap"); gpmc_read_settings_dt() 1685 p->burst_read = of_property_read_bool(np, "gpmc,burst-read"); gpmc_read_settings_dt() 1686 p->burst_write = of_property_read_bool(np, "gpmc,burst-write"); gpmc_read_settings_dt() 1692 if (!of_property_read_u32(np, "gpmc,wait-pin", &p->wait_pin)) { gpmc_read_settings_dt() 1694 "gpmc,wait-on-read"); gpmc_read_settings_dt() 1696 "gpmc,wait-on-write"); gpmc_read_settings_dt() 1714 of_property_read_u32(np, "gpmc,sync-clk-ps", &gpmc_t->sync_clk); gpmc_read_timings_dt() 1717 of_property_read_u32(np, "gpmc,cs-on-ns", &gpmc_t->cs_on); gpmc_read_timings_dt() 1718 of_property_read_u32(np, "gpmc,cs-rd-off-ns", &gpmc_t->cs_rd_off); gpmc_read_timings_dt() 1719 of_property_read_u32(np, "gpmc,cs-wr-off-ns", &gpmc_t->cs_wr_off); gpmc_read_timings_dt() 1722 of_property_read_u32(np, "gpmc,adv-on-ns", &gpmc_t->adv_on); gpmc_read_timings_dt() 1723 of_property_read_u32(np, "gpmc,adv-rd-off-ns", &gpmc_t->adv_rd_off); gpmc_read_timings_dt() 1724 of_property_read_u32(np, "gpmc,adv-wr-off-ns", &gpmc_t->adv_wr_off); gpmc_read_timings_dt() 1727 of_property_read_u32(np, "gpmc,we-on-ns", &gpmc_t->we_on); gpmc_read_timings_dt() 1728 of_property_read_u32(np, "gpmc,we-off-ns", &gpmc_t->we_off); gpmc_read_timings_dt() 1731 of_property_read_u32(np, "gpmc,oe-on-ns", &gpmc_t->oe_on); gpmc_read_timings_dt() 1732 of_property_read_u32(np, "gpmc,oe-off-ns", &gpmc_t->oe_off); gpmc_read_timings_dt() 1735 of_property_read_u32(np, "gpmc,page-burst-access-ns", gpmc_read_timings_dt() 1737 of_property_read_u32(np, "gpmc,access-ns", &gpmc_t->access); gpmc_read_timings_dt() 1738 of_property_read_u32(np, "gpmc,rd-cycle-ns", &gpmc_t->rd_cycle); gpmc_read_timings_dt() 1739 of_property_read_u32(np, "gpmc,wr-cycle-ns", &gpmc_t->wr_cycle); gpmc_read_timings_dt() 1740 of_property_read_u32(np, "gpmc,bus-turnaround-ns", gpmc_read_timings_dt() 1742 of_property_read_u32(np, "gpmc,cycle2cycle-delay-ns", gpmc_read_timings_dt() 1744 of_property_read_u32(np, "gpmc,wait-monitoring-ns", gpmc_read_timings_dt() 1746 of_property_read_u32(np, "gpmc,clk-activation-ns", gpmc_read_timings_dt() 1750 of_property_read_u32(np, "gpmc,wr-access-ns", &gpmc_t->wr_access); gpmc_read_timings_dt() 1751 of_property_read_u32(np, "gpmc,wr-data-mux-bus-ns", gpmc_read_timings_dt() 1758 of_property_read_bool(np, "gpmc,cycle2cycle-diffcsen"); gpmc_read_timings_dt() 1760 of_property_read_bool(np, "gpmc,cycle2cycle-samecsen"); gpmc_read_timings_dt() 1761 p->we_extra_delay = of_property_read_bool(np, "gpmc,we-extra-delay"); gpmc_read_timings_dt() 1762 p->oe_extra_delay = of_property_read_bool(np, "gpmc,oe-extra-delay"); gpmc_read_timings_dt() 1763 p->adv_extra_delay = of_property_read_bool(np, "gpmc,adv-extra-delay"); gpmc_read_timings_dt() 1764 p->cs_extra_delay = of_property_read_bool(np, "gpmc,cs-extra-delay"); gpmc_read_timings_dt() 1766 of_property_read_bool(np, "gpmc,time-para-granularity"); gpmc_read_timings_dt() 1906 * gpmc_probe_generic_child - configures the gpmc for a child device 1907 * @pdev: pointer to gpmc platform device 1968 /* CS must be disabled while making changes to gpmc configuration */ gpmc_probe_generic_child() 1973 * location in the gpmc address space. When booting with gpmc_probe_generic_child() 1997 dev_err(&pdev->dev, "failed to set gpmc timings for: %s\n", gpmc_probe_generic_child() 2027 dev_err(&pdev->dev, "failed to create gpmc child %s\n", child->name); gpmc_probe_generic_child() 2046 ret = of_property_read_u32(pdev->dev.of_node, "gpmc,num-cs", gpmc_probe_dt() 2060 ret = of_property_read_u32(pdev->dev.of_node, "gpmc,num-waitpins", gpmc_probe_dt()
|