From: Kishon Vijay Abraham I <kishon@ti.com>
To: Jingoo Han <jg1.han@samsung.com>
Cc: devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
linux-pci@vger.kernel.org, bhelgaas@google.com,
mohit.kumar@st.com, robh+dt@kernel.org, pawel.moll@arm.com,
mark.rutland@arm.com, ijc+devicetree@hellion.org.uk,
galak@codeaurora.org, rob@landley.net, linux@arm.linux.org.uk,
tony@atomide.com, rnayak@ti.com, paul@pwsan.com
Subject: Re: [RFC PATCH 02/12] pci: host: pcie-dra7xx: add support for pcie-dra7xx controller
Date: Thu, 27 Mar 2014 10:56:02 +0530 [thread overview]
Message-ID: <5333B66A.8020804@ti.com> (raw)
In-Reply-To: <000c01cf496e$bf2c85b0$3d859110$%han@samsung.com>
On Thursday 27 March 2014 09:13 AM, Jingoo Han wrote:
> On Wednesday, March 26, 2014 10:58 PM, Kishon Vijay Abraham I wrote:
>>
>> Added support for pcie controller in dra7xx. This driver re-uses
>> the designware core code that is already present in kernel.
>>
>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>
> Hi Kishon,
> Long time no see! I added trivial comments.
yeah, these were in my TODO for a long time. Sorry for it though.
>
>> ---
>> Documentation/devicetree/bindings/pci/ti-pci.txt | 35 ++
>> drivers/pci/host/Kconfig | 10 +
>> drivers/pci/host/Makefile | 1 +
>> drivers/pci/host/pcie-dra7xx.c | 411 ++++++++++++++++++++++
>
> How about using 'pci-' prefix?
> As it was discussed earlier, 'pci-' prefix is more proper.
>
>> 4 files changed, 457 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/pci/ti-pci.txt
>> create mode 100644 drivers/pci/host/pcie-dra7xx.c
>
> [.....]
>
>> --- /dev/null
>> +++ b/drivers/pci/host/pcie-dra7xx.c
>
> [.....]
>
>> +#define PCIECTRL_TI_CONF_IRQSTATUS_MAIN 0x0024
>> +#define PCIECTRL_TI_CONF_IRQENABLE_SET_MAIN 0x0028
>
> I don't think that it's good to add vendor names such as TI
> to SFR names.
>
> How about adding 'DRA7XX' or just removing 'TI'?
>
> 1. PCIECTRL_DRA7XX_CONF_IRQSTATUS_MAIN
ok.
>
> 2. PCIECTRL_CONF_IRQSTATUS_MAIN
>
> [.....]
>
>> +enum dra7xx_pcie_device_type {
>> + DRA7XX_PCIE_UNKNOWN_TYPE,
>> + DRA7XX_PCIE_EP_TYPE,
>> + DRA7XX_PCIE_LEG_EP_TYPE,
>> + DRA7XX_PCIE_RC_TYPE,
>> +};
>
> This driver can support only RC mode, so, these enum can be removed.
>
> [.....]
>
>> + of_property_read_u32(node, "ti,device-type", &device_type);
>> + switch (device_type) {
>> + case DRA7XX_PCIE_RC_TYPE:
>> + dra7xx_pcie_writel(dra7xx->base,
>> + PCIECTRL_TI_CONF_DEVICE_TYPE, DEVICE_TYPE_RC);
>> + break;
>> + case DRA7XX_PCIE_EP_TYPE:
>> + dra7xx_pcie_writel(dra7xx->base,
>> + PCIECTRL_TI_CONF_DEVICE_TYPE, DEVICE_TYPE_EP);
>> + break;
>> + case DRA7XX_PCIE_LEG_EP_TYPE:
>> + dra7xx_pcie_writel(dra7xx->base,
>> + PCIECTRL_TI_CONF_DEVICE_TYPE, DEVICE_TYPE_LEG_EP);
>> + break;
>> + default:
>> + dev_dbg(dev, "UNKNOWN device type %d\n", device_type);
>> + }
>
> Thus, this switch can be removed.
sure.
Thanks
Kishon
WARNING: multiple messages have this Message-ID (diff)
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Jingoo Han <jg1.han@samsung.com>
Cc: <devicetree@vger.kernel.org>, <linux-doc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-omap@vger.kernel.org>, <linux-pci@vger.kernel.org>,
<bhelgaas@google.com>, <mohit.kumar@st.com>, <robh+dt@kernel.org>,
<pawel.moll@arm.com>, <mark.rutland@arm.com>,
<ijc+devicetree@hellion.org.uk>, <galak@codeaurora.org>,
<rob@landley.net>, <linux@arm.linux.org.uk>, <tony@atomide.com>,
<rnayak@ti.com>, <paul@pwsan.com>
Subject: Re: [RFC PATCH 02/12] pci: host: pcie-dra7xx: add support for pcie-dra7xx controller
Date: Thu, 27 Mar 2014 10:56:02 +0530 [thread overview]
Message-ID: <5333B66A.8020804@ti.com> (raw)
In-Reply-To: <000c01cf496e$bf2c85b0$3d859110$%han@samsung.com>
On Thursday 27 March 2014 09:13 AM, Jingoo Han wrote:
> On Wednesday, March 26, 2014 10:58 PM, Kishon Vijay Abraham I wrote:
>>
>> Added support for pcie controller in dra7xx. This driver re-uses
>> the designware core code that is already present in kernel.
>>
>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>
> Hi Kishon,
> Long time no see! I added trivial comments.
yeah, these were in my TODO for a long time. Sorry for it though.
>
>> ---
>> Documentation/devicetree/bindings/pci/ti-pci.txt | 35 ++
>> drivers/pci/host/Kconfig | 10 +
>> drivers/pci/host/Makefile | 1 +
>> drivers/pci/host/pcie-dra7xx.c | 411 ++++++++++++++++++++++
>
> How about using 'pci-' prefix?
> As it was discussed earlier, 'pci-' prefix is more proper.
>
>> 4 files changed, 457 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/pci/ti-pci.txt
>> create mode 100644 drivers/pci/host/pcie-dra7xx.c
>
> [.....]
>
>> --- /dev/null
>> +++ b/drivers/pci/host/pcie-dra7xx.c
>
> [.....]
>
>> +#define PCIECTRL_TI_CONF_IRQSTATUS_MAIN 0x0024
>> +#define PCIECTRL_TI_CONF_IRQENABLE_SET_MAIN 0x0028
>
> I don't think that it's good to add vendor names such as TI
> to SFR names.
>
> How about adding 'DRA7XX' or just removing 'TI'?
>
> 1. PCIECTRL_DRA7XX_CONF_IRQSTATUS_MAIN
ok.
>
> 2. PCIECTRL_CONF_IRQSTATUS_MAIN
>
> [.....]
>
>> +enum dra7xx_pcie_device_type {
>> + DRA7XX_PCIE_UNKNOWN_TYPE,
>> + DRA7XX_PCIE_EP_TYPE,
>> + DRA7XX_PCIE_LEG_EP_TYPE,
>> + DRA7XX_PCIE_RC_TYPE,
>> +};
>
> This driver can support only RC mode, so, these enum can be removed.
>
> [.....]
>
>> + of_property_read_u32(node, "ti,device-type", &device_type);
>> + switch (device_type) {
>> + case DRA7XX_PCIE_RC_TYPE:
>> + dra7xx_pcie_writel(dra7xx->base,
>> + PCIECTRL_TI_CONF_DEVICE_TYPE, DEVICE_TYPE_RC);
>> + break;
>> + case DRA7XX_PCIE_EP_TYPE:
>> + dra7xx_pcie_writel(dra7xx->base,
>> + PCIECTRL_TI_CONF_DEVICE_TYPE, DEVICE_TYPE_EP);
>> + break;
>> + case DRA7XX_PCIE_LEG_EP_TYPE:
>> + dra7xx_pcie_writel(dra7xx->base,
>> + PCIECTRL_TI_CONF_DEVICE_TYPE, DEVICE_TYPE_LEG_EP);
>> + break;
>> + default:
>> + dev_dbg(dev, "UNKNOWN device type %d\n", device_type);
>> + }
>
> Thus, this switch can be removed.
sure.
Thanks
Kishon
WARNING: multiple messages have this Message-ID (diff)
From: kishon@ti.com (Kishon Vijay Abraham I)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 02/12] pci: host: pcie-dra7xx: add support for pcie-dra7xx controller
Date: Thu, 27 Mar 2014 10:56:02 +0530 [thread overview]
Message-ID: <5333B66A.8020804@ti.com> (raw)
In-Reply-To: <000c01cf496e$bf2c85b0$3d859110$%han@samsung.com>
On Thursday 27 March 2014 09:13 AM, Jingoo Han wrote:
> On Wednesday, March 26, 2014 10:58 PM, Kishon Vijay Abraham I wrote:
>>
>> Added support for pcie controller in dra7xx. This driver re-uses
>> the designware core code that is already present in kernel.
>>
>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>
> Hi Kishon,
> Long time no see! I added trivial comments.
yeah, these were in my TODO for a long time. Sorry for it though.
>
>> ---
>> Documentation/devicetree/bindings/pci/ti-pci.txt | 35 ++
>> drivers/pci/host/Kconfig | 10 +
>> drivers/pci/host/Makefile | 1 +
>> drivers/pci/host/pcie-dra7xx.c | 411 ++++++++++++++++++++++
>
> How about using 'pci-' prefix?
> As it was discussed earlier, 'pci-' prefix is more proper.
>
>> 4 files changed, 457 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/pci/ti-pci.txt
>> create mode 100644 drivers/pci/host/pcie-dra7xx.c
>
> [.....]
>
>> --- /dev/null
>> +++ b/drivers/pci/host/pcie-dra7xx.c
>
> [.....]
>
>> +#define PCIECTRL_TI_CONF_IRQSTATUS_MAIN 0x0024
>> +#define PCIECTRL_TI_CONF_IRQENABLE_SET_MAIN 0x0028
>
> I don't think that it's good to add vendor names such as TI
> to SFR names.
>
> How about adding 'DRA7XX' or just removing 'TI'?
>
> 1. PCIECTRL_DRA7XX_CONF_IRQSTATUS_MAIN
ok.
>
> 2. PCIECTRL_CONF_IRQSTATUS_MAIN
>
> [.....]
>
>> +enum dra7xx_pcie_device_type {
>> + DRA7XX_PCIE_UNKNOWN_TYPE,
>> + DRA7XX_PCIE_EP_TYPE,
>> + DRA7XX_PCIE_LEG_EP_TYPE,
>> + DRA7XX_PCIE_RC_TYPE,
>> +};
>
> This driver can support only RC mode, so, these enum can be removed.
>
> [.....]
>
>> + of_property_read_u32(node, "ti,device-type", &device_type);
>> + switch (device_type) {
>> + case DRA7XX_PCIE_RC_TYPE:
>> + dra7xx_pcie_writel(dra7xx->base,
>> + PCIECTRL_TI_CONF_DEVICE_TYPE, DEVICE_TYPE_RC);
>> + break;
>> + case DRA7XX_PCIE_EP_TYPE:
>> + dra7xx_pcie_writel(dra7xx->base,
>> + PCIECTRL_TI_CONF_DEVICE_TYPE, DEVICE_TYPE_EP);
>> + break;
>> + case DRA7XX_PCIE_LEG_EP_TYPE:
>> + dra7xx_pcie_writel(dra7xx->base,
>> + PCIECTRL_TI_CONF_DEVICE_TYPE, DEVICE_TYPE_LEG_EP);
>> + break;
>> + default:
>> + dev_dbg(dev, "UNKNOWN device type %d\n", device_type);
>> + }
>
> Thus, this switch can be removed.
sure.
Thanks
Kishon
next prev parent reply other threads:[~2014-03-27 5:26 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-26 13:57 [RFC PATCH 00/12] PCIe support for DRA7xx Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` [RFC PATCH 01/12] phy: phy-omap-pipe3: Add support for PCIe PHY Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` [RFC PATCH 02/12] pci: host: pcie-dra7xx: add support for pcie-dra7xx controller Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 14:45 ` Rob Herring
2014-03-26 14:45 ` Rob Herring
2014-03-26 15:19 ` Kishon Vijay Abraham I
2014-03-26 15:19 ` Kishon Vijay Abraham I
2014-03-26 15:19 ` Kishon Vijay Abraham I
2014-03-27 3:43 ` Jingoo Han
2014-03-27 3:43 ` Jingoo Han
2014-03-27 5:26 ` Kishon Vijay Abraham I [this message]
2014-03-27 5:26 ` Kishon Vijay Abraham I
2014-03-27 5:26 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` [RFC PATCH 03/12] pci: host: pcie-designware: Use *base-mask* for configuring the iATU Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-27 11:45 ` Jingoo Han
2014-03-27 11:45 ` Jingoo Han
2014-03-27 11:53 ` Mohit KUMAR DCG
2014-03-27 11:53 ` Mohit KUMAR DCG
2014-03-27 11:53 ` Mohit KUMAR DCG
[not found] ` <000001cf49b1$fcd8a810$f689f830$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-27 17:32 ` Marek Vasut
2014-03-27 17:32 ` Marek Vasut
2014-03-27 17:32 ` Marek Vasut
2014-03-26 13:57 ` [RFC PATCH 04/12] ARM: dts: DRA7: Add divider table to optfclk_pciephy_div clock Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` [RFC PATCH 05/12] ARM: dts: DRA7: Change the parent of apll_pcie_in_clk_mux to dpll_pcie_ref_m2ldo_ck Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` [RFC PATCH 06/12] arm: dra7xx: Add hwmod data for pcie1 phy and pcie2 phy Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` [RFC PATCH 07/12] arm: dra7xx: Add hwmod data for pcie1 and pcie2 subsystems Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` [RFC PATCH 08/12] ARM: dts: dra7xx-clocks: Add missing 32khz clocks used for PHY Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` [RFC PATCH 09/12] ARM: dts: dra7: Add dt data for PCIe PHY control module Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` [RFC PATCH 10/12] ARM: dts: dra7: Add dt data for PCIe PHY Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` [RFC PATCH 11/12] ARM: dts: dra7: Add dt data for PCIe controller Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` [RFC PATCH 12/12] ARM: OMAP: Enable PCI for DRA7 Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
2014-03-26 13:57 ` Kishon Vijay Abraham I
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=5333B66A.8020804@ti.com \
--to=kishon@ti.com \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jg1.han@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=mohit.kumar@st.com \
--cc=paul@pwsan.com \
--cc=pawel.moll@arm.com \
--cc=rnayak@ti.com \
--cc=rob@landley.net \
--cc=robh+dt@kernel.org \
--cc=tony@atomide.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.