Skip to contentSkip to conversation

imx2-wdt: Add regmap-mmio support

PATCH In review Xiubo Li 2 participants 6 messages Apr 4, 2014 – May 27, 2014

Subsystems (2)
lore
Share & tools
lore

Xiubo Li

author
#0 lore raw

v5 cover imx2-wdt: Add regmap-mmio support

This patches are preparing for Vybird, LS1 and LS2. And on LS1 the IP will in BE mode.

Changes in V5:
- Select the REGMAP_MMIO default for IMX2 Watchdog.

Changes in V4:
- Add the explanation why uing the regmap APIs.

Changes in V3:
- convert to use regmap-mmio API.

Changes in V2:
- Add the detail information in the commit comment.
- 'big-endians' --> 'big-endian'.

Xiubo Li (2):
watchdog: imx2_wdt: Sort the header files alphabetically
watchdog: imx2_wdt: convert to use regmap API.

 drivers/watchdog/Kconfig    |  1 +
 drivers/watchdog/imx2_wdt.c | 62 +++++++++++++++++++++++++++------------------
 2 files changed, 39 insertions(+), 24 deletions(-)
Signature · 1 line
1.8.4
author
#1 lore raw

PATCH v5 1/2 watchdog: imx2_wdt: Sort the header files alphabetically

---
 drivers/watchdog/imx2_wdt.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/watchdog/imx2_wdt.c +6 -6
index dd51d95..1795922 100644
@@ -21,19 +21,19 @@
  * Halt on suspend:	Manual		Can be automatic
  */
 
+#include <linux/clk.h>
+#include <linux/fs.h>
 #include <linux/init.h>
+#include <linux/io.h>
+#include <linux/jiffies.h>
 #include <linux/kernel.h>
 #include <linux/miscdevice.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/platform_device.h>
-#include <linux/watchdog.h>
-#include <linux/clk.h>
-#include <linux/fs.h>
-#include <linux/io.h>
-#include <linux/uaccess.h>
 #include <linux/timer.h>
-#include <linux/jiffies.h>
+#include <linux/uaccess.h>
+#include <linux/watchdog.h>
 
 #define DRIVER_NAME "imx2-wdt"
 
Signature · 1 line
1.8.4
author
#2 lore raw

PATCH v5 2/2 watchdog: imx2_wdt: convert to use regmap API.

In reply to Xiubo Li

This watchdog driver will be working on IMX2+, Vybrid, LS1, LS2+ platforms, and will be in different endianness mode in those SoCs:

SoCs CPU endian mode WDT endian mode
------------------------------------------------

IMX2+            LE                    LE
Vybird           LE                    LE
LS1              LE                    BE
LS2              LE                    LE

Other possible SoCs:
SoCs CPU endian mode WDT endian mode
------------------------------------------------

Soc1             BE                    BE
Soc2             BE                    LE

And also the watchdog's registers will be 32-bits for some versions, and though it is 16-bits in IMX2+, Vybird and LS+.

Using the regmap APIs, could be more easy to support different endianness and also more easy to support 32-bits version...

---
 drivers/watchdog/Kconfig    |  1 +
 drivers/watchdog/imx2_wdt.c | 50 +++++++++++++++++++++++++++++----------------
 2 files changed, 33 insertions(+), 18 deletions(-)
drivers/watchdog/Kconfig +1 -0
index 79d2589..3e55fa9 100644
@@ -369,6 +369,7 @@ config MAX63XX_WATCHDOG
 config IMX2_WDT
 	tristate "IMX2+ Watchdog"
 	depends on ARCH_MXC
+	select REGMAP_MMIO
 	help
 	  This is the driver for the hardware watchdog
 	  on the Freescale IMX2 and later processors.
drivers/watchdog/imx2_wdt.c +32 -18

110 lines not on this page · raw message

Signature · 1 line
1.8.4
#3 lore raw
In reply to Xiubo Li

Wim Van Sebroeck,

Ping:)

Quoted 39 lines

-----Original Message-----
From: Xiubo Li [mailto:[email protected]]
Sent: Friday, April 04, 2014 9:33 AM
To: [email protected]; [email protected]
Cc: [email protected]; Xiubo Li-B47053
Subject: [PATCHv5 0/2] imx2-wdt: Add regmap-mmio support

This patches are preparing for Vybird, LS1 and LS2. And on LS1 the IP will in BE mode.

Changes in V5:
- Select the REGMAP_MMIO default for IMX2 Watchdog.

Changes in V4:
- Add the explanation why uing the regmap APIs.

Changes in V3:
- convert to use regmap-mmio API.

Changes in V2:
- Add the detail information in the commit comment.
- 'big-endians' --> 'big-endian'.

Xiubo Li (2):
watchdog: imx2_wdt: Sort the header files alphabetically
watchdog: imx2_wdt: convert to use regmap API.

 drivers/watchdog/Kconfig    |  1 +
 drivers/watchdog/imx2_wdt.c | 62 +++++++++++++++++++++++++++-----------------
-
 2 files changed, 39 insertions(+), 24 deletions(-)

--
1.8.4

#4 lore raw
In reply to Xiubo Li

Hi Xiubo,

Quoted 20 lines

This patches are preparing for Vybird, LS1 and LS2. And on LS1 the IP will in BE mode.

Changes in V5:
- Select the REGMAP_MMIO default for IMX2 Watchdog.

Changes in V4:
- Add the explanation why uing the regmap APIs.

Changes in V3:
- convert to use regmap-mmio API.

Changes in V2:
- Add the detail information in the commit comment.
- 'big-endians' --> 'big-endian'.

Quoted 7 lines

Xiubo Li (2):
watchdog: imx2_wdt: Sort the header files alphabetically
watchdog: imx2_wdt: convert to use regmap API.

 drivers/watchdog/Kconfig    |  1 +
 drivers/watchdog/imx2_wdt.c | 62 +++++++++++++++++++++++++++------------------
 2 files changed, 39 insertions(+), 24 deletions(-)

both patches have been added to linux-watchdog-next.

Kind regards,
Wim.

#5 lore raw
Quoted 5 lines
Quoted 5 lines

Xiubo Li (2):
watchdog: imx2_wdt: Sort the header files alphabetically
watchdog: imx2_wdt: convert to use regmap API.

Quoted 7 lines
Quoted 2 lines
 drivers/watchdog/Kconfig    |  1 +
 drivers/watchdog/imx2_wdt.c | 62 +++++++++++++++++++++++++++---------------

---

Quoted 1 line
 2 files changed, 39 insertions(+), 24 deletions(-)

both patches have been added to linux-watchdog-next.

Thanks very much,

BRs
Xiubo