linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 1/6] PCI: rcar: Clean up remaining macros defining bits
@ 2019-03-22  2:38 marek.vasut
  2019-03-22  2:38 ` [PATCH V2 2/6] PCI: rcar: Replace unsigned long with u32 in register accessors marek.vasut
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: marek.vasut @ 2019-03-22  2:38 UTC (permalink / raw)
  To: linux-pci
  Cc: Marek Vasut, Geert Uytterhoeven, Phil Edworthy, Simon Horman,
	Wolfram Sang, linux-renesas-soc

From: Marek Vasut <marek.vasut+renesas@gmail.com>

Replace macros using constants with BIT()s instead, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Phil Edworthy <phil.edworthy@renesas.com>
Cc: Simon Horman <horms+renesas@verge.net.au>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-renesas-soc@vger.kernel.org
To: linux-pci@vger.kernel.org
---
V2: Bundle this patch with other cleanups before resending
---
 drivers/pci/controller/pcie-rcar.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c
index c8febb009454..5b8736f0cd6b 100644
--- a/drivers/pci/controller/pcie-rcar.c
+++ b/drivers/pci/controller/pcie-rcar.c
@@ -46,14 +46,14 @@
 
 /* Transfer control */
 #define PCIETCTLR		0x02000
-#define  CFINIT			1
+#define  CFINIT			BIT(0)
 #define PCIETSTR		0x02004
-#define  DATA_LINK_ACTIVE	1
+#define  DATA_LINK_ACTIVE	BIT(0)
 #define PCIEERRFR		0x02020
 #define  UNSUPPORTED_REQUEST	BIT(4)
 #define PCIEMSIFR		0x02044
 #define PCIEMSIALR		0x02048
-#define  MSIFE			1
+#define  MSIFE			BIT(0)
 #define PCIEMSIAUR		0x0204c
 #define PCIEMSIIER		0x02050
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH V2 2/6] PCI: rcar: Replace unsigned long with u32 in register accessors
  2019-03-22  2:38 [PATCH V2 1/6] PCI: rcar: Clean up remaining macros defining bits marek.vasut
@ 2019-03-22  2:38 ` marek.vasut
  2019-03-22  8:20   ` Wolfram Sang
  2019-03-22  2:38 ` [PATCH V2 3/6] PCI: rcar: Replace various variable types with unsigned ones for register values marek.vasut
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 15+ messages in thread
From: marek.vasut @ 2019-03-22  2:38 UTC (permalink / raw)
  To: linux-pci
  Cc: Marek Vasut, Geert Uytterhoeven, Phil Edworthy, Simon Horman,
	Wolfram Sang, linux-renesas-soc

From: Marek Vasut <marek.vasut+renesas@gmail.com>

Replace unsigned long with u32 in register accessor functions,
since they access 32bit registers.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Phil Edworthy <phil.edworthy@renesas.com>
Cc: Simon Horman <horms+renesas@verge.net.au>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-renesas-soc@vger.kernel.org
To: linux-pci@vger.kernel.org
---
V2: Bundle this patch with other cleanups before resending
---
 drivers/pci/controller/pcie-rcar.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c
index 5b8736f0cd6b..1408c8aa758b 100644
--- a/drivers/pci/controller/pcie-rcar.c
+++ b/drivers/pci/controller/pcie-rcar.c
@@ -152,14 +152,12 @@ struct rcar_pcie {
 	struct			rcar_msi msi;
 };
 
-static void rcar_pci_write_reg(struct rcar_pcie *pcie, unsigned long val,
-			       unsigned long reg)
+static void rcar_pci_write_reg(struct rcar_pcie *pcie, u32 val, u32 reg)
 {
 	writel(val, pcie->base + reg);
 }
 
