A bug fix:
Fix the ctrl_devport_conf_clear to clear the enable bit. A simplification: Dynamically enable ck804s that are found instead of relying on #defines. Removing an Opteron changes the number of ck804s that are present. Simple changes to make it easier to compare the factory BIOS with Coreboot when using SerialICE for boards with the Nvidia ck804 chipset: If the mask is zero, don't read the value, just write the new value over it. Signed-off-by: Myles Watson <mylesgw@gmail.com> Acked-by: Myles Watson <mylesgw@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5652 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
106f7ffadf
commit
8376831eaf
|
@ -45,7 +45,6 @@
|
||||||
#include "superio/winbond/w83627hf/w83627hf_early_serial.c"
|
#include "superio/winbond/w83627hf/w83627hf_early_serial.c"
|
||||||
|
|
||||||
/* Used by ck804_early_setup(). */
|
/* Used by ck804_early_setup(). */
|
||||||
#define CK804_NUM 1
|
|
||||||
#define CK804_USE_NIC 1
|
#define CK804_USE_NIC 1
|
||||||
#define CK804_USE_ACI 1
|
#define CK804_USE_ACI 1
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,6 @@ static inline int spd_read_byte(unsigned device, unsigned address)
|
||||||
|
|
||||||
#include "cpu/amd/dualcore/dualcore.c"
|
#include "cpu/amd/dualcore/dualcore.c"
|
||||||
|
|
||||||
#define CK804_NUM 2
|
|
||||||
#define CK804_USE_NIC 1
|
#define CK804_USE_NIC 1
|
||||||
#define CK804_USE_ACI 1
|
#define CK804_USE_ACI 1
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,6 @@ static inline int spd_read_byte(unsigned device, unsigned address)
|
||||||
|
|
||||||
#include "cpu/amd/dualcore/dualcore.c"
|
#include "cpu/amd/dualcore/dualcore.c"
|
||||||
|
|
||||||
#define CK804_NUM 1
|
|
||||||
#include "southbridge/nvidia/ck804/ck804_early_setup_ss.h"
|
#include "southbridge/nvidia/ck804/ck804_early_setup_ss.h"
|
||||||
//set GPIO to input mode
|
//set GPIO to input mode
|
||||||
#define CK804_MB_SETUP \
|
#define CK804_MB_SETUP \
|
||||||
|
|
|
@ -73,7 +73,6 @@ static inline int spd_read_byte(unsigned device, unsigned address)
|
||||||
|
|
||||||
#include "cpu/amd/dualcore/dualcore.c"
|
#include "cpu/amd/dualcore/dualcore.c"
|
||||||
|
|
||||||
#define CK804_NUM 2
|
|
||||||
#define CK804_USE_NIC 1
|
#define CK804_USE_NIC 1
|
||||||
#define CK804_USE_ACI 1
|
#define CK804_USE_ACI 1
|
||||||
|
|
||||||
|
@ -90,7 +89,6 @@ static inline int spd_read_byte(unsigned device, unsigned address)
|
||||||
|
|
||||||
#include "southbridge/nvidia/ck804/ck804_early_setup_car.c"
|
#include "southbridge/nvidia/ck804/ck804_early_setup_car.c"
|
||||||
|
|
||||||
|
|
||||||
#include "cpu/amd/car/post_cache_as_ram.c"
|
#include "cpu/amd/car/post_cache_as_ram.c"
|
||||||
|
|
||||||
#include "cpu/amd/model_fxx/init_cpus.c"
|
#include "cpu/amd/model_fxx/init_cpus.c"
|
||||||
|
|
|
@ -15,7 +15,8 @@ static void setup_resource_map_offset(const unsigned int *register_values, int m
|
||||||
#endif
|
#endif
|
||||||
dev = (register_values[i] & ~0xfff) + offset_pci_dev;
|
dev = (register_values[i] & ~0xfff) + offset_pci_dev;
|
||||||
where = register_values[i] & 0xfff;
|
where = register_values[i] & 0xfff;
|
||||||
reg = pci_read_config32(dev, where);
|
if (register_values[i+1])
|
||||||
|
reg = pci_read_config32(dev, where);
|
||||||
reg &= register_values[i+1];
|
reg &= register_values[i+1];
|
||||||
reg |= register_values[i+2] + offset_io_base;
|
reg |= register_values[i+2] + offset_io_base;
|
||||||
pci_write_config32(dev, where, reg);
|
pci_write_config32(dev, where, reg);
|
||||||
|
@ -60,7 +61,8 @@ static void setup_resource_map_x_offset(const unsigned int *register_values, int
|
||||||
unsigned long reg;
|
unsigned long reg;
|
||||||
dev = (register_values[i+1] & ~0xfff) + offset_pci_dev;
|
dev = (register_values[i+1] & ~0xfff) + offset_pci_dev;
|
||||||
where = register_values[i+1] & 0xfff;
|
where = register_values[i+1] & 0xfff;
|
||||||
reg = pci_read_config32(dev, where);
|
if (register_values[i+2])
|
||||||
|
reg = pci_read_config32(dev, where);
|
||||||
reg &= register_values[i+2];
|
reg &= register_values[i+2];
|
||||||
reg |= register_values[i+3];
|
reg |= register_values[i+3];
|
||||||
pci_write_config32(dev, where, reg);
|
pci_write_config32(dev, where, reg);
|
||||||
|
@ -71,7 +73,8 @@ static void setup_resource_map_x_offset(const unsigned int *register_values, int
|
||||||
unsigned where;
|
unsigned where;
|
||||||
unsigned reg;
|
unsigned reg;
|
||||||
where = register_values[i+1] + offset_io_base;
|
where = register_values[i+1] + offset_io_base;
|
||||||
reg = inb(where);
|
if (register_values[i+2])
|
||||||
|
reg = inb(where);
|
||||||
reg &= register_values[i+2];
|
reg &= register_values[i+2];
|
||||||
reg |= register_values[i+3];
|
reg |= register_values[i+3];
|
||||||
outb(reg, where);
|
outb(reg, where);
|
||||||
|
@ -82,7 +85,8 @@ static void setup_resource_map_x_offset(const unsigned int *register_values, int
|
||||||
unsigned where;
|
unsigned where;
|
||||||
unsigned long reg;
|
unsigned long reg;
|
||||||
where = register_values[i+1] + offset_io_base;
|
where = register_values[i+1] + offset_io_base;
|
||||||
reg = inl(where);
|
if (register_values[i+2])
|
||||||
|
reg = inl(where);
|
||||||
reg &= register_values[i+2];
|
reg &= register_values[i+2];
|
||||||
reg |= register_values[i+3];
|
reg |= register_values[i+3];
|
||||||
outl(reg, where);
|
outl(reg, where);
|
||||||
|
|
|
@ -102,8 +102,8 @@ static void ck804_early_clear_port(unsigned ck804_num, unsigned *busn,
|
||||||
unsigned *io_base)
|
unsigned *io_base)
|
||||||
{
|
{
|
||||||
static const unsigned int ctrl_devport_conf_clear[] = {
|
static const unsigned int ctrl_devport_conf_clear[] = {
|
||||||
PCI_ADDR(0, 0x1, 0, ANACTRL_REG_POS), ~(0x0000ff00), 0,
|
PCI_ADDR(0, 0x1, 0, ANACTRL_REG_POS), ~(0x0000ff01), 0,
|
||||||
PCI_ADDR(0, 0x1, 0, SYSCTRL_REG_POS), ~(0x0000ff00), 0,
|
PCI_ADDR(0, 0x1, 0, SYSCTRL_REG_POS), ~(0x0000ff01), 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
int j;
|
int j;
|
||||||
|
@ -211,9 +211,10 @@ static void ck804_early_setup(unsigned ck804_num, unsigned *busn,
|
||||||
RES_PORT_IO_8, SYSCTRL_IO_BASE + 0xc0 + 0x1a, ~(0xff), ((0 << 4) | (2 << 2) | (0 << 0)),
|
RES_PORT_IO_8, SYSCTRL_IO_BASE + 0xc0 + 0x1a, ~(0xff), ((0 << 4) | (2 << 2) | (0 << 0)),
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CK804_NUM > 1
|
};
|
||||||
|
|
||||||
|
static const unsigned int ctrl_conf_multiple[] = {
|
||||||
RES_PORT_IO_8, SYSCTRL_IO_BASE + 0xc0 + 0, ~(3 << 2), (0 << 2),
|
RES_PORT_IO_8, SYSCTRL_IO_BASE + 0xc0 + 0, ~(3 << 2), (0 << 2),
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const unsigned int ctrl_conf_slave[] = {
|
static const unsigned int ctrl_conf_slave[] = {
|
||||||
|
@ -284,7 +285,12 @@ static void ck804_early_setup(unsigned ck804_num, unsigned *busn,
|
||||||
if (busn[j] == 0) {
|
if (busn[j] == 0) {
|
||||||
setup_resource_map_x_offset(ctrl_conf_master,
|
setup_resource_map_x_offset(ctrl_conf_master,
|
||||||
ARRAY_SIZE(ctrl_conf_master),
|
ARRAY_SIZE(ctrl_conf_master),
|
||||||
PCI_DEV(busn[0], CK804_DEVN_BASE, 0), io_base[0]);
|
PCI_DEV(0, CK804_DEVN_BASE, 0), io_base[0]);
|
||||||
|
if (ck804_num > 1)
|
||||||
|
setup_resource_map_x_offset(ctrl_conf_multiple,
|
||||||
|
ARRAY_SIZE(ctrl_conf_multiple),
|
||||||
|
PCI_DEV(0, CK804_DEVN_BASE, 0), 0);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue