[PATCH 2/2] mtd: rawnand: nuvoton: add new driver for the Nuvoton MA35 SoC

Krzysztof Kozlowski krzk at kernel.org
Mon Aug 12 09:13:47 UTC 2024


On 12/08/2024 11:10, Hui-Ping Chen wrote:
>>> +
>>> +/* NAND-type Flash BCH Error Data Registers */
>>> +#define MA35_NFI_REG_NANDECCED0	(0x960)
>>> +#define MA35_NFI_REG_NANDECCED1	(0x964)
>>> +#define MA35_NFI_REG_NANDECCED2	(0x968)
>>> +#define MA35_NFI_REG_NANDECCED3	(0x96C)
>>> +#define MA35_NFI_REG_NANDECCED4	(0x970)
>>> +#define MA35_NFI_REG_NANDECCED5	(0x974)
>>> +
>>> +/* NAND-type Flash Redundant Area Registers */
>>> +#define MA35_NFI_REG_NANDRA0		(0xA00)
>>> +#define MA35_NFI_REG_NANDRA1		(0xA04)
>>> +
>>> +#define SKIP_SPARE_BYTES	4
>>> +
>>> +/* BCH algorithm related constants and variables */
>>> +enum {
>>> +	eBCH_NONE = 0,
>>> +	eBCH_T8,
>>> +	eBCH_T12,
>>> +	eBCH_T24,
>>> +	eBCH_CNT
>>> +} E_BCHALGORITHM;
>>> +
>>> +static const int g_i32BCHAlgoIdx[eBCH_CNT] = {BCH_T8, BCH_T8, BCH_T12, BCH_T24};
>>> +static struct nand_ecclayout_user ma35_nand_oob;
>> Why this is file-scope?
> 
> I will remove the `static`.

No, why this cannot be instance dependent? Quick looks says it could.
And should.


Best regards,
Krzysztof



More information about the dri-devel mailing list