lkml.org 
[lkml]   [2017]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v5 19/23] mtd: nand: denali: fix raw and oob accessors for syndrome page layout
2017-06-08 20:22 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> 2017-06-07 23:09 GMT+09:00 Boris Brezillon <boris.brezillon@free-electrons.com>:
>> On Wed, 7 Jun 2017 20:52:28 +0900
>> Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
>>
>>>
>>> +static void denali_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
>>> +{
>>> + struct denali_nand_info *denali = mtd_to_denali(mtd);
>>> + int i;
>>> +
>>> + iowrite32(MODE_11 | BANK(denali->flash_bank) | 2, denali->flash_mem);
>>
>> What is this '| 2'? You seem to use it a lot. Can you define a macro
>> and maybe add a comment if the macro name is not self-descriptive.
>
> The type of access.
>
> bit[1:0] == 0 : command cycle
> 1 : address cycle
> 2 : data read/write cycle
>
> I will replace magic numbers
> with macros or something.


I will add this magic-number/macro consolidation
at the tail of v6.



--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2017-06-13 06:42    [W:0.133 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site