Lines Matching refs:gpmc_t

1223 	struct gpmc_timings gpmc_t;  in gpmc_omap_onenand_set_timings()  local
1235 gpmc_omap_onenand_calc_sync_timings(&gpmc_t, &gpmc_s, freq, latency); in gpmc_omap_onenand_set_timings()
1241 return gpmc_cs_set_timings(cs, &gpmc_t, &gpmc_s); in gpmc_omap_onenand_set_timings()
1505 static int gpmc_calc_sync_read_timings(struct gpmc_timings *gpmc_t, in gpmc_calc_sync_read_timings() argument
1519 temp = max_t(u32, temp, gpmc_t->clk_activation + dev_t->t_avdh); in gpmc_calc_sync_read_timings()
1520 temp = max_t(u32, gpmc_t->adv_on + gpmc_ticks_to_ps(1), temp); in gpmc_calc_sync_read_timings()
1522 gpmc_t->adv_rd_off = gpmc_round_ps_to_ticks(temp); in gpmc_calc_sync_read_timings()
1527 temp = max_t(u32, temp, gpmc_t->clk_activation + dev_t->t_ach); in gpmc_calc_sync_read_timings()
1528 temp = max_t(u32, temp, gpmc_t->adv_rd_off + in gpmc_calc_sync_read_timings()
1531 gpmc_t->oe_on = gpmc_round_ps_to_ticks(temp); in gpmc_calc_sync_read_timings()
1538 temp = max_t(u32, dev_t->t_iaa, dev_t->cyc_iaa * gpmc_t->sync_clk); in gpmc_calc_sync_read_timings()
1539 temp += gpmc_t->clk_activation; in gpmc_calc_sync_read_timings()
1541 temp = max_t(u32, temp, gpmc_t->oe_on + in gpmc_calc_sync_read_timings()
1543 gpmc_t->access = gpmc_round_ps_to_ticks(temp); in gpmc_calc_sync_read_timings()
1545 gpmc_t->oe_off = gpmc_t->access + gpmc_ticks_to_ps(1); in gpmc_calc_sync_read_timings()
1546 gpmc_t->cs_rd_off = gpmc_t->oe_off; in gpmc_calc_sync_read_timings()
1550 temp = gpmc_round_ps_to_sync_clk(temp, gpmc_t->sync_clk) + in gpmc_calc_sync_read_timings()
1551 gpmc_t->access; in gpmc_calc_sync_read_timings()
1554 temp = max_t(u32, temp, gpmc_t->cs_rd_off + dev_t->t_ce_rdyz); in gpmc_calc_sync_read_timings()
1555 gpmc_t->rd_cycle = gpmc_round_ps_to_ticks(temp); in gpmc_calc_sync_read_timings()
1560 static int gpmc_calc_sync_write_timings(struct gpmc_timings *gpmc_t, in gpmc_calc_sync_write_timings() argument
1570 gpmc_t->clk_activation + dev_t->t_avdh); in gpmc_calc_sync_write_timings()
1571 temp = max_t(u32, gpmc_t->adv_on + gpmc_ticks_to_ps(1), temp); in gpmc_calc_sync_write_timings()
1573 gpmc_t->adv_wr_off = gpmc_round_ps_to_ticks(temp); in gpmc_calc_sync_write_timings()
1577 gpmc_t->clk_activation + dev_t->t_rdyo); in gpmc_calc_sync_write_timings()
1583 gpmc_t->adv_wr_off + dev_t->t_aavdh); in gpmc_calc_sync_write_timings()
1584 temp = max_t(u32, temp, gpmc_t->adv_wr_off + in gpmc_calc_sync_write_timings()
1587 gpmc_t->wr_data_mux_bus = gpmc_round_ps_to_ticks(temp); in gpmc_calc_sync_write_timings()
1591 gpmc_t->we_on = gpmc_round_ps_to_ticks(dev_t->t_weasu); in gpmc_calc_sync_write_timings()
1593 gpmc_t->we_on = gpmc_t->wr_data_mux_bus; in gpmc_calc_sync_write_timings()
1597 gpmc_t->wr_access = gpmc_t->access; in gpmc_calc_sync_write_timings()
1600 temp = gpmc_t->we_on + dev_t->t_wpl; in gpmc_calc_sync_write_timings()
1602 gpmc_t->wr_access + gpmc_ticks_to_ps(1)); in gpmc_calc_sync_write_timings()
1604 gpmc_t->we_on + gpmc_ticks_to_ps(dev_t->cyc_wpl)); in gpmc_calc_sync_write_timings()
1605 gpmc_t->we_off = gpmc_round_ps_to_ticks(temp); in gpmc_calc_sync_write_timings()
1607 gpmc_t->cs_wr_off = gpmc_round_ps_to_ticks(gpmc_t->we_off + in gpmc_calc_sync_write_timings()
1611 temp = gpmc_round_ps_to_sync_clk(dev_t->t_cez_w, gpmc_t->sync_clk); in gpmc_calc_sync_write_timings()
1612 temp += gpmc_t->wr_access; in gpmc_calc_sync_write_timings()
1616 gpmc_t->cs_wr_off + dev_t->t_ce_rdyz); in gpmc_calc_sync_write_timings()
1617 gpmc_t->wr_cycle = gpmc_round_ps_to_ticks(temp); in gpmc_calc_sync_write_timings()
1622 static int gpmc_calc_async_read_timings(struct gpmc_timings *gpmc_t, in gpmc_calc_async_read_timings() argument
1631 temp = max_t(u32, gpmc_t->adv_on + gpmc_ticks_to_ps(1), temp); in gpmc_calc_async_read_timings()
1632 gpmc_t->adv_rd_off = gpmc_round_ps_to_ticks(temp); in gpmc_calc_async_read_timings()
1638 gpmc_t->adv_rd_off + dev_t->t_aavdh); in gpmc_calc_async_read_timings()
1639 gpmc_t->oe_on = gpmc_round_ps_to_ticks(temp); in gpmc_calc_async_read_timings()
1643 gpmc_t->oe_on + dev_t->t_oe); in gpmc_calc_async_read_timings()
1645 gpmc_t->cs_on + dev_t->t_ce); in gpmc_calc_async_read_timings()
1647 gpmc_t->adv_on + dev_t->t_aa); in gpmc_calc_async_read_timings()
1648 gpmc_t->access = gpmc_round_ps_to_ticks(temp); in gpmc_calc_async_read_timings()
1650 gpmc_t->oe_off = gpmc_t->access + gpmc_ticks_to_ps(1); in gpmc_calc_async_read_timings()
1651 gpmc_t->cs_rd_off = gpmc_t->oe_off; in gpmc_calc_async_read_timings()
1655 gpmc_t->cs_rd_off + dev_t->t_cez_r); in gpmc_calc_async_read_timings()
1656 temp = max_t(u32, temp, gpmc_t->oe_off + dev_t->t_oez); in gpmc_calc_async_read_timings()
1657 gpmc_t->rd_cycle = gpmc_round_ps_to_ticks(temp); in gpmc_calc_async_read_timings()
1662 static int gpmc_calc_async_write_timings(struct gpmc_timings *gpmc_t, in gpmc_calc_async_write_timings() argument
1671 temp = max_t(u32, gpmc_t->adv_on + gpmc_ticks_to_ps(1), temp); in gpmc_calc_async_write_timings()
1672 gpmc_t->adv_wr_off = gpmc_round_ps_to_ticks(temp); in gpmc_calc_async_write_timings()
1677 temp = max_t(u32, temp, gpmc_t->adv_wr_off + dev_t->t_aavdh); in gpmc_calc_async_write_timings()
1678 temp = max_t(u32, temp, gpmc_t->adv_wr_off + in gpmc_calc_async_write_timings()
1681 gpmc_t->wr_data_mux_bus = gpmc_round_ps_to_ticks(temp); in gpmc_calc_async_write_timings()
1685 gpmc_t->we_on = gpmc_round_ps_to_ticks(dev_t->t_weasu); in gpmc_calc_async_write_timings()
1687 gpmc_t->we_on = gpmc_t->wr_data_mux_bus; in gpmc_calc_async_write_timings()
1690 temp = gpmc_t->we_on + dev_t->t_wpl; in gpmc_calc_async_write_timings()
1691 gpmc_t->we_off = gpmc_round_ps_to_ticks(temp); in gpmc_calc_async_write_timings()
1693 gpmc_t->cs_wr_off = gpmc_round_ps_to_ticks(gpmc_t->we_off + in gpmc_calc_async_write_timings()
1698 gpmc_t->cs_wr_off + dev_t->t_cez_w); in gpmc_calc_async_write_timings()
1699 gpmc_t->wr_cycle = gpmc_round_ps_to_ticks(temp); in gpmc_calc_async_write_timings()
1704 static int gpmc_calc_sync_common_timings(struct gpmc_timings *gpmc_t, in gpmc_calc_sync_common_timings() argument
1709 gpmc_t->sync_clk = gpmc_calc_divider(dev_t->clk) * in gpmc_calc_sync_common_timings()
1712 gpmc_t->page_burst_access = gpmc_round_ps_to_sync_clk( in gpmc_calc_sync_common_timings()
1714 gpmc_t->sync_clk); in gpmc_calc_sync_common_timings()
1717 gpmc_t->clk_activation = gpmc_round_ps_to_ticks(temp); in gpmc_calc_sync_common_timings()
1719 if (gpmc_calc_divider(gpmc_t->sync_clk) != 1) in gpmc_calc_sync_common_timings()
1723 gpmc_t->bool_timings.cs_extra_delay = true; in gpmc_calc_sync_common_timings()
1725 gpmc_t->bool_timings.adv_extra_delay = true; in gpmc_calc_sync_common_timings()
1727 gpmc_t->bool_timings.oe_extra_delay = true; in gpmc_calc_sync_common_timings()
1729 gpmc_t->bool_timings.we_extra_delay = true; in gpmc_calc_sync_common_timings()
1734 static int gpmc_calc_common_timings(struct gpmc_timings *gpmc_t, in gpmc_calc_common_timings() argument
1741 gpmc_t->cs_on = gpmc_round_ps_to_ticks(dev_t->t_ceasu); in gpmc_calc_common_timings()
1747 gpmc_t->cs_on + dev_t->t_ce_avd); in gpmc_calc_common_timings()
1748 gpmc_t->adv_on = gpmc_round_ps_to_ticks(temp); in gpmc_calc_common_timings()
1751 gpmc_calc_sync_common_timings(gpmc_t, dev_t); in gpmc_calc_common_timings()
1784 int gpmc_calc_timings(struct gpmc_timings *gpmc_t, in gpmc_calc_timings() argument
1795 memset(gpmc_t, 0, sizeof(*gpmc_t)); in gpmc_calc_timings()
1797 gpmc_calc_common_timings(gpmc_t, dev_t, sync); in gpmc_calc_timings()
1800 gpmc_calc_sync_read_timings(gpmc_t, dev_t, mux); in gpmc_calc_timings()
1802 gpmc_calc_async_read_timings(gpmc_t, dev_t, mux); in gpmc_calc_timings()
1805 gpmc_calc_sync_write_timings(gpmc_t, dev_t, mux); in gpmc_calc_timings()
1807 gpmc_calc_async_write_timings(gpmc_t, dev_t, mux); in gpmc_calc_timings()
1810 gpmc_convert_ps_to_ns(gpmc_t); in gpmc_calc_timings()
1948 struct gpmc_timings *gpmc_t) in gpmc_read_timings_dt() argument
1952 if (!np || !gpmc_t) in gpmc_read_timings_dt()
1955 memset(gpmc_t, 0, sizeof(*gpmc_t)); in gpmc_read_timings_dt()
1958 of_property_read_u32(np, "gpmc,sync-clk-ps", &gpmc_t->sync_clk); in gpmc_read_timings_dt()
1961 of_property_read_u32(np, "gpmc,cs-on-ns", &gpmc_t->cs_on); in gpmc_read_timings_dt()
1962 of_property_read_u32(np, "gpmc,cs-rd-off-ns", &gpmc_t->cs_rd_off); in gpmc_read_timings_dt()
1963 of_property_read_u32(np, "gpmc,cs-wr-off-ns", &gpmc_t->cs_wr_off); in gpmc_read_timings_dt()
1966 of_property_read_u32(np, "gpmc,adv-on-ns", &gpmc_t->adv_on); in gpmc_read_timings_dt()
1967 of_property_read_u32(np, "gpmc,adv-rd-off-ns", &gpmc_t->adv_rd_off); in gpmc_read_timings_dt()
1968 of_property_read_u32(np, "gpmc,adv-wr-off-ns", &gpmc_t->adv_wr_off); in gpmc_read_timings_dt()
1970 &gpmc_t->adv_aad_mux_on); in gpmc_read_timings_dt()
1972 &gpmc_t->adv_aad_mux_rd_off); in gpmc_read_timings_dt()
1974 &gpmc_t->adv_aad_mux_wr_off); in gpmc_read_timings_dt()
1977 of_property_read_u32(np, "gpmc,we-on-ns", &gpmc_t->we_on); in gpmc_read_timings_dt()
1978 of_property_read_u32(np, "gpmc,we-off-ns", &gpmc_t->we_off); in gpmc_read_timings_dt()
1981 of_property_read_u32(np, "gpmc,oe-on-ns", &gpmc_t->oe_on); in gpmc_read_timings_dt()
1982 of_property_read_u32(np, "gpmc,oe-off-ns", &gpmc_t->oe_off); in gpmc_read_timings_dt()
1984 &gpmc_t->oe_aad_mux_on); in gpmc_read_timings_dt()
1986 &gpmc_t->oe_aad_mux_off); in gpmc_read_timings_dt()
1990 &gpmc_t->page_burst_access); in gpmc_read_timings_dt()
1991 of_property_read_u32(np, "gpmc,access-ns", &gpmc_t->access); in gpmc_read_timings_dt()
1992 of_property_read_u32(np, "gpmc,rd-cycle-ns", &gpmc_t->rd_cycle); in gpmc_read_timings_dt()
1993 of_property_read_u32(np, "gpmc,wr-cycle-ns", &gpmc_t->wr_cycle); in gpmc_read_timings_dt()
1995 &gpmc_t->bus_turnaround); in gpmc_read_timings_dt()
1997 &gpmc_t->cycle2cycle_delay); in gpmc_read_timings_dt()
1999 &gpmc_t->wait_monitoring); in gpmc_read_timings_dt()
2001 &gpmc_t->clk_activation); in gpmc_read_timings_dt()
2004 of_property_read_u32(np, "gpmc,wr-access-ns", &gpmc_t->wr_access); in gpmc_read_timings_dt()
2006 &gpmc_t->wr_data_mux_bus); in gpmc_read_timings_dt()
2009 p = &gpmc_t->bool_timings; in gpmc_read_timings_dt()
2035 struct gpmc_timings gpmc_t; in gpmc_probe_generic_child() local
2073 gpmc_read_timings_dt(child, &gpmc_t); in gpmc_probe_generic_child()
2080 if (!gpmc_t.cs_rd_off) { in gpmc_probe_generic_child()
2188 ret = gpmc_cs_set_timings(cs, &gpmc_t, &gpmc_s); in gpmc_probe_generic_child()