diff options
Diffstat (limited to 'drivers/video/omap2/dss/dss.h')
-rw-r--r-- | drivers/video/omap2/dss/dss.h | 59 |
1 files changed, 44 insertions, 15 deletions
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index 610c8e563daa..84758936429d 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h | |||
@@ -268,14 +268,21 @@ void dss_set_dac_pwrdn_bgz(bool enable); | |||
268 | unsigned long dss_get_dpll4_rate(void); | 268 | unsigned long dss_get_dpll4_rate(void); |
269 | int dss_calc_clock_rates(struct dss_clock_info *cinfo); | 269 | int dss_calc_clock_rates(struct dss_clock_info *cinfo); |
270 | int dss_set_clock_div(struct dss_clock_info *cinfo); | 270 | int dss_set_clock_div(struct dss_clock_info *cinfo); |
271 | int dss_calc_clock_div(unsigned long req_pck, struct dss_clock_info *dss_cinfo, | 271 | |
272 | struct dispc_clock_info *dispc_cinfo); | 272 | typedef bool (*dss_div_calc_func)(int fckd, unsigned long fck, void *data); |
273 | bool dss_div_calc(unsigned long fck_min, dss_div_calc_func func, void *data); | ||
273 | 274 | ||
274 | /* SDI */ | 275 | /* SDI */ |
275 | int sdi_init_platform_driver(void) __init; | 276 | int sdi_init_platform_driver(void) __init; |
276 | void sdi_uninit_platform_driver(void) __exit; | 277 | void sdi_uninit_platform_driver(void) __exit; |
277 | 278 | ||
278 | /* DSI */ | 279 | /* DSI */ |
280 | |||
281 | typedef bool (*dsi_pll_calc_func)(int regn, int regm, unsigned long fint, | ||
282 | unsigned long pll, void *data); | ||
283 | typedef bool (*dsi_hsdiv_calc_func)(int regm_dispc, unsigned long dispc, | ||
284 | void *data); | ||
285 | |||
279 | #ifdef CONFIG_OMAP2_DSS_DSI | 286 | #ifdef CONFIG_OMAP2_DSS_DSI |
280 | 287 | ||
281 | struct dentry; | 288 | struct dentry; |
@@ -292,12 +299,17 @@ void dsi_dump_clocks(struct seq_file *s); | |||
292 | void dsi_irq_handler(void); | 299 | void dsi_irq_handler(void); |
293 | u8 dsi_get_pixel_size(enum omap_dss_dsi_pixel_format fmt); | 300 | u8 dsi_get_pixel_size(enum omap_dss_dsi_pixel_format fmt); |
294 | 301 | ||
302 | unsigned long dsi_get_pll_clkin(struct platform_device *dsidev); | ||
303 | |||
304 | bool dsi_hsdiv_calc(struct platform_device *dsidev, unsigned long pll, | ||
305 | unsigned long out_min, dsi_hsdiv_calc_func func, void *data); | ||
306 | bool dsi_pll_calc(struct platform_device *dsidev, unsigned long clkin, | ||
307 | unsigned long pll_min, unsigned long pll_max, | ||
308 | dsi_pll_calc_func func, void *data); | ||
309 | |||
295 | unsigned long dsi_get_pll_hsdiv_dispc_rate(struct platform_device *dsidev); | 310 | unsigned long dsi_get_pll_hsdiv_dispc_rate(struct platform_device *dsidev); |
296 | int dsi_pll_set_clock_div(struct platform_device *dsidev, | 311 | int dsi_pll_set_clock_div(struct platform_device *dsidev, |
297 | struct dsi_clock_info *cinfo); | 312 | struct dsi_clock_info *cinfo); |
298 | int dsi_pll_calc_clock_div_pck(struct platform_device *dsidev, | ||
299 | unsigned long req_pck, struct dsi_clock_info *cinfo, | ||
300 | struct dispc_clock_info *dispc_cinfo); | ||
301 | int dsi_pll_init(struct platform_device *dsidev, bool enable_hsclk, | 313 | int dsi_pll_init(struct platform_device *dsidev, bool enable_hsclk, |
302 | bool enable_hsdiv); | 314 | bool enable_hsdiv); |
303 | void dsi_pll_uninit(struct platform_device *dsidev, bool disconnect_lanes); | 315 | void dsi_pll_uninit(struct platform_device *dsidev, bool disconnect_lanes); |
@@ -328,14 +340,6 @@ static inline int dsi_pll_set_clock_div(struct platform_device *dsidev, | |||
328 | WARN("%s: DSI not compiled in\n", __func__); | 340 | WARN("%s: DSI not compiled in\n", __func__); |
329 | return -ENODEV; | 341 | return -ENODEV; |
330 | } | 342 | } |
331 | static inline int dsi_pll_calc_clock_div_pck(struct platform_device *dsidev, | ||
332 | unsigned long req_pck, | ||
333 | struct dsi_clock_info *dsi_cinfo, | ||
334 | struct dispc_clock_info *dispc_cinfo) | ||
335 | { | ||
336 | WARN("%s: DSI not compiled in\n", __func__); | ||
337 | return -ENODEV; | ||
338 | } | ||
339 | static inline int dsi_pll_init(struct platform_device *dsidev, | 343 | static inline int dsi_pll_init(struct platform_device *dsidev, |
340 | bool enable_hsclk, bool enable_hsdiv) | 344 | bool enable_hsclk, bool enable_hsdiv) |
341 | { | 345 | { |
@@ -356,6 +360,27 @@ static inline struct platform_device *dsi_get_dsidev_from_id(int module) | |||
356 | { | 360 | { |
357 | return NULL; | 361 | return NULL; |
358 | } | 362 | } |
363 | |||
364 | static inline unsigned long dsi_get_pll_clkin(struct platform_device *dsidev) | ||
365 | { | ||
366 | return 0; | ||
367 | } | ||
368 | |||
369 | static inline bool dsi_hsdiv_calc(struct platform_device *dsidev, | ||
370 | unsigned long pll, unsigned long out_min, | ||
371 | dsi_hsdiv_calc_func func, void *data) | ||
372 | { | ||
373 | return false; | ||
374 | } | ||
375 | |||
376 | static inline bool dsi_pll_calc(struct platform_device *dsidev, | ||
377 | unsigned long clkin, | ||
378 | unsigned long pll_min, unsigned long pll_max, | ||
379 | dsi_pll_calc_func func, void *data) | ||
380 | { | ||
381 | return false; | ||
382 | } | ||
383 | |||
359 | #endif | 384 | #endif |
360 | 385 | ||
361 | /* DPI */ | 386 | /* DPI */ |
@@ -376,11 +401,15 @@ void dispc_enable_fifomerge(bool enable); | |||
376 | void dispc_enable_gamma_table(bool enable); | 401 | void dispc_enable_gamma_table(bool enable); |
377 | void dispc_set_loadmode(enum omap_dss_load_mode mode); | 402 | void dispc_set_loadmode(enum omap_dss_load_mode mode); |
378 | 403 | ||
404 | typedef bool (*dispc_div_calc_func)(int lckd, int pckd, unsigned long lck, | ||
405 | unsigned long pck, void *data); | ||
406 | bool dispc_div_calc(unsigned long dispc, | ||
407 | unsigned long pck_min, unsigned long pck_max, | ||
408 | dispc_div_calc_func func, void *data); | ||
409 | |||
379 | bool dispc_mgr_timings_ok(enum omap_channel channel, | 410 | bool dispc_mgr_timings_ok(enum omap_channel channel, |
380 | const struct omap_video_timings *timings); | 411 | const struct omap_video_timings *timings); |
381 | unsigned long dispc_fclk_rate(void); | 412 | unsigned long dispc_fclk_rate(void); |
382 | void dispc_find_clk_divs(unsigned long req_pck, unsigned long fck, | ||
383 | struct dispc_clock_info *cinfo); | ||
384 | int dispc_calc_clock_rates(unsigned long dispc_fclk_rate, | 413 | int dispc_calc_clock_rates(unsigned long dispc_fclk_rate, |
385 | struct dispc_clock_info *cinfo); | 414 | struct dispc_clock_info *cinfo); |
386 | 415 | ||