All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: mvebu: a3700: fix the XTAL MODE pin to MPP1_9
@ 2020-11-06 10:00 Pali Rohár
  2020-11-06 10:51 ` Marek Behún
  2020-12-19 23:51 ` Stephen Boyd
  0 siblings, 2 replies; 7+ messages in thread
From: Pali Rohár @ 2020-11-06 10:00 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Gregory CLEMENT, Marek Behun
  Cc: linux-clk, linux-kernel, Terry Zhou, Konstantin Porotchkin

From: Terry Zhou <bjzhou@marvell.com>

There is an error in the current code that the XTAL MODE
pin was set to NB MPP1_31 which should be NB MPP1_9.
The latch register of NB MPP1_9 has different offset of 0x8.

Signed-off-by: Terry Zhou <bjzhou@marvell.com>
[pali: Fix pin name in commit message]
Signed-off-by: Pali Rohár <pali@kernel.org>
Fixes: 7ea8250406a6 ("clk: mvebu: Add the xtal clock for Armada 3700 SoC")
Cc: stable@vger.kernel.org

---
This patch is present in Marvell SDK and also in Marvell's kernel fork:
https://github.com/MarvellEmbeddedProcessors/linux-marvell/commit/80d4cec4cef8282e5ac3aaf98ce3e68fb299a134

Konstantin Porotchkin wrote on Github that Gregory Clement was notified
about this patch, but as this patch is still not in mainline kernel I'm
sending it again for review.

In original commit message (only in commit message, not code) was
specified MPP9 pin on South Bridge, but correct is North Bridge.
---
 drivers/clk/mvebu/armada-37xx-xtal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/mvebu/armada-37xx-xtal.c b/drivers/clk/mvebu/armada-37xx-xtal.c
