linux-hardened/include/asm-arm/arch-cl7500/acornfb.h
Linus Torvalds 1da177e4c3 Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
2005-04-16 15:20:36 -07:00

34 lines
932 B
C

#include <linux/config.h>
#define acornfb_valid_pixrate(var) (var->pixclock >= 39325 && var->pixclock <= 40119)
static inline void
acornfb_vidc20_find_rates(struct vidc_timing *vidc,
struct fb_var_screeninfo *var)
{
u_int bandwidth;
vidc->control |= VIDC20_CTRL_PIX_CK;
/* Calculate bandwidth */
bandwidth = var->pixclock * 8 / var->bits_per_pixel;
/* Encode bandwidth as VIDC20 setting */
if (bandwidth > 16667*2)
vidc->control |= VIDC20_CTRL_FIFO_16;
else if (bandwidth > 13333*2)
vidc->control |= VIDC20_CTRL_FIFO_20;
else if (bandwidth > 11111*2)
vidc->control |= VIDC20_CTRL_FIFO_24;
else
vidc->control |= VIDC20_CTRL_FIFO_28;
vidc->pll_ctl = 0x2020;
}
#ifdef CONFIG_CHRONTEL_7003
#define acornfb_default_control() VIDC20_CTRL_PIX_HCLK
#else
#define acornfb_default_control() VIDC20_CTRL_PIX_VCLK
#endif
#define acornfb_default_econtrol() VIDC20_ECTL_DAC | VIDC20_ECTL_REG(3) | VIDC20_ECTL_ECK