1 #include <linux/config.h>
2 #define acornfb_valid_pixrate(var) (var->pixclock >= 39325 && var->pixclock <= 40119)
5 acornfb_vidc20_find_rates(struct vidc_timing *vidc,
6 struct fb_var_screeninfo *var)
10 vidc->control |= VIDC20_CTRL_PIX_CK;
12 /* Calculate bandwidth */
13 bandwidth = var->pixclock * 8 / var->bits_per_pixel;
15 /* Encode bandwidth as VIDC20 setting */
16 if (bandwidth > 16667*2)
17 vidc->control |= VIDC20_CTRL_FIFO_16;
18 else if (bandwidth > 13333*2)
19 vidc->control |= VIDC20_CTRL_FIFO_20;
20 else if (bandwidth > 11111*2)
21 vidc->control |= VIDC20_CTRL_FIFO_24;
23 vidc->control |= VIDC20_CTRL_FIFO_28;
25 vidc->pll_ctl = 0x2020;
28 #ifdef CONFIG_CHRONTEL_7003
29 #define acornfb_default_control() VIDC20_CTRL_PIX_HCLK
31 #define acornfb_default_control() VIDC20_CTRL_PIX_VCLK
34 #define acornfb_default_econtrol() VIDC20_ECTL_DAC | VIDC20_ECTL_REG(3) | VIDC20_ECTL_ECK