From: mcuos.com@gmail.com (Wan ZongShun)
To: linux-arm-kernel@lists.infradead.org
Subject: [Linux-arm-nuc900] NUC900 nand driver Patch
Date: Thu, 29 Apr 2010 23:07:41 +0800 [thread overview]
Message-ID: <o2qe68bb3471004290807s9b3ae137p4a3d62e0e01f4530@mail.gmail.com> (raw)
In-Reply-To: <4BD99D4A.2020908@gmail.com>
Thanks a lot, wait for me checking it.
? 2010?4?29? ??10:52?Wills Wang <wills.wang.cn@gmail.com> ???
> There is a patch for NUC900 nand driver, it fix up the bug access for
> incorrect register address and NULL pointer.
>
> --- linux-2.6.34-rc5/drivers/mtd/nand/nuc900_nand.c 2010-04-29
> 14:35:04.000000000 +0000
> +++ linux-2.6.34-rc5/drivers/mtd/nand/nuc900_nand.c 2010-04-29
> 14:42:22.000000000 +0000
> @@ -132,7 +153,7 @@
> {
> unsigned int val;
> spin_lock(&nand->lock);
> - val = __raw_readl(REG_SMISR);
> + val = __raw_readl(nand->reg + REG_SMISR);
> val &= READYBUSY;
> spin_unlock(&nand->lock);
>
> @@ -150,6 +171,19 @@
> return ready;
> }
>
> +static void nuc900_nand_select_chip(struct mtd_info *mtd, int chipnr)
> +{
> + switch (chipnr) {
> + case -1:
> + break;
> + case 0:
> + break;
> +
> + default:
> + BUG();
> + }
> +}
> +
> static void nuc900_nand_command_lp(struct mtd_info *mtd, unsigned int
> command,
> int column, int page_addr)
> {
> @@ -240,7 +274,6 @@
> ;
> }
>
> -
> static void nuc900_nand_enable(struct nuc900_nand *nand)
> {
> unsigned int val;
> @@ -250,7 +283,7 @@
> val = __raw_readl(nand->reg + REG_FMICSR);
>
> if (!(val & NAND_EN))
> - __raw_writel(val | NAND_EN, REG_FMICSR);
> + __raw_writel(val | NAND_EN, nand->reg + REG_FMICSR);
>
> val = __raw_readl(nand->reg + REG_SMCSR);
>
> @@ -286,7 +319,7 @@
> goto fail1;
> }
> clk_enable(nuc900_nand->clk);
> -
> + chip->select_chip = nuc900_nand_select_chip;
> chip->cmdfunc = nuc900_nand_command_lp;
> chip->dev_ready = nuc900_nand_devready;
> chip->read_byte = nuc900_nand_read_byte;
>
> --
> ????"NUC900 Linux BSP????".
> NUC900 Linux????????????
> NUC900 at googlegroups.com
> ?????????
> NUC900+unsubscribe at googlegroups.com
> ??????????
> https://groups.google.com/group/NUC900?hl=zh-CN
>
--
*linux-arm-kernel mailing list
mail addr:linux-arm-kernel at lists.infradead.org
you can subscribe by:
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
* linux-arm-NUC900 mailing list
mail addr:NUC900 at googlegroups.com
main web: https://groups.google.com/group/NUC900
you can subscribe it by sending me mail:
mcuos.com at gmail.com
next parent reply other threads:[~2010-04-29 15:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4BD99D4A.2020908@gmail.com>
2010-04-29 15:07 ` Wan ZongShun [this message]
2010-05-18 6:29 ` [Linux-arm-nuc900] NUC900 nand driver Patch Wan ZongShun
2010-05-27 6:41 ` wills wang
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=o2qe68bb3471004290807s9b3ae137p4a3d62e0e01f4530@mail.gmail.com \
--to=mcuos.com@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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).