blob: 670ff251b1823e23800eba3d6177c8e932c84b91 [file] [log] [blame]
Morgan Tsai1602dd52007-10-29 21:00:14 +00001/*
Stefan Reinauer7e61e452008-01-18 10:35:56 +00002 * This file is part of the coreboot project.
Morgan Tsai1602dd52007-10-29 21:00:14 +00003 *
4 * Copyright (C) 2004 Tyan Computer
5 * Written by Yinghai Lu <yhlu@tyan.com> for Tyan Computer.
6 * Copyright (C) 2006,2007 AMD
7 * Written by Yinghai Lu <yinghai.lu@amd.com> for AMD.
8 * Copyright (C) 2007 Silicon Integrated Systems Corp. (SiS)
9 * Written by Morgan Tsai <my_tsai@sis.com> for SiS.
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
Morgan Tsai1602dd52007-10-29 21:00:14 +000020 */
21
Uwe Hermannb9c224e2010-12-16 19:57:54 +000022#include <stdint.h>
23#include <arch/io.h>
Uwe Hermannb9c224e2010-12-16 19:57:54 +000024#include <device/pci_ids.h>
25#include "sis966.h"
Morgan Tsai1602dd52007-10-29 21:00:14 +000026
27static void sis966_enable_rom(void)
28{
Edward O'Callaghan9a817ef2014-10-26 10:12:15 +110029 pci_devfn_t addr;
Morgan Tsai218c2652007-11-02 16:09:58 +000030
Uwe Hermannb9c224e2010-12-16 19:57:54 +000031 /* Enable 4MB ROM access at 0xFFC00000 - 0xFFFFFFFF. */
32 addr = pci_locate_device(PCI_ID(PCI_VENDOR_ID_SIS,
33 PCI_DEVICE_ID_SIS_SIS966_LPC), 0);
Morgan Tsai1602dd52007-10-29 21:00:14 +000034
Uwe Hermannb9c224e2010-12-16 19:57:54 +000035 /* Set the 4MB enable bit(s). */
Morgan Tsai1602dd52007-10-29 21:00:14 +000036 pci_write_config8(addr, 0x40, pci_read_config8(addr, 0x40) | 0x11);
37}
Uwe Hermannb9c224e2010-12-16 19:57:54 +000038
39static void bootblock_southbridge_init(void)
40{
41 sis966_enable_rom();
42}