All of lore.kernel.org
 help / color / mirror / Atom feed
From: Savin Zlobec <savin@epico.si>
To: linux-mtd@lists.infradead.org
Cc: tglx@linutronix.de
Subject: Re: [PATCH] AT91RM9200 NAND support
Date: Tue, 20 Jun 2006 09:43:31 +0200	[thread overview]
Message-ID: <4497A723.2070006@epico.si> (raw)
In-Reply-To: <1150787823.15614.297.camel@fuzzie.sanpeople.com>

[-- Attachment #1: Type: text/plain, Size: 419 bytes --]

Andrew Victor wrote:

>hi Thomas,
>
>  
>
>>As I pointed out in my previous mail, the driver needs to be updated to
>>work with the latest changes in the nand driver.
>>    
>>
I'am working on this right now. I've changed the at91 driver and I'am 
going to
test it when I finish the changes on YAFFS - read/write_ecc and oobblock are
not part of mtd_info any more...

I'am attaching the at91_nand.c changes.
 
--
savin

[-- Attachment #2: at91_nand.diff --]
[-- Type: text/x-patch, Size: 1528 bytes --]

--- drivers/mtd.old/nand/at91_nand.c	2006-06-20 09:09:21.000000000 +0200
+++ drivers/mtd/nand/at91_nand.c	2006-06-20 09:33:21.000000000 +0200
@@ -39,12 +39,13 @@
 /*
  * Hardware specific access to control-lines
  */
-static void at91_nand_hwcontrol(struct mtd_info *mtd, int cmd)
+static void at91_nand_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 {
 	struct nand_chip *nand_chip = mtd->priv;
 	struct at91_nand_host *host = nand_chip->priv;
 
-	switch(cmd) {
+	if (ctrl & NAND_CTRL_CHANGE) {
+		switch(cmd) {
 		case NAND_CTL_SETCLE:
 			nand_chip->IO_ADDR_W = host->io_base + (1 << host->board->cle);
 			break;
@@ -61,7 +62,10 @@
 			break;
 		case NAND_CTL_CLRNCE:
 			break;
+		}
 	}
+	if (cmd != NAND_CMD_NONE)
+		writeb(cmd, chip->IO_ADDR_W);
 }
 
 
@@ -145,13 +149,14 @@
 
 	nand_chip->priv = host;		/* link the private data structures */
 	mtd->priv = nand_chip;
+	mtd->owner = THIS_MODULE;
 
 	/* Set address of NAND IO lines */
 	nand_chip->IO_ADDR_R = host->io_base;
 	nand_chip->IO_ADDR_W = host->io_base;
-	nand_chip->hwcontrol = at91_nand_hwcontrol;
+	nand_chip->cmd_ctrl = at91_nand_hwcontrol;
 	nand_chip->dev_ready = at91_nand_device_ready;
-	nand_chip->eccmode = NAND_ECC_SOFT;	/* enable ECC */
+	nand_chip->ecc.mode = NAND_ECC_SOFT;	/* enable ECC */
 	nand_chip->chip_delay = 20;		/* 20us command delay time */
 
 	platform_set_drvdata(pdev, host);
@@ -170,6 +175,7 @@
 		res = -ENXIO;
 		goto out;
 	}
+	nand_release(mtd);
 
 #ifdef CONFIG_MTD_PARTITIONS
 	if (host->board->partition_info)

  reply	other threads:[~2006-06-20  7:34 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-20  6:54 [PATCH] AT91RM9200 NAND support Andrew Victor
2006-06-20  7:08 ` Thomas Gleixner
2006-06-20  7:17   ` Andrew Victor
2006-06-20  7:43     ` Savin Zlobec [this message]
2006-06-20  8:00       ` Thomas Gleixner
2006-06-20  8:08         ` Thomas Gleixner
2006-06-20  9:07         ` Savin Zlobec
2006-06-20  9:18           ` Thomas Gleixner
2006-06-20 10:49             ` Savin Zlobec
2006-06-20 11:12               ` Thomas Gleixner
2006-06-20 11:42                 ` Savin Zlobec
2006-06-20 11:55                   ` Thomas Gleixner
2006-06-20 12:28                     ` Savin Zlobec
2006-06-20 12:44                       ` Thomas Gleixner
2006-06-20 12:52                         ` Thomas Gleixner
2006-06-20 13:17                           ` Savin Zlobec
2006-06-20 13:01                         ` Savin Zlobec
2006-06-20 13:21                           ` Thomas Gleixner
2006-06-20 13:48                             ` Savin Zlobec
2006-06-20 13:57                               ` Thomas Gleixner
2006-06-20 14:24                                 ` Savin Zlobec
2006-06-20 14:24                                   ` Thomas Gleixner
2006-06-20 14:29                                   ` Thomas Gleixner
2006-06-20 15:53                                     ` Savin Zlobec
2006-06-20 15:53                                       ` Thomas Gleixner
2006-06-20 16:03                                         ` Savin Zlobec
2006-06-20  9:07   ` David Woodhouse
2006-06-20  9:14     ` Thomas Gleixner

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=4497A723.2070006@epico.si \
    --to=savin@epico.si \
    --cc=linux-mtd@lists.infradead.org \
    --cc=tglx@linutronix.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.