All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] phy: ti-pipe3: Do not overwrite the whole PROGRAMMABILITY register
@ 2019-02-26  9:24 Rolf Evers-Fischer
  2019-02-26  9:26 ` Kishon Vijay Abraham I
  0 siblings, 1 reply; 3+ messages in thread
From: Rolf Evers-Fischer @ 2019-02-26  9:24 UTC (permalink / raw)
  To: kishon, linux-kernel; +Cc: Rolf Evers-Fischer

From: Rolf Evers-Fischer <rolf.evers.fischer@aptiv.com>

Previously, ti_pipe3_calibrate() wrote all bits in the
PCIEPHYRX_ANA_PROGRAMMABILITY register, thus overwriting bits,
which should not be modified.
Fix ti_pipe3_calibrate() so that it only modifies LOSD and
INTERFACE bits.

Signed-off-by: Rolf Evers-Fischer <rolf.evers.fischer@aptiv.com>
---
 drivers/phy/ti/phy-ti-pipe3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/ti/phy-ti-pipe3.c b/drivers/phy/ti/phy-ti-pipe3.c
index 68ce4a082b9b..693acc167351 100644
--- a/drivers/phy/ti/phy-ti-pipe3.c
+++ b/drivers/phy/ti/phy-ti-pipe3.c
@@ -303,7 +303,7 @@ static void ti_pipe3_calibrate(struct ti_pipe3 *phy)
 
 	val = ti_pipe3_readl(phy->phy_rx, PCIEPHYRX_ANA_PROGRAMMABILITY);
 	val &= ~(INTERFACE_MASK | LOSD_MASK | MEM_PLLDIV);
-	val = (0x1 << INTERFACE_SHIFT | 0xA << LOSD_SHIFT);
+	val |= (0x1 << INTERFACE_SHIFT | 0xA << LOSD_SHIFT);
 	ti_pipe3_writel(phy->phy_rx, PCIEPHYRX_ANA_PROGRAMMABILITY, val);
 
 	val = ti_pipe3_readl(phy->phy_rx, PCIEPHYRX_DIGITAL_MODES);
-- 
2.21.0


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

* Re: [PATCH] phy: ti-pipe3: Do not overwrite the whole PROGRAMMABILITY register
  2019-02-26  9:24 [PATCH] phy: ti-pipe3: Do not overwrite the whole PROGRAMMABILITY register Rolf Evers-Fischer
@ 2019-02-26  9:26 ` Kishon Vijay Abraham I
  2019-02-26  9:45   ` Rolf Evers-Fischer
  0 siblings, 1 reply; 3+ messages in thread
From: Kishon Vijay Abraham I @ 2019-02-26  9:26 UTC (permalink / raw)
  To: Rolf Evers-Fischer, linux-kernel; +Cc: Rolf Evers-Fischer

Rolf,

On 26/02/19 2:54 PM, Rolf Evers-Fischer wrote:
> From: Rolf Evers-Fischer <rolf.evers.fischer@aptiv.com>
> 
> Previously, ti_pipe3_calibrate() wrote all bits in the
> PCIEPHYRX_ANA_PROGRAMMABILITY register, thus overwriting bits,
> which should not be modified.
> Fix ti_pipe3_calibrate() so that it only modifies LOSD and
> INTERFACE bits.

A patch to fix this was sent a week earlier by Colin
https://lkml.org/lkml/2019/2/19/459

Thanks
Kishon
> 
> Signed-off-by: Rolf Evers-Fischer <rolf.evers.fischer@aptiv.com>
> ---
>  drivers/phy/ti/phy-ti-pipe3.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/phy/ti/phy-ti-pipe3.c b/drivers/phy/ti/phy-ti-pipe3.c
> index 68ce4a082b9b..693acc167351 100644
> --- a/drivers/phy/ti/phy-ti-pipe3.c
> +++ b/drivers/phy/ti/phy-ti-pipe3.c
> @@ -303,7 +303,7 @@ static void ti_pipe3_calibrate(struct ti_pipe3 *phy)
>  
>  	val = ti_pipe3_readl(phy->phy_rx, PCIEPHYRX_ANA_PROGRAMMABILITY);
>  	val &= ~(INTERFACE_MASK | LOSD_MASK | MEM_PLLDIV);
> -	val = (0x1 << INTERFACE_SHIFT | 0xA << LOSD_SHIFT);
> +	val |= (0x1 << INTERFACE_SHIFT | 0xA << LOSD_SHIFT);
>  	ti_pipe3_writel(phy->phy_rx, PCIEPHYRX_ANA_PROGRAMMABILITY, val);
>  
>  	val = ti_pipe3_readl(phy->phy_rx, PCIEPHYRX_DIGITAL_MODES);
> 

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

* Re: [PATCH] phy: ti-pipe3: Do not overwrite the whole PROGRAMMABILITY register
  2019-02-26  9:26 ` Kishon Vijay Abraham I
