azalia: Shrink boilerplate

Change-Id: Ib3e09644c0ee71aacb067adaa85653d151b52078
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/6840
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
This commit is contained in:
Vladimir Serbinenko 2014-09-05 01:01:31 +02:00
parent a812643723
commit 75c83870e5
87 changed files with 251 additions and 456 deletions

View File

@ -14,6 +14,10 @@ ramstage-$(CONFIG_PCI) += pci_ops.c
ramstage-$(CONFIG_PCI) += pci_early.c ramstage-$(CONFIG_PCI) += pci_early.c
ramstage-y += smbus_ops.c ramstage-y += smbus_ops.c
ifeq ($(CONFIG_AZALIA_PLUGIN_SUPPORT),y)
ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/hda_verb.c
endif
romstage-y += device_romstage.c romstage-y += device_romstage.c
romstage-$(CONFIG_PCI) += pci_early.c romstage-$(CONFIG_PCI) += pci_early.c

View File

@ -110,9 +110,6 @@ no_codec:
return 0; return 0;
} }
const u32 *cim_verb_data = NULL;
u32 cim_verb_data_size = 0;
static u32 find_verb(struct device *dev, u32 viddid, const u32 ** verb) static u32 find_verb(struct device *dev, u32 viddid, const u32 ** verb)
{ {
printk(BIOS_DEBUG, "azalia_audio: dev=%s\n", dev_path(dev)); printk(BIOS_DEBUG, "azalia_audio: dev=%s\n", dev_path(dev));

View File

@ -20,15 +20,26 @@
#ifndef DEVICE_AZALIA_H #ifndef DEVICE_AZALIA_H
#define DEVICE_AZALIA_H #define DEVICE_AZALIA_H
#include <types.h>
#include <string.h>
#include <console/console.h>
#include <arch/acpi.h>
#include <arch/io.h>
#include <arch/interrupt.h>
#include <build.h>
#include <device/device.h> #include <device/device.h>
void azalia_audio_init(struct device *dev); void azalia_audio_init(struct device *dev);
extern struct device_operations default_azalia_audio_ops; extern struct device_operations default_azalia_audio_ops;
extern const u32 *cim_verb_data; extern const u32 cim_verb_data[];
extern u32 cim_verb_data_size; extern const u32 cim_verb_data_size;
extern const u32 *pc_beep_verbs; extern const u32 pc_beep_verbs[];
extern u32 pc_beep_verbs_size; extern const u32 pc_beep_verbs_size;
#define AZALIA_ARRAY_SIZES const u32 pc_beep_verbs_size = ARRAY_SIZE(pc_beep_verbs); \
const u32 cim_verb_data_size = sizeof(cim_verb_data)
#define AZALIA_PIN_CFG(codec, pin, val) \ #define AZALIA_PIN_CFG(codec, pin, val) \
((codec) << 28) | ((pin) << 20) | ( 0x71c << 8) | ((val) & 0xff), \ ((codec) << 28) | ((pin) << 20) | ( 0x71c << 8) | ((val) & 0xff), \

View File

@ -18,7 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x83847680, /* Codec Vendor / Device ID: SigmaTel STAC9221 A1 */ 0x83847680, /* Codec Vendor / Device ID: SigmaTel STAC9221 A1 */
0x106b2200, /* Subsystem ID */ 0x106b2200, /* Subsystem ID */
@ -58,3 +60,7 @@ static const u32 mainboard_cim_verb_data[] = {
AZALIA_PIN_CFG(0x0, 0x1B, 0x400000FB), AZALIA_PIN_CFG(0x0, 0x1B, 0x400000FB),
}; };
const u32 pc_beep_verbs[0] = {};
AZALIA_ARRAY_SIZES;

View File

@ -34,8 +34,6 @@
#include <arch/x86/include/arch/acpigen.h> #include <arch/x86/include/arch/acpigen.h>
#include <smbios.h> #include <smbios.h>
#include <drivers/intel/gma/int15.h> #include <drivers/intel/gma/int15.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
#define PANEL INT15_5F35_CL_DISPLAY_DEFAULT #define PANEL INT15_5F35_CL_DISPLAY_DEFAULT
int get_cst_entries(acpi_cstate_t **entries) int get_cst_entries(acpi_cstate_t **entries)
@ -51,8 +49,6 @@ static void mainboard_init(device_t dev)
static void mainboard_enable(device_t dev) static void mainboard_enable(device_t dev)
{ {
dev->ops->init = mainboard_init; dev->ops->init = mainboard_init;
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -24,7 +24,9 @@
* http://www.analog.com/static/imported-files/data_sheets/AD1988A_1988B.pdf * http://www.analog.com/static/imported-files/data_sheets/AD1988A_1988B.pdf
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x11d4198b, /* Codec Vendor / Device ID: Analog Devices AD1988B */ 0x11d4198b, /* Codec Vendor / Device ID: Analog Devices AD1988B */
0x104381f6, /* Subsystem ID (0x1043 == ASUS) */ 0x104381f6, /* Subsystem ID (0x1043 == ASUS) */
@ -76,3 +78,4 @@ static const u32 mainboard_cim_verb_data[] = {
AZALIA_PIN_CFG(0x0, 0x25, 0x01012014), AZALIA_PIN_CFG(0x0, 0x25, 0x01012014),
}; };
AZALIA_ARRAY_SIZES;

View File

@ -19,18 +19,10 @@
*/ */
#include <device/device.h> #include <device/device.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
}
static void mainboard_enable(device_t dev) static void mainboard_enable(device_t dev)
{ {
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -17,7 +17,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x10ec0262, // Codec Vendor / Device ID: Realtek ALC262 0x10ec0262, // Codec Vendor / Device ID: Realtek ALC262
0x10714700, // Subsystem ID 0x10714700, // Subsystem ID
@ -60,3 +62,7 @@ static const u32 mainboard_cim_verb_data[] = {
/* Pin widget 0x1F - S/PDIF-IN */ /* Pin widget 0x1F - S/PDIF-IN */
AZALIA_PIN_CFG(0x0, 0x1f, 0x411111f0), AZALIA_PIN_CFG(0x0, 0x1f, 0x411111f0),
}; };
const u32 pc_beep_verbs[0] = {};
AZALIA_ARRAY_SIZES;

View File

@ -23,18 +23,10 @@
#include <arch/io.h> #include <arch/io.h>
#include <boot/tables.h> #include <boot/tables.h>
#include <device/pci_def.h> #include <device/pci_def.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
}
static void mainboard_enable(device_t dev) static void mainboard_enable(device_t dev)
{ {
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -0,0 +1,7 @@
#include <device/azalia_device.h>
const u32 cim_verb_data[0] = {};
const u32 pc_beep_verbs[0] = {};
AZALIA_ARRAY_SIZES;

View File

@ -17,7 +17,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x10ec0262, // Codec Vendor / Device ID: Realtek ALC262 0x10ec0262, // Codec Vendor / Device ID: Realtek ALC262
0x10714700, // Subsystem ID 0x10714700, // Subsystem ID
@ -64,3 +66,7 @@ static const u32 mainboard_cim_verb_data[] = {
/* Pin Complex (NID 0x1F), S/PDIF-IN */ /* Pin Complex (NID 0x1F), S/PDIF-IN */
AZALIA_PIN_CFG(0x0, 0x1F, 0x411111F0), AZALIA_PIN_CFG(0x0, 0x1F, 0x411111F0),
}; };
const u32 pc_beep_verbs[0] = {};
AZALIA_ARRAY_SIZES;

View File

@ -24,9 +24,7 @@
#include <device/pci_def.h> #include <device/pci_def.h>
#include <arch/io.h> #include <arch/io.h>
#include <delay.h> #include <delay.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
#include "ec_oem.c" #include "ec_oem.c"
@ -78,11 +76,6 @@ static void pcie_limit_power(void)
#endif #endif
} }
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
}
static void mainboard_init(device_t dev) static void mainboard_init(device_t dev)
{ {
@ -95,7 +88,6 @@ static void mainboard_enable(device_t dev)
{ {
dev->ops->init = mainboard_init; dev->ops->init = mainboard_init;
pcie_limit_power(); pcie_limit_power();
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -24,18 +24,10 @@
#include <device/pci.h> #include <device/pci.h>
#include <device/pci_ids.h> #include <device/pci_ids.h>
#include <device/pci_ops.h> #include <device/pci_ops.h>
// #include "hda_verb.h"
static void verb_setup(void)
{
/* TODO: Add a correct hda_verb.h file for this board. */
// cim_verb_data = mainboard_cim_verb_data;
// cim_verb_data_size = sizeof(mainboard_cim_verb_data);
}
static void mainboard_enable(device_t dev) static void mainboard_enable(device_t dev)
{ {
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -17,7 +17,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x10ec0283, // Codec Vendor / Device ID: Realtek ALC283 0x10ec0283, // Codec Vendor / Device ID: Realtek ALC283
0x10ec0283, // Subsystem ID 0x10ec0283, // Subsystem ID
@ -75,3 +77,7 @@ static const u32 mainboard_cim_verb_data[] = {
AZALIA_PIN_CFG(0x0, 0x21, 0x0321101f), AZALIA_PIN_CFG(0x0, 0x21, 0x0321101f),
}; };
const u32 pc_beep_verbs[0] = {};
AZALIA_ARRAY_SIZES;

View File

@ -32,8 +32,6 @@
#include <arch/io.h> #include <arch/io.h>
#include <arch/interrupt.h> #include <arch/interrupt.h>
#include <boot/coreboot_tables.h> #include <boot/coreboot_tables.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
#include <southbridge/intel/lynxpoint/pch.h> #include <southbridge/intel/lynxpoint/pch.h>
#include "ec.h" #include "ec.h"
#include "onboard.h" #include "onboard.h"
@ -44,13 +42,7 @@ void mainboard_suspend_resume(void)
outb(0xcb, 0xb2); outb(0xcb, 0xb2);
} }
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
}
static void mainboard_init(device_t dev) static void mainboard_init(device_t dev)
{ {
@ -100,7 +92,6 @@ static void mainboard_enable(device_t dev)
dev->ops->init = mainboard_init; dev->ops->init = mainboard_init;
dev->ops->get_smbios_data = mainboard_smbios_data; dev->ops->get_smbios_data = mainboard_smbios_data;
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -24,7 +24,9 @@
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x111D76E5, // Codec Vendor / Device ID: IDT 92HD99 0x111D76E5, // Codec Vendor / Device ID: IDT 92HD99
0x103C18F9, // Subsystem ID 0x103C18F9, // Subsystem ID
@ -223,9 +225,8 @@ static const u32 mainboard_cim_verb_data[] = {
AZALIA_PIN_CFG(0x3, 0x07, 0x18560030) AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
}; };
static const u32 mainboard_pc_beep_verbs[] = { const u32 pc_beep_verbs[] = {
0x02177a00, /* Digital PCBEEP Gain: 0h=-9db, 1h=-6db ... 4h=+3db, 5h=+6db */ 0x02177a00, /* Digital PCBEEP Gain: 0h=-9db, 1h=-6db ... 4h=+3db, 5h=+6db */
}; };
static const u32 mainboard_pc_beep_verbs_size = AZALIA_ARRAY_SIZES;
ARRAY_SIZE(mainboard_pc_beep_verbs);

View File

@ -36,8 +36,6 @@
#include <smbios.h> #include <smbios.h>
#include <device/pci.h> #include <device/pci.h>
#include <ec/quanta/ene_kb3940q/ec.h> #include <ec/quanta/ene_kb3940q/ec.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
#if CONFIG_CHROMEOS #if CONFIG_CHROMEOS
#include <vendorcode/google/chromeos/fmap.h> #include <vendorcode/google/chromeos/fmap.h>
#else #else
@ -194,16 +192,7 @@ void mainboard_suspend_resume(void)
outb(0xcb, 0xb2); outb(0xcb, 0xb2);
} }
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
pc_beep_verbs = mainboard_pc_beep_verbs;
pc_beep_verbs_size = mainboard_pc_beep_verbs_size;
}
static void mainboard_init(device_t dev) static void mainboard_init(device_t dev)
{ {
@ -294,7 +283,6 @@ static void mainboard_enable(device_t dev)
dev->ops->init = mainboard_init; dev->ops->init = mainboard_init;
dev->ops->get_smbios_data = butterfly_onboard_smbios_data; dev->ops->get_smbios_data = butterfly_onboard_smbios_data;
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -17,7 +17,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x10ec0283, // Codec Vendor / Device ID: Realtek ALC283 0x10ec0283, // Codec Vendor / Device ID: Realtek ALC283
0x10ec0283, // Subsystem ID 0x10ec0283, // Subsystem ID
@ -87,7 +89,7 @@ static const u32 mainboard_cim_verb_data[] = {
0x0204081b, 0x0204081b,
}; };
static const u32 mainboard_pc_beep_verbs[] = { const u32 pc_beep_verbs[] = {
0x00170500, /* power up everything (codec, dac, adc, mixers) */ 0x00170500, /* power up everything (codec, dac, adc, mixers) */
0x01470740, /* enable speaker out */ 0x01470740, /* enable speaker out */
0x01470c02, /* set speaker EAPD pin */ 0x01470c02, /* set speaker EAPD pin */
@ -96,5 +98,4 @@ static const u32 mainboard_pc_beep_verbs[] = {
0x00b37410, /* unmute mixer nid 0xb beep input and set volume */ 0x00b37410, /* unmute mixer nid 0xb beep input and set volume */
}; };
static const u32 mainboard_pc_beep_verbs_size = AZALIA_ARRAY_SIZES;
sizeof(mainboard_pc_beep_verbs) / sizeof(mainboard_pc_beep_verbs[0]);

View File

@ -33,8 +33,6 @@
#include <arch/interrupt.h> #include <arch/interrupt.h>
#include <boot/coreboot_tables.h> #include <boot/coreboot_tables.h>
#include <southbridge/intel/lynxpoint/pch.h> #include <southbridge/intel/lynxpoint/pch.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
#include "ec.h" #include "ec.h"
#include "onboard.h" #include "onboard.h"
@ -44,16 +42,7 @@ void mainboard_suspend_resume(void)
outb(0xcb, 0xb2); outb(0xcb, 0xb2);
} }
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
pc_beep_verbs = mainboard_pc_beep_verbs;
pc_beep_verbs_size = mainboard_pc_beep_verbs_size;
}
static void mainboard_init(device_t dev) static void mainboard_init(device_t dev)
{ {
@ -103,7 +92,6 @@ static void mainboard_enable(device_t dev)
dev->ops->init = mainboard_init; dev->ops->init = mainboard_init;
dev->ops->get_smbios_data = mainboard_smbios_data; dev->ops->get_smbios_data = mainboard_smbios_data;
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -17,7 +17,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x11020011, // Codec Vendor / Device ID: Creative CA0132 0x11020011, // Codec Vendor / Device ID: Creative CA0132
0x144dc0c2, // Subsystem ID 0x144dc0c2, // Subsystem ID
@ -126,7 +128,7 @@ static const u32 mainboard_cim_verb_data[] = {
}; };
static const u32 mainboard_pc_beep_verbs[] = { const u32 pc_beep_verbs[] = {
0x00170500, /* power up codec */ 0x00170500, /* power up codec */
0x00270500, /* power up DAC */ 0x00270500, /* power up DAC */
0x00b70500, /* power up speaker */ 0x00b70500, /* power up speaker */
@ -135,5 +137,4 @@ static const u32 mainboard_pc_beep_verbs[] = {
0x00b70c02, /* set EAPD pin */ 0x00b70c02, /* set EAPD pin */
0x0143b013, /* beep volume */ 0x0143b013, /* beep volume */
}; };
static const u32 mainboard_pc_beep_verbs_size = AZALIA_ARRAY_SIZES;
ARRAY_SIZE(mainboard_pc_beep_verbs);

View File

@ -39,8 +39,6 @@
#include <smbios.h> #include <smbios.h>
#include <device/pci.h> #include <device/pci.h>
#include <ec/google/chromeec/ec.h> #include <ec/google/chromeec/ec.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
/* placeholder for evenual link post. Not sure what we'll /* placeholder for evenual link post. Not sure what we'll
* do but it will look nice * do but it will look nice
@ -149,15 +147,7 @@ static int int15_handler(void)
} }
#endif #endif
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
pc_beep_verbs = mainboard_pc_beep_verbs;
pc_beep_verbs_size = mainboard_pc_beep_verbs_size;
}
static void mainboard_init(device_t dev) static void mainboard_init(device_t dev)
{ {
@ -222,7 +212,6 @@ static void mainboard_enable(device_t dev)
/* Install custom int15 handler for VGA OPROM */ /* Install custom int15 handler for VGA OPROM */
mainboard_interrupt_handlers(0x15, &int15_handler); mainboard_interrupt_handlers(0x15, &int15_handler);
#endif #endif
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -22,7 +22,9 @@
#include <stdlib.h> #include <stdlib.h>
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x10ec0283, // Codec Vendor / Device ID: Realtek ALC283 0x10ec0283, // Codec Vendor / Device ID: Realtek ALC283
0x10ec0283, // Subsystem ID 0x10ec0283, // Subsystem ID
@ -83,7 +85,7 @@ static const u32 mainboard_cim_verb_data[] = {
0x0204081b, 0x0204081b,
}; };
static const u32 mainboard_pc_beep_verbs[] = { const u32 pc_beep_verbs[] = {
0x00170500, /* power up everything (codec, dac, adc, mixers) */ 0x00170500, /* power up everything (codec, dac, adc, mixers) */
0x01470740, /* enable speaker out */ 0x01470740, /* enable speaker out */
0x01470c02, /* set speaker EAPD pin */ 0x01470c02, /* set speaker EAPD pin */
@ -92,7 +94,6 @@ static const u32 mainboard_pc_beep_verbs[] = {
0x00b37410, /* unmute mixer nid 0xb beep input and set volume */ 0x00b37410, /* unmute mixer nid 0xb beep input and set volume */
}; };
static const u32 mainboard_pc_beep_verbs_size =
ARRAY_SIZE(mainboard_pc_beep_verbs);
#endif /* HDA_VERB_H */ #endif /* HDA_VERB_H */
AZALIA_ARRAY_SIZES;

View File

@ -32,9 +32,7 @@
#include <device/pci_ops.h> #include <device/pci_ops.h>
#include <pc80/mc146818rtc.h> #include <pc80/mc146818rtc.h>
#include <southbridge/intel/lynxpoint/pch.h> #include <southbridge/intel/lynxpoint/pch.h>
#include <device/azalia_device.h>
#include <drivers/intel/gma/int15.h> #include <drivers/intel/gma/int15.h>
#include "hda_verb.h"
#include "onboard.h" #include "onboard.h"
@ -44,16 +42,7 @@ void mainboard_suspend_resume(void)
outb(0xcb, 0xb2); outb(0xcb, 0xb2);
} }
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
pc_beep_verbs = mainboard_pc_beep_verbs;
pc_beep_verbs_size = mainboard_pc_beep_verbs_size;
}
static void mainboard_init(device_t dev) static void mainboard_init(device_t dev)
{ {
@ -67,7 +56,6 @@ static void mainboard_enable(device_t dev)
{ {
dev->ops->init = mainboard_init; dev->ops->init = mainboard_init;
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -32,7 +32,9 @@
* HDMI PatherPoint * HDMI PatherPoint
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x10ec0269, // Codec Vendor / Device ID: Realtek ALC269 0x10ec0269, // Codec Vendor / Device ID: Realtek ALC269
0x10250742, // Subsystem ID 0x10250742, // Subsystem ID
@ -131,7 +133,7 @@ static const u32 mainboard_cim_verb_data[] = {
AZALIA_PIN_CFG(0x3, 0x07, 0x18560030) AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
}; };
static const u32 mainboard_pc_beep_verbs[] = { const u32 pc_beep_verbs[] = {
0x00170500, /* power up everything (codec, dac, adc, mixers) */ 0x00170500, /* power up everything (codec, dac, adc, mixers) */
0x01470740, /* enable speaker out */ 0x01470740, /* enable speaker out */
0x01470c02, /* set speaker EAPD pin */ 0x01470c02, /* set speaker EAPD pin */
@ -140,5 +142,4 @@ static const u32 mainboard_pc_beep_verbs[] = {
0x00b37410, /* unmute mixer nid 0xb beep input and set volume */ 0x00b37410, /* unmute mixer nid 0xb beep input and set volume */
}; };
static const u32 mainboard_pc_beep_verbs_size = AZALIA_ARRAY_SIZES;
ARRAY_SIZE(mainboard_pc_beep_verbs);

View File

@ -36,8 +36,6 @@
#include <smbios.h> #include <smbios.h>
#include <device/pci.h> #include <device/pci.h>
#include <ec/compal/ene932/ec.h> #include <ec/compal/ene932/ec.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
{ {
@ -48,16 +46,7 @@ void mainboard_suspend_resume(void)
outb(0xe1, 0xb2); outb(0xe1, 0xb2);
} }
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
pc_beep_verbs = mainboard_pc_beep_verbs;
pc_beep_verbs_size = mainboard_pc_beep_verbs_size;
}
static void mainboard_init(device_t dev) static void mainboard_init(device_t dev)
{ {
@ -101,7 +90,6 @@ static void mainboard_enable(device_t dev)
dev->ops->init = mainboard_init; dev->ops->init = mainboard_init;
dev->ops->get_smbios_data = parrot_onboard_smbios_data; dev->ops->get_smbios_data = parrot_onboard_smbios_data;
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -17,7 +17,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x10ec0283, // Codec Vendor / Device ID: Realtek ALC283 0x10ec0283, // Codec Vendor / Device ID: Realtek ALC283
0x10ec0283, // Subsystem ID 0x10ec0283, // Subsystem ID
@ -91,7 +93,7 @@ static const u32 mainboard_cim_verb_data[] = {
0x0204081b, 0x0204081b,
}; };
static const u32 mainboard_pc_beep_verbs[] = { const u32 pc_beep_verbs[] = {
0x00170500, /* power up everything (codec, dac, adc, mixers) */ 0x00170500, /* power up everything (codec, dac, adc, mixers) */
0x01470740, /* enable speaker out */ 0x01470740, /* enable speaker out */
0x01470c02, /* set speaker EAPD pin */ 0x01470c02, /* set speaker EAPD pin */
@ -100,5 +102,4 @@ static const u32 mainboard_pc_beep_verbs[] = {
0x00b37410, /* unmute mixer nid 0xb beep input and set volume */ 0x00b37410, /* unmute mixer nid 0xb beep input and set volume */
}; };
static const u32 mainboard_pc_beep_verbs_size = AZALIA_ARRAY_SIZES;
sizeof(mainboard_pc_beep_verbs) / sizeof(mainboard_pc_beep_verbs[0]);

View File

@ -33,10 +33,8 @@
#include <arch/interrupt.h> #include <arch/interrupt.h>
#include <boot/coreboot_tables.h> #include <boot/coreboot_tables.h>
#include <southbridge/intel/lynxpoint/pch.h> #include <southbridge/intel/lynxpoint/pch.h>
#include <device/azalia_device.h>
#include "ec.h" #include "ec.h"
#include "onboard.h" #include "onboard.h"
#include "hda_verb.h"
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
{ {
@ -44,16 +42,7 @@ void mainboard_suspend_resume(void)
outb(0xcb, 0xb2); outb(0xcb, 0xb2);
} }
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
pc_beep_verbs = mainboard_pc_beep_verbs;
pc_beep_verbs_size = mainboard_pc_beep_verbs_size;
}
static void mainboard_init(device_t dev) static void mainboard_init(device_t dev)
{ {
@ -103,7 +92,6 @@ static void mainboard_enable(device_t dev)
dev->ops->init = mainboard_init; dev->ops->init = mainboard_init;
dev->ops->get_smbios_data = mainboard_smbios_data; dev->ops->get_smbios_data = mainboard_smbios_data;
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -0,0 +1,7 @@
#include <device/azalia_device.h>
const u32 cim_verb_data[0] = {};
const u32 pc_beep_verbs[0] = {};
AZALIA_ARRAY_SIZES;

View File

@ -17,7 +17,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x10ec0283, // Codec Vendor / Device ID: Realtek ALC283 0x10ec0283, // Codec Vendor / Device ID: Realtek ALC283
0x10ec0283, // Subsystem ID 0x10ec0283, // Subsystem ID
@ -82,7 +84,7 @@ static const u32 mainboard_cim_verb_data[] = {
0x0204081b, 0x0204081b,
}; };
static const u32 mainboard_pc_beep_verbs[] = { const u32 pc_beep_verbs[] = {
0x00170500, /* power up everything (codec, dac, adc, mixers) */ 0x00170500, /* power up everything (codec, dac, adc, mixers) */
0x01470740, /* enable speaker out */ 0x01470740, /* enable speaker out */
0x01470c02, /* set speaker EAPD pin */ 0x01470c02, /* set speaker EAPD pin */
@ -91,5 +93,4 @@ static const u32 mainboard_pc_beep_verbs[] = {
0x00b37410, /* unmute mixer nid 0xb beep input and set volume */ 0x00b37410, /* unmute mixer nid 0xb beep input and set volume */
}; };
static const u32 mainboard_pc_beep_verbs_size = AZALIA_ARRAY_SIZES;
sizeof(mainboard_pc_beep_verbs) / sizeof(mainboard_pc_beep_verbs[0]);

View File

@ -35,8 +35,6 @@
#include <southbridge/intel/lynxpoint/pch.h> #include <southbridge/intel/lynxpoint/pch.h>
#include "ec.h" #include "ec.h"
#include "onboard.h" #include "onboard.h"
#include <device/azalia_device.h>
#include "hda_verb.h"
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
{ {
@ -44,16 +42,7 @@ void mainboard_suspend_resume(void)
outb(0xcb, 0xb2); outb(0xcb, 0xb2);
} }
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
pc_beep_verbs = mainboard_pc_beep_verbs;
pc_beep_verbs_size = mainboard_pc_beep_verbs_size;
}
static void mainboard_init(device_t dev) static void mainboard_init(device_t dev)
{ {
@ -103,7 +92,6 @@ static void mainboard_enable(device_t dev)
dev->ops->init = mainboard_init; dev->ops->init = mainboard_init;
dev->ops->get_smbios_data = mainboard_smbios_data; dev->ops->get_smbios_data = mainboard_smbios_data;
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -17,7 +17,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x10ec0269, // Codec Vendor / Device ID: Realtek 0x10ec0269, // Codec Vendor / Device ID: Realtek
0x17aa21fe, // Subsystem ID 0x17aa21fe, // Subsystem ID
@ -82,7 +84,7 @@ static const u32 mainboard_cim_verb_data[] = {
AZALIA_PIN_CFG(0x3, 0x07, 0x58560030) AZALIA_PIN_CFG(0x3, 0x07, 0x58560030)
}; };
static const u32 mainboard_pc_beep_verbs[] = { const u32 pc_beep_verbs[] = {
0x00170500, /* power up everything (codec, dac, adc, mixers) */ 0x00170500, /* power up everything (codec, dac, adc, mixers) */
0x01470740, /* enable speaker out */ 0x01470740, /* enable speaker out */
0x01470c02, /* set speaker EAPD pin */ 0x01470c02, /* set speaker EAPD pin */
@ -90,5 +92,4 @@ static const u32 mainboard_pc_beep_verbs[] = {
0x00c37100, /* unmute mixer nid 0xc input 1 */ 0x00c37100, /* unmute mixer nid 0xc input 1 */
0x00b37410, /* unmute mixer nid 0xb beep input and set volume */ 0x00b37410, /* unmute mixer nid 0xb beep input and set volume */
}; };
static const u32 mainboard_pc_beep_verbs_size = AZALIA_ARRAY_SIZES;
ARRAY_SIZE(mainboard_pc_beep_verbs);

View File

@ -36,8 +36,6 @@
#include <smbios.h> #include <smbios.h>
#include <device/pci.h> #include <device/pci.h>
#include <ec/quanta/it8518/ec.h> #include <ec/quanta/it8518/ec.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
{ {
@ -48,15 +46,7 @@ void mainboard_suspend_resume(void)
ec_write_cmd(EC_CMD_NOTIFY_ACPI_ENTER); ec_write_cmd(EC_CMD_NOTIFY_ACPI_ENTER);
} }
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
pc_beep_verbs = mainboard_pc_beep_verbs;
pc_beep_verbs_size = mainboard_pc_beep_verbs_size;
}
static void mainboard_init(device_t dev) static void mainboard_init(device_t dev)
{ {
@ -84,7 +74,6 @@ static void mainboard_enable(device_t dev)
{ {
dev->ops->init = mainboard_init; dev->ops->init = mainboard_init;
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -0,0 +1,7 @@
#include <device/azalia_device.h>
const u32 cim_verb_data[0] = {};
const u32 pc_beep_verbs[0] = {};
AZALIA_ARRAY_SIZES;

View File

@ -24,17 +24,9 @@
#include <pc80/mc146818rtc.h> #include <pc80/mc146818rtc.h>
#include <arch/io.h> #include <arch/io.h>
#include <arch/interrupt.h> #include <arch/interrupt.h>
#include <device/azalia_device.h>
#include "superio_hwm.h" #include "superio_hwm.h"
/* Audio Setup */
static void verb_setup(void)
{
// Default VERB is fine on this mainboard.
cim_verb_data = NULL;
cim_verb_data_size = 0;
}
// mainboard_enable is executed as first thing after // mainboard_enable is executed as first thing after
// enumerate_buses(). // enumerate_buses().
@ -42,7 +34,6 @@ static void verb_setup(void)
static void mainboard_enable(device_t dev) static void mainboard_enable(device_t dev)
{ {
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 3); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 3);
verb_setup();
hwm_setup(); hwm_setup();
} }

View File

@ -17,7 +17,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x10134210, // Codec Vendor / Device ID: Cirrus Logic CS4210 0x10134210, // Codec Vendor / Device ID: Cirrus Logic CS4210
0x10134210, // Subsystem ID 0x10134210, // Subsystem ID
@ -63,3 +65,7 @@ static const u32 mainboard_cim_verb_data[] = {
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */ /* Pin Complex (NID 0x07) Digital Out at Int HDMI */
AZALIA_PIN_CFG(0x3, 0x07, 0x18560030) AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
}; };
const u32 pc_beep_verbs[0] = {};
AZALIA_ARRAY_SIZES;

View File

@ -32,8 +32,6 @@
#include <arch/interrupt.h> #include <arch/interrupt.h>
#include <boot/coreboot_tables.h> #include <boot/coreboot_tables.h>
#include <southbridge/intel/lynxpoint/pch.h> #include <southbridge/intel/lynxpoint/pch.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
{ {
@ -41,13 +39,7 @@ void mainboard_suspend_resume(void)
outb(0xcb, 0xb2); outb(0xcb, 0xb2);
} }
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
}
// mainboard_enable is executed as first thing after // mainboard_enable is executed as first thing after
// enumerate_buses(). // enumerate_buses().
@ -55,7 +47,6 @@ static void verb_setup(void)
static void mainboard_enable(device_t dev) static void mainboard_enable(device_t dev)
{ {
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -17,7 +17,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x80862805, // Codec Vendor / Device ID: Intel CougarPoint HDMI 0x80862805, // Codec Vendor / Device ID: Intel CougarPoint HDMI
0x80860101, // Subsystem ID 0x80860101, // Subsystem ID
@ -35,3 +37,4 @@ static const u32 mainboard_cim_verb_data[] = {
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */ /* Pin Complex (NID 0x07) Digital Out at Int HDMI */
AZALIA_PIN_CFG(0x3, 0x07, 0x18560030) AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
}; };
AZALIA_ARRAY_SIZES;

View File

@ -32,8 +32,6 @@
#include <arch/interrupt.h> #include <arch/interrupt.h>
#include <boot/coreboot_tables.h> #include <boot/coreboot_tables.h>
#include <southbridge/intel/fsp_bd82x6x/pch.h> #include <southbridge/intel/fsp_bd82x6x/pch.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME) #if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
@ -43,13 +41,7 @@ void mainboard_suspend_resume(void)
} }
#endif #endif
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
}
// mainboard_enable is executed as first thing after // mainboard_enable is executed as first thing after
// enumerate_buses(). // enumerate_buses().
@ -57,7 +49,6 @@ static void verb_setup(void)
static void mainboard_enable(device_t dev) static void mainboard_enable(device_t dev)
{ {
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -0,0 +1,7 @@
#include <device/azalia_device.h>
const u32 cim_verb_data[0] = {};
const u32 pc_beep_verbs[0] = {};
AZALIA_ARRAY_SIZES;

View File

@ -17,7 +17,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x10134210, // Codec Vendor / Device ID: Cirrus Logic CS4210 0x10134210, // Codec Vendor / Device ID: Cirrus Logic CS4210
0x10134210, // Subsystem ID 0x10134210, // Subsystem ID
@ -63,3 +65,7 @@ static const u32 mainboard_cim_verb_data[] = {
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */ /* Pin Complex (NID 0x07) Digital Out at Int HDMI */
AZALIA_PIN_CFG(0x3, 0x07, 0x18560030) AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
}; };
const u32 pc_beep_verbs[0] = {};
AZALIA_ARRAY_SIZES;

View File

@ -32,8 +32,6 @@
#include <arch/interrupt.h> #include <arch/interrupt.h>
#include <boot/coreboot_tables.h> #include <boot/coreboot_tables.h>
#include <southbridge/intel/bd82x6x/pch.h> #include <southbridge/intel/bd82x6x/pch.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
{ {
@ -41,13 +39,7 @@ void mainboard_suspend_resume(void)
outb(0xcb, 0xb2); outb(0xcb, 0xb2);
} }
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
}
// mainboard_enable is executed as first thing after // mainboard_enable is executed as first thing after
// enumerate_buses(). // enumerate_buses().
@ -55,7 +47,6 @@ static void verb_setup(void)
static void mainboard_enable(device_t dev) static void mainboard_enable(device_t dev)
{ {
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -17,7 +17,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x10134210, // Codec Vendor / Device ID: Cirrus Logic CS4210 0x10134210, // Codec Vendor / Device ID: Cirrus Logic CS4210
0x10134210, // Subsystem ID 0x10134210, // Subsystem ID
@ -63,3 +65,7 @@ static const u32 mainboard_cim_verb_data[] = {
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */ /* Pin Complex (NID 0x07) Digital Out at Int HDMI */
AZALIA_PIN_CFG(0x3, 0x07, 0x18560030) AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
}; };
const u32 pc_beep_verbs[0] = {};
AZALIA_ARRAY_SIZES;

View File

@ -32,8 +32,6 @@
#include <arch/interrupt.h> #include <arch/interrupt.h>
#include <boot/coreboot_tables.h> #include <boot/coreboot_tables.h>
#include <southbridge/intel/lynxpoint/pch.h> #include <southbridge/intel/lynxpoint/pch.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
{ {
@ -41,13 +39,7 @@ void mainboard_suspend_resume(void)
outb(0xcb, 0xb2); outb(0xcb, 0xb2);
} }
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
}
// mainboard_enable is executed as first thing after // mainboard_enable is executed as first thing after
// enumerate_buses(). // enumerate_buses().
@ -55,7 +47,6 @@ static void verb_setup(void)
static void mainboard_enable(device_t dev) static void mainboard_enable(device_t dev)
{ {
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -89,3 +89,4 @@ static u32 mainboard_cim_verb_data[] = {
/* BTL Gain */ /* BTL Gain */
0x017F417, /* Gain = 16.79dB */ 0x017F417, /* Gain = 16.79dB */
}; };
AZALIA_ARRAY_SIZES;

View File

@ -20,18 +20,10 @@
#include <device/device.h> #include <device/device.h>
#include <console/console.h> #include <console/console.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
}
static void mainboard_enable(device_t dev) static void mainboard_enable(device_t dev)
{ {
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -0,0 +1,7 @@
#include <device/azalia_device.h>
const u32 cim_verb_data[0] = {};
const u32 pc_beep_verbs[0] = {};
AZALIA_ARRAY_SIZES;

View File

@ -24,7 +24,6 @@
#include <pc80/mc146818rtc.h> #include <pc80/mc146818rtc.h>
#include <arch/io.h> #include <arch/io.h>
#include <arch/interrupt.h> #include <arch/interrupt.h>
#include <device/azalia_device.h>
/* Hardware Monitor */ /* Hardware Monitor */
@ -160,14 +159,7 @@ static void hwm_setup(void)
hwm_write(0x40, 0x01); // Init, but no SMI# hwm_write(0x40, 0x01); // Init, but no SMI#
} }
/* Audio Setup */
static void verb_setup(void)
{
// Default VERB is fine on this mainboard.
cim_verb_data = NULL;
cim_verb_data_size = 0;
}
// mainboard_enable is executed as first thing after // mainboard_enable is executed as first thing after
// enumerate_buses(). // enumerate_buses().
@ -175,7 +167,6 @@ static void verb_setup(void)
static void mainboard_enable(device_t dev) static void mainboard_enable(device_t dev)
{ {
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 3); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 3);
verb_setup();
hwm_setup(); hwm_setup();
} }

View File

@ -18,7 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x11060397, // Codec Vendor / Device ID: Via VT1708S 0x11060397, // Codec Vendor / Device ID: Via VT1708S
0x11060000, // Subsystem ID 0x11060000, // Subsystem ID
@ -113,3 +115,7 @@ static const u32 mainboard_cim_verb_data[] = {
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */ /* Pin Complex (NID 0x07) Digital Out at Int HDMI */
AZALIA_PIN_CFG(0x3, 0x07, 0x18560030) AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
}; };
const u32 pc_beep_verbs[0] = {};
AZALIA_ARRAY_SIZES;

View File

@ -34,8 +34,6 @@
#include <arch/interrupt.h> #include <arch/interrupt.h>
#include <boot/coreboot_tables.h> #include <boot/coreboot_tables.h>
#include <southbridge/intel/bd82x6x/pch.h> #include <southbridge/intel/bd82x6x/pch.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
{ {
@ -169,13 +167,7 @@ static int int15_handler(void)
} }
#endif #endif
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
}
// mainboard_enable is executed as first thing after // mainboard_enable is executed as first thing after
// enumerate_buses(). // enumerate_buses().
@ -186,7 +178,6 @@ static void mainboard_enable(device_t dev)
/* Install custom int15 handler for VGA OPROM */ /* Install custom int15 handler for VGA OPROM */
mainboard_interrupt_handlers(0x15, &int15_handler); mainboard_interrupt_handlers(0x15, &int15_handler);
#endif #endif
verb_setup();
unsigned disable = 0; unsigned disable = 0;
if ((get_option(&disable, "ethernet1") == CB_SUCCESS) && disable) { if ((get_option(&disable, "ethernet1") == CB_SUCCESS) && disable) {

View File

@ -25,7 +25,9 @@
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x14f1506e, // Codec Vendor / Device ID: Conexant CX20590 - Schematic shows CX20672 0x14f1506e, // Codec Vendor / Device ID: Conexant CX20590 - Schematic shows CX20672
0x17aa21cf, // Subsystem ID 0x17aa21cf, // Subsystem ID
@ -181,9 +183,8 @@ static const u32 mainboard_cim_verb_data[] = {
0x00170500, /* Set power state to D0 */ 0x00170500, /* Set power state to D0 */
}; };
static const u32 mainboard_pc_beep_verbs[] = { const u32 pc_beep_verbs[] = {
0x02177a00, /* Digital PCBEEP Gain: 0h=-9db, 1h=-6db ... 4h=+3db, 5h=+6db */ 0x02177a00, /* Digital PCBEEP Gain: 0h=-9db, 1h=-6db ... 4h=+3db, 5h=+6db */
}; };
static const u32 mainboard_pc_beep_verbs_size = AZALIA_ARRAY_SIZES;
ARRAY_SIZE(mainboard_pc_beep_verbs);

View File

@ -37,8 +37,6 @@
#include <cbfs.h> #include <cbfs.h>
#include <pc80/keyboard.h> #include <pc80/keyboard.h>
#include <ec/lenovo/h8/h8.h> #include <ec/lenovo/h8/h8.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
{ {
@ -46,16 +44,7 @@ void mainboard_suspend_resume(void)
outb(0xcb, 0xb2); outb(0xcb, 0xb2);
} }
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
pc_beep_verbs = mainboard_pc_beep_verbs;
pc_beep_verbs_size = mainboard_pc_beep_verbs_size;
}
static void mainboard_init(device_t dev) static void mainboard_init(device_t dev)
{ {
@ -80,7 +69,6 @@ static void mainboard_enable(device_t dev)
{ {
dev->ops->init = mainboard_init; dev->ops->init = mainboard_init;
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
verb_setup();
} }
void h8_mainboard_init_dock (void) void h8_mainboard_init_dock (void)

View File

@ -25,7 +25,9 @@
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x10ec0269, // Codec Vendor / Device ID: Realtek ALC269VC 0x10ec0269, // Codec Vendor / Device ID: Realtek ALC269VC
0x17aa21fa, // Subsystem ID 0x17aa21fa, // Subsystem ID
@ -243,9 +245,8 @@ static const u32 mainboard_cim_verb_data[] = {
AZALIA_PIN_CFG(0x3, 0x07, 0x18560030) AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
}; };
static const u32 mainboard_pc_beep_verbs[] = { const u32 pc_beep_verbs[] = {
0x02177a00, /* Digital PCBEEP Gain: 0h=-9db, 1h=-6db ... 4h=+3db, 5h=+6db */ 0x02177a00, /* Digital PCBEEP Gain: 0h=-9db, 1h=-6db ... 4h=+3db, 5h=+6db */
}; };
static const u32 mainboard_pc_beep_verbs_size = AZALIA_ARRAY_SIZES;
ARRAY_SIZE(mainboard_pc_beep_verbs);

View File

@ -37,8 +37,6 @@
#include <cbfs.h> #include <cbfs.h>
#include <pc80/keyboard.h> #include <pc80/keyboard.h>
#include <ec/lenovo/h8/h8.h> #include <ec/lenovo/h8/h8.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
{ {
@ -46,16 +44,7 @@ void mainboard_suspend_resume(void)
outb(0xcb, 0xb2); outb(0xcb, 0xb2);
} }
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
pc_beep_verbs = mainboard_pc_beep_verbs;
pc_beep_verbs_size = mainboard_pc_beep_verbs_size;
}
static void mainboard_init(device_t dev) static void mainboard_init(device_t dev)
{ {
@ -85,7 +74,6 @@ static void mainboard_enable(device_t dev)
dev->ops->init = mainboard_init; dev->ops->init = mainboard_init;
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
verb_setup();
} }
void h8_mainboard_init_dock (void) void h8_mainboard_init_dock (void)

View File

@ -0,0 +1,7 @@
#include <device/azalia_device.h>
const u32 cim_verb_data[0] = {};
const u32 pc_beep_verbs[0] = {};
AZALIA_ARRAY_SIZES;

View File

@ -18,7 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x14f15051, // Conexant CX20561 (Hermosa) 0x14f15051, // Conexant CX20561 (Hermosa)
0x17aa20ff, // Subsystem ID 0x17aa20ff, // Subsystem ID
@ -36,7 +38,7 @@ static const u32 mainboard_cim_verb_data[] = {
AZALIA_PIN_CFG(0, 0x1d, 0x90a601f0) AZALIA_PIN_CFG(0, 0x1d, 0x90a601f0)
}; };
static const u32 mainboard_pc_beep_verbs[] = { const u32 pc_beep_verbs[] = {
0x00170500, /* power up codec */ 0x00170500, /* power up codec */
0x01470500, /* power up speakers */ 0x01470500, /* power up speakers */
0x01470100, /* select lout1 (input 0x0) for speakers */ 0x01470100, /* select lout1 (input 0x0) for speakers */
@ -46,3 +48,4 @@ static const u32 mainboard_pc_beep_verbs[] = {
0x00c3b015, /* set lout1 output volume -15dB */ 0x00c3b015, /* set lout1 output volume -15dB */
0x0143b000, /* unmute speakers */ 0x0143b000, /* unmute speakers */
}; };
AZALIA_ARRAY_SIZES;

View File

@ -32,23 +32,13 @@
#include <ec/lenovo/pmh7/pmh7.h> #include <ec/lenovo/pmh7/pmh7.h>
#include <ec/acpi/ec.h> #include <ec/acpi/ec.h>
#include <ec/lenovo/h8/h8.h> #include <ec/lenovo/h8/h8.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
#if CONFIG_GENERATE_ACPI_TABLES #if CONFIG_GENERATE_ACPI_TABLES
#include "cstates.c" /* Include it, as the linker won't find #include "cstates.c" /* Include it, as the linker won't find
the overloaded weak function in there. */ the overloaded weak function in there. */
#endif #endif
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
pc_beep_verbs = mainboard_pc_beep_verbs;
pc_beep_verbs_size = ARRAY_SIZE(mainboard_pc_beep_verbs);
}
const char *smbios_mainboard_bios_version(void) const char *smbios_mainboard_bios_version(void)
{ {
/* Satisfy thinkpad_acpi. */ /* Satisfy thinkpad_acpi. */
@ -68,7 +58,6 @@ static void mainboard_init(device_t dev)
static void mainboard_enable(device_t dev) static void mainboard_enable(device_t dev)
{ {
verb_setup();
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 2); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 2);
dev->ops->init = mainboard_init; dev->ops->init = mainboard_init;

View File

@ -18,7 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x14F15069, /* Codec Vendor / Device ID: Conexant CX20585 */ 0x14F15069, /* Codec Vendor / Device ID: Conexant CX20585 */
0x17AA2155, /* Subsystem ID */ 0x17AA2155, /* Subsystem ID */
@ -73,3 +75,7 @@ static const u32 mainboard_cim_verb_data[] = {
/* NID 0x06. */ /* NID 0x06. */
AZALIA_PIN_CFG(0x3, 0x06, 0x58560030), AZALIA_PIN_CFG(0x3, 0x06, 0x58560030),
}; };
const u32 pc_beep_verbs[0] = {};
AZALIA_ARRAY_SIZES;

View File

@ -35,11 +35,9 @@
#include <ec/lenovo/h8/h8.h> #include <ec/lenovo/h8/h8.h>
#include <northbridge/intel/nehalem/nehalem.h> #include <northbridge/intel/nehalem/nehalem.h>
#include <southbridge/intel/bd82x6x/pch.h> #include <southbridge/intel/bd82x6x/pch.h>
#include <device/azalia_device.h>
#include <pc80/mc146818rtc.h> #include <pc80/mc146818rtc.h>
#include "dock.h" #include "dock.h"
#include "hda_verb.h"
#include <arch/x86/include/arch/acpigen.h> #include <arch/x86/include/arch/acpigen.h>
#include <drivers/intel/gma/int15.h> #include <drivers/intel/gma/int15.h>
#include <arch/interrupt.h> #include <arch/interrupt.h>
@ -71,13 +69,7 @@ const char *smbios_mainboard_bios_version(void)
return "CBET4000 " COREBOOT_VERSION; return "CBET4000 " COREBOOT_VERSION;
} }
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
}
static void mainboard_init(device_t dev) static void mainboard_init(device_t dev)
{ {
@ -155,7 +147,6 @@ static void mainboard_enable(device_t dev)
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_LFP, 2); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_LFP, 2);
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -25,7 +25,9 @@
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x14f1506e, // Codec Vendor / Device ID: Conexant CX20590 0x14f1506e, // Codec Vendor / Device ID: Conexant CX20590
0x17aa21db, // Subsystem ID 0x17aa21db, // Subsystem ID
@ -205,9 +207,8 @@ static const u32 mainboard_cim_verb_data[] = {
AZALIA_PIN_CFG(0x3, 0x07, 0x18560030) AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
}; };
static const u32 mainboard_pc_beep_verbs[] = { const u32 pc_beep_verbs[] = {
0x02177a00, /* Digital PCBEEP Gain: 0h=-9db, 1h=-6db ... 4h=+3db, 5h=+6db */ 0x02177a00, /* Digital PCBEEP Gain: 0h=-9db, 1h=-6db ... 4h=+3db, 5h=+6db */
}; };
static const u32 mainboard_pc_beep_verbs_size = AZALIA_ARRAY_SIZES;
ARRAY_SIZE(mainboard_pc_beep_verbs);

