From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Jay Agarwal <jagarwal-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org,
ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org,
hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
pgaikwad-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
jtukkinen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
kthota-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH 2/4] ARM: tegra: pcie: Add tegra3 support
Date: Wed, 08 May 2013 10:53:53 -0600 [thread overview]
Message-ID: <518A8321.6020401@wwwdotorg.org> (raw)
In-Reply-To: <1368010660-31465-2-git-send-email-jagarwal-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
On 05/08/2013 04:57 AM, Jay Agarwal wrote:
> - Enable PCIe root port 2 for Cardhu
> - Make private data structure for each SoC
> - Add required Tegra30 clocks and regulators
> - Add Tegra30 specific code in enable controller
> - Patch is based on remotes/gitorious_thierryreding_linux/tegra/next
> - and should be applied on top of this.
Again, those two lines would go below the ---. And since that's all one
bullet point, why is the second line indented with a "-"?
> diff --git a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
> pcie-controller {
> vdd-supply = <&pci_vdd_reg>;
> pex-clk-supply = <&pci_clk_reg>;
> + avdd-supply = <&ldo2_reg>; /* required for tegra30 */
I would simply drop that comment, and perhaps even the whole line; this
is just an example after all, and doesn't need to cover the latest SoC.
Equally, the example SoC DTSI section is an example for Tegra20, so
making the example board DTS section contain a Tegra30 example would be
inconsistent. Tegra30 should be capitalized; it's a name.
Why is there no change to the "Required Properties" section of this
document? It should list the set of clocks and regulators that are
required. That section is the definitive reference, whereas the example
is just than; an example.
> diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
> +/* used to differentiate tegra chips code */
> +struct tegra_pcie_soc_data {
> + unsigned int num_max_ports;
> + unsigned int pads_pll_ctl;
> + unsigned int tx_ref_sel;
Perhaps those 2 values should be u32 to match the readl/writel
parameters? They're HW register values after all.
> @@ -220,6 +240,7 @@ struct tegra_pcie {
> struct clk *afi_clk;
> struct clk *pcie_xclk;
> struct clk *pll_e;
> + struct clk *cml0_clk;
I think this clock should be called "cml" not "cml0". The clocks within
the driver and DT binding should be named from the perspective of the
PCI HW unit, and not from the perspective of the system that surrounds
it and provides those clocks.
The only exception would be if some future Tegra version might end up
with multiple cml clocks to a single PCIe unit, and we need to number
them to identify them. However, that seems quite unlikely since the PCIe
unit already supports multiple ports, and multiple port support would be
about the only reason that I could think of to have multiple clock
instances.
I think I mentioned this when I reviewed the previous version of the
patch, but you didn't respond to the suggestion.
> @@ -749,6 +778,11 @@ static int tegra_pcie_enable_controller(struct tegra_pcie *pcie)
> struct tegra_pcie_port *port;
> unsigned int timeout;
> unsigned long value;
> + struct tegra_pcie_soc_data *soc = pcie->soc_data;
> +
> + /* power down to PCIe slot clock bias pad */
> + if (soc->pex_bias_ctrl)
> + afi_writel(pcie, 0, AFI_PEXBIAS_CTRL_0);
Renaming pex_bias_ctrl to has_pex_bias_ctrl might make it more obvious
what that variable means.
A similar comment might apply to soc->pex_clkreq_en and
soc->intr_prsnt_sense.
next prev parent reply other threads:[~2013-05-08 16:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-08 10:57 [PATCH 1/4] ARM: tegra30: clocks: Fix pciex clock registration Jay Agarwal
2013-05-08 10:57 ` [PATCH 2/4] ARM: tegra: pcie: Add tegra3 support Jay Agarwal
[not found] ` <1368010660-31465-2-git-send-email-jagarwal-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-08 16:53 ` Stephen Warren [this message]
2013-05-08 10:57 ` [PATCH 3/4] ARM: dts: tegra: Correct PCIe entry Jay Agarwal
2013-05-08 16:56 ` Stephen Warren
[not found] ` <1368010660-31465-1-git-send-email-jagarwal-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-08 10:57 ` [PATCH 4/4] ARM: tegra: pcie: Enable PCIe controller on Cardhu Jay Agarwal
[not found] ` <1368010660-31465-4-git-send-email-jagarwal-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-08 17:04 ` Stephen Warren
[not found] ` <518A8596.7070702-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-05-08 17:53 ` Stephen Warren
2013-05-15 17:28 ` Jay Agarwal
2013-05-17 16:51 ` Jay Agarwal
2013-05-17 19:48 ` Stephen Warren
2013-05-29 10:10 ` Jay Agarwal
2013-05-29 15:35 ` Stephen Warren
2013-05-30 17:37 ` Jay Agarwal
[not found] ` <C79B248886DD134989C8FF6B096A91AB91B616BEA6-kdsAE/FnitNDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2013-05-30 18:04 ` Stephen Warren
[not found] ` <C79B248886DD134989C8FF6B096A91AB91B616BEAD@BGMAIL01.nvidia.com>
[not found] ` <51A8DE3A.6080503@wwwdotorg.org>
[not found] ` <C79B248886DD134989C8FF6B096A91AB91B616BEB3@BGMAIL01.nvidia.com>
[not found] ` <C79B248886DD134989C8FF6B096A91AB91B616BEB4@BGMAIL01.nvidia.com>
[not found] ` <C79B248886DD134989C8FF6B096A91AB91B616BEB5@BGMAIL01.nvidia.com>
[not found] ` <C79B248886DD134989C8FF6B096A91AB91B616BEBE@BGMAIL01.nvidia.com>
[not found] ` <C79B248886DD134989C8FF6B096A91AB91B616BEC1@BGMAIL01.nvidia.com>
[not found] ` <C79B248886DD134989C8FF6B096A91AB91B616BEC1-kdsAE/FnitNDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2013-06-04 17:17 ` FW: " Jay Agarwal
2013-05-08 16:36 ` [PATCH 1/4] ARM: tegra30: clocks: Fix pciex clock registration Stephen Warren
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=518A8321.6020401@wwwdotorg.org \
--to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
--cc=bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=jagarwal-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=jtukkinen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=kthota-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
--cc=pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=pgaikwad-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org \
/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).