index e9e306d4e9af..41271351cf1f 100644
--- a/drivers/clk/mvebu/armada-37xx-xtal.c
+++ b/drivers/clk/mvebu/armada-37xx-xtal.c
@@ -13,8 +13,8 @@
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 
-#define NB_GPIO1_LATCH	0xC
-#define XTAL_MODE	    BIT(31)
+#define NB_GPIO1_LATCH	0x8
+#define XTAL_MODE	    BIT(9)
 
 static int armada_3700_xtal_clock_probe(struct platform_device *pdev)
 {
-- 
2.20.1


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

* Re: [PATCH] clk: mvebu: a3700: fix the XTAL MODE pin to MPP1_9
  2020-11-06 10:00 [PATCH] clk: mvebu: a3700: fix the XTAL MODE pin to MPP1_9 Pali Rohár
@ 2020-11-06 10:51 ` Marek Behún
  2020-11-13 10:19   ` Pali Rohár
  2020-12-19 23:51 ` Stephen Boyd
  1 sibling, 1 reply; 7+ messages in thread
From: Marek Behún @ 2020-11-06 10:51 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Michael Turquette, Stephen Boyd, Gregory CLEMENT, linux-clk,
	linux-kernel, Terry Zhou, Konstantin Porotchkin

Also, this is how A3720 WTMI code and ATF determines XTAL clock rate.
No reason for kernel to do it differently.

Reviewed-by: Marek Behún <kabel@kernel.org>

On Fri,  6 Nov 2020 11:00:39 +0100
Pali Rohár <pali@kernel.org> wrote:

> From: Terry Zhou <bjzhou@marvell.com>
> 
> There is an error in the current code that the XTAL MODE
> pin was set to NB MPP1_31 which should be NB MPP1_9.
> The latch register of NB MPP1_9 has different offset of 0x8.
> 
> Signed-off-by: Terry Zhou <bjzhou@marvell.com>
> [pali: Fix pin name in commit message]
> Signed-off-by: Pali Rohár <pali@kernel.org>
> Fixes: 7ea8250406a6 ("clk: mvebu: Add the xtal clock for Armada 3700 SoC")
> Cc: stable@vger.kernel.org
> 
> ---
> This patch is present in Marvell SDK and also in Marvell's kernel fork:
> https://github.com/MarvellEmbeddedProcessors/linux-marvell/commit/80d4cec4cef8282e5ac3aaf98ce3e68fb299a134
> 
> Konstantin Porotchkin wrote on Github that Gregory Clement was notified
> about this patch, but as this patch is still not in mainline kernel I'm
> sending it again for review.
> 
> In original commit message (only in commit message, not code) was
> specified MPP9 pin on South Bridge, but correct is North Bridge.
> ---
>  drivers/clk/mvebu/armada-37xx-xtal.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/clk/mvebu/armada-37xx-xtal.c b/drivers/clk/mvebu/armada-37xx-xtal.c
> index e9e306d4e9af..41271351cf1f 100644
> --- a/drivers/clk/mvebu/armada-37xx-xtal.c
> +++ b/drivers/clk/mvebu/armada-37xx-xtal.c
> @@ -13,8 +13,8 @@
>  #include <linux/platform_device.h>
>  #include <linux/regmap.h>
>  
> -#define NB_GPIO1_LATCH	0xC
> -#define XTAL_MODE	    BIT(31)
> +#define NB_GPIO1_LATCH	0x8
> +#define XTAL_MODE	    BIT(9)
>  
>  static int armada_3700_xtal_clock_probe(struct platform_device *pdev)
>  {


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

* Re: [PATCH] clk: mvebu: a3700: fix the XTAL MODE pin to MPP1_9
  2020-11-06 10:51 ` Marek Behún
@ 2020-11-13 10:19   ` Pali Rohár
  2020-12-01  9:46     ` Pali Rohár
  0 siblings, 1 reply; 7+ messages in thread
From: Pali Rohár @ 2020-11-13 10:19 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd
  Cc: Marek Behún, Gregory CLEMENT, linux-clk, linux-kernel,
	Terry Zhou, Konstantin Porotchkin

Michael, Stephen: Could you take this clk patch?

On Friday 06 November 2020 11:51:18 Marek Behún wrote:
> Also, this is how A3720 WTMI code and ATF determines XTAL clock rate.
> No reason for kernel to do it differently.
> 
> Reviewed-by: Marek Behún <kabel@kernel.org>
> 
> On Fri,  6 Nov 2020 11:00:39 +0100
> Pali Rohár <pali@kernel.org> wrote:
> 
> > From: Terry Zhou <bjzhou@marvell.com>
> > 
> > There is an error in the current code that the XTAL MODE
> > pin was set to NB MPP1_31 which should be NB MPP1_9.
> > The latch register of NB MPP1_9 has different offset of 0x8.
> > 
> > Signed-off-by: Terry Zhou <bjzhou@marvell.com>
> > [pali: Fix pin name in commit message]
> > Signed-off-by: Pali Rohár <pali@kernel.org>
> > Fixes: 7ea8250406a6 ("clk: mvebu: Add the xtal clock for Armada 3700 SoC")
> > Cc: stable@vger.kernel.org
> > 
> > ---
> > This patch is present in Marvell SDK and also in Marvell's kernel fork:
> > https://github.com/MarvellEmbeddedProcessors/linux-marvell/commit/80d4cec4cef8282e5ac3aaf98ce3e68fb299a134
> > 
> > Konstantin Porotchkin wrote on Github that Gregory Clement was notified
> > about this patch, but as this patch is still not in mainline kernel I'm
> > sending it again for review.
> > 
> > In original commit message (only in commit message, not code) was
> > specified MPP9 pin on South Bridge, but correct is North Bridge.
> > ---
> >  drivers/clk/mvebu/armada-37xx-xtal.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/clk/mvebu/armada-37xx-xtal.c b/drivers/clk/mvebu/armada-37xx-xtal.c
> > index e9e306d4e9af..41271351cf1f 100644
> > --- a/drivers/clk/mvebu/armada-37xx-xtal.c
> > +++ b/drivers/clk/mvebu/armada-37xx-xtal.c
> > @@ -13,8 +13,8 @@
> >  #include <linux/platform_device.h>
> >  #include <linux/regmap.h>
> >  
> > -#define NB_GPIO1_LATCH	0xC
> > -#define XTAL_MODE	    BIT(31)
> > +#define NB_GPIO1_LATCH	0x8
> > +#define XTAL_MODE	    BIT(9)
> >  
> >  static int armada_3700_xtal_clock_probe(struct platform_device *pdev)
> >  {
> 

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

* Re: [PATCH] clk: mvebu: a3700: fix the XTAL MODE pin to MPP1_9
  2020-11-13 10:19   ` Pali Rohár
@ 2020-12-01  9:46     ` Pali Rohár
  0 siblings, 0 replies; 7+ messages in thread
From: Pali Rohár @ 2020-12-01  9:46 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd
  Cc: Marek Behún, Gregory CLEMENT, linux-clk, linux-kernel,
	Terry Zhou, Konstantin Porotchkin

PING! I would like to remind this patch.

On Friday 13 November 2020 11:19:19 Pali Rohár wrote:
> Michael, Stephen: Could you take this clk patch?
> 
> On Friday 06 November 2020 11:51:18 Marek Behún wrote:
> > Also, this is how A3720 WTMI code and ATF determines XTAL clock rate.
> > No reason for kernel to do it differently.
> > 
> > Reviewed-by: Marek Behún <kabel@kernel.org>
> > 
> > On Fri,  6 Nov 2020 11:00:39 +0100
> > Pali Rohár <pali@kernel.org> wrote:
> > 
> > > From: Terry Zhou <bjzhou@marvell.com>
> > > 
> > > There is an error in the current code that the XTAL MODE
> > > pin was set to NB MPP1_31 which should be NB MPP1_9.
> > > The latch register of NB MPP1_9 has different offset of 0x8.
> > > 
> > > Signed-off-by: Terry Zhou <bjzhou@marvell.com>
> > > [pali: Fix pin name in commit message]
> > > Signed-off-by: Pali Rohár <pali@kernel.org>
> > > Fixes: 7ea8250406a6 ("clk: mvebu: Add the xtal clock for Armada 3700 SoC")
> > > Cc: stable@vger.kernel.org
> > > 
> > > ---
> > > This patch is present in Marvell SDK and also in Marvell's kernel fork:
> > > https://github.com/MarvellEmbeddedProcessors/linux-marvell/commit/80d4cec4cef8282e5ac3aaf98ce3e68fb299a134
> > > 
> > > Konstantin Porotchkin wrote on Github that Gregory Clement was notified
> > > about this patch, but as this patch is still not in mainline kernel I'm
> > > sending it again for review.
> > > 
> > > In original commit message (only in commit message, not code) was
> > > specified MPP9 pin on South Bridge, but correct is North Bridge.
> > > ---
> > >  drivers/clk/mvebu/armada-37xx-xtal.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/clk/mvebu/armada-37xx-xtal.c b/drivers/clk/mvebu/armada-37xx-xtal.c
> > > index e9e306d4e9af..41271351cf1f 100644
> > > --- a/drivers/clk/mvebu/armada-37xx-xtal.c
> > > +++ b/drivers/clk/mvebu/armada-37xx-xtal.c
> > > @@ -13,8 +13,8 @@
> > >  #include <linux/platform_device.h>
> > >  #include <linux/regmap.h>
> > >  
> > > -#define NB_GPIO1_LATCH	0xC
> > > -#define XTAL_MODE	    BIT(31)
> > > +#define NB_GPIO1_LATCH	0x8
> > > +#define XTAL_MODE	    BIT(9)
> > >  
> > >  static int armada_3700_xtal_clock_probe(struct platform_device *pdev)
> > >  {
> > 

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

* Re: [PATCH] clk: mvebu: a3700: fix the XTAL MODE pin to MPP1_9
  2020-11-06 10:00 [PATCH] clk: mvebu: a3700: fix the XTAL MODE pin to MPP1_9 Pali Rohár
  2020-11-06 10:51 ` Marek Behún
@ 2020-12-19 23:51 ` Stephen Boyd
  2020-12-20 16:21   ` Pali Rohár
  1 sibling, 1 reply; 7+ messages in thread
From: Stephen Boyd @ 2020-12-19 23:51 UTC (permalink / raw)
  To: Gregory CLEMENT, Marek Behun, Michael Turquette, Pali Rohár
  Cc: linux-clk, linux-kernel, Terry Zhou, Konstantin Porotchkin

Quoting Pali Rohár (2020-11-06 02:00:39)
> From: Terry Zhou <bjzhou@marvell.com>
> 
> There is an error in the current code that the XTAL MODE
> pin was set to NB MPP1_31 which should be NB MPP1_9.
> The latch register of NB MPP1_9 has different offset of 0x8.
> 
> Signed-off-by: Terry Zhou <bjzhou@marvell.com>
> [pali: Fix pin name in commit message]
> Signed-off-by: Pali Rohár <pali@kernel.org>
> Fixes: 7ea8250406a6 ("clk: mvebu: Add the xtal clock for Armada 3700 SoC")
> Cc: stable@vger.kernel.org
> 
> ---

Applied to clk-next

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

* Re: [PATCH] clk: mvebu: a3700: fix the XTAL MODE pin to MPP1_9
  2020-12-19 23:51 ` Stephen Boyd
@ 2020-12-20 16:21   ` Pali Rohár
  2020-12-21  1:47     ` Stephen Boyd
  0 siblings, 1 reply; 7+ messages in thread
From: Pali Rohár @ 2020-12-20 16:21 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Gregory CLEMENT, Marek Behun, Michael Turquette, linux-clk,
	linux-kernel, Terry Zhou, Konstantin Porotchkin

On Saturday 19 December 2020 15:51:30 Stephen Boyd wrote:
> Quoting Pali Rohár (2020-11-06 02:00:39)
> > From: Terry Zhou <bjzhou@marvell.com>
> > 
> > There is an error in the current code that the XTAL MODE
> > pin was set to NB MPP1_31 which should be NB MPP1_9.
> > The latch register of NB MPP1_9 has different offset of 0x8.
> > 
> > Signed-off-by: Terry Zhou <bjzhou@marvell.com>
> > [pali: Fix pin name in commit message]
> > Signed-off-by: Pali Rohár <pali@kernel.org>
> > Fixes: 7ea8250406a6 ("clk: mvebu: Add the xtal clock for Armada 3700 SoC")
> > Cc: stable@vger.kernel.org
> > 
> > ---
> 
> Applied to clk-next

Hello Stephen! As this is fix also for stable releases, could you please
queue this patch for 5.11 release?

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

* Re: [PATCH] clk: mvebu: a3700: fix the XTAL MODE pin to MPP1_9
  2020-12-20 16:21   ` Pali Rohár
@ 2020-12-21  1:47     ` Stephen Boyd
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Boyd @ 2020-12-21  1:47 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Gregory CLEMENT, Marek Behun, Michael Turquette, linux-clk,
	linux-kernel, Terry Zhou, Konstantin Porotchkin

Quoting Pali Rohár (2020-12-20 08:21:35)
> On Saturday 19 December 2020 15:51:30 Stephen Boyd wrote:
> > Quoting Pali Rohár (2020-11-06 02:00:39)
> > > From: Terry Zhou <bjzhou@marvell.com>
> > > 
> > > There is an error in the current code that the XTAL MODE
> > > pin was set to NB MPP1_31 which should be NB MPP1_9.
> > > The latch register of NB MPP1_9 has different offset of 0x8.
> > > 
> > > Signed-off-by: Terry Zhou <bjzhou@marvell.com>
> > > [pali: Fix pin name in commit message]
> > > Signed-off-by: Pali Rohár <pali@kernel.org>
> > > Fixes: 7ea8250406a6 ("clk: mvebu: Add the xtal clock for Armada 3700 SoC")
> > > Cc: stable@vger.kernel.org
> > > 
> > > ---
> > 
> > Applied to clk-next
> 
> Hello Stephen! As this is fix also for stable releases, could you please
> queue this patch for 5.11 release?

No problem.

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

end of thread, other threads:[~2020-12-21  1:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06 10:00 [PATCH] clk: mvebu: a3700: fix the XTAL MODE pin to MPP1_9 Pali Rohár
2020-11-06 10:51 ` Marek Behún
2020-11-13 10:19   ` Pali Rohár
2020-12-01  9:46     ` Pali Rohár
2020-12-19 23:51 ` Stephen Boyd
2020-12-20 16:21   ` Pali Rohár
2020-12-21  1:47     ` Stephen Boyd

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.