From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Update SystemACE driver for 16bit access
Date: Tue, 20 Feb 2007 13:33:54 +0100 [thread overview]
Message-ID: <200702201333.54351.sr@denx.de> (raw)
This patch removes some problems when the Xilinx SystemACE driver
is used with 16bit access on an big endian platform (like the
AMCC Katmai).
Signed-off-by: Stefan Roese <sr@denx.de>
---
commit d93e2212f962668b3dce091ff5edc33f2347fe37
tree 19b9b366ae1bdb33437370fa5dd009068c2039ec
parent 874bb7b88fe9b4648e1288a387af2e31014a72f3
author Stefan Roese <sr@denx.de> Tue, 20 Feb 2007 13:17:42 +0100
committer Stefan Roese <sr@denx.de> Tue, 20 Feb 2007 13:17:42 +0100
drivers/systemace.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/systemace.c b/drivers/systemace.c
index 9502623..3bd2ea9 100644
--- a/drivers/systemace.c
+++ b/drivers/systemace.c
@@ -66,8 +66,8 @@
writeb(val>>8, CFG_SYSTEMACE_BASE+off+1);}
#endif
#else
-#define ace_readw(off) (readw(CFG_SYSTEMACE_BASE+off))
-#define ace_writew(val, off) (writew(val, CFG_SYSTEMACE_BASE+off))
+#define ace_readw(off) (in16(CFG_SYSTEMACE_BASE+off))
+#define ace_writew(val, off) (out16(CFG_SYSTEMACE_BASE+off,val))
#endif
/* */
@@ -119,6 +119,14 @@ block_dev_desc_t *systemace_get_dev(int dev)
systemace_dev.removable = 1;
systemace_dev.block_read = systemace_read;
+#if (CFG_SYSTEMACE_WIDTH == 16)
+ /*
+ * By default the SystemACE comes up in 8-bit mode.
+ * Ensure that 16-bit mode gets enabled.
+ */
+ ace_writew(0x0001, 0);
+#endif
+
init_part(&systemace_dev);
}
@@ -197,7 +205,7 @@ static unsigned long systemace_read(int dev, unsigned long start,
#endif
/* Write LBA block address */
ace_writew((start >> 0) & 0xffff, 0x10);
- ace_writew((start >> 16) & 0x00ff, 0x12);
+ ace_writew((start >> 16) & 0x0fff, 0x12);
/* NOTE: in the Write Sector count below, a count of 0
causes a transfer of 256, so &0xff gives the right
next reply other threads:[~2007-02-20 12:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-20 12:33 Stefan Roese [this message]
2007-02-21 16:25 ` [U-Boot-Users] [PATCH] Update SystemACE driver for 16bit access Grant Likely
2007-02-21 19:58 ` Stefan Roese
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=200702201333.54351.sr@denx.de \
--to=sr@denx.de \
--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