Lines Matching refs:rfbi
73 } rfbi; variable
77 __raw_writel(val, rfbi.base + idx); in rfbi_write_reg()
82 return __raw_readl(rfbi.base + idx); in rfbi_read_reg()
87 rfbi.dss_ick = clk_get(&rfbi.fbdev->dssdev->dev, "ick"); in rfbi_get_clocks()
88 if (IS_ERR(rfbi.dss_ick)) { in rfbi_get_clocks()
89 dev_err(rfbi.fbdev->dev, "can't get ick\n"); in rfbi_get_clocks()
90 return PTR_ERR(rfbi.dss_ick); in rfbi_get_clocks()
93 rfbi.dss1_fck = clk_get(&rfbi.fbdev->dssdev->dev, "dss1_fck"); in rfbi_get_clocks()
94 if (IS_ERR(rfbi.dss1_fck)) { in rfbi_get_clocks()
95 dev_err(rfbi.fbdev->dev, "can't get dss1_fck\n"); in rfbi_get_clocks()
96 clk_put(rfbi.dss_ick); in rfbi_get_clocks()
97 return PTR_ERR(rfbi.dss1_fck); in rfbi_get_clocks()
105 clk_put(rfbi.dss1_fck); in rfbi_put_clocks()
106 clk_put(rfbi.dss_ick); in rfbi_put_clocks()
112 clk_enable(rfbi.dss_ick); in rfbi_enable_clocks()
113 clk_enable(rfbi.dss1_fck); in rfbi_enable_clocks()
115 clk_disable(rfbi.dss1_fck); in rfbi_enable_clocks()
116 clk_disable(rfbi.dss_ick); in rfbi_enable_clocks()
128 time = 1000000000 / rfbi.l4_khz; in rfbi_print_timings()
132 dev_dbg(rfbi.fbdev->dev, "Tick time %u ps\n", time); in rfbi_print_timings()
134 dev_dbg(rfbi.fbdev->dev, in rfbi_print_timings()
141 dev_dbg(rfbi.fbdev->dev, in rfbi_print_timings()
172 *clk_period = 1000000000 / rfbi.l4_khz; in rfbi_get_clk_info()
182 tick_ps = 1000000000 / (rfbi.l4_khz) * div; in ps_to_rfbi_ticks()
212 l4_rate = rfbi.l4_khz / 1000; in rfbi_get_max_tx_rate()
213 dss1_rate = clk_get_rate(rfbi.dss1_fck) / 1000000; in rfbi_get_max_tx_rate()
230 dev_err(rfbi.fbdev->dev, in rfbi_get_max_tx_rate()
232 return rfbi.l4_khz * 1000; in rfbi_get_max_tx_rate()
234 return rfbi.l4_khz * 1000 / min_l4_ticks; in rfbi_get_max_tx_rate()
239 return rfbi.l4_khz * 1000; in rfbi_get_max_tx_rate()
355 rfbi.tearsync_pin_cnt = pin_cnt; in rfbi_setup_tearsync()
356 dev_dbg(rfbi.fbdev->dev, in rfbi_setup_tearsync()
382 dev_dbg(rfbi.fbdev->dev, "tearsync %d line %d mode %d\n", in rfbi_enable_tearsync()
383 enable, line, rfbi.tearsync_mode); in rfbi_enable_tearsync()
391 rfbi.tearsync_mode = rfbi.tearsync_pin_cnt; in rfbi_enable_tearsync()
392 l |= rfbi.tearsync_mode << 2; in rfbi_enable_tearsync()
394 rfbi.tearsync_mode = 0; in rfbi_enable_tearsync()
405 if (rfbi.bits_per_cycle == 16) { in rfbi_write_command()
412 BUG_ON(rfbi.bits_per_cycle != 8); in rfbi_write_command()
422 if (rfbi.bits_per_cycle == 16) { in rfbi_read_data()
431 BUG_ON(rfbi.bits_per_cycle != 8); in rfbi_read_data()
443 if (rfbi.bits_per_cycle == 16) { in rfbi_write_data()
450 BUG_ON(rfbi.bits_per_cycle != 8); in rfbi_write_data()
467 rfbi.lcdc_callback = callback; in rfbi_transfer_area()
468 rfbi.lcdc_callback_data = data; in rfbi_transfer_area()
474 if (!rfbi.tearsync_mode) in rfbi_transfer_area()
493 rfbi.lcdc_callback(rfbi.lcdc_callback_data); in rfbi_dma_callback()
514 rfbi.bits_per_cycle = bpc; in rfbi_set_bits_per_cycle()
523 rfbi.fbdev = fbdev; in rfbi_init()
524 rfbi.base = ioremap(RFBI_BASE, SZ_1K); in rfbi_init()
525 if (!rfbi.base) { in rfbi_init()
534 rfbi.l4_khz = clk_get_rate(rfbi.dss_ick) / 1000; in rfbi_init()
578 iounmap(rfbi.base); in rfbi_cleanup()