[coreboot-gerrit] Patch set updated for coreboot: 4017225 amd/southbridge: Change #if defined to #if IS_ENABLED
Dave Frodin (dave.frodin@se-eng.com)
gerrit at coreboot.org
Thu Jun 12 16:54:37 CEST 2014
Dave Frodin (dave.frodin at se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5974
-gerrit
commit 4017225fab0350fd8b39e4addaa2030e5dc45314
Author: Dave Frodin <dave.frodin at se-eng.com>
Date: Wed Jun 11 13:15:56 2014 -0600
amd/southbridge: Change #if defined to #if IS_ENABLED
The IMC functions were being called and timing out when the
CONFIG_SB800_IMC_FWM/CONFIG_HUDSON_IMC_FWM were defined as 0.
Changing to a IS_ENABLED will keep the IMC handshake from
occuring if the IMC firmware isn't running.
Tested on a Persimmon platform which makes three calls to
spi_claim_bus() with each call timing out after 500ms.
Change-Id: I5d4bbcecf003b93704553b495a16bcd15f66763b
Signed-off-by: Dave Frodin <dave.frodin at se-eng.com>
---
src/southbridge/amd/agesa/hudson/spi.c | 6 +++---
src/southbridge/amd/cimx/sb800/spi.c | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/southbridge/amd/agesa/hudson/spi.c b/src/southbridge/amd/agesa/hudson/spi.c
index 013bb21..573dd3d 100644
--- a/src/southbridge/amd/agesa/hudson/spi.c
+++ b/src/southbridge/amd/agesa/hudson/spi.c
@@ -25,7 +25,7 @@
#include <device/pci.h>
#include <device/pci_ops.h>
-#if defined (CONFIG_HUDSON_IMC_FWM)
+#if IS_ENABLED (CONFIG_HUDSON_IMC_FWM)
#include <Proc/Fch/FchPlatform.h>
static int bus_claimed = 0;
@@ -138,7 +138,7 @@ int spi_xfer(struct spi_slave *slave, const void *dout,
}
int spi_claim_bus(struct spi_slave *slave)
{
-#if defined (CONFIG_HUDSON_IMC_FWM)
+#if IS_ENABLED (CONFIG_HUDSON_IMC_FWM)
if (slave->rw == SPI_WRITE_FLAG) {
bus_claimed++;
@@ -152,7 +152,7 @@ int spi_claim_bus(struct spi_slave *slave)
void spi_release_bus(struct spi_slave *slave)
{
-#if defined (CONFIG_HUDSON_IMC_FWM)
+#if IS_ENABLED (CONFIG_HUDSON_IMC_FWM)
if (slave->rw == SPI_WRITE_FLAG) {
bus_claimed--;
diff --git a/src/southbridge/amd/cimx/sb800/spi.c b/src/southbridge/amd/cimx/sb800/spi.c
index 3b2f556..a1cdf55 100644
--- a/src/southbridge/amd/cimx/sb800/spi.c
+++ b/src/southbridge/amd/cimx/sb800/spi.c
@@ -25,7 +25,7 @@
#include <device/pci.h>
#include <device/pci_ops.h>
-#if defined (CONFIG_SB800_IMC_FWM)
+#if IS_ENABLED (CONFIG_SB800_IMC_FWM)
#include "SBPLATFORM.h"
#include <vendorcode/amd/cimx/sb800/ECfan.h>
@@ -98,7 +98,7 @@ int spi_xfer(struct spi_slave *slave, const void *dout,
return 0;
}
-#if defined (CONFIG_SB800_IMC_FWM)
+#if IS_ENABLED (CONFIG_SB800_IMC_FWM)
static void ImcSleep(void)
{
@@ -130,7 +130,7 @@ static void ImcWakeup(void)
int spi_claim_bus(struct spi_slave *slave)
{
-#if defined (CONFIG_SB800_IMC_FWM)
+#if IS_ENABLED (CONFIG_SB800_IMC_FWM)
if (slave->rw == SPI_WRITE_FLAG) {
bus_claimed++;
@@ -144,7 +144,7 @@ int spi_claim_bus(struct spi_slave *slave)
void spi_release_bus(struct spi_slave *slave)
{
-#if defined (CONFIG_SB800_IMC_FWM)
+#if IS_ENABLED (CONFIG_SB800_IMC_FWM)
if (slave->rw == SPI_WRITE_FLAG) {
bus_claimed--;
More information about the coreboot-gerrit
mailing list