[PATCH] tty_io.c balance tty_ldisc_ref()
[linux/fpc-iii.git] / include / asm-arm / arch-cl7500 / acornfb.h
blobaea6330c97453f624a2c8bd5c2ca4958b603e08a
1 #define acornfb_valid_pixrate(var) (var->pixclock >= 39325 && var->pixclock <= 40119)
3 static inline void
4 acornfb_vidc20_find_rates(struct vidc_timing *vidc,
5 struct fb_var_screeninfo *var)
7 u_int bandwidth;
9 vidc->control |= VIDC20_CTRL_PIX_CK;
11 /* Calculate bandwidth */
12 bandwidth = var->pixclock * 8 / var->bits_per_pixel;
14 /* Encode bandwidth as VIDC20 setting */
15 if (bandwidth > 16667*2)
16 vidc->control |= VIDC20_CTRL_FIFO_16;
17 else if (bandwidth > 13333*2)
18 vidc->control |= VIDC20_CTRL_FIFO_20;
19 else if (bandwidth > 11111*2)
20 vidc->control |= VIDC20_CTRL_FIFO_24;
21 else
22 vidc->control |= VIDC20_CTRL_FIFO_28;
24 vidc->pll_ctl = 0x2020;
27 #ifdef CONFIG_CHRONTEL_7003
28 #define acornfb_default_control() VIDC20_CTRL_PIX_HCLK
29 #else
30 #define acornfb_default_control() VIDC20_CTRL_PIX_VCLK
31 #endif
33 #define acornfb_default_econtrol() VIDC20_ECTL_DAC | VIDC20_ECTL_REG(3) | VIDC20_ECTL_ECK