OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-arm/] [arch-cl7500/] [acornfb.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1276 phoenix
#include <linux/config.h>
2
#define acornfb_valid_pixrate(rate) (rate >= 39325 && rate <= 40119)
3
 
4
static inline void
5
acornfb_vidc20_find_rates(struct vidc_timing *vidc,
6
                          struct fb_var_screeninfo *var)
7
{
8
        u_int bandwidth;
9
 
10
        vidc->control |= VIDC20_CTRL_PIX_CK;
11
 
12
        /* Calculate bandwidth */
13
        bandwidth = var->pixclock * 8 / var->bits_per_pixel;
14
 
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;
22
        else
23
                vidc->control |= VIDC20_CTRL_FIFO_28;
24
 
25
        vidc->pll_ctl  = 0x2020;
26
}
27
 
28
#ifdef CONFIG_CHRONTEL_7003
29
#define acornfb_default_control()       VIDC20_CTRL_PIX_HCLK
30
#else
31
#define acornfb_default_control()       VIDC20_CTRL_PIX_VCLK
32
#endif
33
 
34
#define acornfb_default_econtrol()      VIDC20_ECTL_DAC | VIDC20_ECTL_REG(3) | VIDC20_ECTL_ECK

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.