blob: 6562eab31160fbeccbe9deaac8c3dd2a184acfb0 [file] [log] [blame]
Shawn Nematbakhsh51d787a2014-01-16 17:52:21 -08001/*
2 * This file is part of the coreboot project.
3 *
Duncan Laurief0aaa292014-04-22 10:48:29 -07004 * Copyright (C) 2014 Google Inc.
Shawn Nematbakhsh51d787a2014-01-16 17:52:21 -08005 *
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; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
Shawn Nematbakhsh51d787a2014-01-16 17:52:21 -080014 */
15
Duncan Laurief0aaa292014-04-22 10:48:29 -070016#ifndef _COMMON_HDA_VERB_H_
17#define _COMMON_HDA_VERB_H_
Shawn Nematbakhsh51d787a2014-01-16 17:52:21 -080018
19#include <stdint.h>
20
21#define HDA_GCAP_REG 0x00
22#define HDA_GCTL_REG 0x08
23#define HDA_GCTL_CRST (1 << 0)
24#define HDA_STATESTS_REG 0x0e
25#define HDA_IC_REG 0x60
26#define HDA_IR_REG 0x64
27#define HDA_ICII_REG 0x68
28#define HDA_ICII_BUSY (1 << 0)
29#define HDA_ICII_VALID (1 << 1)
30
Kevin Paul Herbertbde6d302014-12-24 18:43:20 -080031int hda_codec_detect(u8 *base);
32int hda_codec_write(u8 *base, u32 size, const u32 *data);
33int hda_codec_init(u8 *base, int addr, int verb_size, const u32 *verb_data);
Shawn Nematbakhsh51d787a2014-01-16 17:52:21 -080034
Duncan Laurief0aaa292014-04-22 10:48:29 -070035#endif /* _COMMON_HDA_VERB_H_ */