[PATCH v2 2/4] spi: spi-mtk-nor: improve device table for adding more capabilities

Guochun Mao guochun.mao at mediatek.com
Tue Jan 18 17:40:40 PST 2022


On Tue, 2022-01-18 at 15:52 +0100, AngeloGioacchino Del Regno wrote:
> Il 18/01/22 15:28, guochun.mao at mediatek.com ha scritto:
> > From: Guochun Mao <guochun.mao at mediatek.com>
> > 
> > Define a structure for adding more capabilities.
> > Add a item extra_dummy_bit for new SoCs, due to design changed.
> > 
> > Signed-off-by: Guochun Mao <guochun.mao at mediatek.com>
> > Signed-off-by: Zhen Zhang <zhen.zhang at mediatek.com>
> > ---
> >   drivers/spi/spi-mtk-nor.c | 48 +++++++++++++++++++++++++++++++---
> > -----
> >   1 file changed, 39 insertions(+), 9 deletions(-)
> > 
> > diff --git a/drivers/spi/spi-mtk-nor.c b/drivers/spi/spi-mtk-nor.c
> > index 5c93730615f8..f5ff01f61f42 100644
> > --- a/drivers/spi/spi-mtk-nor.c
> > +++ b/drivers/spi/spi-mtk-nor.c
> > @@ -95,6 +95,17 @@
> >   
> >   #define CLK_TO_US(sp, clkcnt)		DIV_ROUND_UP(clkcnt,
> > sp->spi_freq / 1000000)
> >   
> > +struct mtk_nor_caps {
> > +	u8 dma_bits;
> > +
> > +	/* extra_dummy_bit is adding for the IP of new SoCs.
> > +	 * Some new SoCs modify the timing of fetching registers'
> > values
> > +	 * and IDs of nor flash, they need a extra_dummy_bit which can
> > add
> > +	 * more clock cycles for fetching data.
> > +	 */
> 
> Thank you for this explaination. That was much appreciated.
> 
> Reviewed-by: AngeloGioacchino Del Regno <
> angelogioacchino.delregno at collabora.com>


HI Angelo,

Thanks for your review, appreciate your efforts.
I'm glad to explain it clearly.

BR,
Guochun








More information about the Linux-mediatek mailing list