From: "Stephen Williams" <612dlag102@sneakemail.com>
To: linuxppc-embedded@lists.linuxppc.org
Subject: SystemACE but not V2PRO
Date: Thu, 01 Apr 2004 18:38:19 -0800 [thread overview]
Message-ID: <15270-14190@sneakemail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 837 bytes --]
The attached patch is my spin at getting the existing xsysace
block driver working on systems that have SystemACE chips, but
do not use Virtex-II-Pro chips. The adapter.c file assumes that
the system ace halt will halt the processor. This is not the
case in general, so this patch ifdefs that part of the code out
using CONFIG_VIRTEX_II_PRO.
This is only part of the story for getting the systemace
working in general, but the remaining bits are configuration
issues, not code/driver support.
Question: Who is the maintainer for this section of code? It
is maybe MonteVista?
--
Steve Williams "The woods are lovely, dark and deep.
steve at XXXXXXXXXX But I have promises to keep,
http://www.XXXXXXXXXX and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep."
[-- Attachment #2: sysace-without-v2pro.patch --]
[-- Type: text/plain, Size: 1836 bytes --]
Index: drivers/block/xilinx_sysace/adapter.c
===================================================================
RCS file: /cvsroot/linuxppc_2_4_devel/drivers/block/xilinx_sysace/adapter.c,v
retrieving revision 1.3
diff -p -u -r1.3 adapter.c
--- drivers/block/xilinx_sysace/adapter.c 30 Oct 2003 00:32:49 -0000 1.3
+++ drivers/block/xilinx_sysace/adapter.c 2 Apr 2004 02:27:37 -0000
@@ -74,7 +74,9 @@ MODULE_LICENSE("GPL");
static const int dont_spin = 0;
static u32 save_BaseAddress; /* Saved physical base address */
+#ifdef CONFIG_VIRTEX_II_PRO
static void (*old_restart) (char *cmd) = NULL; /* old ppc_md.restart */
+#endif
static unsigned char heads;
static unsigned char sectors;
@@ -277,6 +279,13 @@ proc_cleanup(void)
}
#endif
+#ifdef CONFIG_VIRTEX_II_PRO
+/*
+ * The XSysAce_ResetCfg function causes the SystemACE to reset the
+ * Xilinx chain that is attached to it. If I am a Virtex II Pro, then
+ * presumably that includes me. Thus, The ResetCfg will ultimately
+ * reset me, the processor, end of story.
+ */
static void
xsysace_restart(char *cmd)
{
@@ -285,6 +294,7 @@ xsysace_restart(char *cmd)
/* Wait for reset. */
for (;;) ;
}
+#endif
/*
* The code to handle the block device starts here.
@@ -725,8 +735,10 @@ cleanup(void)
iounmap((void *) cfg->BaseAddress);
cfg->BaseAddress = save_BaseAddress;
+#ifdef CONFIG_VIRTEX_II_PRO
if (old_restart)
ppc_md.restart = old_restart;
+#endif
}
static int __init
@@ -837,9 +849,11 @@ xsysace_init(void)
DEVICE_NAME, save_BaseAddress, cfg->BaseAddress, XSA_IRQ,
size / 2);
+#ifdef CONFIG_VIRTEX_II_PRO
/* Hook our reset function into system's restart code. */
old_restart = ppc_md.restart;
ppc_md.restart = xsysace_restart;
+#endif
if (proc_init())
printk(KERN_WARNING "%s: could not register /proc interface.\n",
next reply other threads:[~2004-04-02 2:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-02 2:38 Stephen Williams [this message]
2004-04-02 17:35 ` SystemACE but not V2PRO Scott Anderson
2004-04-02 19:10 ` Andrei Konovalov
2004-04-05 14:36 ` Andrei Konovalov
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=15270-14190@sneakemail.com \
--to=612dlag102@sneakemail.com \
--cc=linuxppc-embedded@lists.linuxppc.org \
/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;
as well as URLs for NNTP newsgroup(s).