]>
git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - arch/m68k/68000/m68VZ328.c
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/init.h>
18 #include <linux/types.h>
19 #include <linux/kernel.h>
21 #include <linux/netdevice.h>
22 #include <linux/interrupt.h>
23 #include <linux/irq.h>
24 #include <linux/rtc.h>
26 #include <asm/pgtable.h>
27 #include <asm/machdep.h>
28 #include <asm/MC68VZ328.h>
29 #include <asm/bootstd.h>
31 #ifdef CONFIG_INIT_LCD
32 #include "bootlogo-vz.h"
35 /***************************************************************************/
37 int m68328_hwclk(int set
, struct rtc_time
*t
);
39 /***************************************************************************/
40 /* Init Drangon Engine hardware */
41 /***************************************************************************/
42 #if defined(CONFIG_DRAGEN2)
44 static void m68vz328_reset(void)
48 #ifdef CONFIG_INIT_LCD
49 PBDATA
|= 0x20; /* disable CCFL light */
50 PKDATA
|= 0x4; /* disable LCD controller */
56 "moveal #0x04000000, %a0\n\t"
57 "moveal 0(%a0), %sp\n\t"
58 "moveal 4(%a0), %a0\n\t"
63 static void __init
init_hardware(char *command
, int size
)
65 #ifdef CONFIG_DIRECT_IO_ACCESS
66 SCR
= 0x10; /* allow user access to internal registers */
74 /* PK3: hardware sleep function pin, active low */
75 PKSEL
|= PK(3); /* select pin as I/O */
76 PKDIR
|= PK(3); /* select pin as output */
77 PKDATA
|= PK(3); /* set pin high */
79 /* PF5: hardware reset function pin, active high */
80 PFSEL
|= PF(5); /* select pin as I/O */
81 PFDIR
|= PF(5); /* select pin as output */
82 PFDATA
&= ~PF(5); /* set pin low */
84 /* cs8900 hardware reset */
86 { int i
; for (i
= 0; i
< 32000; ++i
); }
89 /* INT1 enable (cs8900 IRQ) */
90 PDPOL
&= ~PD(1); /* active high signal */
92 PDIRQEN
|= PD(1); /* IRQ enabled */
94 #ifdef CONFIG_INIT_LCD
95 /* initialize LCD controller */
96 LSSA
= (long) screen_bits
;
108 /* Enable LCD controller */
113 /* Enable CCFL backlighting circuit */
118 /* contrast control register */
125 /***************************************************************************/
126 /* Init RT-Control uCdimm hardware */
127 /***************************************************************************/
128 #elif defined(CONFIG_UCDIMM)
130 static void m68vz328_reset(void)
134 "moveal #0x10c00000, %a0;\n\t"
135 "moveb #0, 0xFFFFF300;\n\t"
136 "moveal 0(%a0), %sp;\n\t"
137 "moveal 4(%a0), %a0;\n\t"
142 unsigned char *cs8900a_hwaddr
;
145 _bsc0(char *, getserialnum
)
146 _bsc1(unsigned char *, gethwaddr
, int, a
)
147 _bsc1(char *, getbenv
, char *, a
)
149 static void __init
init_hardware(char *command
, int size
)
153 printk(KERN_INFO
"uCdimm serial string [%s]\n", getserialnum());
154 p
= cs8900a_hwaddr
= gethwaddr(0);
155 printk(KERN_INFO
"uCdimm hwaddr %pM\n", p
);
156 p
= getbenv("APPEND");
163 /***************************************************************************/
166 static void m68vz328_reset(void)
170 static void __init
init_hardware(char *command
, int size
)
174 /***************************************************************************/
176 /***************************************************************************/
178 void __init
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_sched_init
= hw_timer_init
;
185 mach_hwclk
= m68328_hwclk
;
186 mach_reset
= m68vz328_reset
;
189 /***************************************************************************/