All of lore.kernel.org
 help / color / mirror / Atom feed
From: xiangfu <xiangfu.z@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-BOOT] nand merge problem
Date: Sun, 31 May 2009 16:09:35 +0800	[thread overview]
Message-ID: <4A223B3F.3030900@gmail.com> (raw)
In-Reply-To: <00ab01c9e19b$b2488f50$3e03a8c0@st.jz.com>

zyliu at ingenic.cn wrote:
> Hi, xiangfu
> 
> Maybe the drivers of mtd in linux-2.6.24.3 can be as reference.
> 
> Best Regards
> 
thanks, now it's output :
"nand_get_flash_type: second ID read did not match 43,20 against 84,84"

I will let you know the progress.

now the hwcontrol is
--
static void jz_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
{
	struct nand_chip *this = (struct nand_chip *)(mtd->priv);
        unsigned int nandaddr = (unsigned int)this->IO_ADDR_W;
	if (ctrl & NAND_CTRL_CHANGE) {
		if (ctrl & NAND_CLE)
			nandaddr = nandaddr | 0x00008000;
                else
                        nandaddr = nandaddr & ~0x00008000;
			
		if (ctrl & NAND_ALE)
			this->IO_ADDR_W = (void __iomem *)((unsigned long)(this->IO_ADDR_W) |
0x00010000);
		else
			this->IO_ADDR_W = (void __iomem *)((unsigned long)(this->IO_ADDR_W) &
~0x00010000);
		if (ctrl & NAND_NCE) {
			this->IO_ADDR_W = this->IO_ADDR_R = (void __iomem *)NAND_DATA_PORT1;
			REG_EMC_NFCSR |= EMC_NFCSR_NFCE1;
		} else {
			REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE1;
                        REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE2;
                        REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE3;
                        REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE4;
		}
	}

	this->IO_ADDR_W = (void __iomem *)nandaddr;
        if (cmd != NAND_CMD_NONE)
                writeb(cmd, this->IO_ADDR_W);
}



-- 
Best Regards
Xiangfu Liu

jabber : xiangfu.z at gmail.com
skype  : xiangfu.z

  parent reply	other threads:[~2009-05-31  8:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-26  7:46 [U-Boot] [U-BOOT] nand merge problem xiangfu_gmail
2009-05-26  9:12 ` xiangfu_gmail
2009-05-26 21:17   ` Scott Wood
2009-05-27  0:41     ` xiangfu_gmail
2009-05-27 14:34       ` Scott Wood
     [not found]         ` <00ab01c9e19b$b2488f50$3e03a8c0@st.jz.com>
2009-05-31  8:09           ` xiangfu [this message]
2009-06-01 16:54             ` Scott Wood
2009-06-02  2:42               ` xiangfu
2009-06-06 14:46               ` [U-Boot] console_init_r problem with ingenic jz4740 cpu xiangfu
2009-06-10  9:14               ` [U-Boot] lcd logo color not correct xiangfu
2009-06-10 14:26                 ` xiangfu

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=4A223B3F.3030900@gmail.com \
    --to=xiangfu.z@gmail.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 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.