lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 18 Jul 2016 10:47:01 -0700
From:	Ray Jui <ray.jui@...adcom.com>
To:	Markus Mayer <markus.mayer@...adcom.com>
Cc:	Brian Norris <computersforpeace@...il.com>,
	Kamal Dasu <kdasu.kdev@...il.com>,
	Boris Brezillon <boris.brezillon@...e-electrons.com>,
	David Woodhouse <dwmw2@...radead.org>,
	linux-mtd@...ts.infradead.org,
	BCM Kernel Feedback <bcm-kernel-feedback-list@...adcom.com>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Linux ARM Kernel <linux-arm-kernel@...ts.infradead.org>,
	Prafulla Kota <prafulla.kota@...adcom.com>
Subject: Re: [PATCH 1/2] mtd: brcmnand: iProc big endian and ONFI support

Hi Markus,

On 7/18/2016 10:41 AM, Markus Mayer wrote:
> On 18 July 2016 at 10:36, Ray Jui <ray.jui@...adcom.com> wrote:
>> This patch adds big endian and ONFI support for various iProc based
>> SoCs that use the core brcmstb NAND controller
>>
>> This patch was originally implemented by Prafulla Kota
>> <prafulla.kota@...adcom.com> and fully tested on iProc based NS2 SVK
>>
>> Signed-off-by: Prafulla Kota <prafulla.kota@...adcom.com>
>> Signed-off-by: Ray Jui <ray.jui@...adcom.com>
>> ---
>>  drivers/mtd/nand/brcmnand/brcmnand.c   | 12 ++++++------
>>  drivers/mtd/nand/brcmnand/brcmnand.h   | 13 ++++++++-----
>>  drivers/mtd/nand/brcmnand/iproc_nand.c | 17 +++++++++++++----
>>  3 files changed, 27 insertions(+), 15 deletions(-)
>>
>> diff --git a/drivers/mtd/nand/brcmnand/brcmnand.c b/drivers/mtd/nand/brcmnand/brcmnand.c
>> index b76ad7c..12a1585 100644
>> --- a/drivers/mtd/nand/brcmnand/brcmnand.c
>> +++ b/drivers/mtd/nand/brcmnand/brcmnand.c

...
...

>> +       /*
>> +        * In the case of BE or when dealing with NAND data, alway configure
>> +        * the APB bus to LE mode before accessing the FIFO and back to BE mode
>> +        * after the access is done
>> +        */
>> +       if (IS_ENABLED(CONFIG_CPU_BIG_ENDIAN) || !is_param) {
>> +               if (prepare)
>> +                       val |= IPROC_NAND_APB_LE_MODE;
>> +               else
>> +                       val &= ~IPROC_NAND_APB_LE_MODE;
>> +       } else /* when in LE accessing the parameter page, keep APB in BE */
>
> The coding guidelines state that if you need braces around one branch
> of an if/else combination, you must use them on the other branch,
> also, even if the other branch is just one line.
>

Yes, I will add braces around in the next revision of this patch.

>>                 val &= ~IPROC_NAND_APB_LE_MODE;
>>
>>         brcmnand_writel(val, mmio);
>> --
>> 2.1.4
>>

Thanks,

Ray

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