summaryrefslogtreecommitdiff
path: root/src/mainboard/intel
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/intel
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/intel')
-rw-r--r--src/mainboard/intel/baskingridge/hda_verb.c (renamed from src/mainboard/intel/baskingridge/hda_verb.h)8
-rw-r--r--src/mainboard/intel/baskingridge/mainboard.c9
-rw-r--r--src/mainboard/intel/cougar_canyon2/hda_verb.c (renamed from src/mainboard/intel/cougar_canyon2/hda_verb.h)5
-rw-r--r--src/mainboard/intel/cougar_canyon2/mainboard.c9
-rw-r--r--src/mainboard/intel/d945gclf/hda_verb.c7
-rw-r--r--src/mainboard/intel/emeraldlake2/hda_verb.c (renamed from src/mainboard/intel/emeraldlake2/hda_verb.h)8
-rw-r--r--src/mainboard/intel/emeraldlake2/mainboard.c9
-rw-r--r--src/mainboard/intel/wtm2/hda_verb.c (renamed from src/mainboard/intel/wtm2/hda_verb.h)8
-rw-r--r--src/mainboard/intel/wtm2/mainboard.c9
9 files changed, 32 insertions, 40 deletions
diff --git a/src/mainboard/intel/baskingridge/hda_verb.h b/src/mainboard/intel/baskingridge/hda_verb.c
index 2796e92682..96770de362 100644
--- a/src/mainboard/intel/baskingridge/hda_verb.h
+++ b/src/mainboard/intel/baskingridge/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 */
0x10134210, // Codec Vendor / Device ID: Cirrus Logic CS4210
0x10134210, // Subsystem ID
@@ -63,3 +65,7 @@ static const u32 mainboard_cim_verb_data[] = {
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */
AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
};
+
+const u32 pc_beep_verbs[0] = {};
+
+AZALIA_ARRAY_SIZES;
diff --git a/src/mainboard/intel/baskingridge/mainboard.c b/src/mainboard/intel/baskingridge/mainboard.c
index b4982f8625..a6839fc343 100644
--- a/src/mainboard/intel/baskingridge/mainboard.c
+++ b/src/mainboard/intel/baskingridge/mainboard.c
@@ -32,8 +32,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"
void mainboard_suspend_resume(void)
{
@@ -41,13 +39,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);
-}
// mainboard_enable is executed as first thing after
// enumerate_buses().
@@ -55,7 +47,6 @@ static void verb_setup(void)
static void mainboard_enable(device_t dev)
{
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/intel/cougar_canyon2/hda_verb.h b/src/mainboard/intel/cougar_canyon2/hda_verb.c
index 381e338c45..c518b781bd 100644
--- a/src/mainboard/intel/cougar_canyon2/hda_verb.h
+++ b/src/mainboard/intel/cougar_canyon2/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 */
0x80862805, // Codec Vendor / Device ID: Intel CougarPoint HDMI
0x80860101, // Subsystem ID
@@ -35,3 +37,4 @@ static const u32 mainboard_cim_verb_data[] = {
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */
AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
};
+AZALIA_ARRAY_SIZES;
diff --git a/src/mainboard/intel/cougar_canyon2/mainboard.c b/src/mainboard/intel/cougar_canyon2/mainboard.c
index bb4806a8f3..0ea03d3cf3 100644
--- a/src/mainboard/intel/cougar_canyon2/mainboard.c
+++ b/src/mainboard/intel/cougar_canyon2/mainboard.c
@@ -32,8 +32,6 @@
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
#include <southbridge/intel/fsp_bd82x6x/pch.h>
-#include <device/azalia_device.h>
-#include "hda_verb.h"
#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)
void mainboard_suspend_resume(void)
@@ -43,13 +41,7 @@ void mainboard_suspend_resume(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);
-}
// mainboard_enable is executed as first thing after
// enumerate_buses().
@@ -57,7 +49,6 @@ static void verb_setup(void)
static void mainboard_enable(device_t dev)
{
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/intel/d945gclf/hda_verb.c b/src/mainboard/intel/d945gclf/hda_verb.c
new file mode 100644
index 0000000000..072a306131
--- /dev/null
+++ b/src/mainboard/intel/d945gclf/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/intel/emeraldlake2/hda_verb.h b/src/mainboard/intel/emeraldlake2/hda_verb.c
index 2796e92682..96770de362 100644
--- a/src/mainboard/intel/emeraldlake2/hda_verb.h
+++ b/src/mainboard/intel/emeraldlake2/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 */
0x10134210, // Codec Vendor / Device ID: Cirrus Logic CS4210
0x10134210, // Subsystem ID
@@ -63,3 +65,7 @@ static const u32 mainboard_cim_verb_data[] = {
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */
AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
};
+
+const u32 pc_beep_verbs[0] = {};
+
+AZALIA_ARRAY_SIZES;
diff --git a/src/mainboard/intel/emeraldlake2/mainboard.c b/src/mainboard/intel/emeraldlake2/mainboard.c
index 3dc859415c..347ce8a910 100644
--- a/src/mainboard/intel/emeraldlake2/mainboard.c
+++ b/src/mainboard/intel/emeraldlake2/mainboard.c
@@ -32,8 +32,6 @@
#include <arch/interrupt.h>
#include <boot/coreboot_tables.h>
#include <southbridge/intel/bd82x6x/pch.h>
-#include <device/azalia_device.h>
-#include "hda_verb.h"
void mainboard_suspend_resume(void)
{
@@ -41,13 +39,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);
-}
// mainboard_enable is executed as first thing after
// enumerate_buses().
@@ -55,7 +47,6 @@ static void verb_setup(void)
static void mainboard_enable(device_t dev)
{
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/intel/wtm2/hda_verb.h b/src/mainboard/intel/wtm2/hda_verb.c
index 48750356c0..c18e79b1af 100644
--- a/src/mainboard/intel/wtm2/hda_verb.h
+++ b/src/mainboard/intel/wtm2/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 */
0x10134210, // Codec Vendor / Device ID: Cirrus Logic CS4210
0x10134210, // Subsystem ID
@@ -63,3 +65,7 @@ static const u32 mainboard_cim_verb_data[] = {
/* Pin Complex (NID 0x07) Digital Out at Int HDMI */
AZALIA_PIN_CFG(0x3, 0x07, 0x18560030)
};
+
+const u32 pc_beep_verbs[0] = {};
+
+AZALIA_ARRAY_SIZES;
diff --git a/src/mainboard/intel/wtm2/mainboard.c b/src/mainboard/intel/wtm2/mainboard.c
index b4982f8625..a6839fc343 100644
--- a/src/mainboard/intel/wtm2/mainboard.c
+++ b/src/mainboard/intel/wtm2/mainboard.c
@@ -32,8 +32,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"
void mainboard_suspend_resume(void)
{
@@ -41,13 +39,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);
-}
// mainboard_enable is executed as first thing after
// enumerate_buses().
@@ -55,7 +47,6 @@ static void verb_setup(void)
static void mainboard_enable(device_t dev)
{
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 = {