Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1474771

Re: [v10,2/2] PCI: Rockchip: Add Rockchip PCIe controller support

From Brian Norris <briannorris@chromium.org>
Newsgroups linux.kernel
Subject Re: [v10,2/2] PCI: Rockchip: Add Rockchip PCIe controller support
Date 2016-09-02 00:40 +0200
Message-ID <scHyY-75a-81@gated-at.bofh.it> (permalink)
References <s7H6x-7vO-17@gated-at.bofh.it> <scihc-5N2-19@gated-at.bofh.it> <scraN-2Zr-11@gated-at.bofh.it> <scDbY-4hA-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Sep 01, 2016 at 11:34:55AM -0500, Bjorn Helgaas wrote:
> I can't conveniently build it, so I'm sure I've broken things.  I

Indeed, you have :)

> pushed the current work-in-progress branch to pci/host-rockchip-wip.
> After we fix build errors and other thinkos, I'll rename it and put it
> in -next.

I'll append a patch that gets things building and working for me. With
that:

Tested-by: Brian Norris <briannorris@chromium.org>

I haven't examined all the changes in detail, but they mostly seem
reasonable.

> I'll also post the broken-out patches for the changes I made on top of
> the previous v10 (2098142ae87d).  I'll eventually squash them all into
> the original commit so we don't have the clutter in the logs.

diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c
index 6623598679f2..ac846bab7396 100644
--- a/drivers/pci/host/pcie-rockchip.c
+++ b/drivers/pci/host/pcie-rockchip.c
@@ -128,9 +128,9 @@
 #define PCIE_CLIENT_CONF_ENABLE		(0x00010000 | 0x0001)
 #define PCIE_CLIENT_LINK_TRAIN_ENABLE	(0x00020000 | 0x0002)
 #define PCIE_CLIENT_ARI_ENABLE		(0x00080000 | 0x0008)
-#define PCIE_CLIENT_CONF_LANE_NUM(x)	(0x00300000 | (((x >> 1) & 3) << 4)
+#define PCIE_CLIENT_CONF_LANE_NUM(x)	(0x00300000 | (((x >> 1) & 3) << 4))
 #define PCIE_CLIENT_MODE_RC		(0x00400000 | 0x0040)
-#define PCIE_CLIENT_GEN_SEL(x)		(0x00800000 | ((x & 1) << 7)
+#define PCIE_CLIENT_GEN_SEL(x)		(0x00800000 | ((x & 1) << 7))
 #define  PCIE_CLIENT_GEN_SEL_0		0
 #define  PCIE_CLIENT_GEN_SEL_2		1
 
@@ -643,14 +643,13 @@ static irqreturn_t rockchip_pcie_client_irq_handler(int irq, void *arg)
 static void rockchip_pcie_legacy_int_handler(struct irq_desc *desc)
 {
 	struct irq_chip *chip = irq_desc_get_chip(desc);
-	struct rockchip_pcie *rockchip;
+	struct rockchip_pcie *rockchip = irq_desc_get_handler_data(desc);
 	struct device *dev = rockchip->dev;
 	u32 reg;
 	u32 hwirq;
 	u32 virq;
 
 	chained_irq_enter(chip, desc);
-	rockchip = irq_desc_get_handler_data(desc);
 
 	reg = rockchip_pcie_read(rockchip, PCIE_CLIENT_INT_STATUS);
 	reg = (reg & ROCKCHIP_PCIE_RPIFR1_INTR_MASK) >>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [v10,2/2] PCI: Rockchip: Add Rockchip PCIe controller support Shawn Lin <shawn.lin@rock-chips.com> - 2016-09-01 05:50 +0200
  Re: [v10,2/2] PCI: Rockchip: Add Rockchip PCIe controller support Guenter Roeck <linux@roeck-us.net> - 2016-09-01 06:20 +0200
  Re: [v10,2/2] PCI: Rockchip: Add Rockchip PCIe controller support Bjorn Helgaas <helgaas@kernel.org> - 2016-09-01 18:40 +0200
    Re: [v10,2/2] PCI: Rockchip: Add Rockchip PCIe controller support Brian Norris <briannorris@chromium.org> - 2016-09-01 23:10 +0200
      Re: [v10,2/2] PCI: Rockchip: Add Rockchip PCIe controller support Bjorn Helgaas <helgaas@kernel.org> - 2016-09-01 23:30 +0200
        Re: [v10,2/2] PCI: Rockchip: Add Rockchip PCIe controller support Bjorn Helgaas <helgaas@kernel.org> - 2016-09-02 17:50 +0200
          Re: [v10,2/2] PCI: Rockchip: Add Rockchip PCIe controller support Heiko Stübner <heiko@sntech.de> - 2016-09-02 18:30 +0200
      Re: [v10,2/2] PCI: Rockchip: Add Rockchip PCIe controller support Heiko Stübner <heiko@sntech.de> - 2016-09-01 23:30 +0200
    Re: [v10,2/2] PCI: Rockchip: Add Rockchip PCIe controller support Bjorn Helgaas <helgaas@kernel.org> - 2016-09-01 23:20 +0200
    Re: [v10,2/2] PCI: Rockchip: Add Rockchip PCIe controller support Brian Norris <briannorris@chromium.org> - 2016-09-02 00:40 +0200
      Re: [v10,2/2] PCI: Rockchip: Add Rockchip PCIe controller support Guenter Roeck <linux@roeck-us.net> - 2016-09-02 19:30 +0200

csiph-web