From: mdalam@codeaurora.org
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: mani@kernel.org, boris.brezillon@collabora.com,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
sricharan@codeaurora.org, mdalam=codeaurora.org@codeaurora.org
Subject: Re: [PATCH] mtd: rawnand: qcom: update last code word register
Date: Wed, 24 Feb 2021 22:00:05 +0530 [thread overview]
Message-ID: <e0f0282b8552b0225f15a4c45a6894cd@codeaurora.org> (raw)
In-Reply-To: <20210224074850.0c74154d@xps13>
On 2021-02-24 12:18, Miquel Raynal wrote:
> Hello,
>
> mdalam@codeaurora.org wrote on Wed, 24 Feb 2021 10:09:48 +0530:
>
>> On 2021-02-24 01:13, mdalam@codeaurora.org wrote:
>> > On 2021-02-23 22:04, Miquel Raynal wrote:
>> >> Hello,
>> >> >> Md Sadre Alam <mdalam@codeaurora.org> wrote on Tue, 23 Feb 2021
>> >> 01:34:27 +0530:
>> >> >>> From QPIC version 2.0 onwards new register got added to read last
>> >> >> a new
>> >> >>> codeword. This change will add the READ_LOCATION_LAST_CW_n register.
>> >> >> Add support for this READ_LOCATION_LAST_CW_n register.
>> >> >>> >>> For first three code word READ_LOCATION_n register will be
>> >>> use.For last code word READ_LOCATION_LAST_CW_n register will be
>> >>> use.
>> >> >> "
>> >> In the case of QPIC v2, codewords 0, 1 and 2 will be accessed through
>> >> READ_LOCATION_n, while codeword 3 will be accessed through
>> >> READ_LOCATION_LAST_CW_n.
>> >> "
>> >> >> When I read my own sentence, I feel that there is something wrong.
>> >> If there are only 4 codewords, I guess a QPIC v2 is able to use
>> >> READ_LOCATION_3 or READ_LOCATION_LAST_CW_0 interchangeably. Isn't it?
>> >> >> I guess the point of having these "last_cw_n" registers is to support
>> >> up to 8 codewords, am I wrong? If this the case, the current patch
>> >> completely fails doing that I don't get the point of such change.
>> >
>> > This register is only use to read last code word.
>> >
>> > I have address all the comments from all the previous sub sequent
>> > patches and pushed
>> > all patches in only one series.
>> >
>> > Please check.
>>
>> The registers READ_LOCATION & READ_LOCATION_LAST are not associated
>> with number of code words.
>> These two registers are used to access the location inside a code
>> word.
>
> Ok. Can you please explain what is a location then? Or point me to a
> datasheet that explains it.
The location is the position inside a code word.
>
> Bottom line question: why having READ_LOCATION_0, _1,... an
> READ_LOCATION_LAST_0, _1, etc?
READ_LOCATION_0, _1,... are used to extract multiple chunks from a code
word.
e.g If we wanted to extract first 100 bytes from a code word then
(0...99) READ_LOCATION_0 will be configured.
if we wanted to extract next 100 bytes (100...199) then
READ_LOCATION_1 will be configured.
same way for last code word READ_LOCATION_LAST_0, _1, will be used.
Below is the mapping example for a 2K page size.
<---------------------2048------------------------------------------------><------64---------->2111
_______________________________________________________________________________________________
|
| | |
|
| | |
|
| | |
|
| | |
|__________________________________________________________________________|___|_______________|
2048-bytes
factory BBM
One code word:
1-byte BBM 7-bytes ECC
______________________________________
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
|____________|__|____________|___|____|
<-----------512 bytes-------> 4-bytes spare
data
<-------------------------------------2048-------------------------------------------------->2047<------64---------->2111
____________________________________________________________________________________________________________________
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|_____________________________________________________________________________________________|___|_____________|____|
| |
| |
| |<-----mapping
| |
| |
____________________________________________________________________________________________________|___|______
| | |
| |
| | |
| |
| | |
| |
| | |
| |
| | |
| |
|______________________|___________________________|_______________________________|____________________________|
<-------CW1-----------><----------CW2-------------><-----------CW3----------------><----------CW4--------------->
/ \
/ \
/ \
/ \
/ \
/ \
/ \
/ \
_________________________________________________________________ \___
|
|
|
|
|
|
|
|
|
|
|
|
|<--read_location_0--> <---read_location_1-->
<--read_location_n-->|
|
|_____________________________________________________________________|
So in QPIC V2 onwards to access last code word same way we have to use
read_location_last_0,1,2..3 etc.
>
>> So whether we are having 4 code words
>> or 8 code words it doesn't matter. If we wanted access the location
>> within normal code word we have to
>> use READ_LOCATION register and if we wanted to access location in
>> last code word then we have to use
>> READ_LOCATION_LAST.
>> >
>> >> >>> Signed-off-by: Md Sadre Alam <mdalam@codeaurora.org>
>
> Thanks,
> Miquèl
next prev parent reply other threads:[~2021-02-24 16:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-22 20:04 [PATCH] mtd: rawnand: qcom: update last code word register Md Sadre Alam
2021-02-23 16:34 ` Miquel Raynal
2021-02-23 19:43 ` mdalam
2021-02-24 4:39 ` mdalam
2021-02-24 6:48 ` Miquel Raynal
2021-02-24 16:30 ` mdalam [this message]
2021-02-24 16:36 ` Miquel Raynal
2021-02-26 18:25 ` mdalam
-- strict thread matches above, loose matches on Subject: below --
2021-02-15 19:16 Md Sadre Alam
2021-02-16 8:16 ` Miquel Raynal
2021-02-16 17:53 ` mdalam
2021-02-18 9:20 ` Miquel Raynal
2021-02-18 16:29 ` mdalam
2021-02-21 20:27 ` mdalam
2021-02-14 21:17 Md Sadre Alam
2021-02-15 8:40 ` Miquel Raynal
2021-02-15 19:19 ` mdalam
2020-12-17 14:02 Md Sadre Alam
2020-12-31 10:53 ` Manivannan Sadhasivam
2021-01-04 18:54 ` mdalam
2021-01-05 15:45 ` Manivannan Sadhasivam
2021-01-10 3:49 ` mdalam
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=e0f0282b8552b0225f15a4c45a6894cd@codeaurora.org \
--to=mdalam@codeaurora.org \
--cc=boris.brezillon@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mani@kernel.org \
--cc=mdalam=codeaurora.org@codeaurora.org \
--cc=miquel.raynal@bootlin.com \
--cc=sricharan@codeaurora.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