<br><br><div class="gmail_quote">2010/5/18 Wan ZongShun <span dir="ltr"><<a href="http://mcuos.com">mcuos.com</a>@<a href="http://gmail.com">gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Wills,<br>
<br>
Please send your patch to me as a attached file.<br>
<br>
thanks!<br>
<div class="im"><br>
在 2010年4月29日 下午10:52,Wills Wang <<a href="http://wills.wang.cn" target="_blank">wills.wang.cn</a>@<a href="http://gmail.com" target="_blank">gmail.com</a>> 写道:<br>
</div><div><div></div><div class="h5">> There is a patch for NUC900 nand driver, it fix up the bug access for<br>
> incorrect register address and NULL pointer.<br>
><br>
> --- linux-2.6.34-rc5/drivers/mtd/nand/nuc900_nand.c 2010-04-29<br>
> 14:35:04.000000000 +0000<br>
> +++ linux-2.6.34-rc5/drivers/mtd/nand/nuc900_nand.c 2010-04-29<br>
> 14:42:22.000000000 +0000<br>
> @@ -132,7 +153,7 @@<br>
> {<br>
> unsigned int val;<br>
> spin_lock(&nand->lock);<br>
> - val = __raw_readl(REG_SMISR);<br>
> + val = __raw_readl(nand->reg + REG_SMISR);<br>
> val &= READYBUSY;<br>
> spin_unlock(&nand->lock);<br>
><br>
> @@ -150,6 +171,19 @@<br>
> return ready;<br>
> }<br>
><br>
> +static void nuc900_nand_select_chip(struct mtd_info *mtd, int chipnr)<br>
> +{<br>
> + switch (chipnr) {<br>
> + case -1:<br>
> + break;<br>
> + case 0:<br>
> + break;<br>
> +<br>
> + default:<br>
> + BUG();<br>
> + }<br>
> +}<br>
> +<br>
> static void nuc900_nand_command_lp(struct mtd_info *mtd, unsigned int<br>
> command,<br>
> int column, int page_addr)<br>
> {<br>
> @@ -240,7 +274,6 @@<br>
> ;<br>
> }<br>
><br>
> -<br>
> static void nuc900_nand_enable(struct nuc900_nand *nand)<br>
> {<br>
> unsigned int val;<br>
> @@ -250,7 +283,7 @@<br>
> val = __raw_readl(nand->reg + REG_FMICSR);<br>
><br>
> if (!(val & NAND_EN))<br>
> - __raw_writel(val | NAND_EN, REG_FMICSR);<br>
> + __raw_writel(val | NAND_EN, nand->reg + REG_FMICSR);<br>
><br>
> val = __raw_readl(nand->reg + REG_SMCSR);<br>
><br>
> @@ -286,7 +319,7 @@<br>
> goto fail1;<br>
> }<br>
> clk_enable(nuc900_nand->clk);<br>
> -<br>
> + chip->select_chip = nuc900_nand_select_chip;<br>
> chip->cmdfunc = nuc900_nand_command_lp;<br>
> chip->dev_ready = nuc900_nand_devready;<br>
> chip->read_byte = nuc900_nand_read_byte;<br>
><br>
</div></div><div><div></div><div class="h5">> --<br>
> 欢迎加入"NUC900 Linux BSP开发社区".<br>
> NUC900 Linux相关问题请发问题邮件至:<br>
> <a href="mailto:NUC900@googlegroups.com">NUC900@googlegroups.com</a><br>
> 取消订阅请发邮件:<br>
> <a href="mailto:NUC900%2Bunsubscribe@googlegroups.com">NUC900+unsubscribe@googlegroups.com</a><br>
> 新手请熟读社区首页:<br>
> <a href="https://groups.google.com/group/NUC900?hl=zh-CN" target="_blank">https://groups.google.com/group/NUC900?hl=zh-CN</a><br>
><br>
<br>
<br>
<br>
--<br>
*linux-arm-kernel mailing list<br>
mail <a href="mailto:addr%3Alinux-arm-kernel@lists.infradead.org">addr:linux-arm-kernel@lists.infradead.org</a><br>
you can subscribe by:<br>
<a href="http://lists.infradead.org/mailman/listinfo/linux-arm-kernel" target="_blank">http://lists.infradead.org/mailman/listinfo/linux-arm-kernel</a><br>
<br>
* linux-arm-NUC900 mailing list<br>
mail <a href="mailto:addr%3ANUC900@googlegroups.com">addr:NUC900@googlegroups.com</a><br>
main web: <a href="https://groups.google.com/group/NUC900" target="_blank">https://groups.google.com/group/NUC900</a><br>
you can subscribe it by sending me mail:<br>
<a href="http://mcuos.com" target="_blank">mcuos.com</a>@<a href="http://gmail.com" target="_blank">gmail.com</a><br>
</div></div></blockquote></div><br>