linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: f.fainelli@gmail.com (Florian Fainelli)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/4] ARM: ep93xx: tidy up TS-72xx Watchdog resources
Date: Sun,  3 Sep 2017 10:43:46 -0700	[thread overview]
Message-ID: <20170903174347.6148-4-f.fainelli@gmail.com> (raw)
In-Reply-To: <20170903174347.6148-1-f.fainelli@gmail.com>

From: H Hartley Sweeten <hsweeten@visionengravers.com>

The ts-72xx watchdog uses two byte sized registers. Tidy up the resource
declaration so that the proper information is shown in /proc/iomem.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
---
 arch/arm/mach-ep93xx/ts72xx.c | 20 +++++++++-----------
 arch/arm/mach-ep93xx/ts72xx.h |  3 ---
 2 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index 55b186ef863a..55ca3b375952 100644
--- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -186,24 +186,22 @@ static struct platform_device ts72xx_rtc_device = {
 	.num_resources 	= ARRAY_SIZE(ts72xx_rtc_resources),
 };
 
+/*************************************************************************
+ * Watchdog (in CPLD)
+ *************************************************************************/
+#define TS72XX_WDT_CONTROL_PHYS_BASE	(EP93XX_CS2_PHYS_BASE + 0x03800000)
+#define TS72XX_WDT_FEED_PHYS_BASE	(EP93XX_CS2_PHYS_BASE + 0x03c00000)
+
 static struct resource ts72xx_wdt_resources[] = {
-	{
-		.start	= TS72XX_WDT_CONTROL_PHYS_BASE,
-		.end	= TS72XX_WDT_CONTROL_PHYS_BASE + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	{
-		.start	= TS72XX_WDT_FEED_PHYS_BASE,
-		.end	= TS72XX_WDT_FEED_PHYS_BASE + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
+	DEFINE_RES_MEM(TS72XX_WDT_CONTROL_PHYS_BASE, 0x01),
+	DEFINE_RES_MEM(TS72XX_WDT_FEED_PHYS_BASE, 0x01),
 };
 
 static struct platform_device ts72xx_wdt_device = {
 	.name		= "ts72xx-wdt",
 	.id		= -1,
-	.num_resources 	= ARRAY_SIZE(ts72xx_wdt_resources),
 	.resource	= ts72xx_wdt_resources,
+	.num_resources	= ARRAY_SIZE(ts72xx_wdt_resources),
 };
 
 static struct ep93xx_eth_data __initdata ts72xx_eth_data = {
diff --git a/arch/arm/mach-ep93xx/ts72xx.h b/arch/arm/mach-ep93xx/ts72xx.h
index 2255ba29fdd6..4e6519b2a3c4 100644
--- a/arch/arm/mach-ep93xx/ts72xx.h
+++ b/arch/arm/mach-ep93xx/ts72xx.h
@@ -38,9 +38,6 @@
 #define TS72XX_OPTIONS2_TS9420		0x04
 #define TS72XX_OPTIONS2_TS9420_BOOT	0x02
 
-#define TS72XX_WDT_CONTROL_PHYS_BASE	0x23800000
-#define TS72XX_WDT_FEED_PHYS_BASE	0x23c00000
-
 #ifndef __ASSEMBLY__
 
 static inline int ts72xx_model(void)
-- 
2.11.0

  parent reply	other threads:[~2017-09-03 17:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-03 17:43 [PATCH v2 0/4] ARM: ep93xx: various updates Florian Fainelli
2017-09-03 17:43 ` [PATCH v2 1/4] ARM: ep93xx: switch to SPARSEMEM Florian Fainelli
2017-09-03 17:58   ` Alexander Sverdlin
2017-09-03 17:43 ` [PATCH v2 2/4] ARM: ep93xx: simone: let the mmc_spi driver handle the card detect Florian Fainelli
2017-09-03 17:58   ` Alexander Sverdlin
2017-09-03 17:43 ` Florian Fainelli [this message]
2017-09-03 17:58   ` [PATCH v2 3/4] ARM: ep93xx: tidy up TS-72xx Watchdog resources Alexander Sverdlin
2017-09-03 17:43 ` [PATCH v2 4/4] ARM: ep93xx: Add lm70 HWMON sensor to TS-72xx boards Florian Fainelli
2017-09-03 17:59   ` Alexander Sverdlin
2017-09-05  6:50 ` [PATCH v2 0/4] ARM: ep93xx: various updates Linus Walleij
2017-09-05 15:54   ` Hartley Sweeten

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=20170903174347.6148-4-f.fainelli@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).