diff options
author | Vladimir Serbinenko <phcoder@gmail.com> | 2014-09-05 01:01:31 +0200 |
---|---|---|
committer | Vladimir Serbinenko <phcoder@gmail.com> | 2014-09-13 00:42:14 +0200 |
commit | 75c83870e51e6bc48a83114c64177432d3204b1f (patch) | |
tree | 98284c8843dc1a27a2df4e46b493386934d51a32 /src/mainboard/kontron | |
parent | a812643723419f4fe3f079731a9d10d2dc083aae (diff) | |
download | coreboot-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/kontron')
-rw-r--r-- | src/mainboard/kontron/986lcd-m/hda_verb.c | 7 | ||||
-rw-r--r-- | src/mainboard/kontron/986lcd-m/mainboard.c | 9 | ||||
-rw-r--r-- | src/mainboard/kontron/ktqm77/hda_verb.c (renamed from src/mainboard/kontron/ktqm77/hda_verb.h) | 8 | ||||
-rw-r--r-- | src/mainboard/kontron/ktqm77/mainboard.c | 9 |
4 files changed, 14 insertions, 19 deletions
diff --git a/src/mainboard/kontron/986lcd-m/hda_verb.c b/src/mainboard/kontron/986lcd-m/hda_verb.c new file mode 100644 index 0000000000..072a306131 --- /dev/null +++ b/src/mainboard/kontron/986lcd-m/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/kontron/986lcd-m/mainboard.c b/src/mainboard/kontron/986lcd-m/mainboard.c index 10bba69afd..afca796000 100644 --- a/src/mainboard/kontron/986lcd-m/mainboard.c +++ b/src/mainboard/kontron/986lcd-m/mainboard.c @@ -24,7 +24,6 @@ #include <pc80/mc146818rtc.h> #include <arch/io.h> #include <arch/interrupt.h> -#include <device/azalia_device.h> /* Hardware Monitor */ @@ -160,14 +159,7 @@ static void hwm_setup(void) hwm_write(0x40, 0x01); // Init, but no SMI# } -/* Audio Setup */ -static void verb_setup(void) -{ - // Default VERB is fine on this mainboard. - cim_verb_data = NULL; - cim_verb_data_size = 0; -} // mainboard_enable is executed as first thing after // enumerate_buses(). @@ -175,7 +167,6 @@ static void verb_setup(void) static void mainboard_enable(device_t dev) { install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 3); - verb_setup(); hwm_setup(); } diff --git a/src/mainboard/kontron/ktqm77/hda_verb.h b/src/mainboard/kontron/ktqm77/hda_verb.c index ccec18c752..c957c25fe1 100644 --- a/src/mainboard/kontron/ktqm77/hda_verb.h +++ b/src/mainboard/kontron/ktqm77/hda_verb.c @@ -18,7 +18,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 */ 0x11060397, // Codec Vendor / Device ID: Via VT1708S 0x11060000, // Subsystem ID @@ -113,3 +115,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/kontron/ktqm77/mainboard.c b/src/mainboard/kontron/ktqm77/mainboard.c index c09082aa5a..715ec5621c 100644 --- a/src/mainboard/kontron/ktqm77/mainboard.c +++ b/src/mainboard/kontron/ktqm77/mainboard.c @@ -34,8 +34,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) { @@ -169,13 +167,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); -} // mainboard_enable is executed as first thing after // enumerate_buses(). @@ -186,7 +178,6 @@ static void mainboard_enable(device_t dev) /* Install custom int15 handler for VGA OPROM */ mainboard_interrupt_handlers(0x15, &int15_handler); #endif - verb_setup(); unsigned disable = 0; if ((get_option(&disable, "ethernet1") == CB_SUCCESS) && disable) { |