public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: David Ho <davidho@nanometrics.ca>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] SPI relocation fix
Date: Thu, 30 Mar 2006 16:07:07 -0500	[thread overview]
Message-ID: <11437528271561-git-send-email-davidho@nanometrics.ca> (raw)

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

             reply	other threads:[~2006-03-30 21:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-30 21:07 David Ho [this message]
2006-03-30 23:05 ` [U-Boot-Users] [PATCH] SPI relocation fix 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11437528271561-git-send-email-davidho@nanometrics.ca \
    --to=davidho@nanometrics.ca \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox