summaryrefslogtreecommitdiff
path: root/src/mainboard/lenovo/x220
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2014-09-05 01:01:31 +0200
committerVladimir Serbinenko <phcoder@gmail.com>2014-09-13 00:42:14 +0200
commit75c83870e51e6bc48a83114c64177432d3204b1f (patch)
tree98284c8843dc1a27a2df4e46b493386934d51a32 /src/mainboard/lenovo/x220
parenta812643723419f4fe3f079731a9d10d2dc083aae (diff)
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>
Diffstat (limited to 'src/mainboard/lenovo/x220')
-rw-r--r--src/mainboard/lenovo/x220/hda_verb.c (renamed from src/mainboard/lenovo/x220/hda_verb.h)9
-rw-r--r--src/mainboard/lenovo/x220/mainboard.c12
2 files changed, 5 insertions, 16 deletions
diff --git a/src/mainboard/lenovo/x220/hda_verb.h b/src/mainboard/lenovo/x220/hda_verb.c
index ce980fc2a8..c3d1372da7 100644
--- a/src/mainboard/lenovo/x220/hda_verb.h
+++ b/src/mainboard/lenovo/x220/hda_verb.c
@@ -25,7 +25,9 @@
*/
-static const u32 mainboard_cim_verb_data[] = {
+#include <device/azalia_device.h>
+
+const u32 cim_verb_data[] = {
/* coreboot specific header */
0x14f1506e, // Codec Vendor / Device ID: Conexant CX20590
0x17aa21db, // Subsystem ID
@@ -205,9 +207,8 @@ static const u32 mainboard_cim_verb_data[] = {
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 */
};
-static const u32 mainboard_pc_beep_verbs_size =
- ARRAY_SIZE(mainboard_pc_beep_verbs);
+AZALIA_ARRAY_SIZES;
diff --git a/src/mainboard/lenovo/x220/mainboard.c b/src/mainboard/lenovo/x220/mainboard.c
index ffc99bd4eb..87fedfe30a 100644
--- a/src/mainboard/lenovo/x220/mainboard.c
+++ b/src/mainboard/lenovo/x220/mainboard.c
@@ -38,8 +38,6 @@
#include <pc80/keyboard.h>
#include <ec/lenovo/h8/h8.h>
#include <build.h>
-#include <device/azalia_device.h>
-#include "hda_verb.h"
void mainboard_suspend_resume(void)
{
@@ -56,16 +54,7 @@ const char *smbios_mainboard_bios_version(void)
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)
{
@@ -95,7 +84,6 @@ static void mainboard_enable(device_t dev)
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);
- verb_setup();
}
void h8_mainboard_init_dock (void)