@ 2019-02-26  9:45   ` Rolf Evers-Fischer
  0 siblings, 0 replies; 3+ messages in thread
From: Rolf Evers-Fischer @ 2019-02-26  9:45 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: Rolf Evers-Fischer, linux-kernel, Rolf Evers-Fischer

Kishon,

On Tue, 26 Feb 2019, Kishon Vijay Abraham I wrote:

> Rolf,
> 
> On 26/02/19 2:54 PM, Rolf Evers-Fischer wrote:
> > From: Rolf Evers-Fischer <rolf.evers.fischer@aptiv.com>
> > 
> > Previously, ti_pipe3_calibrate() wrote all bits in the
> > PCIEPHYRX_ANA_PROGRAMMABILITY register, thus overwriting bits,
> > which should not be modified.
> > Fix ti_pipe3_calibrate() so that it only modifies LOSD and
> > INTERFACE bits.
> 
> A patch to fix this was sent a week earlier by Colin
> https://lkml.org/lkml/2019/2/19/459
> 
> Thanks
> Kishon
> > 
> > Signed-off-by: Rolf Evers-Fischer <rolf.evers.fischer@aptiv.com>
> > ---
> >  drivers/phy/ti/phy-ti-pipe3.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/phy/ti/phy-ti-pipe3.c b/drivers/phy/ti/phy-ti-pipe3.c
> > index 68ce4a082b9b..693acc167351 100644
> > --- a/drivers/phy/ti/phy-ti-pipe3.c
> > +++ b/drivers/phy/ti/phy-ti-pipe3.c
> > @@ -303,7 +303,7 @@ static void ti_pipe3_calibrate(struct ti_pipe3 *phy)
> >  
> >  	val = ti_pipe3_readl(phy->phy_rx, PCIEPHYRX_ANA_PROGRAMMABILITY);
> >  	val &= ~(INTERFACE_MASK | LOSD_MASK | MEM_PLLDIV);
> > -	val = (0x1 << INTERFACE_SHIFT | 0xA << LOSD_SHIFT);
> > +	val |= (0x1 << INTERFACE_SHIFT | 0xA << LOSD_SHIFT);
> >  	ti_pipe3_writel(phy->phy_rx, PCIEPHYRX_ANA_PROGRAMMABILITY, val);
> >  
> >  	val = ti_pipe3_readl(phy->phy_rx, PCIEPHYRX_DIGITAL_MODES);
> > 
> 
please excuse me. I must have missed that one.
Therefore please forget about my previous mail.

Thanks
Rolf


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

end of thread, other threads:[~2019-02-26  9:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-26  9:24 [PATCH] phy: ti-pipe3: Do not overwrite the whole PROGRAMMABILITY register Rolf Evers-Fischer
2019-02-26  9:26 ` Kishon Vijay Abraham I
2019-02-26  9:45   ` Rolf Evers-Fischer

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.