lkml.org 
[lkml]   [2019]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 2/4] mtd: rawnand: Add Macronix MX25F0A NAND controller
Hi Mason,

masonccyang@mxic.com.tw wrote on Fri, 17 May 2019 17:30:21 +0800:

> Hi Miquel,
>
> > > +
> > > +static void mxic_nand_select_chip(struct nand_chip *chip, int chipnr)
> >
> > _select_target() is preferred now
>
> Do you mean I implement mxic_nand_select_target() to control #CS ?
>
> If so, I need to call mxic_nand_select_target( ) to control #CS ON
> and then #CS OFF in _exec_op() due to nand_select_target()<in nand_base,c>
> is still calling chip->legacy.select_chip ?

You must forget about the ->select_chip() callback. Now it should be
handled directly from the controller driver. Please have a look at the
commit pointed against the marvell_nand.c driver.

[...]

> > > + if (!mxic)
> > > + return -ENOMEM;
> > > +
> > > + nand_chip = &mxic->nand;
> > > + mtd = nand_to_mtd(nand_chip);
> > > + mtd->dev.parent = pdev->dev.parent;
> > > + nand_chip->ecc.priv = NULL;
> > > + nand_set_flash_node(nand_chip, pdev->dev.parent->of_node);
> > > + nand_chip->priv = mxic;
> > > +
> > > + mxic->mfd = mfd;
> > > +
> > > + nand_chip->legacy.select_chip = mxic_nand_select_chip;
> >
> > Please don't implement legacy interfaces. You can check in
> > marvell_nand.c how this is handled now:
> >
> > b25251414f6e mtd: rawnand: marvell: Stop implementing ->select_chip()
> >
>
> Does it mean chip->legacy.select_chip() will phase-out ?

Yes it will.

Thanks,
Miquèl

\
 
 \ /
  Last update: 2019-05-20 14:24    [W:0.112 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site