From: Felipe Balbi <balbi@kernel.org>
To: Peter Chen <peter.chen@nxp.com>, mathias.nyman@intel.com
Cc: linux-usb@vger.kernel.org, linux-imx@nxp.com, pawell@cadence.com,
rogerq@ti.com, gregkh@linuxfoundation.org, jun.li@nxp.com,
Peter Chen <peter.chen@nxp.com>
Subject: Re: [PATCH 2/8] usb: cdns3: imx: add glue layer runtime pm implementation
Date: Mon, 31 Aug 2020 13:04:22 +0300 [thread overview]
Message-ID: <87pn779lnd.fsf@kernel.org> (raw)
In-Reply-To: <20200522103256.16322-3-peter.chen@nxp.com>
[-- Attachment #1: Type: text/plain, Size: 1882 bytes --]
Peter Chen <peter.chen@nxp.com> writes:
> Add imx glue layer runtime pm implementation, and the runtime
> pm is default off.
>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
> drivers/usb/cdns3/cdns3-imx.c | 179 +++++++++++++++++++++++++++++++++-
> 1 file changed, 177 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/cdns3/cdns3-imx.c b/drivers/usb/cdns3/cdns3-imx.c
> index aba988e71958..9d247de8e7eb 100644
> --- a/drivers/usb/cdns3/cdns3-imx.c
> +++ b/drivers/usb/cdns3/cdns3-imx.c
> @@ -15,6 +15,8 @@
> #include <linux/io.h>
> #include <linux/of_platform.h>
> #include <linux/iopoll.h>
> +#include <linux/pm_runtime.h>
> +#include "core.h"
>
> #define USB3_CORE_CTRL1 0x00
> #define USB3_CORE_CTRL2 0x04
> @@ -66,11 +68,30 @@
> #define CLK_VALID_COMPARE_BITS (0xf << 28)
> #define PHY_REFCLK_REQ (1 << 0)
>
> +/* OTG registers definition */
> +#define OTGSTS 0x4
looks like a blank line here would (mildly) aid readability.
> +/* OTGSTS */
> +#define OTG_NRDY (1 << 11)
> +
> +/* xHCI registers definition */
> +#define XECP_PM_PMCSR 0x8018
> +#define XECP_AUX_CTRL_REG1 0x8120
> +
> +/* Register bits definition */
> +/* XECP_AUX_CTRL_REG1 */
> +#define CFG_RXDET_P3_EN (1 << 15)
> +
> +/* XECP_PM_PMCSR */
> +#define PS_MASK (3 << 0)
> +#define PS_D0 0
> +#define PS_D1 (1 << 0)
> +
> struct cdns_imx {
> struct device *dev;
> void __iomem *noncore;
> struct clk_bulk_data *clks;
> int num_clks;
> + struct platform_device *cdns3_pdev;
do you really need the entire platform_device? Why don't you use
container_of to get the platform_device from the device pointer? We
already have a generic to_platform_device(), right?
Or are those referring to different devices?
Also, it seems like that pointer isn't used, at least not in $subject
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 857 bytes --]
next prev parent reply other threads:[~2020-08-31 10:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-22 10:32 [PATCH 0/8] usb: cdns3: add runtime PM support Peter Chen
2020-05-22 10:32 ` [PATCH 1/8] " Peter Chen
2020-08-31 10:01 ` Felipe Balbi
2020-08-31 10:59 ` Peter Chen
2020-08-31 11:27 ` Felipe Balbi
2020-05-22 10:32 ` [PATCH 2/8] usb: cdns3: imx: add glue layer runtime pm implementation Peter Chen
2020-08-31 10:04 ` Felipe Balbi [this message]
2020-05-22 10:32 ` [PATCH 3/8] usb: host: xhci-plat: add platform data support Peter Chen
2020-05-22 10:32 ` [PATCH 4/8] usb: host: xhci-plat: add .suspend_quirk for struct xhci_plat_priv Peter Chen
2020-08-31 10:06 ` Felipe Balbi
2020-08-31 11:00 ` Peter Chen
2020-05-22 10:32 ` [PATCH 5/8] usb: host: xhci-plat: delete the unnecessary code Peter Chen
2020-05-22 10:32 ` [PATCH 6/8] usb: host: xhci-plat: add priv flag for skip_phy_initialization Peter Chen
2020-05-22 10:32 ` [PATCH 7/8] usb: cdns3: host: add .suspend_quirk for xhci-plat.c Peter Chen
2020-05-22 10:32 ` [PATCH 8/8] usb: cdns3: host: add xhci_plat_priv's flag skip_phy_initialization Peter Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pn779lnd.fsf@kernel.org \
--to=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jun.li@nxp.com \
--cc=linux-imx@nxp.com \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=pawell@cadence.com \
--cc=peter.chen@nxp.com \
--cc=rogerq@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).