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