PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/arch/sh/boards/hp6xx/hp680/setup.c

https://bitbucket.org/evzijst/gittest
C | 41 lines | 26 code | 5 blank | 10 comment | 0 complexity | fdf3554bf6f93e36885590c02f532bb3 MD5 | raw file
 1/*
 2 * linux/arch/sh/boards/hp6xx/hp680/setup.c
 3 *
 4 * Copyright (C) 2002 Andriy Skulysh
 5 *
 6 * May be copied or modified under the terms of the GNU General Public
 7 * License.  See linux/COPYING for more information.
 8 *
 9 * Setup code for an HP680  (internal peripherials only)
10 */
11
12#include <linux/config.h>
13#include <linux/init.h>
14#include <asm/hd64461/hd64461.h>
15#include <asm/io.h>
16#include <asm/hp6xx/hp6xx.h>
17#include <asm/cpu/dac.h>
18
19const char *get_system_type(void)
20{
21	return "HP680";
22}
23
24int __init platform_setup(void)
25{
26	u16 v;
27	v = inw(HD64461_STBCR);
28	v |= HD64461_STBCR_SURTST | HD64461_STBCR_SIRST |
29	    HD64461_STBCR_STM1ST | HD64461_STBCR_STM0ST |
30	    HD64461_STBCR_SAFEST | HD64461_STBCR_SPC0ST |
31	    HD64461_STBCR_SMIAST | HD64461_STBCR_SAFECKE_OST |
32	    HD64461_STBCR_SAFECKE_IST;
33	outw(v, HD64461_STBCR);
34	v = inw(HD64461_GPADR);
35	v |= HD64461_GPADR_SPEAKER | HD64461_GPADR_PCMCIA0;
36	outw(v, HD64461_GPADR);
37
38	sh_dac_disable(DAC_SPEAKER_VOLUME);
39
40	return 0;
41}