Fix SPI BAR special case in lpc_set_resources
There was already a special case for the SPI base address in lpc_set_resources for southbridge/amd/cimx/sb800 and southbridge/amd/agesa/hudson, but it needed to be modified to keep from killing the IMC rom during initialization. As soon as the BAR is disabled by setting the new base address, the IMC dies. The fix is to make sure it's still enabled when setting the new base address instead of setting the new address then re-enabling it. Change the name SPIROM_BASE_ADDRESS to SPIROM_BASE_ADDRESS_REGISTER to more accurately describe what we're using. Change-Id: I216d75b722c4332c239d487111a9880eabf59e91 Signed-off-by: Martin Roth <martin@se-eng.com> Reviewed-on: http://review.coreboot.org/1975 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones <marcj303@gmail.com>
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include <device/pnp.h>
|
||||
#include <device/pci_ids.h>
|
||||
#include <device/pci_ops.h>
|
||||
#include <device/pci_def.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <pc80/isa-dma.h>
|
||||
#include <arch/io.h>
|
||||
@@ -104,11 +105,12 @@ static void hudson_lpc_set_resources(struct device *dev)
|
||||
{
|
||||
struct resource *res;
|
||||
|
||||
/* Special case. SPI Base Address. The SpiRomEnable should STAY set. */
|
||||
res = find_resource(dev, SPIROM_BASE_ADDRESS_REGISTER);
|
||||
res->base |= PCI_COMMAND_MEMORY;
|
||||
|
||||
pci_dev_set_resources(dev);
|
||||
|
||||
/* Specical case. SPI Base Address. The SpiRomEnable should be set. */
|
||||
res = find_resource(dev, 0xA0);
|
||||
pci_write_config32(dev, 0xA0, res->base | 1 << 1);
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user