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>
17 /***************************************************************************/
18 /* Init Drangon Engine hardware */
19 /***************************************************************************/
21 static void dragen2_reset(void)
25 #ifdef CONFIG_INIT_LCD
26 PBDATA |= 0x20; /* disable CCFL light */
27 PKDATA |= 0x4; /* disable LCD controller */
33 "moveal #0x04000000, %a0\n\t"
34 "moveal 0(%a0), %sp\n\t"
35 "moveal 4(%a0), %a0\n\t"
40 void __init init_dragen2(char *command, int size)
42 mach_reset = dragen2_reset;
44 #ifdef CONFIG_DIRECT_IO_ACCESS
45 SCR = 0x10; /* allow user access to internal registers */
53 /* PK3: hardware sleep function pin, active low */
54 PKSEL |= PK(3); /* select pin as I/O */
55 PKDIR |= PK(3); /* select pin as output */
56 PKDATA |= PK(3); /* set pin high */
58 /* PF5: hardware reset function pin, active high */
59 PFSEL |= PF(5); /* select pin as I/O */
60 PFDIR |= PF(5); /* select pin as output */
61 PFDATA &= ~PF(5); /* set pin low */
63 /* cs8900 hardware reset */
65 { int i; for (i = 0; i < 32000; ++i); }
68 /* INT1 enable (cs8900 IRQ) */
69 PDPOL &= ~PD(1); /* active high signal */
71 PDIRQEN |= PD(1); /* IRQ enabled */
73 #ifdef CONFIG_INIT_LCD
74 /* initialize LCD controller */
75 LSSA = (long) screen_bits;
87 /* Enable LCD controller */
92 /* Enable CCFL backlighting circuit */
97 /* contrast control register */