1 /***************************************************************************/
4 * m68VZ328.c - 68VZ328 specific config
6 * Copyright (C) 1993 Hamish Macdonald
7 * Copyright (C) 1999 D. Jeff Dionne
8 * Copyright (C) 2001 Georges Menie, Ken Desmet
10 * This file is subject to the terms and conditions of the GNU General Public
11 * License. See the file COPYING in the main directory of this archive
15 /***************************************************************************/
17 #include <linux/types.h>
18 #include <linux/kernel.h>
20 #include <linux/netdevice.h>
21 #include <linux/interrupt.h>
22 #include <linux/irq.h>
23 #include <linux/rtc.h>
25 #include <asm/pgtable.h>
26 #include <asm/machdep.h>
27 #include <asm/MC68VZ328.h>
28 #include <asm/bootstd.h>
30 #ifdef CONFIG_INIT_LCD
31 #include "bootlogo-vz.h"
34 /***************************************************************************/
36 int m68328_hwclk(int set
, struct rtc_time
*t
);
38 /***************************************************************************/
39 /* Init Drangon Engine hardware */
40 /***************************************************************************/
41 #if defined(CONFIG_DRAGEN2)
43 static void m68vz328_reset(void)
47 #ifdef CONFIG_INIT_LCD
48 PBDATA
|= 0x20; /* disable CCFL light */
49 PKDATA
|= 0x4; /* disable LCD controller */
55 "moveal #0x04000000, %a0\n\t"
56 "moveal 0(%a0), %sp\n\t"
57 "moveal 4(%a0), %a0\n\t"
62 static void init_hardware(char *command
, int size
)
64 #ifdef CONFIG_DIRECT_IO_ACCESS
65 SCR
= 0x10; /* allow user access to internal registers */
73 /* PK3: hardware sleep function pin, active low */
74 PKSEL
|= PK(3); /* select pin as I/O */
75 PKDIR
|= PK(3); /* select pin as output */
76 PKDATA
|= PK(3); /* set pin high */
78 /* PF5: hardware reset function pin, active high */
79 PFSEL
|= PF(5); /* select pin as I/O */
80 PFDIR
|= PF(5); /* select pin as output */
81 PFDATA
&= ~PF(5); /* set pin low */
83 /* cs8900 hardware reset */
85 { int i
; for (i
= 0; i
< 32000; ++i
); }
88 /* INT1 enable (cs8900 IRQ) */
89 PDPOL
&= ~PD(1); /* active high signal */
91 PDIRQEN
|= PD(1); /* IRQ enabled */
93 #ifdef CONFIG_INIT_LCD
94 /* initialize LCD controller */
95 LSSA
= (long) screen_bits
;
107 /* Enable LCD controller */
112 /* Enable CCFL backlighting circuit */
117 /* contrast control register */
124 /***************************************************************************/
125 /* Init RT-Control uCdimm hardware */
126 /***************************************************************************/
127 #elif defined(CONFIG_UCDIMM)
129 static void m68vz328_reset(void)
133 "moveal #0x10c00000, %a0;\n\t"
134 "moveb #0, 0xFFFFF300;\n\t"
135 "moveal 0(%a0), %sp;\n\t"
136 "moveal 4(%a0), %a0;\n\t"
141 unsigned char *cs8900a_hwaddr
;
144 _bsc0(char *, getserialnum
)
145 _bsc1(unsigned char *, gethwaddr
, int, a
)
146 _bsc1(char *, getbenv
, char *, a
)
148 static void init_hardware(char *command
, int size
)
152 printk(KERN_INFO
"uCdimm serial string [%s]\n", getserialnum());
153 p
= cs8900a_hwaddr
= gethwaddr(0);
154 printk(KERN_INFO
"uCdimm hwaddr %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
155 p
[0], p
[1], p
[2], p
[3], p
[4], p
[5]);
156 p
= getbenv("APPEND");
163 /***************************************************************************/
166 static void m68vz328_reset(void)
170 static void init_hardware(char *command
, int size
)
174 /***************************************************************************/
176 /***************************************************************************/
178 void config_BSP(char *command
, int size
)
180 printk(KERN_INFO
"68VZ328 DragonBallVZ support (c) 2001 Lineo, Inc.\n");
182 init_hardware(command
, size
);
184 mach_hwclk
= m68328_hwclk
;
185 mach_reset
= m68vz328_reset
;
188 /***************************************************************************/