tree: drop last paragraph of GPL copyright header
[coreboot.git] / src / superio / fintek / f71869ad / f71869ad_multifunc.c
blobbb850ad9ece49be07d58847a04ffa053f1834785
1 /*
2 * This file is part of the coreboot project.
4 * Copyright (C) 2014 Edward O'Callaghan <eocallaghan@alterapraxis.com>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
17 #include <arch/io.h>
18 #include <device/device.h>
19 #include <device/pnp.h>
20 #include "chip.h"
21 #include "fintek_internal.h"
23 #define MULTI_FUNC_SEL_REG1 0x28
24 #define MULTI_FUNC_SEL_REG2 0x29
25 #define MULTI_FUNC_SEL_REG3 0x2A
26 #define MULTI_FUNC_SEL_REG4 0x2B
27 #define MULTI_FUNC_SEL_REG5 0x2C
29 void f71869ad_multifunc_init(struct device *dev)
31 const struct superio_fintek_f71869ad_config *conf = dev->chip_info;
33 pnp_enter_conf_mode(dev);
35 /* multi-func select reg1 */
36 pnp_write_config(dev, MULTI_FUNC_SEL_REG1,
37 conf->multi_function_register_1);
39 /* multi-func select reg2 (CLK_TUNE_EN=0) */
40 pnp_write_config(dev, MULTI_FUNC_SEL_REG2,
41 conf->multi_function_register_2);
43 /* multi-func select reg3 (CLK_TUNE_EN=0) */
44 pnp_write_config(dev, MULTI_FUNC_SEL_REG3,
45 conf->multi_function_register_3);
47 /* multi-func select reg4 (CLK_TUNE_EN=0) */
48 pnp_write_config(dev, MULTI_FUNC_SEL_REG4,
49 conf->multi_function_register_4);
51 /* multi-func select reg5 (CLK_TUNE_EN=0) */
52 pnp_write_config(dev, MULTI_FUNC_SEL_REG5,
53 conf->multi_function_register_5);
55 pnp_exit_conf_mode(dev);