[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f5177fad-214f-1b60-46ba-1dc0a4fb059e@quicinc.com>
Date: Tue, 20 Feb 2024 17:44:47 +0530
From: Md Sadre Alam <quic_mdalam@...cinc.com>
To: Konrad Dybcio <konrad.dybcio@...aro.org>, <andersson@...nel.org>,
<broonie@...nel.org>, <robh@...nel.org>,
<krzysztof.kozlowski+dt@...aro.org>, <conor+dt@...nel.org>,
<miquel.raynal@...tlin.com>, <richard@....at>, <vigneshr@...com>,
<manivannan.sadhasivam@...aro.org>, <linux-arm-msm@...r.kernel.org>,
<linux-spi@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-mtd@...ts.infradead.org>
CC: <quic_srichara@...cinc.com>, <quic_varada@...cinc.com>
Subject: Re: [PATCH 3/5] spi: spi-qpic: Add qpic spi nand driver support
On 2/15/2024 11:27 PM, Konrad Dybcio wrote:
> On 15.02.2024 14:48, Md Sadre Alam wrote:
>> Add qpic spi nand driver support. The spi nand
>> driver currently supported the below commands.
>>
>> -- RESET
>> -- READ ID
>> -- SET FEATURE
>> -- GET FEATURE
>> -- READ PAGE
>> -- WRITE PAGE
>> -- ERASE PAGE
>>
>> Co-developed-by: Sricharan Ramabadhran <quic_srichara@...cinc.com>
>> Signed-off-by: Sricharan Ramabadhran <quic_srichara@...cinc.com>
>> Co-developed-by: Varadarajan Narayanan <quic_varada@...cinc.com>
>> Signed-off-by: Varadarajan Narayanan <quic_varada@...cinc.com>
>> Signed-off-by: Md Sadre Alam <quic_mdalam@...cinc.com>
>> ---
>
> [...]
>
>> +void snandc_set_reg(struct qcom_nand_controller *snandc, int offset, u32 val)
>> +{
>> + struct nandc_regs *regs = snandc->regs;
>> + __le32 *reg;
>> +
>> + reg = offset_to_nandc_reg(regs, offset);
>> +
>> + if (reg)
>> + *reg = cpu_to_le32(val);
>
> if (WARN_ON(!reg))
> return;
>
> instead?
>
> This would be tragic..
will fix this in next patch.
>
> [...]
>
>> +
>> + ecc_cfg->cfg0 = (cwperpage - 1) << CW_PER_PAGE
>> + | ecc_cfg->cw_data << UD_SIZE_BYTES
>> + | 1 << DISABLE_STATUS_AFTER_WRITE
>> + | 3 << NUM_ADDR_CYCLES
>> + | ecc_cfg->ecc_bytes_hw << ECC_PARITY_SIZE_BYTES_RS
>> + | 0 << STATUS_BFR_READ
>> + | 1 << SET_RD_MODE_AFTER_STATUS
>> + | ecc_cfg->spare_bytes << SPARE_SIZE_BYTES;
>
> Let me introduce you to FIELD_PREP/GET and GENMASK().. Many assignments
> in this file could use these.
Ok
>
> Konrad
Thanks for reviewing, will fix all the comments in next patch.
Regards,
Alam.
Powered by blists - more mailing lists