-static unsigned long rcar_pci_read_reg(struct rcar_pcie *pcie,
-				       unsigned long reg)
+static u32 rcar_pci_read_reg(struct rcar_pcie *pcie, u32 reg)
 {
 	return readl(pcie->base + reg);
 }
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH V2 3/6] PCI: rcar: Replace various variable types with unsigned ones for register values
  2019-03-22  2:38 [PATCH V2 1/6] PCI: rcar: Clean up remaining macros defining bits marek.vasut
  2019-03-22  2:38 ` [PATCH V2 2/6] PCI: rcar: Replace unsigned long with u32 in register accessors marek.vasut
@ 2019-03-22  2:38 ` marek.vasut
  2019-03-22  8:22   ` Wolfram Sang
  2019-03-22  8:41   ` Wolfram Sang
  2019-03-22  2:38 ` [PATCH V2 4/6] PCI: rcar: Replace (8 * n) with (n << 3) marek.vasut
                   ` (3 subsequent siblings)
  5 siblings, 2 replies; 15+ messages in thread
From: marek.vasut @ 2019-03-22  2:38 UTC (permalink / raw)
  To: linux-pci
  Cc: Marek Vasut, Geert Uytterhoeven, Phil Edworthy, Simon Horman,
	Wolfram Sang, linux-renesas-soc

From: Marek Vasut <marek.vasut+renesas@gmail.com>

Replace various variable types with u32 or unsigned int type for
variables holding register values, since the registers are 32bit.
Note that rcar_pcie_msi_irq() still uses various variable types
because both find_first_bit() and __fls() require various variable
types as an argument.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Phil Edworthy <phil.edworthy@renesas.com>
Cc: Simon Horman <horms+renesas@verge.net.au>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-renesas-soc@vger.kernel.org
To: linux-pci@vger.kernel.org
---
V2: - s@unsigned long@various variable types@ in the commit message
    - Replace int with unsigned int for the $shift variable
    - Replace int with unsigned int / u32 in rcar_pcie_config_access()
---
 drivers/pci/controller/pcie-rcar.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c
