Dave Frodin (dave.frodin(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5974
-gerrit
commit 684c0cb529937e887d4fd0aef1d65a63edc66af8
Author: Dave Frodin <dave.frodin(a)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(a)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--;
Dave Frodin (dave.frodin(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5973
-gerrit
commit 403d858b052a37451f399c995cd22a66afa14e16
Author: Dave Frodin <dave.frodin(a)se-eng.com>
Date: Wed Jun 11 12:53:47 2014 -0600
drivers/spi: Reduce the per loop delay of spi_flash_cmd_poll_bit()
At the end of some SPI operations the SPI device needs to be polled
to determine if it is done with the operation. For SPI data writes
the predicted time of that operation would be ~9us. The per loop
delay was 500us which was adding too much delay. This change
increases the number of loops to poll the device by a factor of 500
and decreases the per loop delay to 1us.
Change-Id: Ia8b00879135f926c402bbd9d08953c77a2dcc84e
Signed-off-by: Dave Frodin <dave.frodin(a)se-eng.com>
---
src/drivers/spi/spi_flash.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c
index 33588d5..eaf32c2 100644
--- a/src/drivers/spi/spi_flash.c
+++ b/src/drivers/spi/spi_flash.c
@@ -110,7 +110,7 @@ int spi_flash_cmd_poll_bit(struct spi_flash *flash, unsigned long timeout,
int ret;
u8 status;
- timebase = timeout;
+ timebase = timeout * 500;
do {
ret = spi_flash_cmd_read(spi, &cmd, 1, &status, 1);
if (ret)
@@ -119,7 +119,7 @@ int spi_flash_cmd_poll_bit(struct spi_flash *flash, unsigned long timeout,
if ((status & poll_bit) == 0)
break;
- udelay(500);
+ udelay(1);
} while (timebase--);
if ((status & poll_bit) == 0)
the following patch was just integrated into master:
commit 209238755a0efaba26622c4160969391dfa5a39f
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Sat Jun 7 13:31:29 2014 +0200
device/device_util.c: Fix wording in comment of `new_resource()`
Change-Id: Ieb0d5de37870a359f3a7ea1543640e26f86c1684
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/5952
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
See http://review.coreboot.org/5952 for details.
-gerrit
the following patch was just integrated into master:
commit ac1b875b554f45b0c98d375369119495b7ad2a2a
Author: Dave Frodin <dave.frodin(a)se-eng.com>
Date: Thu Jun 5 14:30:22 2014 -0600
amd/southbridge/lpc: SPI BAR has fixed size/location
The CIMX sb700/sb800/sb900 and agesa/hudson code was treating
the LPC SPI BAR as a normal PCI BAR. This will set the
resources for a fixed size at a fixed address. This was tested
on hp/abm, amd/persimmon, and gizmosphere/gizmo boards.
Change-Id: I1367efe0bbb53b7727258585963f61f4bd02ea1d
Signed-off-by: Dave Frodin <dave.frodin(a)se-eng.com>
Reviewed-on: http://review.coreboot.org/5947
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
See http://review.coreboot.org/5947 for details.
-gerrit
the following patch was just integrated into master:
commit 61f902d4a7779d0ce30de79df7a71ad0c3788887
Author: Vladimir Serbinenko <phcoder(a)gmail.com>
Date: Sat Jun 7 16:41:14 2014 +0200
ibexpeak: Set number of USB ports.
Change-Id: Ife3febcc88967386dfae624cd237562a34a68471
Signed-off-by: Vladimir Serbinenko <phcoder(a)gmail.com>
Reviewed-on: http://review.coreboot.org/5956
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
See http://review.coreboot.org/5956 for details.
-gerrit
the following patch was just integrated into master:
commit 49c3045c2dc6852c80e6fa7fca8ecf2a9ecf3c06
Author: Vladimir Serbinenko <phcoder(a)gmail.com>
Date: Sat Jun 7 16:30:35 2014 +0200
ibexpeak: Remove some dead code.
Change-Id: I68ae49d20a2524f03c4503f2b3be93f07b9cb6e3
Signed-off-by: Vladimir Serbinenko <phcoder(a)gmail.com>
Reviewed-on: http://review.coreboot.org/5955
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
See http://review.coreboot.org/5955 for details.
-gerrit