2 * linux/arch/sh/boards/hp6xx/hp680/setup.c
4 * Copyright (C) 2002 Andriy Skulysh
6 * May be copied or modified under the terms of the GNU General Public
7 * License. See linux/COPYING for more information.
9 * Setup code for an HP680 (internal peripherials only)
12 #include <linux/init.h>
14 #include <asm/hd64461.h>
15 #include <asm/hp6xx/hp6xx.h>
16 #include <asm/cpu/dac.h>
18 #define SCPCR 0xa4000116
19 #define SCPDR 0xa4000136
21 const char *get_system_type(void)
26 int __init platform_setup(void)
31 v = inw(HD64461_STBCR);
32 v |= HD64461_STBCR_SURTST | HD64461_STBCR_SIRST |
33 HD64461_STBCR_STM1ST | HD64461_STBCR_STM0ST |
34 HD64461_STBCR_SAFEST | HD64461_STBCR_SPC0ST |
35 HD64461_STBCR_SMIAST | HD64461_STBCR_SAFECKE_OST |
36 HD64461_STBCR_SAFECKE_IST;
37 #ifndef CONFIG_HD64461_ENABLER
38 v |= HD64461_STBCR_SPC1ST;
40 outw(v, HD64461_STBCR);
41 v = inw(HD64461_GPADR);
42 v |= HD64461_GPADR_SPEAKER | HD64461_GPADR_PCMCIA0;
43 outw(v, HD64461_GPADR);
45 outw(HD64461_PCCGCR_VCC0 | HD64461_PCCSCR_VCC1, HD64461_PCC0GCR);
47 #ifndef CONFIG_HD64461_ENABLER
48 outw(HD64461_PCCGCR_VCC0 | HD64461_PCCSCR_VCC1, HD64461_PCC1GCR);
51 sh_dac_output(0, DAC_SPEAKER_VOLUME);
52 sh_dac_disable(DAC_SPEAKER_VOLUME);
58 v8 |= SCPDR_TS_SCAN_X | SCPDR_TS_SCAN_Y;
59 v8 &= ~SCPDR_TS_SCAN_ENABLE;