index 1408c8aa758b..66599e0c4bb4 100644
--- a/drivers/pci/controller/pcie-rcar.c
+++ b/drivers/pci/controller/pcie-rcar.c
@@ -169,7 +169,7 @@ enum {
 
 static void rcar_rmw32(struct rcar_pcie *pcie, int where, u32 mask, u32 data)
 {
-	int shift = 8 * (where & 3);
+	unsigned int shift = 8 * (where & 3);
 	u32 val = rcar_pci_read_reg(pcie, where & ~3);
 
 	val &= ~(mask << shift);
@@ -179,7 +179,7 @@ static void rcar_rmw32(struct rcar_pcie *pcie, int where, u32 mask, u32 data)
 
 static u32 rcar_read_conf(struct rcar_pcie *pcie, int where)
 {
-	int shift = 8 * (where & 3);
+	unsigned int shift = 8 * (where & 3);
 	u32 val = rcar_pci_read_reg(pcie, where & ~3);
 
 	return val >> shift;
@@ -190,7 +190,8 @@ static int rcar_pcie_config_access(struct rcar_pcie *pcie,
 		unsigned char access_type, struct pci_bus *bus,
 		unsigned int devfn, int where, u32 *data)
 {
-	int dev, func, reg, index;
+	unsigned int dev, func, index;
+	u32 reg;
 
 	dev = PCI_SLOT(devfn);
 	func = PCI_FUNC(devfn);
@@ -294,8 +295,8 @@ static int rcar_pcie_write_conf(struct pci_bus *bus, unsigned int devfn,
 				int where, int size, u32 val)
 {
 	struct rcar_pcie *pcie = bus->sysdata;
-	int shift, ret;
-	u32 data;
+	int ret;
+	u32 shift, data;
 
 	ret = rcar_pcie_config_access(pcie, RCAR_PCI_ACCESS_READ,
 				      bus, devfn, where, &data);
@@ -508,7 +509,7 @@ static void phy_write_reg(struct rcar_pcie *pcie,
 				 unsigned int rate, unsigned int addr,
 				 unsigned int lane, unsigned int data)
 {
-	unsigned long phyaddr;
+	u32 phyaddr;
 
 	phyaddr = WRITE_CMD |
 		((rate & 1) << RATE_POS) |
@@ -1116,7 +1117,7 @@ static int rcar_pcie_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct rcar_pcie *pcie;
-	unsigned int data;
+	u32 data;
 	int err;
 	int (*phy_init_fn)(struct rcar_pcie *);
 	struct pci_host_bridge *bridge;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH V2 4/6] PCI: rcar: Replace (8 * n) with (n << 3)
  2019-03-22  2:38 [PATCH V2 1/6] PCI: rcar: Clean up remaining macros defining bits marek.vasut
  2019-03-22  2:38 ` [PATCH V2 2/6] PCI: rcar: Replace unsigned long with u32 in register accessors marek.vasut
  2019-03-22  2:38 ` [PATCH V2 3/6] PCI: rcar: Replace various variable types with unsigned ones for register values marek.vasut
@ 2019-03-22  2:38 ` marek.vasut
  2019-03-22  8:32   ` Wolfram Sang
  2019-03-22  2:38 ` [PATCH V2 5/6] PCI: rcar: Clean up debug messages marek.vasut
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 15+ messages in thread
From: marek.vasut @ 2019-03-22  2:38 UTC (permalink / raw)
  To: linux-pci
  Cc: Marek Vasut, Geert Uytterhoeven, Phil Edworthy, Simon Horman,
	Wolfram Sang, linux-renesas-soc

From: Marek Vasut <marek.vasut+renesas@gmail.com>

Replace (8 * n) with (n << 3) to make bit shift operations consistent.
No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Phil Edworthy <phil.edworthy@renesas.com>
Cc: Simon Horman <horms+renesas@verge.net.au>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-renesas-soc@vger.kernel.org
To: linux-pci@vger.kernel.org
---
V2: Bundle this patch with other cleanups before resending
---
 drivers/pci/controller/pcie-rcar.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c
index 66599e0c4bb4..0ab05803bb70 100644
--- a/drivers/pci/controller/pcie-rcar.c
+++ b/drivers/pci/controller/pcie-rcar.c
@@ -169,7 +169,7 @@ enum {
 
 static void rcar_rmw32(struct rcar_pcie *pcie, int where, u32 mask, u32 data)
 {
-	unsigned int shift = 8 * (where & 3);
+	unsigned int shift = (where & 3) << 3;
 	u32 val = rcar_pci_read_reg(pcie, where & ~3);
 
 	val &= ~(mask << shift);
@@ -179,7 +179,7 @@ static void rcar_rmw32(struct rcar_pcie *pcie, int where, u32 mask, u32 data)
 
 static u32 rcar_read_conf(struct rcar_pcie *pcie, int where)
 {
-	unsigned int shift = 8 * (where & 3);
+	unsigned int shift = (where & 3) << 3;
 	u32 val = rcar_pci_read_reg(pcie, where & ~3);
 
 	return val >> shift;
@@ -280,9 +280,9 @@ static int rcar_pcie_read_conf(struct pci_bus *bus, unsigned int devfn,
 	}
 
 	if (size == 1)
-		*val = (*val >> (8 * (where & 3))) & 0xff;
+		*val = (*val >> ((where & 3) << 3)) & 0xff;
 	else if (size == 2)
-		*val = (*val >> (8 * (where & 2))) & 0xffff;
+		*val = (*val >> ((where & 2) << 3)) & 0xffff;
 
 	dev_dbg(&bus->dev, "pcie-config-read: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08lx\n",
 		bus->number, devfn, where, size, (unsigned long)*val);
@@ -307,11 +307,11 @@ static int rcar_pcie_write_conf(struct pci_bus *bus, unsigned int devfn,
 		bus->number, devfn, where, size, (unsigned long)val);
 
 	if (size == 1) {
-		shift = 8 * (where & 3);
+		shift = (where & 3) << 3;
 		data &= ~(0xff << shift);
 		data |= ((val & 0xff) << shift);
 	} else if (size == 2) {
-		shift = 8 * (where & 2);
+		shift = (where & 2) << 3;
 		data &= ~(0xffff << shift);
 		data |= ((val & 0xffff) << shift);
 	} else
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH V2 5/6] PCI: rcar: Clean up debug messages
  2019-03-22  2:38 [PATCH V2 1/6] PCI: rcar: Clean up remaining macros defining bits marek.vasut
                   ` (2 preceding siblings ...)
  2019-03-22  2:38 ` [PATCH V2 4/6] PCI: rcar: Replace (8 * n) with (n << 3) marek.vasut
@ 2019-03-22  2:38 ` marek.vasut
  2019-03-22  8:32   ` Wolfram Sang
  2019-03-22  2:38 ` [PATCH V2 6/6] PCI: rcar: Allow 64bit MSI addresses marek.vasut
  2019-03-22  8:20 ` [PATCH V2 1/6] PCI: rcar: Clean up remaining macros defining bits Wolfram Sang
  5 siblings, 1 reply; 15+ messages in thread
From: marek.vasut @ 2019-03-22  2:38 UTC (permalink / raw)
  To: linux-pci
  Cc: Marek Vasut, Geert Uytterhoeven, Phil Edworthy, Simon Horman,
	Wolfram Sang, linux-renesas-soc

From: Marek Vasut <marek.vasut+renesas@gmail.com>

Drop useless casts from debug messages, they are no longer needed
due to the data type cleanup.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Phil Edworthy <phil.edworthy@renesas.com>
Cc: Simon Horman <horms+renesas@verge.net.au>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-renesas-soc@vger.kernel.org
To: linux-pci@vger.kernel.org
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
V2: - Bundle this patch with other cleanups before resending
    - Add R-B from Geert
---
 drivers/pci/controller/pcie-rcar.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c
index 0ab05803bb70..989b7b73ed61 100644
--- a/drivers/pci/controller/pcie-rcar.c
+++ b/drivers/pci/controller/pcie-rcar.c
@@ -284,8 +284,8 @@ static int rcar_pcie_read_conf(struct pci_bus *bus, unsigned int devfn,
 	else if (size == 2)
 		*val = (*val >> ((where & 2) << 3)) & 0xffff;
 
-	dev_dbg(&bus->dev, "pcie-config-read: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08lx\n",
-		bus->number, devfn, where, size, (unsigned long)*val);
+	dev_dbg(&bus->dev, "pcie-config-read: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08x\n",
+		bus->number, devfn, where, size, *val);
 
 	return ret;
 }
@@ -303,8 +303,8 @@ static int rcar_pcie_write_conf(struct pci_bus *bus, unsigned int devfn,
 	if (ret != PCIBIOS_SUCCESSFUL)
 		return ret;
 
-	dev_dbg(&bus->dev, "pcie-config-write: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08lx\n",
-		bus->number, devfn, where, size, (unsigned long)val);
+	dev_dbg(&bus->dev, "pcie-config-write: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08x\n",
+		bus->number, devfn, where, size, val);
 
 	if (size == 1) {
 		shift = (where & 3) << 3;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH V2 6/6] PCI: rcar: Allow 64bit MSI addresses
  2019-03-22  2:38 [PATCH V2 1/6] PCI: rcar: Clean up remaining macros defining bits marek.vasut
                   ` (3 preceding siblings ...)
  2019-03-22  2:38 ` [PATCH V2 5/6] PCI: rcar: Clean up debug messages marek.vasut
@ 2019-03-22  2:38 ` marek.vasut
  2019-03-22  8:34   ` Wolfram Sang
  2019-03-22  8:20 ` [PATCH V2 1/6] PCI: rcar: Clean up remaining macros defining bits Wolfram Sang
  5 siblings, 1 reply; 15+ messages in thread
From: marek.vasut @ 2019-03-22  2:38 UTC (permalink / raw)
  To: linux-pci
  Cc: Marek Vasut, Geert Uytterhoeven, Phil Edworthy, Simon Horman,
	Wolfram Sang, linux-renesas-soc

From: Marek Vasut <marek.vasut+renesas@gmail.com>

The MSI address can be 64bit. Switch the data type used to hold the
result of virt_to_phys() to phys_addr_t to reflect its properties
correctly and program the top 32bits of PA into PCIEMSIAUR.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Phil Edworthy <phil.edworthy@renesas.com>
Cc: Simon Horman <horms+renesas@verge.net.au>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-renesas-soc@vger.kernel.org
To: linux-pci@vger.kernel.org
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
V2: - s/it's/its/ in commit message
    - Add R-B from Geert
---
 drivers/pci/controller/pcie-rcar.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c
index 989b7b73ed61..75ac83f21035 100644
--- a/drivers/pci/controller/pcie-rcar.c
+++ b/drivers/pci/controller/pcie-rcar.c
@@ -889,7 +889,7 @@ static int rcar_pcie_enable_msi(struct rcar_pcie *pcie)
 {
 	struct device *dev = pcie->dev;
 	struct rcar_msi *msi = &pcie->msi;
-	unsigned long base;
+	phys_addr_t base;
 	int err, i;
 
 	mutex_init(&msi->lock);
@@ -931,7 +931,7 @@ static int rcar_pcie_enable_msi(struct rcar_pcie *pcie)
 	base = virt_to_phys((void *)msi->pages);
 
 	rcar_pci_write_reg(pcie, base | MSIFE, PCIEMSIALR);
-	rcar_pci_write_reg(pcie, 0, PCIEMSIAUR);
+	rcar_pci_write_reg(pcie, base >> 32, PCIEMSIAUR);
 
 	/* enable all MSI interrupts */
 	rcar_pci_write_reg(pcie, 0xffffffff, PCIEMSIIER);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH V2 1/6] PCI: rcar: Clean up remaining macros defining bits
  2019-03-22  2:38 [PATCH V2 1/6] PCI: rcar: Clean up remaining macros defining bits marek.vasut
                   ` (4 preceding siblings ...)
  2019-03-22  2:38 ` [PATCH V2 6/6] PCI: rcar: Allow 64bit MSI addresses marek.vasut
@ 2019-03-22  8:20 ` Wolfram Sang
  5 siblings, 0 replies; 15+ messages in thread
From: Wolfram Sang @ 2019-03-22  8:20 UTC (permalink / raw)
  To: marek.vasut
  Cc: linux-pci, Marek Vasut, Geert Uytterhoeven, Phil Edworthy,
	Simon Horman, linux-renesas-soc

[-- Attachment #1: Type: text/plain, Size: 338 bytes --]

On Fri, Mar 22, 2019 at 03:38:39AM +0100, marek.vasut@gmail.com wrote:
> From: Marek Vasut <marek.vasut+renesas@gmail.com>
> 
> Replace macros using constants with BIT()s instead, no functional change.
> 
> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH V2 2/6] PCI: rcar: Replace unsigned long with u32 in register accessors
  2019-03-22  2:38 ` [PATCH V2 2/6] PCI: rcar: Replace unsigned long with u32 in register accessors marek.vasut
@ 2019-03-22  8:20   ` Wolfram Sang
  0 siblings, 0 replies; 15+ messages in thread
From: Wolfram Sang @ 2019-03-22  8:20 UTC (permalink / raw)
  To: marek.vasut
  Cc: linux-pci, Marek Vasut, Geert Uytterhoeven, Phil Edworthy,
	Simon Horman, linux-renesas-soc

[-- Attachment #1: Type: text/plain, Size: 365 bytes --]

On Fri, Mar 22, 2019 at 03:38:40AM +0100, marek.vasut@gmail.com wrote:
> From: Marek Vasut <marek.vasut+renesas@gmail.com>
> 
> Replace unsigned long with u32 in register accessor functions,
> since they access 32bit registers.
> 
> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH V2 3/6] PCI: rcar: Replace various variable types with unsigned ones for register values
  2019-03-22  2:38 ` [PATCH V2 3/6] PCI: rcar: Replace various variable types with unsigned ones for register values marek.vasut
@ 2019-03-22  8:22   ` Wolfram Sang
  2019-03-22  8:41   ` Wolfram Sang
  1 sibling, 0 replies; 15+ messages in thread
From: Wolfram Sang @ 2019-03-22  8:22 UTC (permalink / raw)
  To: marek.vasut
  Cc: linux-pci, Marek Vasut, Geert Uytterhoeven, Phil Edworthy,
	Simon Horman, linux-renesas-soc

[-- Attachment #1: Type: text/plain, Size: 136 bytes --]


> -	int shift, ret;
> -	u32 data;
> +	int ret;
> +	u32 shift, data;

This 'shift' is u32 instead of 'unsigned int'.

Rest looks good.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH V2 4/6] PCI: rcar: Replace (8 * n) with (n << 3)
  2019-03-22  2:38 ` [PATCH V2 4/6] PCI: rcar: Replace (8 * n) with (n << 3) marek.vasut
@ 2019-03-22  8:32   ` Wolfram Sang
  0 siblings, 0 replies; 15+ messages in thread
From: Wolfram Sang @ 2019-03-22  8:32 UTC (permalink / raw)
  To: marek.vasut
  Cc: linux-pci, Marek Vasut, Geert Uytterhoeven, Phil Edworthy,
	Simon Horman, linux-renesas-soc

[-- Attachment #1: Type: text/plain, Size: 360 bytes --]

On Fri, Mar 22, 2019 at 03:38:42AM +0100, marek.vasut@gmail.com wrote:
> From: Marek Vasut <marek.vasut+renesas@gmail.com>
> 
> Replace (8 * n) with (n << 3) to make bit shift operations consistent.
> No functional change.
> 
> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH V2 5/6] PCI: rcar: Clean up debug messages
  2019-03-22  2:38 ` [PATCH V2 5/6] PCI: rcar: Clean up debug messages marek.vasut
@ 2019-03-22  8:32   ` Wolfram Sang
  0 siblings, 0 replies; 15+ messages in thread
From: Wolfram Sang @ 2019-03-22  8:32 UTC (permalink / raw)
  To: marek.vasut
  Cc: linux-pci, Marek Vasut, Geert Uytterhoeven, Phil Edworthy,
	Simon Horman, linux-renesas-soc

[-- Attachment #1: Type: text/plain, Size: 363 bytes --]

On Fri, Mar 22, 2019 at 03:38:43AM +0100, marek.vasut@gmail.com wrote:
> From: Marek Vasut <marek.vasut+renesas@gmail.com>
> 
> Drop useless casts from debug messages, they are no longer needed
> due to the data type cleanup.
> 
> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH V2 6/6] PCI: rcar: Allow 64bit MSI addresses
  2019-03-22  2:38 ` [PATCH V2 6/6] PCI: rcar: Allow 64bit MSI addresses marek.vasut
@ 2019-03-22  8:34   ` Wolfram Sang
  2019-03-23  1:52     ` Marek Vasut
  0 siblings, 1 reply; 15+ messages in thread
From: Wolfram Sang @ 2019-03-22  8:34 UTC (permalink / raw)
  To: marek.vasut
  Cc: linux-pci, Marek Vasut, Geert Uytterhoeven, Phil Edworthy,
	Simon Horman, linux-renesas-soc

[-- Attachment #1: Type: text/plain, Size: 187 bytes --]


> -	rcar_pci_write_reg(pcie, 0, PCIEMSIAUR);
> +	rcar_pci_write_reg(pcie, base >> 32, PCIEMSIAUR);

Seeing the in-depth discussion between you and Geert, I'll leave this to
you guys :)


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH V2 3/6] PCI: rcar: Replace various variable types with unsigned ones for register values
  2019-03-22  2:38 ` [PATCH V2 3/6] PCI: rcar: Replace various variable types with unsigned ones for register values marek.vasut
  2019-03-22  8:22   ` Wolfram Sang
@ 2019-03-22  8:41   ` Wolfram Sang
  2019-03-23  1:28     ` Marek Vasut
  1 sibling, 1 reply; 15+ messages in thread
From: Wolfram Sang @ 2019-03-22  8:41 UTC (permalink / raw)
  To: marek.vasut
  Cc: linux-pci, Marek Vasut, Geert Uytterhoeven, Phil Edworthy,
	Simon Horman, linux-renesas-soc

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]


> @@ -508,7 +509,7 @@ static void phy_write_reg(struct rcar_pcie *pcie,
>  				 unsigned int rate, unsigned int addr,
>  				 unsigned int lane, unsigned int data)

What about converting 'addr' and 'data' here? Other than those, I didn't
find other candidates in this driver.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH V2 3/6] PCI: rcar: Replace various variable types with unsigned ones for register values
  2019-03-22  8:41   ` Wolfram Sang
@ 2019-03-23  1:28     ` Marek Vasut
  0 siblings, 0 replies; 15+ messages in thread
From: Marek Vasut @ 2019-03-23  1:28 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-pci, Marek Vasut, Geert Uytterhoeven, Phil Edworthy,
	Simon Horman, linux-renesas-soc

On 3/22/19 9:41 AM, Wolfram Sang wrote:
> 
>> @@ -508,7 +509,7 @@ static void phy_write_reg(struct rcar_pcie *pcie,
>>  				 unsigned int rate, unsigned int addr,
>>  				 unsigned int lane, unsigned int data)
> 
> What about converting 'addr' and 'data' here? Other than those, I didn't
> find other candidates in this driver.

Sure, fixed.

-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH V2 6/6] PCI: rcar: Allow 64bit MSI addresses
  2019-03-22  8:34   ` Wolfram Sang
@ 2019-03-23  1:52     ` Marek Vasut
  0 siblings, 0 replies; 15+ messages in thread
From: Marek Vasut @ 2019-03-23  1:52 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-pci, Marek Vasut, Geert Uytterhoeven, Phil Edworthy,
	Simon Horman, linux-renesas-soc

On 3/22/19 9:34 AM, Wolfram Sang wrote:
> 
>> -	rcar_pci_write_reg(pcie, 0, PCIEMSIAUR);
>> +	rcar_pci_write_reg(pcie, base >> 32, PCIEMSIAUR);
> 
> Seeing the in-depth discussion between you and Geert, I'll leave this to
> you guys :)

I think this fix is clear, the discussion is now rather about whether we
should allocate the reserved page with GFP_DMA32 and keep it in 32bit
address range or not.

I'll reword the commit message though.

-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-03-23  1:54 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-22  2:38 [PATCH V2 1/6] PCI: rcar: Clean up remaining macros defining bits marek.vasut
2019-03-22  2:38 ` [PATCH V2 2/6] PCI: rcar: Replace unsigned long with u32 in register accessors marek.vasut
2019-03-22  8:20   ` Wolfram Sang
2019-03-22  2:38 ` [PATCH V2 3/6] PCI: rcar: Replace various variable types with unsigned ones for register values marek.vasut
2019-03-22  8:22   ` Wolfram Sang
2019-03-22  8:41   ` Wolfram Sang
2019-03-23  1:28     ` Marek Vasut
2019-03-22  2:38 ` [PATCH V2 4/6] PCI: rcar: Replace (8 * n) with (n << 3) marek.vasut
2019-03-22  8:32   ` Wolfram Sang
2019-03-22  2:38 ` [PATCH V2 5/6] PCI: rcar: Clean up debug messages marek.vasut
2019-03-22  8:32   ` Wolfram Sang
2019-03-22  2:38 ` [PATCH V2 6/6] PCI: rcar: Allow 64bit MSI addresses marek.vasut
2019-03-22  8:34   ` Wolfram Sang
2019-03-23  1:52     ` Marek Vasut
2019-03-22  8:20 ` [PATCH V2 1/6] PCI: rcar: Clean up remaining macros defining bits Wolfram Sang

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).