public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@grandegger.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC/PATCH 3/4] Add support for TQM-specific chip select logic to UPM-FSL
Date: Wed, 07 Jan 2009 19:57:12 +0100	[thread overview]
Message-ID: <4964FB08.4090204@grandegger.com> (raw)

For the NAND chips on the TQM8548 modules, a special chip-select logic is
used. It uses dedicated address lines to be controlled via UPM machine
address register (mar). This patch adds corresponding support to the
FSL-UPM driver.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
---
 drivers/mtd/nand/fsl_upm.c  |    5 ++++-
 include/linux/mtd/fsl_upm.h |    1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

Index: u-boot/drivers/mtd/nand/fsl_upm.c
===================================================================
--- u-boot.orig/drivers/mtd/nand/fsl_upm.c
+++ u-boot/drivers/mtd/nand/fsl_upm.c
@@ -90,8 +90,11 @@ static void fun_cmd_ctrl(struct mtd_info
 	mar = cmd << (32 - fun->width);
 	io_addr = fun->upm.io_addr;
 #if NAND_MAX_CHIPS > 1
-	if (fun->chip_nr > 0)
+	if (fun->chip_nr > 0) {
 		io_addr += fun->chip_offset * fun->chip_nr;
+		if (fun->upm_mar_chip_offset)
+			mar |= fun->upm_mar_chip_offset * fun->chip_nr;
+	}
 #endif
 	fsl_upm_run_pattern(&fun->upm, fun->width, io_addr, mar);
 
Index: u-boot/include/linux/mtd/fsl_upm.h
===================================================================
--- u-boot.orig/include/linux/mtd/fsl_upm.h
+++ u-boot/include/linux/mtd/fsl_upm.h
@@ -28,6 +28,7 @@ struct fsl_upm_nand {
 	int width;
 	int upm_cmd_offset;
 	int upm_addr_offset;
+	int upm_mar_chip_offset;
 	int wait_pattern;
 	int (*dev_ready)(int chip_nr);
 	int chip_delay;

                 reply	other threads:[~2009-01-07 18:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4964FB08.4090204@grandegger.com \
    --to=wg@grandegger.com \
    --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