View File

@ -38,8 +38,6 @@
#include <pc80/keyboard.h> #include <pc80/keyboard.h>
#include <ec/lenovo/h8/h8.h> #include <ec/lenovo/h8/h8.h>
#include <build.h> #include <build.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
{ {
@ -56,16 +54,7 @@ const char *smbios_mainboard_bios_version(void)
return "CBET4000 " COREBOOT_VERSION; return "CBET4000 " COREBOOT_VERSION;
} }
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
pc_beep_verbs = mainboard_pc_beep_verbs;
pc_beep_verbs_size = mainboard_pc_beep_verbs_size;
}
static void mainboard_init(device_t dev) static void mainboard_init(device_t dev)
{ {
@ -95,7 +84,6 @@ static void mainboard_enable(device_t dev)
dev->ops->init = mainboard_init; dev->ops->init = mainboard_init;
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
verb_setup();
} }
void h8_mainboard_init_dock (void) void h8_mainboard_init_dock (void)

View File

@ -25,7 +25,9 @@
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x10ec0269, // Codec Vendor / Device ID: Realtek ALC269VC 0x10ec0269, // Codec Vendor / Device ID: Realtek ALC269VC
0x17aa21fa, // Subsystem ID 0x17aa21fa, // Subsystem ID
@ -243,9 +245,8 @@ static const u32 mainboard_cim_verb_data[] = {
AZALIA_PIN_CFG(0x3, 0x07, 0x18560030) AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
}; };
static const u32 mainboard_pc_beep_verbs[] = { const u32 pc_beep_verbs[] = {
0x02177a00, /* Digital PCBEEP Gain: 0h=-9db, 1h=-6db ... 4h=+3db, 5h=+6db */ 0x02177a00, /* Digital PCBEEP Gain: 0h=-9db, 1h=-6db ... 4h=+3db, 5h=+6db */
}; };
static const u32 mainboard_pc_beep_verbs_size = AZALIA_ARRAY_SIZES;
ARRAY_SIZE(mainboard_pc_beep_verbs);

