All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: linux-kernel@vger.kernel.org
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Brian Hutchinson <b.hutchman@gmail.com>,
	Delio Brignoli <dbrignoli@audioscience.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Matthijs van Duin <matthijsvanduin@gmail.com>,
	Philipp Rosenberger <ilu@linutronix.de>,
	Paul Walmsley <paul@pwsan.com>
Subject: [PATCH 05/10] ARM: OMAP2+: Disable GPIO softreset for dm81xx
Date: Tue,  1 Dec 2015 15:38:18 -0800	[thread overview]
Message-ID: <1449013103-23238-6-git-send-email-tony@atomide.com> (raw)
In-Reply-To: <1449013103-23238-1-git-send-email-tony@atomide.com>

Looks like GPIO softreset status bit on both dm8168 and dm8148
is broken and only goes high initially. After writing to sysc
softreset bit, the resetdone bit never goes high again.

I noticed this as GPIOs are enabled from u-boot at least on t410.
And this can be tested easliy with the following commands in u-boot:

# mw.l 0x4818155c 0x2
# md.l 0x48032114 1
48032114: 00000001    ....
# mw.l 0x48032010 0x2
# md.l 0x48032114 1
48032114: 00000000    ....

Looks like the GPIO module is functional even with the resetdone
bit down.

Let's just tag the GPIOs for dm81xx with HWMOD_INIT_NO_RESET.

Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/omap_hwmod_81xx_data.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
index 1b96cdf..440fd6c 100644
--- a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
@@ -432,6 +432,7 @@ static struct omap_hwmod_ocp_if dm81xx_l4_ls__elm = {
 	.user		= OCP_USER_MPU,
 };
 
