summaryrefslogtreecommitdiff
path: root/src/mainboard/google
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/google
parenta812643723419f4fe3f079731a9d10d2dc083aae (diff)
downloadcoreboot-75c83870e51e6bc48a83114c64177432d3204b1f.tar.xz
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/google')
-rw-r--r--src/mainboard/google/bolt/hda_verb.c (renamed from src/mainboard/google/bolt/hda_verb.h)8
-rw-r--r--src/mainboard/google/bolt/mainboard.c9
-rw-r--r--src/mainboard/google/butterfly/hda_verb.c (renamed from src/mainboard/google/butterfly/hda_verb.h)9
-rw-r--r--src/mainboard/google/butterfly/mainboard.c12
-rw-r--r--src/mainboard/google/falco/hda_verb.c (renamed from src/mainboard/google/falco/hda_verb.h)9
-rw-r--r--src/mainboard/google/falco/mainboard.c12
-rw-r--r--src/mainboard/google/link/hda_verb.c (renamed from src/mainboard/google/link/hda_verb.h)9
-rw-r--r--src/mainboard/google/link/mainboard.c11
-rw-r--r--src/mainboard/google/panther/hda_verb.c (renamed from src/mainboard/google/panther/hda_verb.h)9
-rw-r--r--src/mainboard/google/panther/mainboard.c12
-rw-r--r--src/mainboard/google/parrot/hda_verb.c (renamed from src/mainboard/google/parrot/hda_verb.h)9
-rw-r--r--src/mainboard/google/parrot/mainboard.c12
-rw-r--r--src/mainboard/google/peppy/hda_verb.c (renamed from src/mainboard/google/peppy/hda_verb.h)9
-rw-r--r--src/mainboard/google/peppy/mainboard.c12
-rw-r--r--src/mainboard/google/samus/hda_verb.c7
-rw-r--r--src/mainboard/google/slippy/hda_verb.c (renamed from src/mainboard/google/slippy/hda_verb.h)9
-rw-r--r--src/mainboard/google/slippy/mainboard.c12
-rw-r--r--src/mainboard/google/stout/hda_verb.c (renamed from src/mainboard/google/stout/hda_verb.h)9
-rw-r--r--src/mainboard/google/stout/mainboard.c11
19 files changed, 54 insertions, 136 deletions
diff --git a/src/mainboard/google/bolt/hda_verb.h b/src/mainboard/google/bolt/hda_verb.c
index 54f27f13ae..b81da64014 100644
--- a/src/mainboard/google/bolt/hda_verb.h
+++ b/src/mainboard/google/bolt/hda_verb.c
@@ -17,7 +17,9 @@
* 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 */
0x10ec0283, // Codec Vendor / Device ID: Realtek ALC283
0x10ec0283, // Subsystem ID
@@ -75,3 +77,7 @@ static const u32 mainboard_cim_verb_data[] = {
AZALIA_PIN_CFG(0x0, 0x21, 0x0321101f),
};
+
+const u32 pc_beep_verbs[0] = {};
+
+AZALIA_ARRAY_SIZES;
diff --git a/src/mainboard/google/bolt/mainboard.c b/src/mainboard/google/bolt/mainboard.c
index 961f58d18f..0ccf90da86 100644
--- a/src/mainboard/google/bolt/mainboard.c
+++ b/src/mainboard/google/bolt/mainboard.c
@@ -32,8 +32,6 @@
#include <arch/io.h>
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
-#include <device/azalia_device.h>
-#include "hda_verb.h"
#include <southbridge/intel/lynxpoint/pch.h>
#include "ec.h"
#include "onboard.h"
@@ -44,13 +42,7 @@ void mainboard_suspend_resume(void)
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)
{
@@ -100,7 +92,6 @@ static void mainboard_enable(device_t dev)
dev->ops->init = mainboard_init;
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);
- verb_setup();
}
struct chip_operations mainboard_ops = {
diff --git a/src/mainboard/google/butterfly/hda_verb.h b/src/mainboard/google/butterfly/hda_verb.c
index e06a1bea49..97ff2f6e19 100644
--- a/src/mainboard/google/butterfly/hda_verb.h
+++ b/src/mainboard/google/butterfly/hda_verb.c
@@ -24,7 +24,9 @@
*/
-static const u32 mainboard_cim_verb_data[] = {
+#include <device/azalia_device.h>
+
+const u32 cim_verb_data[] = {
/* coreboot specific header */
0x111D76E5, // Codec Vendor / Device ID: IDT 92HD99
0x103C18F9, // Subsystem ID
@@ -223,9 +225,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/google/butterfly/mainboard.c b/src/mainboard/google/butterfly/mainboard.c
index 909ba8c0aa..655fc2fc14 100644
--- a/src/mainboard/google/butterfly/mainboard.c
+++ b/src/mainboard/google/butterfly/mainboard.c
@@ -36,8 +36,6 @@
#include <smbios.h>
#include <device/pci.h>
#include <ec/quanta/ene_kb3940q/ec.h>
-#include <device/azalia_device.h>
-#include "hda_verb.h"
#if CONFIG_CHROMEOS
#include <vendorcode/google/chromeos/fmap.h>
#else
@@ -194,16 +192,7 @@ void mainboard_suspend_resume(void)
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)
{
@@ -294,7 +283,6 @@ static void mainboard_enable(device_t dev)
dev->ops->init = mainboard_init;
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);
- verb_setup();
}
struct chip_operations mainboard_ops = {
diff --git a/src/mainboard/google/falco/hda_verb.h b/src/mainboard/google/falco/hda_verb.c
index 5c37f510ea..5ea3c7bcca 100644
--- a/src/mainboard/google/falco/hda_verb.h
+++ b/src/mainboard/google/falco/hda_verb.c
@@ -17,7 +17,9 @@
* 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 */
0x10ec0283, // Codec Vendor / Device ID: Realtek ALC283
0x10ec0283, // Subsystem ID
@@ -87,7 +89,7 @@ static const u32 mainboard_cim_verb_data[] = {
0x0204081b,
};
-static const u32 mainboard_pc_beep_verbs[] = {
+const u32 pc_beep_verbs[] = {
0x00170500, /* power up everything (codec, dac, adc, mixers) */
0x01470740, /* enable speaker out */
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 */
};
-static const u32 mainboard_pc_beep_verbs_size =
- sizeof(mainboard_pc_beep_verbs) / sizeof(mainboard_pc_beep_verbs[0]);
+AZALIA_ARRAY_SIZES;
diff --git a/src/mainboard/google/falco/mainboard.c b/src/mainboard/google/falco/mainboard.c
index acb975042b..0ccf90da86 100644
--- a/src/mainboard/google/falco/mainboard.c
+++ b/src/mainboard/google/falco/mainboard.c
@@ -33,8 +33,6 @@
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
#include <southbridge/intel/lynxpoint/pch.h>
-#include <device/azalia_device.h>
-#include "hda_verb.h"
#include "ec.h"
#include "onboard.h"
@@ -44,16 +42,7 @@ void mainboard_suspend_resume(void)
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)
{
@@ -103,7 +92,6 @@ static void mainboard_enable(device_t dev)
dev->ops->init = mainboard_init;
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);
- verb_setup();
}
struct chip_operations mainboard_ops = {
diff --git a/src/mainboard/google/link/hda_verb.h b/src/mainboard/google/link/hda_verb.c
index bb5ff106c5..87bcf30a98 100644
--- a/src/mainboard/google/link/hda_verb.h
+++ b/src/mainboard/google/link/hda_verb.c
@@ -17,7 +17,9 @@
* 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 */
0x11020011, // Codec Vendor / Device ID: Creative CA0132
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 */
0x00270500, /* power up DAC */
0x00b70500, /* power up speaker */
@@ -135,5 +137,4 @@ static const u32 mainboard_pc_beep_verbs[] = {
0x00b70c02, /* set EAPD pin */
0x0143b013, /* beep volume */
};
-static const u32 mainboard_pc_beep_verbs_size =
- ARRAY_SIZE(mainboard_pc_beep_verbs);
+AZALIA_ARRAY_SIZES;
diff --git a/src/mainboard/google/link/mainboard.c b/src/mainboard/google/link/mainboard.c
index 9d86458912..ed40f8fa32 100644
--- a/src/mainboard/google/link/mainboard.c
+++ b/src/mainboard/google/link/mainboard.c
@@ -39,8 +39,6 @@
#include <smbios.h>
#include <device/pci.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
* do but it will look nice
@@ -149,15 +147,7 @@ static int int15_handler(void)
}
#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)
{
@@ -222,7 +212,6 @@ static void mainboard_enable(device_t dev)
/* Install custom int15 handler for VGA OPROM */
mainboard_interrupt_handlers(0x15, &int15_handler);
#endif
- verb_setup();
}
struct chip_operations mainboard_ops = {
diff --git a/src/mainboard/google/panther/hda_verb.h b/src/mainboard/google/panther/hda_verb.c
index 47311e308d..7de91d9f21 100644
--- a/src/mainboard/google/panther/hda_verb.h
+++ b/src/mainboard/google/panther/hda_verb.c
@@ -22,7 +22,9 @@
#include <stdlib.h>
-static const u32 mainboard_cim_verb_data[] = {
+#include <device/azalia_device.h>
+
+const u32 cim_verb_data[] = {
/* coreboot specific header */
0x10ec0283, // Codec Vendor / Device ID: Realtek ALC283
0x10ec0283, // Subsystem ID
@@ -83,7 +85,7 @@ static const u32 mainboard_cim_verb_data[] = {
0x0204081b,
};
-static const u32 mainboard_pc_beep_verbs[] = {
+const u32 pc_beep_verbs[] = {
0x00170500, /* power up everything (codec, dac, adc, mixers) */
0x01470740, /* enable speaker out */
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 */
};
-static const u32 mainboard_pc_beep_verbs_size =
- ARRAY_SIZE(mainboard_pc_beep_verbs);
#endif /* HDA_VERB_H */
+AZALIA_ARRAY_SIZES;
diff --git a/src/mainboard/google/panther/mainboard.c b/src/mainboard/google/panther/mainboard.c
index 60baf99c8d..5058eca145 100644
--- a/src/mainboard/google/panther/mainboard.c
+++ b/src/mainboard/google/panther/mainboard.c
@@ -32,9 +32,7 @@
#include <device/pci_ops.h>
#include <pc80/mc146818rtc.h>
#include <southbridge/intel/lynxpoint/pch.h>
-#include <device/azalia_device.h>
#include <drivers/intel/gma/int15.h>
-#include "hda_verb.h"
#include "onboard.h"
@@ -44,16 +42,7 @@ void mainboard_suspend_resume(void)
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)
{
@@ -67,7 +56,6 @@ static void mainboard_enable(device_t dev)
{
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);
- verb_setup();
}
struct chip_operations mainboard_ops = {
diff --git a/src/mainboard/google/parrot/hda_verb.h b/src/mainboard/google/parrot/hda_verb.c
index dfa7a817a3..f79f69d8e3 100644
--- a/src/mainboard/google/parrot/hda_verb.h
+++ b/src/mainboard/google/parrot/hda_verb.c
@@ -32,7 +32,9 @@
* HDMI PatherPoint
*/
-static const u32 mainboard_cim_verb_data[] = {
+#include <device/azalia_device.h>
+
+const u32 cim_verb_data[] = {
/* coreboot specific header */
0x10ec0269, // Codec Vendor / Device ID: Realtek ALC269
0x10250742, // Subsystem ID
@@ -131,7 +133,7 @@ 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[] = {
0x00170500, /* power up everything (codec, dac, adc, mixers) */
0x01470740, /* enable speaker out */
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 */
};
-static const u32 mainboard_pc_beep_verbs_size =
- ARRAY_SIZE(mainboard_pc_beep_verbs);
+AZALIA_ARRAY_SIZES;
diff --git a/src/mainboard/google/parrot/mainboard.c b/src/mainboard/google/parrot/mainboard.c
index 440596f730..547680e7e2 100644
--- a/src/mainboard/google/parrot/mainboard.c
+++ b/src/mainboard/google/parrot/mainboard.c
@@ -36,8 +36,6 @@
#include <smbios.h>
#include <device/pci.h>
#include <ec/compal/ene932/ec.h>
-#include <device/azalia_device.h>
-#include "hda_verb.h"
void mainboard_suspend_resume(void)
{
@@ -48,16 +46,7 @@ void mainboard_suspend_resume(void)
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)
{
@@ -101,7 +90,6 @@ static void mainboard_enable(device_t dev)
dev->ops->init = mainboard_init;
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);
- verb_setup();
}
struct chip_operations mainboard_ops = {
diff --git a/src/mainboard/google/peppy/hda_verb.h b/src/mainboard/google/peppy/hda_verb.c
index 9203522443..a88d9f8890 100644
--- a/src/mainboard/google/peppy/hda_verb.h
+++ b/src/mainboard/google/peppy/hda_verb.c
@@ -17,7 +17,9 @@
* 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 */
0x10ec0283, // Codec Vendor / Device ID: Realtek ALC283
0x10ec0283, // Subsystem ID
@@ -91,7 +93,7 @@ static const u32 mainboard_cim_verb_data[] = {
0x0204081b,
};
-static const u32 mainboard_pc_beep_verbs[] = {
+const u32 pc_beep_verbs[] = {
0x00170500, /* power up everything (codec, dac, adc, mixers) */
0x01470740, /* enable speaker out */
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 */
};
-static const u32 mainboard_pc_beep_verbs_size =
- sizeof(mainboard_pc_beep_verbs) / sizeof(mainboard_pc_beep_verbs[0]);
+AZALIA_ARRAY_SIZES;
diff --git a/src/mainboard/google/peppy/mainboard.c b/src/mainboard/google/peppy/mainboard.c
index 3fbec40dc8..0ccf90da86 100644
--- a/src/mainboard/google/peppy/mainboard.c
+++ b/src/mainboard/google/peppy/mainboard.c
@@ -33,10 +33,8 @@
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
#include <southbridge/intel/lynxpoint/pch.h>
-#include <device/azalia_device.h>
#include "ec.h"
#include "onboard.h"
-#include "hda_verb.h"
void mainboard_suspend_resume(void)
{
@@ -44,16 +42,7 @@ void mainboard_suspend_resume(void)
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)
{
@@ -103,7 +92,6 @@ static void mainboard_enable(device_t dev)
dev->ops->init = mainboard_init;
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);
- verb_setup();
}
struct chip_operations mainboard_ops = {
diff --git a/src/mainboard/google/samus/hda_verb.c b/src/mainboard/google/samus/hda_verb.c
new file mode 100644
index 0000000000..072a306131
--- /dev/null
+++ b/src/mainboard/google/samus/hda_verb.c
@@ -0,0 +1,7 @@
+#include <device/azalia_device.h>
+
+const u32 cim_verb_data[0] = {};
+
+const u32 pc_beep_verbs[0] = {};
+
+AZALIA_ARRAY_SIZES;
diff --git a/src/mainboard/google/slippy/hda_verb.h b/src/mainboard/google/slippy/hda_verb.c
index b1f1cb6bf9..68662c644f 100644
--- a/src/mainboard/google/slippy/hda_verb.h
+++ b/src/mainboard/google/slippy/hda_verb.c
@@ -17,7 +17,9 @@
* 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 */
0x10ec0283, // Codec Vendor / Device ID: Realtek ALC283
0x10ec0283, // Subsystem ID
@@ -82,7 +84,7 @@ static const u32 mainboard_cim_verb_data[] = {
0x0204081b,
};
-static const u32 mainboard_pc_beep_verbs[] = {
+const u32 pc_beep_verbs[] = {
0x00170500, /* power up everything (codec, dac, adc, mixers) */
0x01470740, /* enable speaker out */
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 */
};
-static const u32 mainboard_pc_beep_verbs_size =
- sizeof(mainboard_pc_beep_verbs) / sizeof(mainboard_pc_beep_verbs[0]);
+AZALIA_ARRAY_SIZES;
diff --git a/src/mainboard/google/slippy/mainboard.c b/src/mainboard/google/slippy/mainboard.c
index 4ccb5f9a71..0ccf90da86 100644
--- a/src/mainboard/google/slippy/mainboard.c
+++ b/src/mainboard/google/slippy/mainboard.c
@@ -35,8 +35,6 @@
#include <southbridge/intel/lynxpoint/pch.h>
#include "ec.h"
#include "onboard.h"
-#include <device/azalia_device.h>
-#include "hda_verb.h"
void mainboard_suspend_resume(void)
{
@@ -44,16 +42,7 @@ void mainboard_suspend_resume(void)
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)
{
@@ -103,7 +92,6 @@ static void mainboard_enable(device_t dev)
dev->ops->init = mainboard_init;
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);
- verb_setup();
}
struct chip_operations mainboard_ops = {
diff --git a/src/mainboard/google/stout/hda_verb.h b/src/mainboard/google/stout/hda_verb.c
index 43dae91f85..3fcd4f5c65 100644
--- a/src/mainboard/google/stout/hda_verb.h
+++ b/src/mainboard/google/stout/hda_verb.c
@@ -17,7 +17,9 @@
* 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 */
0x10ec0269, // Codec Vendor / Device ID: Realtek
0x17aa21fe, // Subsystem ID
@@ -82,7 +84,7 @@ static const u32 mainboard_cim_verb_data[] = {
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) */
0x01470740, /* enable speaker out */
0x01470c02, /* set speaker EAPD pin */
@@ -90,5 +92,4 @@ static const u32 mainboard_pc_beep_verbs[] = {
0x00c37100, /* unmute mixer nid 0xc input 1 */
0x00b37410, /* unmute mixer nid 0xb beep input and set volume */
};
-static const u32 mainboard_pc_beep_verbs_size =
- ARRAY_SIZE(mainboard_pc_beep_verbs);
+AZALIA_ARRAY_SIZES;
diff --git a/src/mainboard/google/stout/mainboard.c b/src/mainboard/google/stout/mainboard.c
index 7562b5f622..9bcbfe4313 100644
--- a/src/mainboard/google/stout/mainboard.c
+++ b/src/mainboard/google/stout/mainboard.c
@@ -36,8 +36,6 @@
#include <smbios.h>
#include <device/pci.h>
#include <ec/quanta/it8518/ec.h>
-#include <device/azalia_device.h>
-#include "hda_verb.h"
void mainboard_suspend_resume(void)
{
@@ -48,15 +46,7 @@ void mainboard_suspend_resume(void)
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)
{
@@ -84,7 +74,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();
}
struct chip_operations mainboard_ops = {