View File

@ -38,8 +38,6 @@
#include <pc80/keyboard.h> #include <pc80/keyboard.h>
#include <ec/lenovo/h8/h8.h> #include <ec/lenovo/h8/h8.h>
#include <build.h> #include <build.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
{ {
@ -56,16 +54,7 @@ const char *smbios_mainboard_bios_version(void)
return "CBET4000 " COREBOOT_VERSION; return "CBET4000 " COREBOOT_VERSION;
} }
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
pc_beep_verbs = mainboard_pc_beep_verbs;
pc_beep_verbs_size = mainboard_pc_beep_verbs_size;
}
static void mainboard_init(device_t dev) static void mainboard_init(device_t dev)
{ {
@ -95,7 +84,6 @@ static void mainboard_enable(device_t dev)
dev->ops->init = mainboard_init; dev->ops->init = mainboard_init;
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
verb_setup();
} }
void h8_mainboard_init_dock (void) void h8_mainboard_init_dock (void)

View File

@ -0,0 +1,7 @@
#include <device/azalia_device.h>
const u32 cim_verb_data[0] = {};
const u32 pc_beep_verbs[0] = {};
AZALIA_ARRAY_SIZES;

View File

@ -19,20 +19,12 @@
*/ */
#include <device/device.h> #include <device/device.h>
#include <device/azalia_device.h>
#if 0 #if 0
#include "hda_verb.h"
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
}
static void mainboard_enable(device_t dev) static void mainboard_enable(device_t dev)
{ {
verb_setup();
} }
#endif #endif

