lkml.org 
[lkml]   [2021]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [v8,6/7] PCI: mediatek-gen3: Add system PM support
    Hi Jianjun,

    > Add suspend_noirq and resume_noirq callback functions to implement
    > PM system suspend hooks for MediaTek Gen3 PCIe controller.

    So, "systems suspend" and "resume" hooks, correct?

    > When system suspend, trigger the PCIe link to L2 state and pull down

    It probably would be "the system suspends".

    [...]
    > When system resum, the PCIe link should be re-established and the
    > related control register values should be restored.

    Similarly to the above: "the system resumes".

    [...]
    > + if (err) {
    > + dev_err(port->dev, "can not enter L2 state\n");
    > + return err;
    > + }

    Most likely you want "cannot" or "can't" in the above error message.

    > + /* Pull down the PERST# pin */
    > + val = readl_relaxed(port->base + PCIE_RST_CTRL_REG);
    > + val |= PCIE_PE_RSTB;
    > + writel_relaxed(val, port->base + PCIE_RST_CTRL_REG);
    > +
    > + dev_dbg(port->dev, "enter L2 state success");

    Just a nitpick. What about "entered L2 states successfully"?

    [...]
    > + if (err) {
    > + dev_err(port->dev, "resume failed\n");
    > + return err;
    > + }

    This error message does not quite convey that the mtk_pcie_startup_port()
    was the function that failed, which is only a part of what you have to do
    to successfully resume.

    > + dev_dbg(port->dev, "resume done\n");

    A nitpick. Probably not needed, as lack of error message would mean
    that the device resumed successfully after being suspended.

    Krzysztof

    \
     
     \ /
      Last update: 2021-02-24 16:11    [W:4.143 / U:0.640 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site