From: "Steven J. Hill" <sjhill@cotw.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: "Adam J. Richter" <adam@yggdrasil.com>,
dwmw2@redhat.com, linux-kernel@vger.kernel.org,
linux-mtd@lists.infradead.org, torvalds@transmeta.com
Subject: Re: linux-2.4.6-pre8/drivers/mtd/nand/spia.c: undefined symbols
Date: Tue, 03 Jul 2001 12:57:34 -0500 [thread overview]
Message-ID: <3B42078E.8E6539F7@cotw.com> (raw)
In-Reply-To: <E15H3C2-0005qS-00@the-village.bc.nu>
[-- Attachment #1: Type: text/plain, Size: 493 bytes --]
Alan Cox wrote:
>
> > The way that I architected the raw NAND flash device driver was to
> > break it into 2 parts. 'nand.c' contains the actual driver code and
> > is considered to be device independent. 'spia.c' is the device
> > dependent part. You should write your own version of 'spia.c' and
>
> So the Config.in is wrong since I can select spia on x86
>
Indeed. That should be fixed now with this patch. Now onto the stuff
for ESR.
-Steve
--
Steven J. Hill - Embedded SW Engineer
[-- Attachment #2: spia.diff --]
[-- Type: application/octet-stream, Size: 3194 bytes --]
diff -urN linux-2.4.6-pre9/drivers/mtd/nand/Config.in linux-2.4.6-pre9-patched/drivers/mtd/nand/Config.in
--- linux-2.4.6-pre9/drivers/mtd/nand/Config.in Tue Jul 3 11:29:01 2001
+++ linux-2.4.6-pre9-patched/drivers/mtd/nand/Config.in Tue Jul 3 12:51:19 2001
@@ -1,6 +1,6 @@
# drivers/mtd/nand/Config.in
-# $Id: Config.in,v 1.1 2001/04/20 15:27:38 dwmw2 Exp $
+# $Id: Config.in,v 1.3 2001/07/03 17:50:56 sjhill Exp $
mainmenu_option next_comment
@@ -11,6 +11,8 @@
bool ' Enable ECC correction algorithm' CONFIG_MTD_NAND_ECC y
bool ' Verify NAND page writes' CONFIG_MTD_NAND_VERIFY_WRITE y
fi
-dep_tristate ' NAND Flash device on SPIA board' CONFIG_MTD_NAND_SPIA $CONFIG_MTD_NAND
+if [ "$CONFIG_ARM" = "y" -a "$CONFIG_ARCH_P720T" = "y" ]; then
+ dep_tristate ' NAND Flash device on SPIA board' CONFIG_MTD_NAND_SPIA $CONFIG_MTD_NAND
+fi
endmenu
diff -urN linux-2.4.6-pre9/drivers/mtd/nand/spia.c linux-2.4.6-pre9-patched/drivers/mtd/nand/spia.c
--- linux-2.4.6-pre9/drivers/mtd/nand/spia.c Tue Jul 3 11:29:01 2001
+++ linux-2.4.6-pre9-patched/drivers/mtd/nand/spia.c Tue Jul 3 12:51:14 2001
@@ -3,7 +3,7 @@
*
* Copyright (C) 2000 Steven J. Hill (sjhill@cotw.com)
*
- * $Id: spia.c,v 1.9 2001/06/02 14:47:16 dwmw2 Exp $
+ * $Id: spia.c,v 1.11 2001/07/03 17:50:56 sjhill Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -28,6 +28,22 @@
static struct mtd_info *spia_mtd = NULL;
/*
+ * Values specific to the SPIA board (used with EP7212 processor)
+ */
+#define SPIA_IO_ADDR = 0xd0000000 /* Start of EP7212 IO address space */
+#define SPIA_FIO_ADDR = 0xf0000000 /* Address where flash is mapped */
+#define SPIA_PEDR = 0x0080 /*
+ * IO offset to Port E data register
+ * where the CLE, ALE and NCE pins
+ * are wired to.
+ */
+#define SPIA_PEDDR = 0x00c0 /*
+ * IO offset to Port E data direction
+ * register so we can control the IO
+ * lines.
+ */
+
+/*
* Module stuff
*/
#if LINUX_VERSION_CODE < 0x20212 && defined(MODULE)
@@ -35,6 +51,21 @@
#define spia_cleanup cleanup_module
#endif
+static int spia_io_base = SPIA_IO_BASE;
+static int spia_fio_base = SPIA_FIO_BASE;
+static int spia_pedr = SPIA_PEDR;
+static int spia_peddr = SPIA_PEDDR;
+
+MODULE_PARM(spia_io_base, "i");
+MODULE_PARM(spia_fio_base, "i");
+MODULE_PARM(spia_pedr, "i");
+MODULE_PARM(spia_peddr, "i");
+
+__setup("spia_io_base=",spia_io_base);
+__setup("spia_fio_base=",spia_fio_base);
+__setup("spia_pedr=",spia_pedr);
+__setup("spia_peddr=",spia_peddr);
+
/*
* Define partitions for flash device
*/
@@ -77,11 +108,11 @@
* Set GPIO Port E control register so that the pins are configured
* to be outputs for controlling the NAND flash.
*/
- (*(volatile unsigned char *) (IO_BASE + PEDDR)) = 0x07;
+ (*(volatile unsigned char *) (spia_io_base + spia_peddr)) = 0x07;
/* Set address of NAND IO lines */
- this->IO_ADDR = FIO_BASE;
- this->CTRL_ADDR = IO_BASE + PEDR;
+ this->IO_ADDR = spia_fio_base;
+ this->CTRL_ADDR = spia_io_base + spia_pedr;
this->CLE = 0x01;
this->ALE = 0x02;
this->NCE = 0x04;
next prev parent reply other threads:[~2001-07-03 18:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-01 22:07 linux-2.4.6-pre8/drivers/mtd/nand/spia.c: undefined symbols Adam J. Richter
2001-07-02 12:38 ` Steven J. Hill
2001-07-02 12:52 ` Alan Cox
2001-07-02 13:14 ` David Woodhouse
2001-07-03 17:57 ` Steven J. Hill [this message]
2001-07-02 12:53 ` David Woodhouse
2001-07-03 13:10 Adam J. Richter
2001-07-03 15:35 ` Steven J. Hill
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=3B42078E.8E6539F7@cotw.com \
--to=sjhill@cotw.com \
--cc=adam@yggdrasil.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=dwmw2@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=torvalds@transmeta.com \
/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).