* [PATCH] mtd: nand: mtk: deselect the chip that was selected in resume function
@ 2017-11-01 6:19 ` xiaolei.li-NuS5LvNUpcJWk0Htik3J/w
0 siblings, 0 replies; 6+ messages in thread
From: xiaolei.li @ 2017-11-01 6:19 UTC (permalink / raw)
To: boris.brezillon, computersforpeace
Cc: dwmw2, linux-mtd, linux-mediatek, rogercc.lin, srv_heupstream,
xiaolei.li, bayi.cheng
From: Xiaolei Li <xiaolei.li@mediatek.com>
It is necessary to deselect the chip if it was selected before.
But now we only select chips when resume nand driver.
So, deselect the chip after doing nand reset.
Signed-off-by: Xiaolei Li <xiaolei.li@mediatek.com>
---
drivers/mtd/nand/mtk_nand.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c
index d86a7d1..a8bf61a 100644
--- a/drivers/mtd/nand/mtk_nand.c
+++ b/drivers/mtd/nand/mtk_nand.c
@@ -1557,6 +1557,7 @@ static int mtk_nfc_resume(struct device *dev)
for (i = 0; i < chip->nsels; i++) {
nand->select_chip(mtd, i);
nand->cmdfunc(mtd, NAND_CMD_RESET, -1, -1);
+ nand->select_chip(mtd, -1);
}
}
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] mtd: nand: mtk: deselect the chip that was selected in resume function
@ 2017-11-01 6:19 ` xiaolei.li-NuS5LvNUpcJWk0Htik3J/w
0 siblings, 0 replies; 6+ messages in thread
From: xiaolei.li-NuS5LvNUpcJWk0Htik3J/w @ 2017-11-01 6:19 UTC (permalink / raw)
To: boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
computersforpeace-Re5JQEeQqe8AvxtiuMwx3w
Cc: srv_heupstream-NuS5LvNUpcJWk0Htik3J/w,
bayi.cheng-NuS5LvNUpcJWk0Htik3J/w,
linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
xiaolei.li-NuS5LvNUpcJWk0Htik3J/w, dwmw2-wEGCiKHe2LqWVfeAwA7xHQ,
rogercc.lin-NuS5LvNUpcJWk0Htik3J/w
From: Xiaolei Li <xiaolei.li-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
It is necessary to deselect the chip if it was selected before.
But now we only select chips when resume nand driver.
So, deselect the chip after doing nand reset.
Signed-off-by: Xiaolei Li <xiaolei.li-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
---
drivers/mtd/nand/mtk_nand.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c
index d86a7d1..a8bf61a 100644
--- a/drivers/mtd/nand/mtk_nand.c
+++ b/drivers/mtd/nand/mtk_nand.c
@@ -1557,6 +1557,7 @@ static int mtk_nfc_resume(struct device *dev)
for (i = 0; i < chip->nsels; i++) {
nand->select_chip(mtd, i);
nand->cmdfunc(mtd, NAND_CMD_RESET, -1, -1);
+ nand->select_chip(mtd, -1);
}
}
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] mtd: nand: mtk: deselect the chip that was selected in resume function
@ 2017-11-01 10:00 ` Boris Brezillon
0 siblings, 0 replies; 6+ messages in thread
From: Boris Brezillon @ 2017-11-01 10:00 UTC (permalink / raw)
To: xiaolei.li
Cc: computersforpeace, dwmw2, linux-mtd, linux-mediatek, rogercc.lin,
srv_heupstream, bayi.cheng
Hi Xiaolei,
On Wed, 1 Nov 2017 14:19:57 +0800
<xiaolei.li@mediatek.com> wrote:
> From: Xiaolei Li <xiaolei.li@mediatek.com>
>
> It is necessary to deselect the chip if it was selected before.
> But now we only select chips when resume nand driver.
> So, deselect the chip after doing nand reset.
>
> Signed-off-by: Xiaolei Li <xiaolei.li@mediatek.com>
> ---
> drivers/mtd/nand/mtk_nand.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c
> index d86a7d1..a8bf61a 100644
> --- a/drivers/mtd/nand/mtk_nand.c
> +++ b/drivers/mtd/nand/mtk_nand.c
> @@ -1557,6 +1557,7 @@ static int mtk_nfc_resume(struct device *dev)
> for (i = 0; i < chip->nsels; i++) {
> nand->select_chip(mtd, i);
> nand->cmdfunc(mtd, NAND_CMD_RESET, -1, -1);
> + nand->select_chip(mtd, -1);
Can you use nand_reset() instead of open-coding this sequence?
Thanks,
Boris
> }
> }
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mtd: nand: mtk: deselect the chip that was selected in resume function
@ 2017-11-01 10:00 ` Boris Brezillon
0 siblings, 0 replies; 6+ messages in thread
From: Boris Brezillon @ 2017-11-01 10:00 UTC (permalink / raw)
To: xiaolei.li-NuS5LvNUpcJWk0Htik3J/w
Cc: srv_heupstream-NuS5LvNUpcJWk0Htik3J/w,
bayi.cheng-NuS5LvNUpcJWk0Htik3J/w,
linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
computersforpeace-Re5JQEeQqe8AvxtiuMwx3w,
dwmw2-wEGCiKHe2LqWVfeAwA7xHQ, rogercc.lin-NuS5LvNUpcJWk0Htik3J/w
Hi Xiaolei,
On Wed, 1 Nov 2017 14:19:57 +0800
<xiaolei.li-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> wrote:
> From: Xiaolei Li <xiaolei.li-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
>
> It is necessary to deselect the chip if it was selected before.
> But now we only select chips when resume nand driver.
> So, deselect the chip after doing nand reset.
>
> Signed-off-by: Xiaolei Li <xiaolei.li-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
> ---
> drivers/mtd/nand/mtk_nand.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c
> index d86a7d1..a8bf61a 100644
> --- a/drivers/mtd/nand/mtk_nand.c
> +++ b/drivers/mtd/nand/mtk_nand.c
> @@ -1557,6 +1557,7 @@ static int mtk_nfc_resume(struct device *dev)
> for (i = 0; i < chip->nsels; i++) {
> nand->select_chip(mtd, i);
> nand->cmdfunc(mtd, NAND_CMD_RESET, -1, -1);
> + nand->select_chip(mtd, -1);
Can you use nand_reset() instead of open-coding this sequence?
Thanks,
Boris
> }
> }
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mtd: nand: mtk: deselect the chip that was selected in resume function
2017-11-01 10:00 ` Boris Brezillon
@ 2017-11-01 10:07 ` xiaolei li
-1 siblings, 0 replies; 6+ messages in thread
From: xiaolei li @ 2017-11-01 10:07 UTC (permalink / raw)
To: Boris Brezillon
Cc: computersforpeace, dwmw2, linux-mtd, linux-mediatek, rogercc.lin,
srv_heupstream, bayi.cheng
Hi Boris,
On Wed, 2017-11-01 at 11:00 +0100, Boris Brezillon wrote:
> Hi Xiaolei,
>
> On Wed, 1 Nov 2017 14:19:57 +0800
> <xiaolei.li@mediatek.com> wrote:
>
> > From: Xiaolei Li <xiaolei.li@mediatek.com>
> >
> > It is necessary to deselect the chip if it was selected before.
> > But now we only select chips when resume nand driver.
> > So, deselect the chip after doing nand reset.
> >
> > Signed-off-by: Xiaolei Li <xiaolei.li@mediatek.com>
> > ---
> > drivers/mtd/nand/mtk_nand.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c
> > index d86a7d1..a8bf61a 100644
> > --- a/drivers/mtd/nand/mtk_nand.c
> > +++ b/drivers/mtd/nand/mtk_nand.c
> > @@ -1557,6 +1557,7 @@ static int mtk_nfc_resume(struct device *dev)
> > for (i = 0; i < chip->nsels; i++) {
> > nand->select_chip(mtd, i);
> > nand->cmdfunc(mtd, NAND_CMD_RESET, -1, -1);
> > + nand->select_chip(mtd, -1);
>
> Can you use nand_reset() instead of open-coding this sequence?
>
OK. Got it.
Will update it in PATCH v2.
Thanks,
Xiaolei
> Thanks,
>
> Boris
>
> > }
> > }
> >
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mtd: nand: mtk: deselect the chip that was selected in resume function
@ 2017-11-01 10:07 ` xiaolei li
0 siblings, 0 replies; 6+ messages in thread
From: xiaolei li @ 2017-11-01 10:07 UTC (permalink / raw)
To: Boris Brezillon
Cc: srv_heupstream-NuS5LvNUpcJWk0Htik3J/w,
bayi.cheng-NuS5LvNUpcJWk0Htik3J/w,
linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
computersforpeace-Re5JQEeQqe8AvxtiuMwx3w,
dwmw2-wEGCiKHe2LqWVfeAwA7xHQ, rogercc.lin-NuS5LvNUpcJWk0Htik3J/w
Hi Boris,
On Wed, 2017-11-01 at 11:00 +0100, Boris Brezillon wrote:
> Hi Xiaolei,
>
> On Wed, 1 Nov 2017 14:19:57 +0800
> <xiaolei.li-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> wrote:
>
> > From: Xiaolei Li <xiaolei.li-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
> >
> > It is necessary to deselect the chip if it was selected before.
> > But now we only select chips when resume nand driver.
> > So, deselect the chip after doing nand reset.
> >
> > Signed-off-by: Xiaolei Li <xiaolei.li-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
> > ---
> > drivers/mtd/nand/mtk_nand.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c
> > index d86a7d1..a8bf61a 100644
> > --- a/drivers/mtd/nand/mtk_nand.c
> > +++ b/drivers/mtd/nand/mtk_nand.c
> > @@ -1557,6 +1557,7 @@ static int mtk_nfc_resume(struct device *dev)
> > for (i = 0; i < chip->nsels; i++) {
> > nand->select_chip(mtd, i);
> > nand->cmdfunc(mtd, NAND_CMD_RESET, -1, -1);
> > + nand->select_chip(mtd, -1);
>
> Can you use nand_reset() instead of open-coding this sequence?
>
OK. Got it.
Will update it in PATCH v2.
Thanks,
Xiaolei
> Thanks,
>
> Boris
>
> > }
> > }
> >
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-11-01 10:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-01 6:19 [PATCH] mtd: nand: mtk: deselect the chip that was selected in resume function xiaolei.li
2017-11-01 6:19 ` xiaolei.li-NuS5LvNUpcJWk0Htik3J/w
2017-11-01 10:00 ` Boris Brezillon
2017-11-01 10:00 ` Boris Brezillon
2017-11-01 10:07 ` xiaolei li
2017-11-01 10:07 ` xiaolei li
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.