diff mbox

PCI: rcar: Add mask of data to be written to PCIEPARL

Message ID 1422853798-14467-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com
State Accepted
Headers show

Commit Message

Nobuhiro Iwamatsu Feb. 2, 2015, 5:09 a.m. UTC
Lower 7bit of PCIEPARL is reserved bit. When we write to this register,
these bits must be 0.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
---
 drivers/pci/host/pcie-rcar.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Phil Edworthy Feb. 3, 2015, 6:53 p.m. UTC | #1
Hi Iwamatsu-san,

On: 02 February 2015 05:10, Nobuhiro Iwamatsu wrote:
> 
> Lower 7bit of PCIEPARL is reserved bit. When we write to this register,
> these bits must be 0.
> 
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Acked-by: Phil Edworthy <phil.edworthy@renesas.com>

Thanks
Phil

> ---
>  drivers/pci/host/pcie-rcar.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
> index 748786c..bb36e27 100644
> --- a/drivers/pci/host/pcie-rcar.c
> +++ b/drivers/pci/host/pcie-rcar.c
> @@ -342,7 +342,8 @@ static void rcar_pcie_setup_window(int win, struct
> rcar_pcie *pcie)
>  		res_start = res->start;
> 
>  	rcar_pci_write_reg(pcie, upper_32_bits(res_start), PCIEPARH(win));
> -	rcar_pci_write_reg(pcie, lower_32_bits(res_start), PCIEPARL(win));
> +	rcar_pci_write_reg(pcie, lower_32_bits(res_start) & ~0x7F,
> +			   PCIEPARL(win));
> 
>  	/* First resource is for IO */
>  	mask = PAR_ENABLE;
> --
> 2.1.3

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Simon Horman Feb. 24, 2015, 2:02 a.m. UTC | #2
On Tue, Feb 03, 2015 at 06:53:51PM +0000, Phil Edworthy wrote:
> Hi Iwamatsu-san,
> 
> On: 02 February 2015 05:10, Nobuhiro Iwamatsu wrote:
> > 
> > Lower 7bit of PCIEPARL is reserved bit. When we write to this register,
> > these bits must be 0.
> > 
> > Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
> Acked-by: Phil Edworthy <phil.edworthy@renesas.com>

Acked-by: Simon Horman <horms+renesas@verge.net.au>

> 
> Thanks
> Phil
> 
> > ---
> >  drivers/pci/host/pcie-rcar.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
> > index 748786c..bb36e27 100644
> > --- a/drivers/pci/host/pcie-rcar.c
> > +++ b/drivers/pci/host/pcie-rcar.c
> > @@ -342,7 +342,8 @@ static void rcar_pcie_setup_window(int win, struct
> > rcar_pcie *pcie)
> >  		res_start = res->start;
> > 
> >  	rcar_pci_write_reg(pcie, upper_32_bits(res_start), PCIEPARH(win));
> > -	rcar_pci_write_reg(pcie, lower_32_bits(res_start), PCIEPARL(win));
> > +	rcar_pci_write_reg(pcie, lower_32_bits(res_start) & ~0x7F,
> > +			   PCIEPARL(win));
> > 
> >  	/* First resource is for IO */
> >  	mask = PAR_ENABLE;
> > --
> > 2.1.3
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Bjorn Helgaas Feb. 24, 2015, 6:25 a.m. UTC | #3
On Mon, Feb 02, 2015 at 02:09:58PM +0900, Nobuhiro Iwamatsu wrote:
> Lower 7bit of PCIEPARL is reserved bit. When we write to this register,
> these bits must be 0.
> 
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>

Applied to pci/host-rcar for v4.1, thanks!

> ---
>  drivers/pci/host/pcie-rcar.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
> index 748786c..bb36e27 100644
> --- a/drivers/pci/host/pcie-rcar.c
> +++ b/drivers/pci/host/pcie-rcar.c
> @@ -342,7 +342,8 @@ static void rcar_pcie_setup_window(int win, struct rcar_pcie *pcie)
>  		res_start = res->start;
>  
>  	rcar_pci_write_reg(pcie, upper_32_bits(res_start), PCIEPARH(win));
> -	rcar_pci_write_reg(pcie, lower_32_bits(res_start), PCIEPARL(win));
> +	rcar_pci_write_reg(pcie, lower_32_bits(res_start) & ~0x7F,
> +			   PCIEPARL(win));
>  
>  	/* First resource is for IO */
>  	mask = PAR_ENABLE;
> -- 
> 2.1.3
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
index 748786c..bb36e27 100644
--- a/drivers/pci/host/pcie-rcar.c
+++ b/drivers/pci/host/pcie-rcar.c
@@ -342,7 +342,8 @@  static void rcar_pcie_setup_window(int win, struct rcar_pcie *pcie)
 		res_start = res->start;
 
 	rcar_pci_write_reg(pcie, upper_32_bits(res_start), PCIEPARH(win));
-	rcar_pci_write_reg(pcie, lower_32_bits(res_start), PCIEPARL(win));
+	rcar_pci_write_reg(pcie, lower_32_bits(res_start) & ~0x7F,
+			   PCIEPARL(win));
 
 	/* First resource is for IO */
 	mask = PAR_ENABLE;