3 * BuS Elektronik GmbH & Co.KG <esw@bus-elektonik.de>
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
25 #include <asm/m5282.h>
28 vu_char *vcxk_bws = (vu_char *)(CFG_CS3_BASE);
29 #define VCXK_BWS vcxk_bws
31 static ulong vcxk_driver;
34 ulong search_vcxk_driver(void);
36 void vcxk_setbrightness(short brightness);
37 int vcxk_request(void);
38 int vcxk_acknowledge_wait(void);
39 void vcxk_clear(void);
43 VIDEO_Invert_CFG &= ~VIDEO_Invert_IO;
44 VIDEO_INVERT_PORT |= VIDEO_INVERT_PIN;
45 VIDEO_INVERT_DDR |= VIDEO_INVERT_PIN;
47 VIDEO_REQUEST_PORT |= VIDEO_REQUEST_PIN;
48 VIDEO_REQUEST_DDR |= VIDEO_REQUEST_PIN;
50 VIDEO_ACKNOWLEDGE_DDR &= ~VIDEO_ACKNOWLEDGE_PIN;
52 vcxk_driver = search_vcxk_driver();
55 /* use flash resist driver */
61 vcxk_setbrightness(1000);
63 VIDEO_ENABLE_DDR |= VIDEO_ENABLE_PIN;
64 VIDEO_ENABLE_PORT |= VIDEO_ENABLE_PIN;
65 VIDEO_ENABLE_PORT &= ~VIDEO_ENABLE_PIN;
69 void vcxk_loadimage(ulong source)
72 vcxk_acknowledge_wait();
73 for (cnt=0; cnt<16384; cnt++)
75 VCXK_BWS[cnt*2] = (*(vu_char*) source);
83 vcxk_acknowledge_wait();
91 for (cnt=0; cnt<16384; cnt++)
93 VCXK_BWS[cnt*2] = 0x00;
97 void vcxk_setbrightness(short brightness)
99 VCXK_BWS[0x8000]=(brightness >> 4) +2;
100 VCXK_BWS[0xC000]= (brightness + 23) >> 8;
101 VCXK_BWS[0xC001]= (brightness + 23) & 0xFF;
104 int vcxk_request(void)
108 /* use flash resist driver */
112 VIDEO_REQUEST_PORT &= ~VIDEO_REQUEST_PIN;
113 VIDEO_REQUEST_PORT |= VIDEO_REQUEST_PIN;
118 int vcxk_acknowledge_wait(void)
122 /* use flash resist driver */
126 while (!(VIDEO_ACKNOWLEDGE_PORT & VIDEO_ACKNOWLEDGE_PIN));
131 ulong search_vcxk_driver(void)