From: Brian Norris <computersforpeace@gmail.com>
To: "bayi.cheng" <bayi.cheng@mediatek.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org, Marek Vasut <marex@denx.de>,
srv_heupstream@mediatek.com, Pawel Moll <pawel.moll@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Sascha Hauer <s.hauer@pengutronix.de>,
linux-kernel@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
linux-mediatek@lists.infradead.org,
Kumar Gala <galak@codeaurora.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-mtd@lists.infradead.org,
David Woodhouse <dwmw2@infradead.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 2/3] mtd: mtk-nor: mtk serial flash controller driver
Date: Thu, 29 Oct 2015 22:02:49 -0700 [thread overview]
Message-ID: <20151030050249.GB31863@localhost> (raw)
In-Reply-To: <1446171159.25711.36.camel@mhfsdcap03>
Hi Bayi,
On Fri, Oct 30, 2015 at 10:12:39AM +0800, bayi.cheng wrote:
> Hi Brian, The current station is as follows.
>
> 1: put 0x9F to MTK_NOR_PRGDATA5_REG, and five 0x0 to
> MTK_NOR_PRGDATA4_REG ~ MTK_NOR_PRGDATA0_REG, then set (1 + 5) * 8
> to MTK_NOR_CNT_REG, for this way, we can read five IDs.
>
> 2: put 0x9F to MTK_NOR_PRGDATA5_REG, and five 0x0 to
> MTK_NOR_PRGDATA4_REG ~ MTK_NOR_PRGDATA0_REG, then set (1 + 5 + 1) * 8
> to MTK_NOR_CNT_REG, for this way, we can read six IDs.
> In this case, nor flash IDs can be read from MTK_NOR_SHREG5_REG to
> MTK_NOR_SHREG0_REG . Thanks!
Thanks for the update. Glad to hear you can read more bytes there; the
extra number of Shift Registers *looked* to me like you should be able
to read even more than 5...
So in my other email, I showed you how I generalized the TX/RX function,
so it can handle most of both the write_reg() and read_reg() functions.
I'm not 100% sure now that it has all of the RX path correct; it worked
for the cases I could test, but it's confusing when reading the manual
to figure out which SHREG register I should start from. But anyway, I
think it should only take some small adjustments to my patch to make it
handle things properly.
I'd really appreciate it if you could incorporate my feedback and
review/improve the ..._do_tx_rx() function I wrote, to make sure it
handles reading any arbitrary number of bytes (at least up to 6). So,
you might, for example, run some tests where you have spi-nor.c call
nor->read_reg(nor, SPINOR_OP_RDID, id, idlen)
with varying values for 'idlen', and make sure they all work properly.
Let me know if you have any questions about comments either here, or on
v5.
Regards,
Brian
next prev parent reply other threads:[~2015-10-30 5:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-13 9:39 [PATCH v4 0/3] Mediatek SPI-NOR flash driver Bayi Cheng
2015-10-13 9:39 ` [PATCH v4 1/3] doc: dt: add documentation for Mediatek spi-nor controller Bayi Cheng
2015-10-16 1:19 ` Brian Norris
2015-10-13 9:39 ` [PATCH v4 2/3] mtd: mtk-nor: mtk serial flash controller driver Bayi Cheng
2015-10-13 12:44 ` kbuild test robot
2015-10-16 7:39 ` Brian Norris
2015-10-18 14:20 ` bayi.cheng
2015-10-29 1:52 ` Brian Norris
2015-10-29 3:28 ` bayi.cheng
2015-10-29 13:56 ` bayi.cheng
2015-10-29 16:03 ` Brian Norris
2015-10-30 2:12 ` bayi.cheng
2015-10-30 5:02 ` Brian Norris [this message]
2015-10-13 9:39 ` [PATCH v4 3/3] arm64: dts: mt8173: Add nor flash node Bayi Cheng
2015-10-13 14:33 ` Sergei Shtylyov
2015-10-14 1:07 ` Daniel Kurtz
2015-10-14 11:05 ` Sergei Shtylyov
2015-10-14 11:26 ` Daniel Kurtz
2015-10-14 13:59 ` bayi.cheng
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=20151030050249.GB31863@localhost \
--to=computersforpeace@gmail.com \
--cc=bayi.cheng@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marex@denx.de \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=srv_heupstream@mediatek.com \
/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).