summaryrefslogtreecommitdiff
path: root/src/mainboard/google/panther
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/panther
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/google/panther')
-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
2 files changed, 5 insertions, 16 deletions
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 = {