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


Groups > linux.kernel > #1686443 > unrolled thread

[PATCH] PCI: dwc: designware: test PCIE_ATU_ENABLE bit to check enabled or not

Started byJisheng Zhang <jszhang@marvell.com>
First post2017-07-13 12:50 +0200
Last post2017-07-17 21:40 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] PCI: dwc: designware: test PCIE_ATU_ENABLE bit to check enabled or not Jisheng Zhang <jszhang@marvell.com> - 2017-07-13 12:50 +0200
    Re: [PATCH] PCI: dwc: designware: test PCIE_ATU_ENABLE bit to check  enabled or not Joao Pinto <Joao.Pinto@synopsys.com> - 2017-07-17 11:30 +0200
      Re: [PATCH] PCI: dwc: designware: test PCIE_ATU_ENABLE bit to check enabled or not "Jingoo Han" <jingoohan1@gmail.com> - 2017-07-17 21:40 +0200

#1686443 — [PATCH] PCI: dwc: designware: test PCIE_ATU_ENABLE bit to check enabled or not

FromJisheng Zhang <jszhang@marvell.com>
Date2017-07-13 12:50 +0200
Subject[PATCH] PCI: dwc: designware: test PCIE_ATU_ENABLE bit to check enabled or not
Message-ID<u2JR0-4v9-9@gated-at.bofh.it>
The ATU CTRL2 register is 32 bit, besides the enable bit, other bits
may also be set. To check whether the ATU is enabled or not, we should
test the enable it.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
---
 drivers/pci/dwc/pcie-designware.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/dwc/pcie-designware.c b/drivers/pci/dwc/pcie-designware.c
index 0e03af279259..6bf0b409050a 100644
--- a/drivers/pci/dwc/pcie-designware.c
+++ b/drivers/pci/dwc/pcie-designware.c
@@ -177,7 +177,7 @@ void dw_pcie_prog_outbound_atu(struct dw_pcie *pci, int index, int type,
 	 */
 	for (retries = 0; retries < LINK_WAIT_MAX_IATU_RETRIES; retries++) {
 		val = dw_pcie_readl_dbi(pci, PCIE_ATU_CR2);
-		if (val == PCIE_ATU_ENABLE)
+		if (val & PCIE_ATU_ENABLE)
 			return;
 
 		usleep_range(LINK_WAIT_IATU_MIN, LINK_WAIT_IATU_MAX);
-- 
2.13.2

[toc] | [next] | [standalone]


#1688812 — Re: [PATCH] PCI: dwc: designware: test PCIE_ATU_ENABLE bit to check enabled or not

FromJoao Pinto <Joao.Pinto@synopsys.com>
Date2017-07-17 11:30 +0200
SubjectRe: [PATCH] PCI: dwc: designware: test PCIE_ATU_ENABLE bit to check enabled or not
Message-ID<u4avM-3bA-5@gated-at.bofh.it>
In reply to#1686443
Hi,

Às 11:35 AM de 7/13/2017, Jisheng Zhang escreveu:
> The ATU CTRL2 register is 32 bit, besides the enable bit, other bits
> may also be set. To check whether the ATU is enabled or not, we should
> test the enable it.
> 
> Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
> ---
>  drivers/pci/dwc/pcie-designware.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/dwc/pcie-designware.c b/drivers/pci/dwc/pcie-designware.c
> index 0e03af279259..6bf0b409050a 100644
> --- a/drivers/pci/dwc/pcie-designware.c
> +++ b/drivers/pci/dwc/pcie-designware.c
> @@ -177,7 +177,7 @@ void dw_pcie_prog_outbound_atu(struct dw_pcie *pci, int index, int type,
>  	 */
>  	for (retries = 0; retries < LINK_WAIT_MAX_IATU_RETRIES; retries++) {
>  		val = dw_pcie_readl_dbi(pci, PCIE_ATU_CR2);
> -		if (val == PCIE_ATU_ENABLE)
> +		if (val & PCIE_ATU_ENABLE)
>  			return;
>  
>  		usleep_range(LINK_WAIT_IATU_MIN, LINK_WAIT_IATU_MAX);
> 
Make sense, turn it more accurate. Thanks!

Acked-by: Joao Pinto <jpinto@synopsys.com>

[toc] | [prev] | [next] | [standalone]


#1689390

From"Jingoo Han" <jingoohan1@gmail.com>
Date2017-07-17 21:40 +0200
Message-ID<u4k25-LB-5@gated-at.bofh.it>
In reply to#1688812
On Monday, July 17, 2017 5:28 AM, Joao Pinto wrote:
> 
> Hi,
> 
> Às 11:35 AM de 7/13/2017, Jisheng Zhang escreveu:
> > The ATU CTRL2 register is 32 bit, besides the enable bit, other bits
> > may also be set. To check whether the ATU is enabled or not, we should
> > test the enable it.

To Jisheng Zhang,

typo s/it/bit

"test the enable it."  ---> "test the enable bit."


Please fix this typo, and send it again.
Type is confusing.


Best regards,
Jingoo Han


> >
> > Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
> > ---
> >  drivers/pci/dwc/pcie-designware.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/pci/dwc/pcie-designware.c b/drivers/pci/dwc/pcie-
> designware.c
> > index 0e03af279259..6bf0b409050a 100644
> > --- a/drivers/pci/dwc/pcie-designware.c
> > +++ b/drivers/pci/dwc/pcie-designware.c
> > @@ -177,7 +177,7 @@ void dw_pcie_prog_outbound_atu(struct dw_pcie *pci,
> int index, int type,
> >  	 */
> >  	for (retries = 0; retries < LINK_WAIT_MAX_IATU_RETRIES; retries++)
> {
> >  		val = dw_pcie_readl_dbi(pci, PCIE_ATU_CR2);
> > -		if (val == PCIE_ATU_ENABLE)
> > +		if (val & PCIE_ATU_ENABLE)
> >  			return;
> >
> >  		usleep_range(LINK_WAIT_IATU_MIN, LINK_WAIT_IATU_MAX);
> >
> Make sense, turn it more accurate. Thanks!
> 
> Acked-by: Joao Pinto <jpinto@synopsys.com>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web