blob: 98f5f5a30a5142df6a4718f6b742056e4c968176 [file] [log] [blame]
wdenk56f94be2002-11-05 16:35:14 +00001/*
wdenk0608e042004-03-25 19:29:38 +00002 * (C) Copyright 2000-2004
wdenk56f94be2002-11-05 16:35:14 +00003 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 * Klaus Heydeck, Kieback & Peter GmbH & Co KG, heydeck@kieback-peter.de
5 *
6 * See file CREDITS for list of people who contributed to this
7 * project.
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
22 * MA 02111-1307 USA
23 */
24
25#include <common.h>
26#include <mpc8xx.h>
wdenk0608e042004-03-25 19:29:38 +000027#include "../common/kup.h"
wdenk56f94be2002-11-05 16:35:14 +000028#ifdef CONFIG_KUP4K_LOGO
29 #include "s1d13706.h"
30#endif
31
Wolfgang Denkd87080b2006-03-31 18:32:53 +020032DECLARE_GLOBAL_DATA_PTR;
33
wdenk0608e042004-03-25 19:29:38 +000034#undef DEBUG
35#ifdef DEBUG
36# define debugk(fmt,args...) printf(fmt ,##args)
37#else
38# define debugk(fmt,args...)
39#endif
wdenk56f94be2002-11-05 16:35:14 +000040
wdenk0608e042004-03-25 19:29:38 +000041typedef struct {
42 volatile unsigned char *VmemAddr;
43 volatile unsigned char *RegAddr;
44} FB_INFO_S1D13xxx;
45
wdenk56f94be2002-11-05 16:35:14 +000046
47/* ------------------------------------------------------------------------- */
48
wdenk56f94be2002-11-05 16:35:14 +000049#ifdef CONFIG_KUP4K_LOGO
wdenk0608e042004-03-25 19:29:38 +000050void lcd_logo(bd_t *bd);
wdenk56f94be2002-11-05 16:35:14 +000051#endif
52
wdenk0608e042004-03-25 19:29:38 +000053
wdenk56f94be2002-11-05 16:35:14 +000054/* ------------------------------------------------------------------------- */
55
56#define _NOT_USED_ 0xFFFFFFFF
57
wdenk0608e042004-03-25 19:29:38 +000058const uint sdram_table[] = {
wdenk56f94be2002-11-05 16:35:14 +000059 /*
60 * Single Read. (Offset 0 in UPMA RAM)
61 */
wdenk682011f2003-06-03 23:54:09 +000062 0x1F07FC04, 0xEEAEFC04, 0x11ADFC04, 0xEFBBBC00,
wdenk56f94be2002-11-05 16:35:14 +000063 0x1FF77C47, /* last */
64
65 /*
66 * SDRAM Initialization (offset 5 in UPMA RAM)
67 *
68 * This is no UPM entry point. The following definition uses
69 * the remaining space to establish an initialization
70 * sequence, which is executed by a RUN command.
71 *
72 */
wdenk682011f2003-06-03 23:54:09 +000073 0x1FF77C35, 0xEFEABC34, 0x1FB57C35, /* last */
wdenk56f94be2002-11-05 16:35:14 +000074
75 /*
76 * Burst Read. (Offset 8 in UPMA RAM)
77 */
wdenk682011f2003-06-03 23:54:09 +000078 0x1F07FC04, 0xEEAEFC04, 0x10ADFC04, 0xF0AFFC00,
79 0xF0AFFC00, 0xF1AFFC00, 0xEFBBBC00, 0x1FF77C47, /* last */
wdenk56f94be2002-11-05 16:35:14 +000080 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
81 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
82
83 /*
84 * Single Write. (Offset 18 in UPMA RAM)
85 */
wdenk682011f2003-06-03 23:54:09 +000086 0x1F27FC04, 0xEEAEBC00, 0x01B93C04, 0x1FF77C47, /* last */
wdenk56f94be2002-11-05 16:35:14 +000087 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
88
89 /*
90 * Burst Write. (Offset 20 in UPMA RAM)
91 */
wdenk682011f2003-06-03 23:54:09 +000092 0x1F07FC04, 0xEEAEBC00, 0x10AD7C00, 0xF0AFFC00,
93 0xF0AFFC00, 0xE1BBBC04, 0x1FF77C47, /* last */
94 _NOT_USED_,
wdenk56f94be2002-11-05 16:35:14 +000095 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
96 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
97
98 /*
99 * Refresh (Offset 30 in UPMA RAM)
100 */
wdenk682011f2003-06-03 23:54:09 +0000101 0x1FF5FC84, 0xFFFFFC04, 0xFFFFFC04, 0xFFFFFC04,
102 0xFFFFFC84, 0xFFFFFC07, /* last */
103 _NOT_USED_, _NOT_USED_,
wdenk56f94be2002-11-05 16:35:14 +0000104 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
105
106 /*
107 * Exception. (Offset 3c in UPMA RAM)
108 */
109 0x7FFFFC07, /* last */
110 _NOT_USED_, _NOT_USED_, _NOT_USED_,
111};
112
113/* ------------------------------------------------------------------------- */
114
115
116/*
117 * Check Board Identity:
118 */
119
120int checkboard (void)
121{
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200122 volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
wdenk0608e042004-03-25 19:29:38 +0000123 uchar *latch,rev,mod;
wdenk56f94be2002-11-05 16:35:14 +0000124
wdenk0608e042004-03-25 19:29:38 +0000125 /*
126 * Init ChipSelect #4 (CAN + HW-Latch)
127 */
128 immap->im_memctl.memc_or4 = 0xFFFF8926;
129 immap->im_memctl.memc_br4 = 0x90000401;
wdenk02b11f82004-05-12 22:54:36 +0000130 __asm__ ("eieio");
wdenk0608e042004-03-25 19:29:38 +0000131 latch=(uchar *)0x90000200;
132 rev = (*latch & 0xF8) >> 3;
133 mod=(*latch & 0x03);
wdenk02b11f82004-05-12 22:54:36 +0000134 printf ("Board: KUP4K Rev %d.%d\n",rev,mod);
wdenk56f94be2002-11-05 16:35:14 +0000135 return (0);
136}
137
138/* ------------------------------------------------------------------------- */
139
Becky Bruce9973e3c2008-06-09 16:03:40 -0500140phys_size_t initdram (int board_type)
wdenk56f94be2002-11-05 16:35:14 +0000141{
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200142 volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
wdenk682011f2003-06-03 23:54:09 +0000143 volatile memctl8xx_t *memctl = &immap->im_memctl;
144 long int size_b0 = 0;
145 long int size_b1 = 0;
146 long int size_b2 = 0;
wdenk56f94be2002-11-05 16:35:14 +0000147
wdenk682011f2003-06-03 23:54:09 +0000148 upmconfig (UPMA, (uint *) sdram_table,
149 sizeof (sdram_table) / sizeof (uint));
wdenk56f94be2002-11-05 16:35:14 +0000150
wdenk682011f2003-06-03 23:54:09 +0000151 /*
152 * Preliminary prescaler for refresh (depends on number of
153 * banks): This value is selected for four cycles every 62.4 us
154 * with two SDRAM banks or four cycles every 31.2 us with one
155 * bank. It will be adjusted after memory sizing.
156 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200157 memctl->memc_mptpr = CONFIG_SYS_MPTPR;
wdenk56f94be2002-11-05 16:35:14 +0000158
wdenk682011f2003-06-03 23:54:09 +0000159 memctl->memc_mar = 0x00000088;
wdenk56f94be2002-11-05 16:35:14 +0000160
wdenk682011f2003-06-03 23:54:09 +0000161 /*
162 * Map controller banks 1 and 2 to the SDRAM banks 2 and 3 at
163 * preliminary addresses - these have to be modified after the
164 * SDRAM size has been determined.
165 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200166/* memctl->memc_or1 = CONFIG_SYS_OR1_PRELIM; */
167/* memctl->memc_br1 = CONFIG_SYS_BR1_PRELIM; */
wdenk682011f2003-06-03 23:54:09 +0000168
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200169/* memctl->memc_or2 = CONFIG_SYS_OR2_PRELIM; */
170/* memctl->memc_br2 = CONFIG_SYS_BR2_PRELIM; */
wdenk56f94be2002-11-05 16:35:14 +0000171
172
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200173 memctl->memc_mamr = CONFIG_SYS_MAMR & (~(MAMR_PTAE)); /* no refresh yet */
wdenk56f94be2002-11-05 16:35:14 +0000174
wdenk682011f2003-06-03 23:54:09 +0000175 udelay (200);
wdenk56f94be2002-11-05 16:35:14 +0000176
wdenk682011f2003-06-03 23:54:09 +0000177 /* perform SDRAM initializsation sequence */
wdenk56f94be2002-11-05 16:35:14 +0000178
wdenk682011f2003-06-03 23:54:09 +0000179 memctl->memc_mcr = 0x80002105; /* SDRAM bank 0 */
180 udelay (1);
181 memctl->memc_mcr = 0x80002830; /* SDRAM bank 0 - execute twice */
182 udelay (1);
183 memctl->memc_mcr = 0x80002106; /* SDRAM bank 0 - RUN MRS Pattern from loc 6 */
184 udelay (1);
wdenk56f94be2002-11-05 16:35:14 +0000185
wdenk682011f2003-06-03 23:54:09 +0000186 memctl->memc_mcr = 0x80004105; /* SDRAM bank 1 */
187 udelay (1);
188 memctl->memc_mcr = 0x80004830; /* SDRAM bank 1 - execute twice */
189 udelay (1);
190 memctl->memc_mcr = 0x80004106; /* SDRAM bank 1 - RUN MRS Pattern from loc 6 */
191 udelay (1);
wdenk56f94be2002-11-05 16:35:14 +0000192
wdenk682011f2003-06-03 23:54:09 +0000193 memctl->memc_mcr = 0x80006105; /* SDRAM bank 2 */
194 udelay (1);
195 memctl->memc_mcr = 0x80006830; /* SDRAM bank 2 - execute twice */
196 udelay (1);
197 memctl->memc_mcr = 0x80006106; /* SDRAM bank 2 - RUN MRS Pattern from loc 6 */
198 udelay (1);
wdenk56f94be2002-11-05 16:35:14 +0000199
wdenk682011f2003-06-03 23:54:09 +0000200 memctl->memc_mamr |= MAMR_PTAE; /* enable refresh */
201 udelay (1000);
wdenk56f94be2002-11-05 16:35:14 +0000202
wdenk682011f2003-06-03 23:54:09 +0000203#if 0 /* 3 x 8MB */
204 size_b0 = 0x00800000;
205 size_b1 = 0x00800000;
206 size_b2 = 0x00800000;
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200207 memctl->memc_mptpr = CONFIG_SYS_MPTPR;
wdenk682011f2003-06-03 23:54:09 +0000208 udelay (1000);
wdenk56f94be2002-11-05 16:35:14 +0000209 memctl->memc_or1 = 0xFF800A00;
210 memctl->memc_br1 = 0x00000081;
wdenk682011f2003-06-03 23:54:09 +0000211 memctl->memc_or2 = 0xFF000A00;
212 memctl->memc_br2 = 0x00800081;
wdenk56f94be2002-11-05 16:35:14 +0000213 memctl->memc_or3 = 0xFE000A00;
214 memctl->memc_br3 = 0x01000081;
wdenk682011f2003-06-03 23:54:09 +0000215#else /* 3 x 16 MB */
216 size_b0 = 0x01000000;
217 size_b1 = 0x01000000;
218 size_b2 = 0x01000000;
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200219 memctl->memc_mptpr = CONFIG_SYS_MPTPR;
wdenk682011f2003-06-03 23:54:09 +0000220 udelay (1000);
221 memctl->memc_or1 = 0xFF000A00;
222 memctl->memc_br1 = 0x00000081;
223 memctl->memc_or2 = 0xFE000A00;
224 memctl->memc_br2 = 0x01000081;
225 memctl->memc_or3 = 0xFC000A00;
226 memctl->memc_br3 = 0x02000081;
227#endif
wdenk56f94be2002-11-05 16:35:14 +0000228
wdenk682011f2003-06-03 23:54:09 +0000229 udelay (10000);
wdenk56f94be2002-11-05 16:35:14 +0000230
wdenk682011f2003-06-03 23:54:09 +0000231 return (size_b0 + size_b1 + size_b2);
wdenk56f94be2002-11-05 16:35:14 +0000232}
233
234/* ------------------------------------------------------------------------- */
235
wdenk56f94be2002-11-05 16:35:14 +0000236int misc_init_r (void)
237{
wdenk1f53a412002-12-04 23:39:58 +0000238#ifdef CONFIG_STATUS_LED
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200239 volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
wdenk1f53a412002-12-04 23:39:58 +0000240#endif
wdenk56f94be2002-11-05 16:35:14 +0000241#ifdef CONFIG_KUP4K_LOGO
242 bd_t *bd = gd->bd;
243
wdenk682011f2003-06-03 23:54:09 +0000244 lcd_logo (bd);
245#endif /* CONFIG_KUP4K_LOGO */
wdenk1f53a412002-12-04 23:39:58 +0000246#ifdef CONFIG_IDE_LED
247 /* Configure PA8 as output port */
248 immap->im_ioport.iop_padir |= 0x80;
249 immap->im_ioport.iop_paodr |= 0x80;
250 immap->im_ioport.iop_papar &= ~0x80;
wdenk682011f2003-06-03 23:54:09 +0000251 immap->im_ioport.iop_padat |= 0x80; /* turn it off */
wdenk1f53a412002-12-04 23:39:58 +0000252#endif
Mike Frysinger9c150102009-02-11 20:09:52 -0500253 load_sernum_ethaddr();
wdenk0608e042004-03-25 19:29:38 +0000254 setenv("hw","4k");
255 poweron_key();
wdenk682011f2003-06-03 23:54:09 +0000256 return (0);
wdenk56f94be2002-11-05 16:35:14 +0000257}
258
259#ifdef CONFIG_KUP4K_LOGO
wdenk56f94be2002-11-05 16:35:14 +0000260
wdenk682011f2003-06-03 23:54:09 +0000261
wdenk682011f2003-06-03 23:54:09 +0000262void lcd_logo (bd_t * bd)
263{
wdenk682011f2003-06-03 23:54:09 +0000264 FB_INFO_S1D13xxx fb_info;
265 S1D_INDEX s1dReg;
266 S1D_VALUE s1dValue;
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200267 volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
wdenk682011f2003-06-03 23:54:09 +0000268 volatile memctl8xx_t *memctl;
wdenk56f94be2002-11-05 16:35:14 +0000269 ushort i;
270 uchar *fb;
wdenk682011f2003-06-03 23:54:09 +0000271 int rs, gs, bs;
272 int r = 8, g = 8, b = 4;
273 int r1, g1, b1;
wdenk0608e042004-03-25 19:29:38 +0000274 int n;
Wolfgang Denk77ddac92005-10-13 16:45:02 +0200275 char tmp[64]; /* long enough for environment variables */
wdenk0608e042004-03-25 19:29:38 +0000276 int tft = 0;
wdenk682011f2003-06-03 23:54:09 +0000277
wdenk0608e042004-03-25 19:29:38 +0000278 immr->im_cpm.cp_pbpar &= ~(PB_LCD_PWM);
279 immr->im_cpm.cp_pbodr &= ~(PB_LCD_PWM);
280 immr->im_cpm.cp_pbdat &= ~(PB_LCD_PWM); /* set to 0 = enabled */
281 immr->im_cpm.cp_pbdir |= (PB_LCD_PWM);
wdenk56f94be2002-11-05 16:35:14 +0000282
283/*----------------------------------------------------------------------------- */
wdenk56f94be2002-11-05 16:35:14 +0000284/* Initialize the chip and the frame buffer driver. */
wdenk56f94be2002-11-05 16:35:14 +0000285/*----------------------------------------------------------------------------- */
wdenk0608e042004-03-25 19:29:38 +0000286 memctl = &immr->im_memctl;
wdenk56f94be2002-11-05 16:35:14 +0000287
wdenk0608e042004-03-25 19:29:38 +0000288
289 /*
290 * Init ChipSelect #5 (S1D13768)
291 */
292 memctl->memc_or5 = 0xFFC007F0; /* 4 MB 17 WS or externel TA */
wdenk682011f2003-06-03 23:54:09 +0000293 memctl->memc_br5 = 0x80080801; /* Start at 0x80080000 */
wdenk02b11f82004-05-12 22:54:36 +0000294 __asm__ ("eieio");
wdenk56f94be2002-11-05 16:35:14 +0000295
wdenk682011f2003-06-03 23:54:09 +0000296 fb_info.VmemAddr = (unsigned char *) (S1D_PHYSICAL_VMEM_ADDR);
297 fb_info.RegAddr = (unsigned char *) (S1D_PHYSICAL_REG_ADDR);
wdenk56f94be2002-11-05 16:35:14 +0000298
wdenk682011f2003-06-03 23:54:09 +0000299 if ((((S1D_VALUE *) fb_info.RegAddr)[0] != 0x28)
wdenk0608e042004-03-25 19:29:38 +0000300 || (((S1D_VALUE *) fb_info.RegAddr)[1] != 0x14)) {
wdenk682011f2003-06-03 23:54:09 +0000301 printf ("Warning:LCD Controller S1D13706 not found\n");
wdenk0608e042004-03-25 19:29:38 +0000302 setenv ("lcd", "none");
wdenk682011f2003-06-03 23:54:09 +0000303 return;
304 }
wdenk56f94be2002-11-05 16:35:14 +0000305
wdenk0608e042004-03-25 19:29:38 +0000306
307 for (i = 0; i < sizeof(aS1DRegs_prelimn) / sizeof(aS1DRegs_prelimn[0]); i++) {
308 s1dReg = aS1DRegs_prelimn[i].Index;
309 s1dValue = aS1DRegs_prelimn[i].Value;
310 debugk ("s13768 reg: %02x value: %02x\n",
311 aS1DRegs_prelimn[i].Index, aS1DRegs_prelimn[i].Value);
wdenk682011f2003-06-03 23:54:09 +0000312 ((S1D_VALUE *) fb_info.RegAddr)[s1dReg / sizeof (S1D_VALUE)] =
wdenk0608e042004-03-25 19:29:38 +0000313 s1dValue;
314 }
315
316
317 n = getenv_r ("lcd", tmp, sizeof (tmp));
318 if (n > 0) {
319 if (!strcmp ("tft", tmp))
320 tft = 1;
321 else
322 tft = 0;
323 }
324#if 0
325 if (((S1D_VALUE *) fb_info.RegAddr)[0xAC] & 0x04)
326 tft = 0;
327 else
328 tft = 1;
329#endif
330
331 debugk ("Port=0x%02x -> TFT=%d\n", tft,
332 ((S1D_VALUE *) fb_info.RegAddr)[0xAC]);
333
334 /* init controller */
335 if (!tft) {
336 for (i = 0; i < sizeof(aS1DRegs_stn) / sizeof(aS1DRegs_stn[0]); i++) {
337 s1dReg = aS1DRegs_stn[i].Index;
338 s1dValue = aS1DRegs_stn[i].Value;
339 debugk ("s13768 reg: %02x value: %02x\n",
340 aS1DRegs_stn[i].Index,
341 aS1DRegs_stn[i].Value);
342 ((S1D_VALUE *) fb_info.RegAddr)[s1dReg / sizeof(S1D_VALUE)] =
wdenk682011f2003-06-03 23:54:09 +0000343 s1dValue;
wdenk0608e042004-03-25 19:29:38 +0000344 }
345 n = getenv_r ("contrast", tmp, sizeof (tmp));
346 ((S1D_VALUE *) fb_info.RegAddr)[0xB3] =
347 (n > 0) ? (uchar) simple_strtoul (tmp, NULL, 10) * 255 / 100 : 0xA0;
348 switch (bd->bi_busfreq) {
349 case 40000000:
350 ((S1D_VALUE *) fb_info.RegAddr)[0x05] = 0x32;
351 ((S1D_VALUE *) fb_info.RegAddr)[0x12] = 0x41;
352 break;
353 case 48000000:
354 ((S1D_VALUE *) fb_info.RegAddr)[0x05] = 0x22;
355 ((S1D_VALUE *) fb_info.RegAddr)[0x12] = 0x34;
356 break;
357 default:
358 printf ("KUP4K S1D1: unknown busfrequency: %ld assuming 64 MHz\n", bd->bi_busfreq);
359 case 64000000:
360 ((S1D_VALUE *) fb_info.RegAddr)[0x05] = 0x32;
361 ((S1D_VALUE *) fb_info.RegAddr)[0x12] = 0x66;
362 break;
363 }
364 /* setenv("lcd","stn"); */
365 } else {
366 for (i = 0; i < sizeof(aS1DRegs_tft) / sizeof(aS1DRegs_tft[0]); i++) {
367 s1dReg = aS1DRegs_tft[i].Index;
368 s1dValue = aS1DRegs_tft[i].Value;
369 debugk ("s13768 reg: %02x value: %02x\n",
370 aS1DRegs_tft[i].Index,
371 aS1DRegs_tft[i].Value);
372 ((S1D_VALUE *) fb_info.RegAddr)[s1dReg / sizeof (S1D_VALUE)] =
373 s1dValue;
374 }
wdenk56f94be2002-11-05 16:35:14 +0000375
wdenk0608e042004-03-25 19:29:38 +0000376 switch (bd->bi_busfreq) {
377 default:
378 printf ("KUP4K S1D1: unknown busfrequency: %ld assuming 64 MHz\n", bd->bi_busfreq);
379 case 40000000:
380 ((S1D_VALUE *) fb_info.RegAddr)[0x05] = 0x42;
381 ((S1D_VALUE *) fb_info.RegAddr)[0x12] = 0x30;
382 break;
383 }
384 /* setenv("lcd","tft"); */
wdenk56f94be2002-11-05 16:35:14 +0000385 }
wdenk56f94be2002-11-05 16:35:14 +0000386
wdenk682011f2003-06-03 23:54:09 +0000387 /* create and set colormap */
388 rs = 256 / (r - 1);
389 gs = 256 / (g - 1);
390 bs = 256 / (b - 1);
391 for (i = 0; i < 256; i++) {
392 r1 = (rs * ((i / (g * b)) % r)) * 255;
393 g1 = (gs * ((i / b) % g)) * 255;
394 b1 = (bs * ((i) % b)) * 255;
wdenk0608e042004-03-25 19:29:38 +0000395 debugk ("%d %04x %04x %04x\n", i, r1 >> 4, g1 >> 4, b1 >> 4);
wdenk682011f2003-06-03 23:54:09 +0000396 S1D_WRITE_PALETTE (fb_info.RegAddr, i, (r1 >> 4), (g1 >> 4),
wdenk0608e042004-03-25 19:29:38 +0000397 (b1 >> 4));
wdenk682011f2003-06-03 23:54:09 +0000398 }
399
400 /* copy bitmap */
Wolfgang Denk77ddac92005-10-13 16:45:02 +0200401 fb = (uchar *) (fb_info.VmemAddr);
wdenk682011f2003-06-03 23:54:09 +0000402 memcpy (fb, (uchar *) CONFIG_KUP4K_LOGO, 320 * 240);
wdenk56f94be2002-11-05 16:35:14 +0000403}
wdenk0608e042004-03-25 19:29:38 +0000404#endif /* CONFIG_KUP4K_LOGO */