From: David Ho Date: Thu, 30 Mar 2006 16:07:07 -0500 Subject: [U-Boot-Users] [PATCH] SPI relocation fix Message-ID: <11437528271561-git-send-email-davidho@nanometrics.ca> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Signed-off-by: David Ho --- cpu/mpc8xx/spi.c | 21 +++++++++++++++------ 1 files changed, 15 insertions(+), 6 deletions(-) 3f60ba612e16635f35bf00e91fa821d36f294534 diff --git a/cpu/mpc8xx/spi.c b/cpu/mpc8xx/spi.c index e318ed0..cb3469b 100644 --- a/cpu/mpc8xx/spi.c +++ b/cpu/mpc8xx/spi.c @@ -153,8 +153,11 @@ void spi_init_f (void) spi = (spi_t *)&cp->cp_dpmem[spi->spi_rpbase]; #else spi = (spi_t *)&cp->cp_dparam[PROFF_SPI]; - /* Disable relocation */ - spi->spi_rpbase = 0; + + if (!mpc8xx_new_core()) { + /* Disable relocation */ + spi->spi_rpbase = 0; + } #endif /* 1 */ @@ -306,8 +309,11 @@ void spi_init_r (void) spi = (spi_t *)&cp->cp_dpmem[spi->spi_rpbase]; #else spi = (spi_t *)&cp->cp_dparam[PROFF_SPI]; - /* Disable relocation */ - spi->spi_rpbase = 0; + + if (!mpc8xx_new_core()) { + /* Disable relocation */ + spi->spi_rpbase = 0; + } #endif /* tx and rx buffer descriptors */ @@ -399,8 +405,11 @@ ssize_t spi_xfer (size_t count) spi = (spi_t *)&cp->cp_dpmem[spi->spi_rpbase]; #else spi = (spi_t *)&cp->cp_dparam[PROFF_SPI]; - /* Disable relocation */ - spi->spi_rpbase = 0; + + if (!mpc8xx_new_core()) { + /* Disable relocation */ + spi->spi_rpbase = 0; + } #endif tbdf = (cbd_t *) & cp->cp_dpmem[spi->spi_tbase]; -- 1.2.4.g79f5-dirty