src/cpu/amd/pi/00630F01 Fix checkpatch warnings and errors
Fix space prohibited between function name and open parenthesis, line over 80 characters, unnecessary braces for single statement blocks, space required before open brace errors and warnings Change-Id: I66f1a8640ec5c9d8a1dd039088598f40e8d30f95 Signed-off-by: Evelyn Huang <evhuang@google.com> Reviewed-on: https://review.coreboot.org/20096 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
parent
53de6cd1c3
commit
877b586691
|
@ -34,16 +34,20 @@ void amd_initcpuio(void)
|
||||||
* set to non-posted regions.
|
* set to non-posted regions.
|
||||||
*/
|
*/
|
||||||
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0x84);
|
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0x84);
|
||||||
PciData = 0x00FEDF00; /* last address before processor local APIC at FEE00000 */
|
/* last address before processor local APIC at FEE00000 */
|
||||||
PciData |= 1 << 7; /* set NP (non-posted) bit */
|
PciData = 0x00FEDF00;
|
||||||
|
/* set NP (non-posted) bit */
|
||||||
|
PciData |= 1 << 7;
|
||||||
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
|
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
|
||||||
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0x80);
|
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0x80);
|
||||||
PciData = (0xFED00000 >> 8) | 3; /* lowest NP address is HPET at FED00000 */
|
/* lowest NP address is HPET at FED00000 */
|
||||||
|
PciData = (0xFED00000 >> 8) | 3;
|
||||||
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
|
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
|
||||||
|
|
||||||
/* Map the remaining PCI hole as posted MMIO */
|
/* Map the remaining PCI hole as posted MMIO */
|
||||||
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0x8C);
|
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0x8C);
|
||||||
PciData = 0x00FECF00; /* last address before non-posted range */
|
/* last address before non-posted range */
|
||||||
|
PciData = 0x00FECF00;
|
||||||
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
|
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
|
||||||
LibAmdMsrRead(0xC001001A, &MsrReg, &StdHeader);
|
LibAmdMsrRead(0xC001001A, &MsrReg, &StdHeader);
|
||||||
MsrReg = (MsrReg >> 8) | 3;
|
MsrReg = (MsrReg >> 8) | 3;
|
||||||
|
@ -66,10 +70,12 @@ void amd_initmmio(void)
|
||||||
AMD_CONFIG_PARAMS StdHeader;
|
AMD_CONFIG_PARAMS StdHeader;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Set the MMIO Configuration Base Address and Bus Range onto MMIO configuration base
|
* Set the MMIO Configuration Base Address
|
||||||
Address MSR register.
|
* and Bus Range onto MMIO configuration base
|
||||||
|
* Address MSR register.
|
||||||
*/
|
*/
|
||||||
MsrReg = CONFIG_MMCONF_BASE_ADDRESS | (LibAmdBitScanReverse (CONFIG_MMCONF_BUS_NUMBER) << 2) | 1;
|
MsrReg = CONFIG_MMCONF_BASE_ADDRESS |
|
||||||
|
(LibAmdBitScanReverse(CONFIG_MMCONF_BUS_NUMBER) << 2) | 1;
|
||||||
LibAmdMsrWrite(0xC0010058, &MsrReg, &StdHeader);
|
LibAmdMsrWrite(0xC0010058, &MsrReg, &StdHeader);
|
||||||
|
|
||||||
/* Set ROM cache onto WP to decrease post time */
|
/* Set ROM cache onto WP to decrease post time */
|
||||||
|
|
|
@ -50,7 +50,10 @@ static void model_15_init(device_t dev)
|
||||||
msr.lo &= ~SYSCFG_MSR_MtrrFixDramEn;
|
msr.lo &= ~SYSCFG_MSR_MtrrFixDramEn;
|
||||||
wrmsr(SYSCFG_MSR, msr);
|
wrmsr(SYSCFG_MSR, msr);
|
||||||
|
|
||||||
// BSP: make a0000-bffff UC, c0000-fffff WB, same as OntarioApMtrrSettingsList for APs
|
/*
|
||||||
|
* BSP: make a0000-bffff UC, c0000-fffff WB,
|
||||||
|
* same as OntarioApMtrrSettingsList for APs
|
||||||
|
*/
|
||||||
msr.lo = msr.hi = 0;
|
msr.lo = msr.hi = 0;
|
||||||
wrmsr(0x259, msr);
|
wrmsr(0x259, msr);
|
||||||
msr.lo = msr.hi = 0x1e1e1e1e;
|
msr.lo = msr.hi = 0x1e1e1e1e;
|
||||||
|
@ -70,10 +73,8 @@ static void model_15_init(device_t dev)
|
||||||
/* zero the machine check error status registers */
|
/* zero the machine check error status registers */
|
||||||
msr.lo = 0;
|
msr.lo = 0;
|
||||||
msr.hi = 0;
|
msr.hi = 0;
|
||||||
for (i = 0; i < 6; i++) {
|
for (i = 0; i < 6; i++)
|
||||||
wrmsr(MCI_STATUS + (i * 4), msr);
|
wrmsr(MCI_STATUS + (i * 4), msr);
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Enable the local CPU APICs */
|
/* Enable the local CPU APICs */
|
||||||
setup_lapic();
|
setup_lapic();
|
||||||
|
|
Loading…
Reference in New Issue