[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AM0PR04MB421185C8A83EE9549052A91180D00@AM0PR04MB4211.eurprd04.prod.outlook.com>
Date: Tue, 27 Nov 2018 08:07:43 +0000
From: Aisheng DONG <aisheng.dong@....com>
To: Marc Kleine-Budde <mkl@...gutronix.de>,
Joakim Zhang <qiangqing.zhang@....com>,
"wg@...ndegger.com" <wg@...ndegger.com>,
"davem@...emloft.net" <davem@...emloft.net>
CC: "linux-can@...r.kernel.org" <linux-can@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
dl-linux-imx <linux-imx@....com>
Subject: RE: [PATCH] can: flexcan: Implement CAN Runtime PM
> -----Original Message-----
> From: Marc Kleine-Budde [mailto:mkl@...gutronix.de]
> Sent: Tuesday, November 27, 2018 3:52 PM
> To: Joakim Zhang <qiangqing.zhang@....com>; wg@...ndegger.com;
> davem@...emloft.net
> Cc: linux-can@...r.kernel.org; netdev@...r.kernel.org;
> linux-kernel@...r.kernel.org; dl-linux-imx <linux-imx@....com>; Aisheng
> DONG <aisheng.dong@....com>
> Subject: Re: [PATCH] can: flexcan: Implement CAN Runtime PM
>
> On 11/27/18 8:44 AM, Joakim Zhang wrote:
> >>> Flexcan will be disabled during suspend if no wakeup function
> >>> required and enabled after resume accordingly. During this period,
> >>> we could explicitly disable clocks.
> >>>
> >>> Implement Runtime PM which will:
> >>> 1) Keep device in suspend state (clocks disabled) if it's not
> >>> openned
> >>> 2) Make Power Domain framework be able to shutdown the corresponding
> >>> power domain of this device.
> >>
> >> Without CONFIG_PM the device fails to probe:
> >>
> >>> [ 214.420606] flexcan 2090000.flexcan: 2090000.flexcan supply
> >>> xceiver not found, using dummy regulator [ 214.445952] flexcan
> >>> 2090000.flexcan: Linked as a consumer to regulator.0 [ 214.453448]
> >>> flexcan 2090000.flexcan: registering netdev failed [ 214.459666]
> >>> flexcan 2090000.flexcan: Dropping the link to regulator.0 [
> >>> 214.472066] flexcan: probe of 2090000.flexcan failed with error -110
>
> > I would sent V2 rebased on patch "can: flexcan: add self wakeup
> > support", and runtime pm works normally on MX6SX-SDB and MX7D-SDB.
> > So, could you tell me which board you tested on that causes the device
> > probe failed?
>
> I tested on an imx6dl riotboard
> (https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Felixir.
> bootlin.com%2Flinux%2Flatest%2Fsource%2Farch%2Farm%2Fboot%2Fdts%2Fi
> mx6dl-riotboard.dts&data=02%7C01%7Caisheng.dong%40nxp.com%7C8
> 4cfd3f3a08b4c7953fd08d6543d42c1%7C686ea1d3bc2b4c6fa92cd99c5c3016
> 35%7C0%7C0%7C636789019420569534&sdata=rugKpmVaNn0ajTdctyi%
> 2F%2Bnwr%2FqqIBcikAP7eXLp6fcA%3D&reserved=0
> + patches to enable CAN1) with an external PHY.
>
> > And that CONFIG_PM has set in imx_v6_v7_defconfig which config file I
> used.
>
> I disabled CONFIG_PM on purpose.
Joakim,
You need run the same test as Marc.
I guess It might because without CONFIG_PM, Runtime PM API
Simply return positive but the clock may still not enabled, thus cause
a CAN enable timeout.
You can check it.
Regards
Dong Aisheng
>
> Marc
>
> --
> Pengutronix e.K. | Marc Kleine-Budde |
> Industrial Linux Solutions | Phone: +49-231-2826-924 |
> Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
> Amtsgericht Hildesheim, HRA 2686 |
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
> pengutronix.de&data=02%7C01%7Caisheng.dong%40nxp.com%7C84cfd3
> f3a08b4c7953fd08d6543d42c1%7C686ea1d3bc2b4c6fa92cd99c5c301635%7
> C0%7C0%7C636789019420569534&sdata=Us6cO9QfYkw%2B6Nhj68zLr
> wrNxUCRjcC0WDdmr9MOzHM%3D&reserved=0 |
Powered by blists - more mailing lists