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>
diff --git a/src/southbridge/intel/bd82x6x/Makefile.inc b/src/southbridge/intel/bd82x6x/Makefile.inc
index def9cd2..b79b85a 100644
--- a/src/southbridge/intel/bd82x6x/Makefile.inc
+++ b/src/southbridge/intel/bd82x6x/Makefile.inc
@@ -34,6 +34,8 @@
ramstage-y += me_8.x.c
ramstage-y += smbus.c
+ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/hda_verb.c
+
ramstage-y += me_status.c
ramstage-y += reset.c
ramstage-y += watchdog.c
diff --git a/src/southbridge/intel/bd82x6x/azalia.c b/src/southbridge/intel/bd82x6x/azalia.c
index fed6f74..bef88ab 100644
--- a/src/southbridge/intel/bd82x6x/azalia.c
+++ b/src/southbridge/intel/bd82x6x/azalia.c
@@ -26,6 +26,7 @@
#include <device/pci_ops.h>
#include <arch/io.h>
#include <delay.h>
+#include <device/azalia_device.h>
#include "pch.h"
#define HDA_ICII_REG 0x68
@@ -90,11 +91,6 @@
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)
{
int idx=0;
diff --git a/src/southbridge/intel/i82801gx/Makefile.inc b/src/southbridge/intel/i82801gx/Makefile.inc
index 94c84ed..6e4d42e 100644
--- a/src/southbridge/intel/i82801gx/Makefile.inc
+++ b/src/southbridge/intel/i82801gx/Makefile.inc
@@ -30,6 +30,8 @@
ramstage-y += usb.c
ramstage-y += usb_ehci.c
+ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/hda_verb.c
+
ramstage-y += reset.c
ramstage-y += watchdog.c
diff --git a/src/southbridge/intel/i82801gx/azalia.c b/src/southbridge/intel/i82801gx/azalia.c
index 59d8123..f6628e7 100644
--- a/src/southbridge/intel/i82801gx/azalia.c
+++ b/src/southbridge/intel/i82801gx/azalia.c
@@ -25,6 +25,7 @@
#include <device/pci_ops.h>
#include <arch/io.h>
#include <delay.h>
+#include <device/azalia_device.h>
#include "i82801gx.h"
#define HDA_ICII_REG 0x68
@@ -90,9 +91,6 @@
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)
{
int idx=0;
diff --git a/src/southbridge/intel/i82801ix/Makefile.inc b/src/southbridge/intel/i82801ix/Makefile.inc
index 096533c..4117263 100644
--- a/src/southbridge/intel/i82801ix/Makefile.inc
+++ b/src/southbridge/intel/i82801ix/Makefile.inc
@@ -28,6 +28,8 @@
ramstage-y += thermal.c
ramstage-y += smbus.c
+ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/hda_verb.c
+
ramstage-y += ../i82801gx/reset.c
ramstage-y += ../i82801gx/watchdog.c
diff --git a/src/southbridge/intel/i82801ix/hdaudio.c b/src/southbridge/intel/i82801ix/hdaudio.c
index 407c0a7..dd817b9 100644
--- a/src/southbridge/intel/i82801ix/hdaudio.c
+++ b/src/southbridge/intel/i82801ix/hdaudio.c
@@ -26,6 +26,7 @@
#include <device/pci_ops.h>
#include <arch/io.h>
#include <delay.h>
+#include <device/azalia_device.h>
#include "i82801ix.h"
#define HDA_ICII_REG 0x68
@@ -91,11 +92,6 @@
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)
{
int idx=0;
diff --git a/src/southbridge/intel/ibexpeak/Makefile.inc b/src/southbridge/intel/ibexpeak/Makefile.inc
index da9f34a..24cbe45 100644
--- a/src/southbridge/intel/ibexpeak/Makefile.inc
+++ b/src/southbridge/intel/ibexpeak/Makefile.inc
@@ -34,6 +34,8 @@
ramstage-y += smbus.c
ramstage-y += thermal.c
+ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/hda_verb.c
+
ramstage-y += ../bd82x6x/me_status.c
ramstage-y += ../bd82x6x/reset.c
ramstage-y += ../bd82x6x/watchdog.c
diff --git a/src/southbridge/intel/ibexpeak/azalia.c b/src/southbridge/intel/ibexpeak/azalia.c
index 046d2b6..314a1b1 100644
--- a/src/southbridge/intel/ibexpeak/azalia.c
+++ b/src/southbridge/intel/ibexpeak/azalia.c
@@ -26,6 +26,7 @@
#include <device/pci_ops.h>
#include <arch/io.h>
#include <delay.h>
+#include <device/azalia_device.h>
#include "pch.h"
#define HDA_ICII_REG 0x68
@@ -88,11 +89,6 @@
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)
{
int idx=0;
diff --git a/src/southbridge/intel/lynxpoint/Makefile.inc b/src/southbridge/intel/lynxpoint/Makefile.inc
index e504db0..3b7663e 100644
--- a/src/southbridge/intel/lynxpoint/Makefile.inc
+++ b/src/southbridge/intel/lynxpoint/Makefile.inc
@@ -35,6 +35,8 @@
ramstage-y += hda_verb.c
ramstage-$(CONFIG_INTEL_LYNXPOINT_LP) += serialio.c
+ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/hda_verb.c
+
ramstage-y += rcba.c
ramstage-y += me_status.c
ramstage-y += reset.c
diff --git a/src/southbridge/intel/lynxpoint/azalia.c b/src/southbridge/intel/lynxpoint/azalia.c
index 24c6702..be056be 100644
--- a/src/southbridge/intel/lynxpoint/azalia.c
+++ b/src/southbridge/intel/lynxpoint/azalia.c
@@ -26,14 +26,10 @@
#include <device/pci_ops.h>
#include <arch/io.h>
#include <delay.h>
+#include <device/azalia_device.h>
#include "pch.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)
{
int i;
@@ -46,7 +42,7 @@
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);
}