From: Murali Karicheri <m-karicheri2@ti.com>
To: Murali Karicheri <m-karicheri2@ti.com>
Cc: <robh+dt@kernel.org>, <pawel.moll@arm.com>,
<mark.rutland@arm.com>, <ijc+devicetree@hellion.org.uk>,
<galak@codeaurora.org>, <bhelgaas@google.com>, <arnd@arndb.de>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-pci@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3 1/2] PCI: keystone: remove handle of PCI mode configuration
Date: Thu, 11 Sep 2014 15:09:10 -0400 [thread overview]
Message-ID: <5411F356.2090405@ti.com> (raw)
In-Reply-To: <1410369159-11564-1-git-send-email-m-karicheri2@ti.com>
On 09/10/2014 01:12 PM, Murali Karicheri wrote:
> Keystone PCI hardware supports both RC and EP modes and devcfg
> register has bits to boot strap the device to either of these modes.
> It seems proper to add this functionality to the boot loader rather
> than in the driver as device will be operating in either mode, not
> both any time. Currently the driver supports only RC mode and hence
> register configuration in the driver is not needed and driver can
> assume this is a RC hardware.
>
> Also update the DT documentation accordingly.
>
> Signed-off-by: Murali Karicheri<m-karicheri2@ti.com>
> Acked-by: Arnd Bergmann<arnd@arndb.de>
> ---
> v3 - No change
> v2 - Added this separate patch to remove pci mode handling
> .../devicetree/bindings/pci/pci-keystone.txt | 4 +---
> drivers/pci/host/pci-keystone.c | 21 ++------------------
> 2 files changed, 3 insertions(+), 22 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/pci/pci-keystone.txt b/Documentation/devicetree/bindings/pci/pci-keystone.txt
> index ceb3e24..bedacf0 100644
> --- a/Documentation/devicetree/bindings/pci/pci-keystone.txt
> +++ b/Documentation/devicetree/bindings/pci/pci-keystone.txt
> @@ -13,9 +13,7 @@ Required Properties:-
>
> compatibility: "ti,keystone-pcie"
> reg: index 1 is the base address and length of DW application registers.
> - index 2 is the base address and length of PCI mode configuration
> - register.
> - index 3 is the base address and length of PCI device ID register.
> + index 2 is the base address and length of PCI device ID register.
>
> pcie_msi_intc : Interrupt controller device node for MSI IRQ chip
> interrupt-cells: should be set to 1
> diff --git a/drivers/pci/host/pci-keystone.c b/drivers/pci/host/pci-keystone.c
> index ff8ed25..f1119eb 100644
> --- a/drivers/pci/host/pci-keystone.c
> +++ b/drivers/pci/host/pci-keystone.c
> @@ -35,10 +35,6 @@
> #define MAX_MSI_HOST_IRQS 8
> #define MAX_LEGACY_HOST_IRQS 4
>
> -/* RC mode settings masks */
> -#define PCIE_RC_MODE BIT(2)
> -#define PCIE_MODE_MASK (BIT(1) | BIT(2))
> -
> /* DEV_STAT_CTRL */
> #define PCIE_CAP_BASE 0x70
>
> @@ -355,7 +351,6 @@ static int __init ks_pcie_probe(struct platform_device *pdev)
> void __iomem *reg_p;
> struct phy *phy;
> int ret = 0;
> - u32 val;
>
> ks_pcie = devm_kzalloc(&pdev->dev, sizeof(*ks_pcie),
> GFP_KERNEL);
> @@ -365,18 +360,6 @@ static int __init ks_pcie_probe(struct platform_device *pdev)
> }
> pp =&ks_pcie->pp;
>
> - /* index 2 is the devcfg register for RC mode settings */
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
> - reg_p = devm_ioremap_resource(dev, res);
> - if (IS_ERR(reg_p))
> - return PTR_ERR(reg_p);
> -
> - /* enable RC mode in devcfg */
> - val = readl(reg_p);
> - val&= ~PCIE_MODE_MASK;
> - val |= PCIE_RC_MODE;
> - writel(val, reg_p);
> -
> /* initialize SerDes Phy if present */
> phy = devm_phy_get(dev, "pcie-phy");
> if (!IS_ERR_OR_NULL(phy)) {
> @@ -385,8 +368,8 @@ static int __init ks_pcie_probe(struct platform_device *pdev)
> return ret;
> }
>
> - /* index 3 is to read PCI DEVICE_ID */
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 3);
> + /* index 2 is to read PCI DEVICE_ID */
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
> reg_p = devm_ioremap_resource(dev, res);
> if (IS_ERR(reg_p))
> return PTR_ERR(reg_p);
Bjorn,
These patches need to go onto host-keystone as well for v3.18. If you
you have any comments, please let me know so that I can address them. I
have incorporated comments from Arnd already.
Thanks.
Murali
WARNING: multiple messages have this Message-ID (diff)
From: m-karicheri2@ti.com (Murali Karicheri)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/2] PCI: keystone: remove handle of PCI mode configuration
Date: Thu, 11 Sep 2014 15:09:10 -0400 [thread overview]
Message-ID: <5411F356.2090405@ti.com> (raw)
In-Reply-To: <1410369159-11564-1-git-send-email-m-karicheri2@ti.com>
On 09/10/2014 01:12 PM, Murali Karicheri wrote:
> Keystone PCI hardware supports both RC and EP modes and devcfg
> register has bits to boot strap the device to either of these modes.
> It seems proper to add this functionality to the boot loader rather
> than in the driver as device will be operating in either mode, not
> both any time. Currently the driver supports only RC mode and hence
> register configuration in the driver is not needed and driver can
> assume this is a RC hardware.
>
> Also update the DT documentation accordingly.
>
> Signed-off-by: Murali Karicheri<m-karicheri2@ti.com>
> Acked-by: Arnd Bergmann<arnd@arndb.de>
> ---
> v3 - No change
> v2 - Added this separate patch to remove pci mode handling
> .../devicetree/bindings/pci/pci-keystone.txt | 4 +---
> drivers/pci/host/pci-keystone.c | 21 ++------------------
> 2 files changed, 3 insertions(+), 22 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/pci/pci-keystone.txt b/Documentation/devicetree/bindings/pci/pci-keystone.txt
> index ceb3e24..bedacf0 100644
> --- a/Documentation/devicetree/bindings/pci/pci-keystone.txt
> +++ b/Documentation/devicetree/bindings/pci/pci-keystone.txt
> @@ -13,9 +13,7 @@ Required Properties:-
>
> compatibility: "ti,keystone-pcie"
> reg: index 1 is the base address and length of DW application registers.
> - index 2 is the base address and length of PCI mode configuration
> - register.
> - index 3 is the base address and length of PCI device ID register.
> + index 2 is the base address and length of PCI device ID register.
>
> pcie_msi_intc : Interrupt controller device node for MSI IRQ chip
> interrupt-cells: should be set to 1
> diff --git a/drivers/pci/host/pci-keystone.c b/drivers/pci/host/pci-keystone.c
> index ff8ed25..f1119eb 100644
> --- a/drivers/pci/host/pci-keystone.c
> +++ b/drivers/pci/host/pci-keystone.c
> @@ -35,10 +35,6 @@
> #define MAX_MSI_HOST_IRQS 8
> #define MAX_LEGACY_HOST_IRQS 4
>
> -/* RC mode settings masks */
> -#define PCIE_RC_MODE BIT(2)
> -#define PCIE_MODE_MASK (BIT(1) | BIT(2))
> -
> /* DEV_STAT_CTRL */
> #define PCIE_CAP_BASE 0x70
>
> @@ -355,7 +351,6 @@ static int __init ks_pcie_probe(struct platform_device *pdev)
> void __iomem *reg_p;
> struct phy *phy;
> int ret = 0;
> - u32 val;
>
> ks_pcie = devm_kzalloc(&pdev->dev, sizeof(*ks_pcie),
> GFP_KERNEL);
> @@ -365,18 +360,6 @@ static int __init ks_pcie_probe(struct platform_device *pdev)
> }
> pp =&ks_pcie->pp;
>
> - /* index 2 is the devcfg register for RC mode settings */
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
> - reg_p = devm_ioremap_resource(dev, res);
> - if (IS_ERR(reg_p))
> - return PTR_ERR(reg_p);
> -
> - /* enable RC mode in devcfg */
> - val = readl(reg_p);
> - val&= ~PCIE_MODE_MASK;
> - val |= PCIE_RC_MODE;
> - writel(val, reg_p);
> -
> /* initialize SerDes Phy if present */
> phy = devm_phy_get(dev, "pcie-phy");
> if (!IS_ERR_OR_NULL(phy)) {
> @@ -385,8 +368,8 @@ static int __init ks_pcie_probe(struct platform_device *pdev)
> return ret;
> }
>
> - /* index 3 is to read PCI DEVICE_ID */
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 3);
> + /* index 2 is to read PCI DEVICE_ID */
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
> reg_p = devm_ioremap_resource(dev, res);
> if (IS_ERR(reg_p))
> return PTR_ERR(reg_p);
Bjorn,
These patches need to go onto host-keystone as well for v3.18. If you
you have any comments, please let me know so that I can address them. I
have incorporated comments from Arnd already.
Thanks.
Murali
WARNING: multiple messages have this Message-ID (diff)
From: Murali Karicheri <m-karicheri2-l0cyMroinI0@public.gmane.org>
To: Murali Karicheri <m-karicheri2-l0cyMroinI0@public.gmane.org>
Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
pawel.moll-5wv7dgnIgG8@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
arnd-r2nGTMty4D4@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH v3 1/2] PCI: keystone: remove handle of PCI mode configuration
Date: Thu, 11 Sep 2014 15:09:10 -0400 [thread overview]
Message-ID: <5411F356.2090405@ti.com> (raw)
In-Reply-To: <1410369159-11564-1-git-send-email-m-karicheri2-l0cyMroinI0@public.gmane.org>
On 09/10/2014 01:12 PM, Murali Karicheri wrote:
> Keystone PCI hardware supports both RC and EP modes and devcfg
> register has bits to boot strap the device to either of these modes.
> It seems proper to add this functionality to the boot loader rather
> than in the driver as device will be operating in either mode, not
> both any time. Currently the driver supports only RC mode and hence
> register configuration in the driver is not needed and driver can
> assume this is a RC hardware.
>
> Also update the DT documentation accordingly.
>
> Signed-off-by: Murali Karicheri<m-karicheri2-l0cyMroinI0@public.gmane.org>
> Acked-by: Arnd Bergmann<arnd-r2nGTMty4D4@public.gmane.org>
> ---
> v3 - No change
> v2 - Added this separate patch to remove pci mode handling
> .../devicetree/bindings/pci/pci-keystone.txt | 4 +---
> drivers/pci/host/pci-keystone.c | 21 ++------------------
> 2 files changed, 3 insertions(+), 22 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/pci/pci-keystone.txt b/Documentation/devicetree/bindings/pci/pci-keystone.txt
> index ceb3e24..bedacf0 100644
> --- a/Documentation/devicetree/bindings/pci/pci-keystone.txt
> +++ b/Documentation/devicetree/bindings/pci/pci-keystone.txt
> @@ -13,9 +13,7 @@ Required Properties:-
>
> compatibility: "ti,keystone-pcie"
> reg: index 1 is the base address and length of DW application registers.
> - index 2 is the base address and length of PCI mode configuration
> - register.
> - index 3 is the base address and length of PCI device ID register.
> + index 2 is the base address and length of PCI device ID register.
>
> pcie_msi_intc : Interrupt controller device node for MSI IRQ chip
> interrupt-cells: should be set to 1
> diff --git a/drivers/pci/host/pci-keystone.c b/drivers/pci/host/pci-keystone.c
> index ff8ed25..f1119eb 100644
> --- a/drivers/pci/host/pci-keystone.c
> +++ b/drivers/pci/host/pci-keystone.c
> @@ -35,10 +35,6 @@
> #define MAX_MSI_HOST_IRQS 8
> #define MAX_LEGACY_HOST_IRQS 4
>
> -/* RC mode settings masks */
> -#define PCIE_RC_MODE BIT(2)
> -#define PCIE_MODE_MASK (BIT(1) | BIT(2))
> -
> /* DEV_STAT_CTRL */
> #define PCIE_CAP_BASE 0x70
>
> @@ -355,7 +351,6 @@ static int __init ks_pcie_probe(struct platform_device *pdev)
> void __iomem *reg_p;
> struct phy *phy;
> int ret = 0;
> - u32 val;
>
> ks_pcie = devm_kzalloc(&pdev->dev, sizeof(*ks_pcie),
> GFP_KERNEL);
> @@ -365,18 +360,6 @@ static int __init ks_pcie_probe(struct platform_device *pdev)
> }
> pp =&ks_pcie->pp;
>
> - /* index 2 is the devcfg register for RC mode settings */
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
> - reg_p = devm_ioremap_resource(dev, res);
> - if (IS_ERR(reg_p))
> - return PTR_ERR(reg_p);
> -
> - /* enable RC mode in devcfg */
> - val = readl(reg_p);
> - val&= ~PCIE_MODE_MASK;
> - val |= PCIE_RC_MODE;
> - writel(val, reg_p);
> -
> /* initialize SerDes Phy if present */
> phy = devm_phy_get(dev, "pcie-phy");
> if (!IS_ERR_OR_NULL(phy)) {
> @@ -385,8 +368,8 @@ static int __init ks_pcie_probe(struct platform_device *pdev)
> return ret;
> }
>
> - /* index 3 is to read PCI DEVICE_ID */
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 3);
> + /* index 2 is to read PCI DEVICE_ID */
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
> reg_p = devm_ioremap_resource(dev, res);
> if (IS_ERR(reg_p))
> return PTR_ERR(reg_p);
Bjorn,
These patches need to go onto host-keystone as well for v3.18. If you
you have any comments, please let me know so that I can address them. I
have incorporated comments from Arnd already.
Thanks.
Murali
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-09-11 19:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-10 17:12 [PATCH v3 1/2] PCI: keystone: remove handle of PCI mode configuration Murali Karicheri
2014-09-10 17:12 ` Murali Karicheri
2014-09-10 17:12 ` Murali Karicheri
2014-09-10 17:12 ` [PATCH v3 2/2] PCI: keystone: read pci device id dynamically to support multiple ports Murali Karicheri
2014-09-10 17:12 ` Murali Karicheri
2014-09-10 17:12 ` Murali Karicheri
2014-09-11 19:09 ` Murali Karicheri [this message]
2014-09-11 19:09 ` [PATCH v3 1/2] PCI: keystone: remove handle of PCI mode configuration Murali Karicheri
2014-09-11 19:09 ` Murali Karicheri
2014-09-16 21:55 ` Bjorn Helgaas
2014-09-16 21:55 ` Bjorn Helgaas
2014-09-16 21:55 ` Bjorn Helgaas
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=5411F356.2090405@ti.com \
--to=m-karicheri2@ti.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.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 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.