- See Issue Tracker id-11.

- In addition:
	Kept K8_HT_FREQ_1G_SUPPORT
	to support older boards.



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2075 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Jason Schildt 2005-10-25 21:41:45 +00:00
parent 74cf993a54
commit cf6df2afb5
1 changed files with 14 additions and 6 deletions

View File

@ -1,11 +1,17 @@
/* /*
This should be done by Eric This should be done by Eric
2004.12 yhlu add multi ht chain dynamically support 2004.12 yhlu add multi ht chain dynamically support
*/ */
#include <device/pci_def.h> #include <device/pci_def.h>
#include <device/pci_ids.h> #include <device/pci_ids.h>
#include <device/hypertransport_def.h> #include <device/hypertransport_def.h>
/* We can reduce the size of code generated by romcc by
* changing all of the fixed size types that live in registers
* into simple unsigned variables. (ie s/uint8_t/unsigned/g)
*/
#ifndef K8_HT_FREQ_1G_SUPPORT #ifndef K8_HT_FREQ_1G_SUPPORT
#define K8_HT_FREQ_1G_SUPPORT 0 #define K8_HT_FREQ_1G_SUPPORT 0
#endif #endif
@ -130,21 +136,21 @@ static uint16_t ht_read_freq_cap(device_t dev, uint8_t pos)
/* AMD 8131 Errata 48 */ /* AMD 8131 Errata 48 */
if (id == (PCI_VENDOR_ID_AMD | (PCI_DEVICE_ID_AMD_8131_PCIX << 16))) { if (id == (PCI_VENDOR_ID_AMD | (PCI_DEVICE_ID_AMD_8131_PCIX << 16))) {
freq_cap &= ~(1 << HT_FREQ_800Mhz); freq_cap &= ~(1 << HT_FREQ_800Mhz);
return freq_cap;
} }
/* AMD 8151 Errata 23 */ /* AMD 8151 Errata 23 */
if (id == (PCI_VENDOR_ID_AMD | (PCI_DEVICE_ID_AMD_8151_SYSCTRL << 16))) { if (id == (PCI_VENDOR_ID_AMD | (PCI_DEVICE_ID_AMD_8151_SYSCTRL << 16))) {
freq_cap &= ~(1 << HT_FREQ_800Mhz); freq_cap &= ~(1 << HT_FREQ_800Mhz);
return freq_cap;
} }
/* AMD K8 Unsupported 1Ghz? */ /* AMD K8 Unsupported 1Ghz? */
if (id == (PCI_VENDOR_ID_AMD | (0x1100 << 16))) { if (id == (PCI_VENDOR_ID_AMD | (0x1100 << 16))) {
#if K8_HT_FREQ_1G_SUPPORT == 1 #if K8_HT_FREQ_1G_SUPPORT == 1
if (is_cpu_pre_e0()) // CK804 support 1G? /* Supported starting with E0 */
#endif device_t dev_2 = PCI_DEV(0,0x18,2);
freq_cap &= ~(1 << HT_FREQ_1000Mhz); if(pci_read_config32(dev_2,0x9c) < 0x20f00)
#endif
freq_cap &= ~(1 << HT_FREQ_1000Mhz);
} }
return freq_cap; return freq_cap;
@ -199,8 +205,10 @@ static int ht_optimize_link(
/* See if I am changing the link freqency */ /* See if I am changing the link freqency */
old_freq = pci_read_config8(dev1, pos1 + LINK_FREQ(offs1)); old_freq = pci_read_config8(dev1, pos1 + LINK_FREQ(offs1));
old_freq &= 0x0f;
needs_reset |= old_freq != freq; needs_reset |= old_freq != freq;
old_freq = pci_read_config8(dev2, pos2 + LINK_FREQ(offs2)); old_freq = pci_read_config8(dev2, pos2 + LINK_FREQ(offs2));
old_freq &= 0x0f;
needs_reset |= old_freq != freq; needs_reset |= old_freq != freq;
/* Set the Calulcated link frequency */ /* Set the Calulcated link frequency */