View File

@ -24,18 +24,10 @@
#include <device/pci.h> #include <device/pci.h>
#include <device/pci_ids.h> #include <device/pci_ids.h>
#include <device/pci_ops.h> #include <device/pci_ops.h>
// #include "hda_verb.h"
static void verb_setup(void)
{
/* TODO: Add a correct hda_verb.h file for this board. */
// cim_verb_data = mainboard_cim_verb_data;
// cim_verb_data_size = sizeof(mainboard_cim_verb_data);
}
static void mainboard_enable(device_t dev) static void mainboard_enable(device_t dev)
{ {
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -24,19 +24,10 @@
#include <device/pci.h> #include <device/pci.h>
#include <device/pci_ids.h> #include <device/pci_ids.h>
#include <device/pci_ops.h> #include <device/pci_ops.h>
#include <device/azalia_device.h>
// #include "hda_verb.h"
static void verb_setup(void)
{
/* TODO: Add a correct hda_verb.h file for this board. */
// cim_verb_data = mainboard_cim_verb_data;
// cim_verb_data_size = sizeof(mainboard_cim_verb_data);
}
static void mainboard_enable(device_t dev) static void mainboard_enable(device_t dev)
{ {
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -64,3 +64,4 @@ static u32 mainboard_cim_verb_data[] = {
/* NID 0x1f, S/PDIF-IN */ /* NID 0x1f, S/PDIF-IN */
AZALIA_PIN_CFG(0x0, 0x1f, 0x01c59150), AZALIA_PIN_CFG(0x0, 0x1f, 0x01c59150),
}; };
AZALIA_ARRAY_SIZES;

View File

@ -24,18 +24,10 @@
#include <device/pci.h> #include <device/pci.h>
#include <device/pci_ids.h> #include <device/pci_ids.h>
#include <device/pci_ops.h> #include <device/pci_ops.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
}
static void mainboard_enable(device_t dev) static void mainboard_enable(device_t dev)
{ {
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -18,7 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x10ec0272, /* Codec Vendor / Device ID: Realtek ALC272X */ 0x10ec0272, /* Codec Vendor / Device ID: Realtek ALC272X */
0x10250379, /* Subsystem ID */ 0x10250379, /* Subsystem ID */
@ -58,3 +60,7 @@ static const u32 mainboard_cim_verb_data[] = {
/* NID 0x06. */ /* NID 0x06. */
AZALIA_PIN_CFG(0x3, 0x06, 0x58560030), AZALIA_PIN_CFG(0x3, 0x06, 0x58560030),
}; };
const u32 pc_beep_verbs[0] = {};
AZALIA_ARRAY_SIZES;

View File

@ -43,8 +43,6 @@
#include <cpu/x86/lapic.h> #include <cpu/x86/lapic.h>
#include <device/pci.h> #include <device/pci.h>
#include <smbios.h> #include <smbios.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
static acpi_cstate_t cst_entries[] = { static acpi_cstate_t cst_entries[] = {
{1, 1, 1000, {0x7f, 1, 2, {0}, 1, 0}}, {1, 1, 1000, {0x7f, 1, 2, {0}, 1, 0}},
@ -58,13 +56,7 @@ int get_cst_entries(acpi_cstate_t ** entries)
return ARRAY_SIZE(cst_entries); return ARRAY_SIZE(cst_entries);
} }
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
}
static void mainboard_enable(device_t dev) static void mainboard_enable(device_t dev)
{ {
@ -137,7 +129,6 @@ static void mainboard_enable(device_t dev)
/* This sneaked in here, because EasyNote has no SuperIO chip. /* This sneaked in here, because EasyNote has no SuperIO chip.
*/ */
pc_keyboard_init(); pc_keyboard_init();
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -0,0 +1,7 @@
#include <device/azalia_device.h>
const u32 cim_verb_data[0] = {};
const u32 pc_beep_verbs[0] = {};
AZALIA_ARRAY_SIZES;

View File

@ -18,7 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x10ec0262, // Codec Vendor / Device ID: Realtek ALC262 0x10ec0262, // Codec Vendor / Device ID: Realtek ALC262
0x43528986, // Subsystem ID 0x43528986, // Subsystem ID
@ -52,7 +54,7 @@ static const u32 mainboard_cim_verb_data[] = {
AZALIA_PIN_CFG(0, 0x1f, 0x411111f0) AZALIA_PIN_CFG(0, 0x1f, 0x411111f0)
}; };
static const u32 mainboard_pc_beep_verbs[] = { const u32 pc_beep_verbs[] = {
0x00170500, /* power up codec */ 0x00170500, /* power up codec */
0x01470500, /* power up speakers */ 0x01470500, /* power up speakers */
0x01470100, /* select lout1 (input 0x0) for speakers */ 0x01470100, /* select lout1 (input 0x0) for speakers */
@ -62,3 +64,4 @@ static const u32 mainboard_pc_beep_verbs[] = {
0x00c3b015, /* set lout1 output volume -15dB */ 0x00c3b015, /* set lout1 output volume -15dB */
0x0143b000, /* unmute speakers */ 0x0143b000, /* unmute speakers */
}; };
AZALIA_ARRAY_SIZES;

View File

@ -26,22 +26,12 @@
#include <drivers/intel/gma/int15.h> #include <drivers/intel/gma/int15.h>
#include <pc80/keyboard.h> #include <pc80/keyboard.h>
#include <ec/acpi/ec.h> #include <ec/acpi/ec.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
#if CONFIG_GENERATE_ACPI_TABLES #if CONFIG_GENERATE_ACPI_TABLES
#include "cstates.c" /* Include it, as the linker won't find #include "cstates.c" /* Include it, as the linker won't find
the overloaded weak function in there. */ the overloaded weak function in there. */
#endif #endif
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
pc_beep_verbs = mainboard_pc_beep_verbs;
pc_beep_verbs_size = ARRAY_SIZE(mainboard_pc_beep_verbs);
}
static void ec_setup(void) static void ec_setup(void)
{ {
/* Thermal limits? Values are from ectool's ram dump. */ /* Thermal limits? Values are from ectool's ram dump. */
@ -59,7 +49,6 @@ static void ec_setup(void)
static void mainboard_enable(device_t dev) static void mainboard_enable(device_t dev)
{ {
ec_setup(); ec_setup();
verb_setup();
/* LCD panel type is SIO GPIO40-43. /* LCD panel type is SIO GPIO40-43.
It's controlled by a DIP switch but was always It's controlled by a DIP switch but was always
set to 4 while only values of 5 and 6 worked. */ set to 4 while only values of 5 and 6 worked. */

View File

@ -17,7 +17,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x10134210, // Codec Vendor / Device ID: Realtek ALC262 0x10134210, // Codec Vendor / Device ID: Realtek ALC262
0x144db082, // Subsystem ID 0x144db082, // Subsystem ID
@ -49,12 +51,11 @@ static const u32 mainboard_cim_verb_data[] = {
AZALIA_PIN_CFG(0x0, 0x0a, 0x434510f0) AZALIA_PIN_CFG(0x0, 0x0a, 0x434510f0)
}; };
static const u32 mainboard_pc_beep_verbs[] = { const u32 pc_beep_verbs[] = {
0x00170500, /* power up codec */ 0x00170500, /* power up codec */
0x00270500, /* power up DAC */ 0x00270500, /* power up DAC */
0x00670500, /* power up speaker */ 0x00670500, /* power up speaker */
0x00670740, /* enable speaker output */ 0x00670740, /* enable speaker output */
0x0023B04B, /* set DAC gain */ 0x0023B04B, /* set DAC gain */
}; };
static const u32 mainboard_pc_beep_verbs_size = AZALIA_ARRAY_SIZES;
ARRAY_SIZE(mainboard_pc_beep_verbs);

View File

@ -35,8 +35,6 @@
#include "onboard.h" #include "onboard.h"
#include <southbridge/intel/bd82x6x/pch.h> #include <southbridge/intel/bd82x6x/pch.h>
#include <smbios.h> #include <smbios.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
{ {
@ -48,15 +46,7 @@ void mainboard_suspend_resume(void)
send_ec_command(EC_ACPI_ENABLE); send_ec_command(EC_ACPI_ENABLE);
} }
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
pc_beep_verbs = mainboard_pc_beep_verbs;
pc_beep_verbs_size = mainboard_pc_beep_verbs_size;
}
static void mainboard_init(device_t dev) static void mainboard_init(device_t dev)
{ {
@ -116,7 +106,6 @@ static void mainboard_enable(device_t dev)
dev->ops->init = mainboard_init; dev->ops->init = mainboard_init;
dev->ops->get_smbios_data = lumpy_onboard_smbios_data; dev->ops->get_smbios_data = lumpy_onboard_smbios_data;
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -17,7 +17,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
static const u32 mainboard_cim_verb_data[] = { #include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* coreboot specific header */ /* coreboot specific header */
0x10134210, // Codec Vendor / Device ID: Cirrus Logic CS4210 0x10134210, // Codec Vendor / Device ID: Cirrus Logic CS4210
0x10134210, // Subsystem ID 0x10134210, // Subsystem ID
@ -64,12 +66,11 @@ static const u32 mainboard_cim_verb_data[] = {
AZALIA_PIN_CFG(0x3, 0x07, 0x18560030) AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
}; };
static const u32 mainboard_pc_beep_verbs[] = { const u32 pc_beep_verbs[] = {
0x00170500, /* power up codec */ 0x00170500, /* power up codec */
0x00270500, /* power up DAC */ 0x00270500, /* power up DAC */
0x00670500, /* power up speaker */ 0x00670500, /* power up speaker */
0x00670740, /* enable speaker output */ 0x00670740, /* enable speaker output */
0x0023B04B, /* set DAC gain */ 0x0023B04B, /* set DAC gain */
}; };
static const u32 mainboard_pc_beep_verbs_size = AZALIA_ARRAY_SIZES;
ARRAY_SIZE(mainboard_pc_beep_verbs);

View File

@ -32,8 +32,6 @@
#include <arch/interrupt.h> #include <arch/interrupt.h>
#include <boot/coreboot_tables.h> #include <boot/coreboot_tables.h>
#include <southbridge/intel/bd82x6x/pch.h> #include <southbridge/intel/bd82x6x/pch.h>
#include <device/azalia_device.h>
#include "hda_verb.h"
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
{ {
@ -41,15 +39,7 @@ void mainboard_suspend_resume(void)
outb(0xcb, 0xb2); outb(0xcb, 0xb2);
} }
/* Audio Setup */
static void verb_setup(void)
{
cim_verb_data = mainboard_cim_verb_data;
cim_verb_data_size = sizeof(mainboard_cim_verb_data);
pc_beep_verbs = mainboard_pc_beep_verbs;
pc_beep_verbs_size = mainboard_pc_beep_verbs_size;
}
// mainboard_enable is executed as first thing after // mainboard_enable is executed as first thing after
// enumerate_buses(). // enumerate_buses().
@ -57,7 +47,6 @@ static void verb_setup(void)
static void mainboard_enable(device_t dev) static void mainboard_enable(device_t dev)
{ {
install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_CENTERING, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
verb_setup();
} }
struct chip_operations mainboard_ops = { struct chip_operations mainboard_ops = {

View File

@ -34,6 +34,8 @@ ramstage-y += me.c
ramstage-y += me_8.x.c ramstage-y += me_8.x.c
ramstage-y += smbus.c ramstage-y += smbus.c
ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/hda_verb.c
ramstage-y += me_status.c ramstage-y += me_status.c
ramstage-y += reset.c ramstage-y += reset.c
ramstage-y += watchdog.c ramstage-y += watchdog.c

View File

@ -26,6 +26,7 @@
#include <device/pci_ops.h> #include <device/pci_ops.h>
#include <arch/io.h> #include <arch/io.h>
#include <delay.h> #include <delay.h>
#include <device/azalia_device.h>
#include "pch.h" #include "pch.h"
#define HDA_ICII_REG 0x68 #define HDA_ICII_REG 0x68
@ -90,11 +91,6 @@ no_codec:
return 0; return 0;
} }
const u32 * cim_verb_data = NULL;
u32 cim_verb_data_size = 0;
const u32 * pc_beep_verbs = NULL;
u32 pc_beep_verbs_size = 0;
static u32 find_verb(struct device *dev, u32 viddid, const u32 ** verb) static u32 find_verb(struct device *dev, u32 viddid, const u32 ** verb)
{ {
int idx=0; int idx=0;

View File

@ -30,6 +30,8 @@ ramstage-y += smbus.c
ramstage-y += usb.c ramstage-y += usb.c
ramstage-y += usb_ehci.c ramstage-y += usb_ehci.c
ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/hda_verb.c
ramstage-y += reset.c ramstage-y += reset.c
ramstage-y += watchdog.c ramstage-y += watchdog.c

View File

@ -25,6 +25,7 @@
#include <device/pci_ops.h> #include <device/pci_ops.h>
#include <arch/io.h> #include <arch/io.h>
#include <delay.h> #include <delay.h>
#include <device/azalia_device.h>
#include "i82801gx.h" #include "i82801gx.h"
#define HDA_ICII_REG 0x68 #define HDA_ICII_REG 0x68
@ -90,9 +91,6 @@ no_codec:
return 0; return 0;
} }
const u32 * cim_verb_data = NULL;
u32 cim_verb_data_size = 0;
static u32 find_verb(struct device *dev, u32 viddid, const u32 ** verb) static u32 find_verb(struct device *dev, u32 viddid, const u32 ** verb)
{ {
int idx=0; int idx=0;

View File

@ -28,6 +28,8 @@ ramstage-y += hdaudio.c
ramstage-y += thermal.c ramstage-y += thermal.c
ramstage-y += smbus.c ramstage-y += smbus.c
ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/hda_verb.c
ramstage-y += ../i82801gx/reset.c ramstage-y += ../i82801gx/reset.c
ramstage-y += ../i82801gx/watchdog.c ramstage-y += ../i82801gx/watchdog.c

View File

@ -26,6 +26,7 @@
#include <device/pci_ops.h> #include <device/pci_ops.h>
#include <arch/io.h> #include <arch/io.h>
#include <delay.h> #include <delay.h>
#include <device/azalia_device.h>
#include "i82801ix.h" #include "i82801ix.h"
#define HDA_ICII_REG 0x68 #define HDA_ICII_REG 0x68
@ -91,11 +92,6 @@ no_codec:
return 0; return 0;
} }
const u32 * cim_verb_data = NULL;
u32 cim_verb_data_size = 0;
const u32 * pc_beep_verbs = NULL;
u32 pc_beep_verbs_size = 0;
static u32 find_verb(struct device *dev, u32 viddid, const u32 ** verb) static u32 find_verb(struct device *dev, u32 viddid, const u32 ** verb)
{ {
int idx=0; int idx=0;

View File

@ -34,6 +34,8 @@ ramstage-y += ../bd82x6x/me_8.x.c
ramstage-y += smbus.c ramstage-y += smbus.c
ramstage-y += thermal.c ramstage-y += thermal.c
ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/hda_verb.c
ramstage-y += ../bd82x6x/me_status.c ramstage-y += ../bd82x6x/me_status.c
ramstage-y += ../bd82x6x/reset.c ramstage-y += ../bd82x6x/reset.c
ramstage-y += ../bd82x6x/watchdog.c ramstage-y += ../bd82x6x/watchdog.c

View File

@ -26,6 +26,7 @@
#include <device/pci_ops.h> #include <device/pci_ops.h>
#include <arch/io.h> #include <arch/io.h>
#include <delay.h> #include <delay.h>
#include <device/azalia_device.h>
#include "pch.h" #include "pch.h"
#define HDA_ICII_REG 0x68 #define HDA_ICII_REG 0x68
@ -88,11 +89,6 @@ no_codec:
return 0; return 0;
} }
const u32 * cim_verb_data = NULL;
u32 cim_verb_data_size = 0;
const u32 * pc_beep_verbs = NULL;
u32 pc_beep_verbs_size = 0;
static u32 find_verb(struct device *dev, u32 viddid, const u32 ** verb) static u32 find_verb(struct device *dev, u32 viddid, const u32 ** verb)
{ {
int idx=0; int idx=0;

View File

@ -35,6 +35,8 @@ ramstage-y += smbus.c
ramstage-y += hda_verb.c ramstage-y += hda_verb.c
ramstage-$(CONFIG_INTEL_LYNXPOINT_LP) += serialio.c ramstage-$(CONFIG_INTEL_LYNXPOINT_LP) += serialio.c
ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/hda_verb.c
ramstage-y += rcba.c ramstage-y += rcba.c
ramstage-y += me_status.c ramstage-y += me_status.c
ramstage-y += reset.c ramstage-y += reset.c

View File

@ -26,14 +26,10 @@
#include <device/pci_ops.h> #include <device/pci_ops.h>
#include <arch/io.h> #include <arch/io.h>
#include <delay.h> #include <delay.h>
#include <device/azalia_device.h>
#include "pch.h" #include "pch.h"
#include "hda_verb.h" #include "hda_verb.h"
const u32 * cim_verb_data = NULL;
u32 cim_verb_data_size = 0;
const u32 * pc_beep_verbs = NULL;
u32 pc_beep_verbs_size = 0;
static void codecs_init(u32 base, u32 codec_mask) static void codecs_init(u32 base, u32 codec_mask)
{ {
int i; int i;
@ -46,7 +42,7 @@ static void codecs_init(u32 base, u32 codec_mask)
cim_verb_data); cim_verb_data);
} }
if (pc_beep_verbs_size && pc_beep_verbs) if (pc_beep_verbs_size)
hda_codec_write(base, pc_beep_verbs_size, pc_beep_verbs); hda_codec_write(base, pc_beep_verbs_size, pc_beep_verbs);
} }