[PATCH 1/2] mtd: rawnand: gpmi: Fix suspend/resume problem

Esben Haabendal esben at haabendal.dk
Fri Jan 17 11:48:19 PST 2020


Miquel Raynal <miquel.raynal at bootlin.com> writes:

> Hi Esben,
>
> Sascha Hauer <s.hauer at pengutronix.de> wrote on Wed, 15 Jan 2020
> 08:46:22 +0100:
>
>> Hi Esben,
>> 
>> On Thu, Jan 02, 2020 at 02:08:25PM +0100, Esben Haabendal wrote:
>> > On system resume, the gpmi clock must be enabled before accessing gpmi
>> > block.  Without this, resume causes something like
>> > 
>> > [  661.348790] gpmi_reset_block(5cbb0f7e): module reset timeout
>> > [  661.348889] gpmi-nand 1806000.gpmi-nand: Error setting GPMI : -110
>> > [  661.348928] PM: dpm_run_callback(): platform_pm_resume+0x0/0x44 returns -110
>> > [  661.348961] PM: Device 1806000.gpmi-nand failed to resume: error -110
>> > 
>> > Signed-off-by: Esben Haabendal <esben at geanix.com>
>> > ---
>> >  drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 6 ++++++
>> >  1 file changed, 6 insertions(+)
>> > 
>> > diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
>> > index 334fe3130285..7ac8c8b95afc 100644
>> > --- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
>> > +++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
>> > @@ -148,6 +148,10 @@ static int gpmi_init(struct gpmi_nand_data *this)
>> >  	struct resources *r = &this->resources;
>> >  	int ret;
>> >  
>> > +	ret = pm_runtime_get_sync(this->dev);
>> > +	if (ret < 0)
>> > +		return ret;  
>> 
>> This increases the devices usage counter...
>
> I'm dropping the two patches for now, please resend with this fixed and
> the Fixes/Cc:stable tags added.
>
> I'll freeze the PR at the end of the week.

I will send out revised patches tonight.

/Esben



More information about the linux-mtd mailing list