8e2b29d61d43de73eb0c0f7ff6ff59384541a2c4
[coreboot.git] / src / southbridge / nvidia / ck804 / ck804_enable_rom.c
1 /*
2  * Copyright 2004 Tyan Computer
3  *  by yhlu@tyan.com
4  */
5
6 #if CONFIG_HT_CHAIN_END_UNITID_BASE < CONFIG_HT_CHAIN_UNITID_BASE
7 #define CK804_DEVN_BASE CONFIG_HT_CHAIN_END_UNITID_BASE
8 #else
9 #define CK804_DEVN_BASE CONFIG_HT_CHAIN_UNITID_BASE
10 #endif
11
12 static void ck804_enable_rom(void)
13 {
14         unsigned char byte;
15         device_t addr;
16
17         /* Enable 4MB ROM access at 0xFFC00000 - 0xFFFFFFFF. */
18         /* Locate the ck804 LPC. */
19         addr = PCI_DEV(0, (CK804_DEVN_BASE + 1), 0);
20
21         /* Set the 4MB enable bit. */
22         byte = pci_read_config8(addr, 0x88);
23         byte |= 0x80;
24         pci_write_config8(addr, 0x88, byte);
25 }