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/nvidia/l1_2pvv/hda_verb.c | 67 ++++++++++++++++++++++++++++++++ src/mainboard/nvidia/l1_2pvv/hda_verb.h | 66 ------------------------------- src/mainboard/nvidia/l1_2pvv/mainboard.c | 8 ---- 3 files changed, 67 insertions(+), 74 deletions(-) create mode 100644 src/mainboard/nvidia/l1_2pvv/hda_verb.c delete mode 100644 src/mainboard/nvidia/l1_2pvv/hda_verb.h (limited to 'src/mainboard/nvidia/l1_2pvv') diff --git a/src/mainboard/nvidia/l1_2pvv/hda_verb.c b/src/mainboard/nvidia/l1_2pvv/hda_verb.c new file mode 100644 index 0000000000..780167af29 --- /dev/null +++ b/src/mainboard/nvidia/l1_2pvv/hda_verb.c @@ -0,0 +1,67 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2004 Tyan Computer + * Copyright (C) 2006-2007 AMD + * Copyright (C) 2007-2009 coresystems GmbH + * + * 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 */ + 0x10ec0880, // Codec Vendor / Device ID: Realtek ALC880 + 0x00000000, // Subsystem ID + 0x0000000d, // Number of jacks + + /* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x0000e601 */ + AZALIA_SUBVENDOR(0x0, 0x0000e601), + + /* NID 0x14, FRONT-OUT-L/R */ + AZALIA_PIN_CFG(0x0, 0x14, 0x01014410), + + /* NID 0x15, SURR-OUT-L/R */ + AZALIA_PIN_CFG(0x0, 0x15, 0x01011412), + + /* NID 0x16, CEN/LFE-OUT */ + AZALIA_PIN_CFG(0x0, 0x16, 0x01016011), + + /* NID 0x17, SIDE-SURR-L/R */ + AZALIA_PIN_CFG(0x0, 0x17, 0x01012014), + + /* NID 0x18, MIC1-L/R, VREFO */ + AZALIA_PIN_CFG(0x0, 0x18, 0x01a19c30), + + /* NID 0x19, MIC2-L/R, VREFO */ + AZALIA_PIN_CFG(0x0, 0x19, 0x02a19c40), + + /* NID 0x1a, LINE1-L/R, VREFO */ + AZALIA_PIN_CFG(0x0, 0x1a, 0x01813431), + + /* NID 0x1b, LINE2-L/R, VREFO */ + AZALIA_PIN_CFG(0x0, 0x1b, 0x0221441f), + + /* NID 0x1c, CD-L/R / GND */ + AZALIA_PIN_CFG(0x0, 0x1c, 0x411111f0), + + /* NID 0x1d, PCBEEP */ + AZALIA_PIN_CFG(0x0, 0x1d, 0x9983013e), + + /* NID 0x1e, S/PDIF-OUT */ + AZALIA_PIN_CFG(0x0, 0x1e, 0x01454120), + + /* NID 0x1f, S/PDIF-IN */ + AZALIA_PIN_CFG(0x0, 0x1f, 0x01c59150), +}; +AZALIA_ARRAY_SIZES; diff --git a/src/mainboard/nvidia/l1_2pvv/hda_verb.h b/src/mainboard/nvidia/l1_2pvv/hda_verb.h deleted file mode 100644 index ea3159e53d..0000000000 --- a/src/mainboard/nvidia/l1_2pvv/hda_verb.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * Copyright (C) 2004 Tyan Computer - * Copyright (C) 2006-2007 AMD - * Copyright (C) 2007-2009 coresystems GmbH - * - * 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 */ - 0x10ec0880, // Codec Vendor / Device ID: Realtek ALC880 - 0x00000000, // Subsystem ID - 0x0000000d, // Number of jacks - - /* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x0000e601 */ - AZALIA_SUBVENDOR(0x0, 0x0000e601), - - /* NID 0x14, FRONT-OUT-L/R */ - AZALIA_PIN_CFG(0x0, 0x14, 0x01014410), - - /* NID 0x15, SURR-OUT-L/R */ - AZALIA_PIN_CFG(0x0, 0x15, 0x01011412), - - /* NID 0x16, CEN/LFE-OUT */ - AZALIA_PIN_CFG(0x0, 0x16, 0x01016011), - - /* NID 0x17, SIDE-SURR-L/R */ - AZALIA_PIN_CFG(0x0, 0x17, 0x01012014), - - /* NID 0x18, MIC1-L/R, VREFO */ - AZALIA_PIN_CFG(0x0, 0x18, 0x01a19c30), - - /* NID 0x19, MIC2-L/R, VREFO */ - AZALIA_PIN_CFG(0x0, 0x19, 0x02a19c40), - - /* NID 0x1a, LINE1-L/R, VREFO */ - AZALIA_PIN_CFG(0x0, 0x1a, 0x01813431), - - /* NID 0x1b, LINE2-L/R, VREFO */ - AZALIA_PIN_CFG(0x0, 0x1b, 0x0221441f), - - /* NID 0x1c, CD-L/R / GND */ - AZALIA_PIN_CFG(0x0, 0x1c, 0x411111f0), - - /* NID 0x1d, PCBEEP */ - AZALIA_PIN_CFG(0x0, 0x1d, 0x9983013e), - - /* NID 0x1e, S/PDIF-OUT */ - AZALIA_PIN_CFG(0x0, 0x1e, 0x01454120), - - /* NID 0x1f, S/PDIF-IN */ - AZALIA_PIN_CFG(0x0, 0x1f, 0x01c59150), -}; diff --git a/src/mainboard/nvidia/l1_2pvv/mainboard.c b/src/mainboard/nvidia/l1_2pvv/mainboard.c index fb7317b3dd..291d4f7b20 100644 --- a/src/mainboard/nvidia/l1_2pvv/mainboard.c +++ b/src/mainboard/nvidia/l1_2pvv/mainboard.c @@ -24,18 +24,10 @@ #include #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