2 * This file is part of the coreboot project.
4 * Copyright (C) 2010 Uwe Hermann <uwe@hermann-uwe.de>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #include <arch/romcc_io.h>
23 #include <device/pci_ids.h>
25 static void vt8231_enable_rom(void)
29 dev = pci_locate_device(PCI_ID(PCI_VENDOR_ID_VIA,
30 PCI_DEVICE_ID_VIA_8231), 0);
33 * ROM decode control register (0x43):
37 * 7 0xFFFE0000-0xFFFEFFFF
38 * 6 0xFFF80000-0xFFFDFFFF
39 * 5 0xFFF00000-0xFFF7FFFF
40 * 4 0x000E0000-0x000EFFFF
41 * 3 0x000D8000-0x000DFFFF
42 * 2 0x000D0000-0x000D7FFF
43 * 1 0x000C8000-0x000CFFFF
44 * 0 0x000C0000-0x000C7FFF
46 pci_write_config8(dev, 0x43, (1 << 7) | (1 << 6) | (1 << 5));