From 75c83870e51e6bc48a83114c64177432d3204b1f Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Fri, 5 Sep 2014 01:01:31 +0200 Subject: azalia: Shrink boilerplate Change-Id: Ib3e09644c0ee71aacb067adaa85653d151b52078 Signed-off-by: Vladimir Serbinenko Reviewed-on: http://review.coreboot.org/6840 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer Reviewed-by: Edward O'Callaghan --- src/mainboard/iwave/iWRainbowG6/hda_verb.c | 92 +++++++++++++++++++++++++++++ src/mainboard/iwave/iWRainbowG6/hda_verb.h | 91 ---------------------------- src/mainboard/iwave/iWRainbowG6/mainboard.c | 8 --- 3 files changed, 92 insertions(+), 99 deletions(-) create mode 100644 src/mainboard/iwave/iWRainbowG6/hda_verb.c delete mode 100644 src/mainboard/iwave/iWRainbowG6/hda_verb.h (limited to 'src/mainboard/iwave/iWRainbowG6') diff --git a/src/mainboard/iwave/iWRainbowG6/hda_verb.c b/src/mainboard/iwave/iWRainbowG6/hda_verb.c new file mode 100644 index 0000000000..4cb2c9fcee --- /dev/null +++ b/src/mainboard/iwave/iWRainbowG6/hda_verb.c @@ -0,0 +1,92 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2009-2010 iWave Systems + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +static u32 mainboard_cim_verb_data[] = { + /* coreboot specific header */ + 0x111d76d5, // Codec Vendor / Device ID: IDT 92HD81 + 0x00000000, // Subsystem ID + 0x0000000a, // Number of jacks + + /* NID 0x0a, Port A (capless headphone) */ + 0x0A71C40, + 0x0A71D10, + 0x0A71EA1, + 0x0A71F02, + + /* NID 0x0b, Port B (capless headphone) */ + 0x0B71C1F, + 0x0B71D10, + 0x0B71E21, + 0x0B71F02, + + /* + * NID 0x0c, Port C (Line IN/OUT+MIC for YD/UA revisions, and + * Line IN+MIC for TA revision) + */ + 0x0C71CF0, + 0x0C71D00, + 0x0C71E00, + 0x0C71F40, + + /* NID 0x0d, Port D (BTL output - EAPD control) */ + 0x0D71C10, + 0x0D71D41, + 0x0D71E10, + 0x0D71F10, + + /* NID 0x0e, Port E (Line IN/OUT) */ + 0x0E71CF0, + 0x0E71D00, + 0x0E71E00, + 0x0E71F40, + + /* NID 0x0f, Port F (Line IN/OUT, MIC) */ + 0x0F71CF0, + 0x0F71D00, + 0x0F71E00, + 0x0F71F40, + + /* NID 0x10, MonoOut (output-only) */ + 0x1071CF0, + 0x1071D00, + 0x1071EF0, + 0x1071F40, + + /* NID 0x10, DigMic0 (Digital Microphone 0) */ + 0x1171CF0, + 0x1171D00, + 0x1171E00, + 0x1171F40, + + /* NID 0x1f, Dig0Pin (First Digital Output Pin) */ + 0x1F71C50, + 0x1F71D21, + 0x1F71E40, + 0x1F71F10, + + /* NID 0x20, Dig1Pin (Second Digital Output Pin / DMIC Input Pin) */ + 0x2071CF0, + 0x2071D00, + 0x2071E00, + 0x2071F40, + + /* BTL Gain */ + 0x017F417, /* Gain = 16.79dB */ +}; +AZALIA_ARRAY_SIZES; diff --git a/src/mainboard/iwave/iWRainbowG6/hda_verb.h b/src/mainboard/iwave/iWRainbowG6/hda_verb.h deleted file mode 100644 index 6799c12799..0000000000 --- a/src/mainboard/iwave/iWRainbowG6/hda_verb.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * Copyright (C) 2009-2010 iWave Systems - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -static u32 mainboard_cim_verb_data[] = { - /* coreboot specific header */ - 0x111d76d5, // Codec Vendor / Device ID: IDT 92HD81 - 0x00000000, // Subsystem ID - 0x0000000a, // Number of jacks - - /* NID 0x0a, Port A (capless headphone) */ - 0x0A71C40, - 0x0A71D10, - 0x0A71EA1, - 0x0A71F02, - - /* NID 0x0b, Port B (capless headphone) */ - 0x0B71C1F, - 0x0B71D10, - 0x0B71E21, - 0x0B71F02, - - /* - * NID 0x0c, Port C (Line IN/OUT+MIC for YD/UA revisions, and - * Line IN+MIC for TA revision) - */ - 0x0C71CF0, - 0x0C71D00, - 0x0C71E00, - 0x0C71F40, - - /* NID 0x0d, Port D (BTL output - EAPD control) */ - 0x0D71C10, - 0x0D71D41, - 0x0D71E10, - 0x0D71F10, - - /* NID 0x0e, Port E (Line IN/OUT) */ - 0x0E71CF0, - 0x0E71D00, - 0x0E71E00, - 0x0E71F40, - - /* NID 0x0f, Port F (Line IN/OUT, MIC) */ - 0x0F71CF0, - 0x0F71D00, - 0x0F71E00, - 0x0F71F40, - - /* NID 0x10, MonoOut (output-only) */ - 0x1071CF0, - 0x1071D00, - 0x1071EF0, - 0x1071F40, - - /* NID 0x10, DigMic0 (Digital Microphone 0) */ - 0x1171CF0, - 0x1171D00, - 0x1171E00, - 0x1171F40, - - /* NID 0x1f, Dig0Pin (First Digital Output Pin) */ - 0x1F71C50, - 0x1F71D21, - 0x1F71E40, - 0x1F71F10, - - /* NID 0x20, Dig1Pin (Second Digital Output Pin / DMIC Input Pin) */ - 0x2071CF0, - 0x2071D00, - 0x2071E00, - 0x2071F40, - - /* BTL Gain */ - 0x017F417, /* Gain = 16.79dB */ -}; diff --git a/src/mainboard/iwave/iWRainbowG6/mainboard.c b/src/mainboard/iwave/iWRainbowG6/mainboard.c index 0b84f6855b..dfc66363a0 100644 --- a/src/mainboard/iwave/iWRainbowG6/mainboard.c +++ b/src/mainboard/iwave/iWRainbowG6/mainboard.c @@ -20,18 +20,10 @@ #include #include -#include -#include "hda_verb.h" -static void verb_setup(void) -{ - cim_verb_data = mainboard_cim_verb_data; - cim_verb_data_size = sizeof(mainboard_cim_verb_data); -} static void mainboard_enable(device_t dev) { - verb_setup(); } struct chip_operations mainboard_ops = { -- cgit v1.2.3