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/apple/macbook21/hda_verb.c | 66 +++++++++++++++++++++++++++++++ src/mainboard/apple/macbook21/hda_verb.h | 60 ---------------------------- src/mainboard/apple/macbook21/mainboard.c | 4 -- 3 files changed, 66 insertions(+), 64 deletions(-) create mode 100644 src/mainboard/apple/macbook21/hda_verb.c delete mode 100644 src/mainboard/apple/macbook21/hda_verb.h (limited to 'src/mainboard/apple/macbook21') diff --git a/src/mainboard/apple/macbook21/hda_verb.c b/src/mainboard/apple/macbook21/hda_verb.c new file mode 100644 index 0000000000..1fe188e357 --- /dev/null +++ b/src/mainboard/apple/macbook21/hda_verb.c @@ -0,0 +1,66 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2014 Vladimir Serbinenko. + * + * 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, + * or (at your option) any later version. + * + * 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 + */ + +#include + +const u32 cim_verb_data[] = { + /* coreboot specific header */ + 0x83847680, /* Codec Vendor / Device ID: SigmaTel STAC9221 A1 */ + 0x106b2200, /* Subsystem ID */ + 0x0000000B, /* Number of 4 dword sets */ + + /* NID 0x01: Subsystem ID. */ + AZALIA_SUBVENDOR(0x0, 0x106B2200), + + /* NID 0x0A. */ + AZALIA_PIN_CFG(0x0, 0x0A, 0x0321E21F), + + /* NID 0x0B. */ + AZALIA_PIN_CFG(0x0, 0x0B, 0x03A1E02E), + + /* NID 0x0C. */ + AZALIA_PIN_CFG(0x0, 0x0C, 0x9017E110), + + /* NID 0x0D. */ + AZALIA_PIN_CFG(0x0, 0x0D, 0x9017E11F), + + /* NID 0x0E. */ + AZALIA_PIN_CFG(0x0, 0x0E, 0x400000FE), + + /* NID 0x0F */ + AZALIA_PIN_CFG(0x0, 0x0F, 0x0381E020), + + /* NID 0x10 */ + AZALIA_PIN_CFG(0x0, 0x10, 0x1345E230), + + /* NID 0x11 */ + AZALIA_PIN_CFG(0x0, 0x11, 0x13C5E240), + + /* NID 0x15 */ + AZALIA_PIN_CFG(0x0, 0x15, 0x400000FC), + + /* NID 0x1B. */ + AZALIA_PIN_CFG(0x0, 0x1B, 0x400000FB), + +}; + +const u32 pc_beep_verbs[0] = {}; + +AZALIA_ARRAY_SIZES; diff --git a/src/mainboard/apple/macbook21/hda_verb.h b/src/mainboard/apple/macbook21/hda_verb.h deleted file mode 100644 index 07fa6bc81e..0000000000 --- a/src/mainboard/apple/macbook21/hda_verb.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * Copyright (C) 2014 Vladimir Serbinenko. - * - * 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, - * or (at your option) any later version. - * - * 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 const u32 mainboard_cim_verb_data[] = { - /* coreboot specific header */ - 0x83847680, /* Codec Vendor / Device ID: SigmaTel STAC9221 A1 */ - 0x106b2200, /* Subsystem ID */ - 0x0000000B, /* Number of 4 dword sets */ - - /* NID 0x01: Subsystem ID. */ - AZALIA_SUBVENDOR(0x0, 0x106B2200), - - /* NID 0x0A. */ - AZALIA_PIN_CFG(0x0, 0x0A, 0x0321E21F), - - /* NID 0x0B. */ - AZALIA_PIN_CFG(0x0, 0x0B, 0x03A1E02E), - - /* NID 0x0C. */ - AZALIA_PIN_CFG(0x0, 0x0C, 0x9017E110), - - /* NID 0x0D. */ - AZALIA_PIN_CFG(0x0, 0x0D, 0x9017E11F), - - /* NID 0x0E. */ - AZALIA_PIN_CFG(0x0, 0x0E, 0x400000FE), - - /* NID 0x0F */ - AZALIA_PIN_CFG(0x0, 0x0F, 0x0381E020), - - /* NID 0x10 */ - AZALIA_PIN_CFG(0x0, 0x10, 0x1345E230), - - /* NID 0x11 */ - AZALIA_PIN_CFG(0x0, 0x11, 0x13C5E240), - - /* NID 0x15 */ - AZALIA_PIN_CFG(0x0, 0x15, 0x400000FC), - - /* NID 0x1B. */ - AZALIA_PIN_CFG(0x0, 0x1B, 0x400000FB), - -}; diff --git a/src/mainboard/apple/macbook21/mainboard.c b/src/mainboard/apple/macbook21/mainboard.c index 846914cae2..99527c1e75 100644 --- a/src/mainboard/apple/macbook21/mainboard.c +++ b/src/mainboard/apple/macbook21/mainboard.c @@ -34,8 +34,6 @@ #include #include #include -#include -#include "hda_verb.h" #define PANEL INT15_5F35_CL_DISPLAY_DEFAULT int get_cst_entries(acpi_cstate_t **entries) @@ -51,8 +49,6 @@ static void mainboard_init(device_t dev) static void mainboard_enable(device_t dev) { dev->ops->init = mainboard_init; - cim_verb_data = mainboard_cim_verb_data; - cim_verb_data_size = sizeof(mainboard_cim_verb_data); } struct chip_operations mainboard_ops = { -- cgit v1.2.3