+/* On dm81xx RESETDONE bit seems to never goes high again after SOFTRESET */
 static struct omap_hwmod_class_sysconfig dm81xx_gpio_sysc = {
 	.rev_offs	= 0x0000,
 	.sysc_offs	= 0x0010,
@@ -463,6 +464,7 @@ static struct omap_hwmod dm81xx_gpio1_hwmod = {
 	.name		= "gpio1",
 	.clkdm_name	= "alwon_l3s_clkdm",
 	.class		= &dm81xx_gpio_hwmod_class,
+	.flags		= HWMOD_INIT_NO_RESET,
 	.main_clk	= "sysclk6_ck",
 	.prcm = {
 		.omap4 = {
@@ -490,6 +492,7 @@ static struct omap_hwmod dm81xx_gpio2_hwmod = {
 	.clkdm_name	= "alwon_l3s_clkdm",
 	.class		= &dm81xx_gpio_hwmod_class,
 	.main_clk	= "sysclk6_ck",
+	.flags		= HWMOD_INIT_NO_RESET,
 	.prcm = {
 		.omap4 = {
 			.clkctrl_offs = DM81XX_CM_ALWON_GPIO_1_CLKCTRL,
-- 
2.6.2


WARNING: multiple messages have this Message-ID (diff)
From: Tony Lindgren <tony@atomide.com>
To: linux-kernel@vger.kernel.org
Cc: Paul Walmsley <paul@pwsan.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Matthijs van Duin <matthijsvanduin@gmail.com>,
	Philipp Rosenberger <ilu@linutronix.de>,
	Delio Brignoli <dbrignoli@audioscience.com>,
	linux-omap@vger.kernel.org,
	Brian Hutchinson <b.hutchman@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 05/10] ARM: OMAP2+: Disable GPIO softreset for dm81xx
Date: Tue,  1 Dec 2015 15:38:18 -0800	[thread overview]
Message-ID: <1449013103-23238-6-git-send-email-tony@atomide.com> (raw)
In-Reply-To: <1449013103-23238-1-git-send-email-tony@atomide.com>

Looks like GPIO softreset status bit on both dm8168 and dm8148
is broken and only goes high initially. After writing to sysc
softreset bit, the resetdone bit never goes high again.

I noticed this as GPIOs are enabled from u-boot at least on t410.
And this can be tested easliy with the following commands in u-boot:

# mw.l 0x4818155c 0x2
# md.l 0x48032114 1
48032114: 00000001    ....
# mw.l 0x48032010 0x2
# md.l 0x48032114 1
48032114: 00000000    ....

Looks like the GPIO module is functional even with the resetdone
bit down.

Let's just tag the GPIOs for dm81xx with HWMOD_INIT_NO_RESET.

Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/omap_hwmod_81xx_data.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
index 1b96cdf..440fd6c 100644
--- a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
@@ -432,6 +432,7 @@ static struct omap_hwmod_ocp_if dm81xx_l4_ls__elm = {
 	.user		= OCP_USER_MPU,
 };
 
+/* On dm81xx RESETDONE bit seems to never goes high again after SOFTRESET */
 static struct omap_hwmod_class_sysconfig dm81xx_gpio_sysc = {
 	.rev_offs	= 0x0000,
 	.sysc_offs	= 0x0010,
@@ -463,6 +464,7 @@ static struct omap_hwmod dm81xx_gpio1_hwmod = {
 	.name		= "gpio1",
 	.clkdm_name	= "alwon_l3s_clkdm",
 	.class		= &dm81xx_gpio_hwmod_class,
+	.flags		= HWMOD_INIT_NO_RESET,
 	.main_clk	= "sysclk6_ck",
 	.prcm = {
 		.omap4 = {
@@ -490,6 +492,7 @@ static struct omap_hwmod dm81xx_gpio2_hwmod = {
 	.clkdm_name	= "alwon_l3s_clkdm",
 	.class		= &dm81xx_gpio_hwmod_class,
 	.main_clk	= "sysclk6_ck",
+	.flags		= HWMOD_INIT_NO_RESET,
 	.prcm = {
 		.omap4 = {
 			.clkctrl_offs = DM81XX_CM_ALWON_GPIO_1_CLKCTRL,
-- 
2.6.2

WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 05/10] ARM: OMAP2+: Disable GPIO softreset for dm81xx
Date: Tue,  1 Dec 2015 15:38:18 -0800	[thread overview]
Message-ID: <1449013103-23238-6-git-send-email-tony@atomide.com> (raw)
In-Reply-To: <1449013103-23238-1-git-send-email-tony@atomide.com>

Looks like GPIO softreset status bit on both dm8168 and dm8148
is broken and only goes high initially. After writing to sysc
softreset bit, the resetdone bit never goes high again.

I noticed this as GPIOs are enabled from u-boot at least on t410.
And this can be tested easliy with the following commands in u-boot:

# mw.l 0x4818155c 0x2
# md.l 0x48032114 1
48032114: 00000001    ....
# mw.l 0x48032010 0x2
# md.l 0x48032114 1
48032114: 00000000    ....

Looks like the GPIO module is functional even with the resetdone
bit down.

Let's just tag the GPIOs for dm81xx with HWMOD_INIT_NO_RESET.

Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/omap_hwmod_81xx_data.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
index 1b96cdf..440fd6c 100644
--- a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
@@ -432,6 +432,7 @@ static struct omap_hwmod_ocp_if dm81xx_l4_ls__elm = {
 	.user		= OCP_USER_MPU,
 };
 
+/* On dm81xx RESETDONE bit seems to never goes high again after SOFTRESET */
 static struct omap_hwmod_class_sysconfig dm81xx_gpio_sysc = {
 	.rev_offs	= 0x0000,
 	.sysc_offs	= 0x0010,
@@ -463,6 +464,7 @@ static struct omap_hwmod dm81xx_gpio1_hwmod = {
 	.name		= "gpio1",
 	.clkdm_name	= "alwon_l3s_clkdm",
 	.class		= &dm81xx_gpio_hwmod_class,
+	.flags		= HWMOD_INIT_NO_RESET,
 	.main_clk	= "sysclk6_ck",
 	.prcm = {
 		.omap4 = {
@@ -490,6 +492,7 @@ static struct omap_hwmod dm81xx_gpio2_hwmod = {
 	.clkdm_name	= "alwon_l3s_clkdm",
 	.class		= &dm81xx_gpio_hwmod_class,
 	.main_clk	= "sysclk6_ck",
+	.flags		= HWMOD_INIT_NO_RESET,
 	.prcm = {
 		.omap4 = {
 			.clkctrl_offs = DM81XX_CM_ALWON_GPIO_1_CLKCTRL,
-- 
2.6.2

  parent reply	other threads:[~2015-12-01 23:40 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-01 23:38 [PATCH 00/10] Patches to get dm814x-evm booting to NFSroot Tony Lindgren
2015-12-01 23:38 ` Tony Lindgren
2015-12-01 23:38 ` [PATCH 01/10] ARM: OMAP2+: Fix timer entries for dm814x Tony Lindgren
2015-12-01 23:38   ` Tony Lindgren
2015-12-01 23:38 ` [PATCH 02/10] clk: ti: Add few dm814x clock aliases Tony Lindgren
2015-12-01 23:38   ` Tony Lindgren
2015-12-08 16:57   ` Tony Lindgren
2015-12-08 16:57     ` Tony Lindgren
2015-12-08 19:26     ` Tero Kristo
2015-12-08 19:26       ` Tero Kristo
2015-12-08 19:26       ` Tero Kristo
2015-12-08 20:11       ` Tony Lindgren
2015-12-08 20:11         ` Tony Lindgren
2015-12-09  7:51         ` Tero Kristo
2015-12-09  7:51           ` Tero Kristo
2015-12-09  7:51           ` Tero Kristo
2015-12-10  0:56           ` Tony Lindgren
2015-12-10  0:56             ` Tony Lindgren
2015-12-01 23:38 ` [PATCH 03/10] ARM: OMAP2+: Add DPPLS clock manager for dm814x Tony Lindgren
2015-12-01 23:38   ` Tony Lindgren
2015-12-01 23:38 ` [PATCH 04/10] ARM: OMAP2+: Enable GPIO " Tony Lindgren
2015-12-01 23:38   ` Tony Lindgren
2015-12-01 23:38 ` Tony Lindgren [this message]
2015-12-01 23:38   ` [PATCH 05/10] ARM: OMAP2+: Disable GPIO softreset for dm81xx Tony Lindgren
2015-12-01 23:38   ` Tony Lindgren
2015-12-02  0:10   ` Matthijs van Duin
2015-12-02  0:10     ` Matthijs van Duin
2015-12-02  0:10     ` Matthijs van Duin
2015-12-02  0:41     ` Tony Lindgren
2015-12-02  0:41       ` Tony Lindgren
2015-12-02  0:41       ` Tony Lindgren
2015-12-02  0:54       ` Tony Lindgren
2015-12-02  0:54         ` Tony Lindgren
2015-12-02  0:54         ` Tony Lindgren
2015-12-02  1:38         ` Tony Lindgren
2015-12-02  1:38           ` Tony Lindgren
2015-12-02  1:38           ` Tony Lindgren
2015-12-01 23:38 ` [PATCH 06/10] ARM: OMAP2+: Remove useless check for legacy booting for dm814x Tony Lindgren
2015-12-01 23:38   ` Tony Lindgren
2015-12-01 23:38 ` [PATCH 07/10] ARM: dts: Fix dm814x entries for pllss and prcm Tony Lindgren
2015-12-01 23:38   ` Tony Lindgren
2015-12-01 23:38 ` [PATCH 08/10] ARM: dts: Fix some mux and divider clocks to get dm814x-evm booting Tony Lindgren
2015-12-01 23:38   ` Tony Lindgren
2015-12-01 23:38 ` [PATCH 09/10] ARM: dts: Fix dm8148 control modules ranges Tony Lindgren
2015-12-01 23:38   ` Tony Lindgren
2015-12-01 23:38 ` [PATCH 10/10] ARM: dts: Fix dm814x pinctrl address and mask Tony Lindgren
2015-12-01 23:38   ` Tony Lindgren
2015-12-02  0:25   ` Matthijs van Duin
2015-12-02  0:25     ` Matthijs van Duin
2015-12-02  0:25     ` Matthijs van Duin
2015-12-02  0:46     ` Tony Lindgren
2015-12-02  0:46       ` Tony Lindgren
2015-12-02  0:46       ` Tony Lindgren
2015-12-02  1:14       ` Matthijs van Duin
2015-12-02  1:14         ` Matthijs van Duin
2015-12-02  1:14         ` Matthijs van Duin
2015-12-02  1:22         ` Tony Lindgren
2015-12-02  1:22           ` Tony Lindgren
2015-12-02  1:22           ` Tony Lindgren
2015-12-02 16:09           ` Tony Lindgren
2015-12-02 16:09             ` Tony Lindgren
2015-12-02 16:09             ` Tony Lindgren
2015-12-02  1:21       ` Matthijs van Duin
2015-12-02  1:21         ` Matthijs van Duin
2015-12-02  1:21         ` Matthijs van Duin
2015-12-02 16:13         ` Tony Lindgren
2015-12-02 16:13           ` Tony Lindgren
2015-12-02 16:13           ` Tony Lindgren
2015-12-03 18:17 ` [PATCH 00/10] Patches to get dm814x-evm booting to NFSroot Grygorii Strashko
2015-12-03 18:17   ` Grygorii Strashko
2015-12-03 18:17   ` Grygorii Strashko
2015-12-03 19:21   ` Tony Lindgren
2015-12-03 19:21     ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1449013103-23238-6-git-send-email-tony@atomide.com \
    --to=tony@atomide.com \
    --cc=b.hutchman@gmail.com \
    --cc=dbrignoli@audioscience.com \
    --cc=ilu@linutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=matthijsvanduin@gmail.com \
    --cc=narmstrong@baylibre.com \
    --cc=paul@pwsan.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.