Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/44106 )
Change subject: soc/intel/common: Move common HDA registers to <device/azalia_device.h> ......................................................................
soc/intel/common: Move common HDA registers to <device/azalia_device.h>
Change-Id: I9ea191e5076e2f055405dc34d46dbbb8cfb0015e Signed-off-by: Elyes HAOUAS ehaouas@noos.fr Reviewed-on: https://review.coreboot.org/c/coreboot/+/44106 Reviewed-by: Angel Pons th3fanbus@gmail.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/include/device/azalia_device.h M src/soc/intel/common/hda_verb.c M src/soc/intel/common/hda_verb.h 3 files changed, 12 insertions(+), 10 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/include/device/azalia_device.h b/src/include/device/azalia_device.h index fe23c70..cc4ce75 100644 --- a/src/include/device/azalia_device.h +++ b/src/include/device/azalia_device.h @@ -8,6 +8,16 @@ #include <device/device.h> #include <stdint.h>
+#define HDA_GCAP_REG 0x00 +#define HDA_GCTL_REG 0x08 +#define HDA_GCTL_CRST (1 << 0) +#define HDA_STATESTS_REG 0x0e +#define HDA_IC_REG 0x60 +#define HDA_IR_REG 0x64 +#define HDA_ICII_REG 0x68 +#define HDA_ICII_BUSY (1 << 0) +#define HDA_ICII_VALID (1 << 1) + void azalia_audio_init(struct device *dev); extern struct device_operations default_azalia_audio_ops;
diff --git a/src/soc/intel/common/hda_verb.c b/src/soc/intel/common/hda_verb.c index ee94c3e..6c0ace7 100644 --- a/src/soc/intel/common/hda_verb.c +++ b/src/soc/intel/common/hda_verb.c @@ -1,8 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <console/console.h> +#include <device/azalia_device.h> #include <device/mmio.h> #include <delay.h> + #include "hda_verb.h"
/* diff --git a/src/soc/intel/common/hda_verb.h b/src/soc/intel/common/hda_verb.h index 9b77ee3..ddd5774 100644 --- a/src/soc/intel/common/hda_verb.h +++ b/src/soc/intel/common/hda_verb.h @@ -5,16 +5,6 @@
#include <stdint.h>
-#define HDA_GCAP_REG 0x00 -#define HDA_GCTL_REG 0x08 -#define HDA_GCTL_CRST (1 << 0) -#define HDA_STATESTS_REG 0x0e -#define HDA_IC_REG 0x60 -#define HDA_IR_REG 0x64 -#define HDA_ICII_REG 0x68 -#define HDA_ICII_BUSY (1 << 0) -#define HDA_ICII_VALID (1 << 1) - int hda_codec_detect(u8 *base); int hda_codec_write(u8 *base, u32 size, const u32 *data); int hda_codec_init(u8 *base, int addr, int verb_size, const u32 *verb_data);