public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] SPI relocation fix
@ 2006-03-30 21:07 David Ho
  2006-03-30 23:05 ` Wolfgang Denk
  2006-03-31  3:12 ` Vladimir Gurevich
  0 siblings, 2 replies; 23+ messages in thread
From: David Ho @ 2006-03-30 21:07 UTC (permalink / raw)
  To: u-boot

Signed-off-by: David Ho <davidho@nanometrics.ca>

---

 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

^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2006-04-03 21:51 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-30 21:07 [U-Boot-Users] [PATCH] SPI relocation fix David Ho
2006-03-30 23:05 ` Wolfgang Denk
2006-03-31  3:14   ` Vladimir Gurevich
2006-03-31 15:22     ` David Ho
2006-03-31 16:29       ` Wolfgang Denk
2006-03-31 21:44     ` David Ho
2006-03-31 21:52       ` Vladimir Gurevich
2006-04-03 15:09         ` David Ho
2006-04-03 16:53         ` David Ho
2006-04-03 17:18           ` Vladimir Gurevich
2006-04-03 17:32             ` David Ho
2006-04-03 17:37               ` Vladimir Gurevich
2006-04-03 18:12                 ` David Ho
2006-04-03 18:26                   ` Vladimir Gurevich
2006-04-03 19:00                     ` David Ho
2006-04-03 19:51                       ` Vladimir Gurevich
2006-04-03 19:59                         ` David Ho
2006-04-03 20:18                         ` Wolfgang Denk
2006-04-03 20:51                           ` Vladimir Gurevich
2006-04-03 21:36                             ` Wolfgang Denk
2006-04-03 21:51                               ` Vladimir Gurevich
2006-04-03 20:15                     ` Wolfgang Denk
2006-03-31  3:12 ` Vladimir Gurevich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox