[OpenWrt-Devel] RE: [PATCH] ramips: reset m25p80 when shutdown

未命名 countrysideboy at qq.com
Mon Nov 9 21:35:04 EST 2015


Yes, I'd like to submit it to mainline.For 32MB spi flash, The mt7620a soc switch to 32bit address mode.After a soft reset, the spi flash should switch to 24bit back, otherwise the rourer would hang until you do a hard reset.



------------------ 原始邮件 ------------------
发件人: "Rafał Miłecki";<zajec5 at gmail.com>;
发送时间: 2015年11月9日(星期一) 凌晨5:25
收件人: "未命名"<countrysideboy at qq.com>; 
抄送: "OpenWrt Development List"<openwrt-devel at lists.openwrt.org>; 
主题: Re: [OpenWrt-Devel] [PATCH] ramips: reset m25p80 when shutdown



On 7 November 2015 at 21:42, Shonn Lu <countrysideboy at qq.com> wrote:
> Signed-off-by: Shonn Lu <countrysideboy at qq.com>
> ---
>  .../0064-reset-m25p80-when-shutdown.patch          | 24 ++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
>  create mode 100644 target/linux/ramips/patches-3.18/0064-reset-m25p80-when-shutdown.patch
>
> diff --git a/target/linux/ramips/patches-3.18/0064-reset-m25p80-when-shutdown.patch b/target/linux/ramips/patches-3.18/0064-reset-m25p80-when-shutdown.patch
> new file mode 100644
> index 0000000..76f916a
> --- /dev/null
> +++ b/target/linux/ramips/patches-3.18/0064-reset-m25p80-when-shutdown.patch
> @@ -0,0 +1,24 @@
> +--- a/drivers/mtd/devices/m25p80.c
> ++++ b/drivers/mtd/devices/m25p80.c
> +@@ -319,6 +319,12 @@
> + {
> +       struct m25p     *flash = spi_get_drvdata(spi);
> +
> ++    //        play4fun: add spi flash reset code
> ++      flash->command[0] = 0x66;
> ++      spi_write(flash->spi, flash->command, 1);
> ++      flash->command[0] = 0x99;
> ++      spi_write(flash->spi, flash->command, 1);
> ++
> +       /* Clean up MTD stuff. */
> +       return mtd_device_unregister(&flash->mtd);
> + }
> +@@ -382,6 +388,8 @@
> +       .id_table       = m25p_ids,
> +       .probe  = m25p_probe,
> +       .remove = m25p_remove,
> ++      //      play4fun add shutdown method to reset spi flash
> ++      .shutdown = m25p_remove,

What's the point with that "play4fun" something? Please describe this
patch better, explain why it is needed. Did you try to submit this
patch to mainline?

-- 
Rafał
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20151110/c7129167/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list