From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
Rob Herring <robh+dt@kernel.org>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Kumar Gala <galak@codeaurora.org>,
Jason Cooper <jason@lakedaemon.net>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
Gregory Clement <gregory.clement@free-electrons.com>,
Nadav Haklai <nadavh@marvell.com>,
Lior Amsalem <alior@marvell.com>, Hanna Hawa <hannah@marvell.com>,
linux-arm-kernel@lists.infradead.org,
Yehuda Yitschak <yehuday@marvell.com>
Subject: Re: [PATCH 2/2] pci: host: new driver for Marvell Armada 7K/8K PCIe controller
Date: Mon, 11 Apr 2016 17:56:51 +0200 [thread overview]
Message-ID: <20160411175651.5f32a990@free-electrons.com> (raw)
In-Reply-To: <20160327140348.GA19498@lunn.ch>
Hello,
On Sun, 27 Mar 2016 16:03:48 +0200, Andrew Lunn wrote:
> > +static irqreturn_t armada8k_pcie_irq_handler(int irq, void *arg)
> > +{
> > + struct pcie_port *pp = arg;
> > + struct armada8k_pcie *pcie = to_armada8k_pcie(pp);
> > + void __iomem *base = pcie->base;
> > + u32 val;
> > +
> > + val = readl(base + PCIE_GLOBAL_INT_CAUSE1_REG);
> > + writel(val, base + PCIE_GLOBAL_INT_CAUSE1_REG);
> > +
> > + return IRQ_HANDLED;
>
> Maybe a comment as to why you are just throwing them away.
I'll have a look into this.
> > +static int armada8k_pcie_probe(struct platform_device *pdev)
> > +{
> > + struct armada8k_pcie *pcie;
> > + struct pcie_port *pp;
> > + struct device *dev = &pdev->dev;
> > + struct resource *base;
> > + int ret;
> > +
> > + pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL);
> > + if (!pcie)
> > + return -ENOMEM;
> > +
> > + pcie->main_clk = devm_clk_get(dev, "main");
> > + if (!IS_ERR(pcie->main_clk))
> > + clk_prepare_enable(pcie->main_clk);
> > +
> > + pcie->lane_clk = devm_clk_get(dev, "port");
> > + if (!IS_ERR(pcie->lane_clk))
> > + clk_prepare_enable(pcie->lane_clk);
>
> Any need to handle -EPRODE_DEFERED here?
Is this needed? The clocks are registered in of_clk_init(), i.e at
time_init() time. This is way before the device drivers get probed, no?
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
WARNING: multiple messages have this Message-ID (diff)
From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] pci: host: new driver for Marvell Armada 7K/8K PCIe controller
Date: Mon, 11 Apr 2016 17:56:51 +0200 [thread overview]
Message-ID: <20160411175651.5f32a990@free-electrons.com> (raw)
In-Reply-To: <20160327140348.GA19498@lunn.ch>
Hello,
On Sun, 27 Mar 2016 16:03:48 +0200, Andrew Lunn wrote:
> > +static irqreturn_t armada8k_pcie_irq_handler(int irq, void *arg)
> > +{
> > + struct pcie_port *pp = arg;
> > + struct armada8k_pcie *pcie = to_armada8k_pcie(pp);
> > + void __iomem *base = pcie->base;
> > + u32 val;
> > +
> > + val = readl(base + PCIE_GLOBAL_INT_CAUSE1_REG);
> > + writel(val, base + PCIE_GLOBAL_INT_CAUSE1_REG);
> > +
> > + return IRQ_HANDLED;
>
> Maybe a comment as to why you are just throwing them away.
I'll have a look into this.
> > +static int armada8k_pcie_probe(struct platform_device *pdev)
> > +{
> > + struct armada8k_pcie *pcie;
> > + struct pcie_port *pp;
> > + struct device *dev = &pdev->dev;
> > + struct resource *base;
> > + int ret;
> > +
> > + pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL);
> > + if (!pcie)
> > + return -ENOMEM;
> > +
> > + pcie->main_clk = devm_clk_get(dev, "main");
> > + if (!IS_ERR(pcie->main_clk))
> > + clk_prepare_enable(pcie->main_clk);
> > +
> > + pcie->lane_clk = devm_clk_get(dev, "port");
> > + if (!IS_ERR(pcie->lane_clk))
> > + clk_prepare_enable(pcie->lane_clk);
>
> Any need to handle -EPRODE_DEFERED here?
Is this needed? The clocks are registered in of_clk_init(), i.e at
time_init() time. This is way before the device drivers get probed, no?
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-04-11 15:57 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-27 9:30 [PATCH 0/2] pci: host: new driver for Marvell Armada 7K/8K PCIe controller Thomas Petazzoni
2016-03-27 9:30 ` Thomas Petazzoni
2016-03-27 9:30 ` Thomas Petazzoni
2016-03-27 9:30 ` [PATCH 1/2] dt-bindings: pci: add DT binding " Thomas Petazzoni
2016-03-27 9:30 ` Thomas Petazzoni
2016-03-28 20:46 ` Rob Herring
2016-03-28 20:46 ` Rob Herring
2016-03-28 21:18 ` Arnd Bergmann
2016-03-28 21:18 ` Arnd Bergmann
2016-04-14 13:33 ` Thomas Petazzoni
2016-04-14 13:33 ` Thomas Petazzoni
2016-03-27 9:30 ` [PATCH 2/2] pci: host: new driver " Thomas Petazzoni
2016-03-27 9:30 ` Thomas Petazzoni
2016-03-27 14:03 ` Andrew Lunn
2016-03-27 14:03 ` Andrew Lunn
2016-04-11 15:56 ` Thomas Petazzoni [this message]
2016-04-11 15:56 ` Thomas Petazzoni
2016-04-14 14:25 ` Thomas Petazzoni
2016-04-14 14:25 ` Thomas Petazzoni
2016-03-28 21:21 ` Arnd Bergmann
2016-03-28 21:21 ` Arnd Bergmann
2016-04-14 14:26 ` Thomas Petazzoni
2016-04-14 14:26 ` Thomas Petazzoni
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=20160411175651.5f32a990@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=alior@marvell.com \
--cc=andrew@lunn.ch \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=gregory.clement@free-electrons.com \
--cc=hannah@marvell.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=nadavh@marvell.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=yehuday@marvell.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 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.