1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 1993 Hamish Macdonald
4 * Copyright (C) 1999 D. Jeff Dionne
5 * Copyright (C) 2001 Georges Menie, Ken Desmet
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file COPYING in the main directory of this archive
11 #include <linux/init.h>
12 #include <asm/machdep.h>
13 #include <asm/MC68VZ328.h>
15 /***************************************************************************/
16 /* Init Drangon Engine hardware */
17 /***************************************************************************/
19 static void dragen2_reset(void)
23 #ifdef CONFIG_INIT_LCD
24 PBDATA
|= 0x20; /* disable CCFL light */
25 PKDATA
|= 0x4; /* disable LCD controller */
31 "moveal #0x04000000, %a0\n\t"
32 "moveal 0(%a0), %sp\n\t"
33 "moveal 4(%a0), %a0\n\t"
38 void __init
init_dragen2(char *command
, int size
)
40 mach_reset
= dragen2_reset
;
42 #ifdef CONFIG_DIRECT_IO_ACCESS
43 SCR
= 0x10; /* allow user access to internal registers */
51 /* PK3: hardware sleep function pin, active low */
52 PKSEL
|= PK(3); /* select pin as I/O */
53 PKDIR
|= PK(3); /* select pin as output */
54 PKDATA
|= PK(3); /* set pin high */
56 /* PF5: hardware reset function pin, active high */
57 PFSEL
|= PF(5); /* select pin as I/O */
58 PFDIR
|= PF(5); /* select pin as output */
59 PFDATA
&= ~PF(5); /* set pin low */
61 /* cs8900 hardware reset */
63 { int i
; for (i
= 0; i
< 32000; ++i
); }
66 /* INT1 enable (cs8900 IRQ) */
67 PDPOL
&= ~PD(1); /* active high signal */
69 PDIRQEN
|= PD(1); /* IRQ enabled */
71 #ifdef CONFIG_INIT_LCD
72 /* initialize LCD controller */
73 LSSA
= (long) screen_bits
;
85 /* Enable LCD controller */
90 /* Enable CCFL backlighting circuit */
95 /* contrast control register */