Skip to contentSkip to conversation

socfpga: Adding DesignWare watchdog support

PATCH New Chin Liang See 2 participants 5 messages Feb 21, 2014 – Mar 4, 2014 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH v3 2/2 socfpga: Adding DesignWare watchdog support

To enable the DesignWare watchdog support at SOCFPGA Cyclone V dev kit.

Cc Anatolij Gustschin <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Heiko Schocher <[email protected]>
Cc Tom Rini <[email protected]>

---
Changes for v3
- Split to 2 series patch
Changes for v2
- Enable this driver at socfpga_cyclone5 board

---
 .../include/asm/arch-socfpga/socfpga_base_addrs.h  |    1 +
 include/configs/socfpga_cyclone5.h                 |   13 +++++++++++++
 2 files changed, 14 insertions(+)
arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h +1 -0
index 20f12e0..5f73824 100644
@@ -11,6 +11,7 @@
 #define SOCFPGA_UART0_ADDRESS 0xffc02000
 #define SOCFPGA_UART1_ADDRESS 0xffc03000
 #define SOCFPGA_OSC1TIMER0_ADDRESS 0xffd00000
+#define SOCFPGA_L4WD0_ADDRESS 0xffd02000
 #define SOCFPGA_CLKMGR_ADDRESS 0xffd04000
 #define SOCFPGA_RSTMGR_ADDRESS 0xffd05000
 #define SOCFPGA_SYSMGR_ADDRESS 0xffd08000
include/configs/socfpga_cyclone5.h +13 -0
index fc921ee..1b78ccb 100644
@@ -207,6 +207,16 @@
 #define CONFIG_ENV_IS_NOWHERE
 
 /*
+ * L4 Watchdog
+ */
+#define CONFIG_HW_WATCHDOG
+#define CONFIG_HW_WATCHDOG_TIMEOUT_MS	2000
+#define CONFIG_DESIGNWARE_WATCHDOG
+#define CONFIG_DW_WDT_BASE		SOCFPGA_L4WD0_ADDRESS
+/* Clocks source frequency to watchdog timer */
+#define CONFIG_DW_WDT_CLOCK_KHZ		25000
+
+/*
  * SPL "Second Program Loader" aka Initial Software
  */
 
@@ -238,4 +248,7 @@
 /* Support for lib/libgeneric.o in SPL binary */
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
 
+/* Support for watchdog */
+#define CONFIG_SPL_WATCHDOG_SUPPORT
+
 #endif	/* __CONFIG_H */
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v3 2/2 socfpga: Adding DesignWare watchdog support

Quoted 35 lines · Chin Liang See

To enable the DesignWare watchdog support at SOCFPGA Cyclone V dev kit.

Cc Anatolij Gustschin <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Heiko Schocher <[email protected]>
Cc Tom Rini <[email protected]>

---
Changes for v3
- Split to 2 series patch
Changes for v2
- Enable this driver at socfpga_cyclone5 board

---
 .../include/asm/arch-socfpga/socfpga_base_addrs.h  |    1 +
 include/configs/socfpga_cyclone5.h                 |   13 +++++++++++++
 2 files changed, 14 insertions(+)
arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h +1 -0
index 20f12e0..5f73824 100644
@@ -11,6 +11,7 @@
 #define SOCFPGA_UART0_ADDRESS 0xffc02000
 #define SOCFPGA_UART1_ADDRESS 0xffc03000
 #define SOCFPGA_OSC1TIMER0_ADDRESS 0xffd00000
+#define SOCFPGA_L4WD0_ADDRESS 0xffd02000
 #define SOCFPGA_CLKMGR_ADDRESS 0xffd04000
 #define SOCFPGA_RSTMGR_ADDRESS 0xffd05000
 #define SOCFPGA_SYSMGR_ADDRESS 0xffd08000
include/configs/socfpga_cyclone5.h +0 -0
index fc921ee..1b78ccb 100644

include/configs/socfpga_cyclone5.h line 211

Quoted 5 lines
include/configs/socfpga_cyclone5.h +2 -0
@@ -207,6 +207,16 @@
 #define CONFIG_ENV_IS_NOWHERE
 
 /*
+ * L4 Watchdog
+ */

Why multiline comment here?

include/configs/socfpga_cyclone5.h line 215

Quoted 4 lines
include/configs/socfpga_cyclone5.h +4 -0
+#define CONFIG_HW_WATCHDOG
+#define CONFIG_HW_WATCHDOG_TIMEOUT_MS	2000
+#define CONFIG_DESIGNWARE_WATCHDOG
+#define CONFIG_DW_WDT_BASE		SOCFPGA_L4WD0_ADDRESS

Why not just use SOCFPGA_L4WD0_ADDRESS directly?

Thanks,
Michal

Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140224/832427cf/attachment.pgp>
#2 lore raw

PATCH v3 2/2 socfpga: Adding DesignWare watchdog support

Hi Michal,

Quoted 38 lines · Michal Simek
Quoted 37 lines · Chin Liang See

To enable the DesignWare watchdog support at SOCFPGA Cyclone V dev kit.

Cc Anatolij Gustschin <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Heiko Schocher <[email protected]>
Cc Tom Rini <[email protected]>

---
Changes for v3
- Split to 2 series patch
Changes for v2
- Enable this driver at socfpga_cyclone5 board

---
 .../include/asm/arch-socfpga/socfpga_base_addrs.h  |    1 +
 include/configs/socfpga_cyclone5.h                 |   13 +++++++++++++
 2 files changed, 14 insertions(+)
arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h +1 -0
index 20f12e0..5f73824 100644
@@ -11,6 +11,7 @@
 #define SOCFPGA_UART0_ADDRESS 0xffc02000
 #define SOCFPGA_UART1_ADDRESS 0xffc03000
 #define SOCFPGA_OSC1TIMER0_ADDRESS 0xffd00000
+#define SOCFPGA_L4WD0_ADDRESS 0xffd02000
 #define SOCFPGA_CLKMGR_ADDRESS 0xffd04000
 #define SOCFPGA_RSTMGR_ADDRESS 0xffd05000
 #define SOCFPGA_SYSMGR_ADDRESS 0xffd08000
include/configs/socfpga_cyclone5.h +0 -0
index fc921ee..1b78ccb 100644
@@ -207,6 +207,16 @@
 #define CONFIG_ENV_IS_NOWHERE
 
Quoted 5 lines

include/configs/socfpga_cyclone5.h line 211

Quoted 3 lines
include/configs/socfpga_cyclone5.h +2 -0
 /*
+ * L4 Watchdog
+ */

Why multiline comment here?

Oh its just for easy reading.

Quoted 7 lines

include/configs/socfpga_cyclone5.h line 215

Quoted 5 lines
include/configs/socfpga_cyclone5.h +4 -0
+#define CONFIG_HW_WATCHDOG
+#define CONFIG_HW_WATCHDOG_TIMEOUT_MS	2000
+#define CONFIG_DESIGNWARE_WATCHDOG
+#define CONFIG_DW_WDT_BASE		SOCFPGA_L4WD0_ADDRESS

Why not just use SOCFPGA_L4WD0_ADDRESS directly?

Nope, cause this driver might be used by other platform. Thanks

Chin Liang

Quoted 5 lines

Thanks,
Michal

#3 lore raw

PATCH v3 2/2 socfpga: Adding DesignWare watchdog support

Quoted 50 lines · Chin Liang See

Hi Michal,

Quoted 38 lines · Michal Simek
Quoted 37 lines · Chin Liang See

To enable the DesignWare watchdog support at SOCFPGA Cyclone V dev kit.

Cc Anatolij Gustschin <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Heiko Schocher <[email protected]>
Cc Tom Rini <[email protected]>

---
Changes for v3
- Split to 2 series patch
Changes for v2
- Enable this driver at socfpga_cyclone5 board

---
 .../include/asm/arch-socfpga/socfpga_base_addrs.h  |    1 +
 include/configs/socfpga_cyclone5.h                 |   13 +++++++++++++
 2 files changed, 14 insertions(+)
arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h +1 -0
index 20f12e0..5f73824 100644
@@ -11,6 +11,7 @@
 #define SOCFPGA_UART0_ADDRESS 0xffc02000
 #define SOCFPGA_UART1_ADDRESS 0xffc03000
 #define SOCFPGA_OSC1TIMER0_ADDRESS 0xffd00000
+#define SOCFPGA_L4WD0_ADDRESS 0xffd02000
 #define SOCFPGA_CLKMGR_ADDRESS 0xffd04000
 #define SOCFPGA_RSTMGR_ADDRESS 0xffd05000
 #define SOCFPGA_SYSMGR_ADDRESS 0xffd08000
include/configs/socfpga_cyclone5.h +0 -0
index fc921ee..1b78ccb 100644
@@ -207,6 +207,16 @@
 #define CONFIG_ENV_IS_NOWHERE
 
Quoted 5 lines

include/configs/socfpga_cyclone5.h line 211

Quoted 3 lines
include/configs/socfpga_cyclone5.h +2 -0
 /*
+ * L4 Watchdog
+ */

Why multiline comment here?

Oh its just for easy reading.

Quoted 1 line
Quoted 8 lines
Quoted 6 lines

include/configs/socfpga_cyclone5.h line 215

Quoted 4 lines
include/configs/socfpga_cyclone5.h +4 -0
+#define CONFIG_HW_WATCHDOG
+#define CONFIG_HW_WATCHDOG_TIMEOUT_MS	2000
+#define CONFIG_DESIGNWARE_WATCHDOG
+#define CONFIG_DW_WDT_BASE		SOCFPGA_L4WD0_ADDRESS

Why not just use SOCFPGA_L4WD0_ADDRESS directly?

Nope, cause this driver might be used by other platform.

ok It means that SOCFPGA_L4WD0_ADDRESS is system controller right?

Thanks,
Michal

Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140228/4469be06/attachment.pgp>
#4 lore raw

PATCH v3 2/2 socfpga: Adding DesignWare watchdog support

Quoted 58 lines · Michal Simek
Quoted 57 lines · Chin Liang See

Hi Michal,

Quoted 38 lines · Michal Simek
Quoted 37 lines · Chin Liang See

To enable the DesignWare watchdog support at SOCFPGA Cyclone V dev kit.

Cc Anatolij Gustschin <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Heiko Schocher <[email protected]>
Cc Tom Rini <[email protected]>

---
Changes for v3
- Split to 2 series patch
Changes for v2
- Enable this driver at socfpga_cyclone5 board

---
 .../include/asm/arch-socfpga/socfpga_base_addrs.h  |    1 +
 include/configs/socfpga_cyclone5.h                 |   13 +++++++++++++
 2 files changed, 14 insertions(+)
arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h +1 -0
index 20f12e0..5f73824 100644
@@ -11,6 +11,7 @@
 #define SOCFPGA_UART0_ADDRESS 0xffc02000
 #define SOCFPGA_UART1_ADDRESS 0xffc03000
 #define SOCFPGA_OSC1TIMER0_ADDRESS 0xffd00000
+#define SOCFPGA_L4WD0_ADDRESS 0xffd02000
 #define SOCFPGA_CLKMGR_ADDRESS 0xffd04000
 #define SOCFPGA_RSTMGR_ADDRESS 0xffd05000
 #define SOCFPGA_SYSMGR_ADDRESS 0xffd08000
include/configs/socfpga_cyclone5.h +0 -0
index fc921ee..1b78ccb 100644
@@ -207,6 +207,16 @@
 #define CONFIG_ENV_IS_NOWHERE
 
Quoted 5 lines

include/configs/socfpga_cyclone5.h line 211

Quoted 3 lines
include/configs/socfpga_cyclone5.h +2 -0
 /*
+ * L4 Watchdog
+ */

Why multiline comment here?

Oh its just for easy reading.

Quoted 7 lines

include/configs/socfpga_cyclone5.h line 215

Quoted 5 lines
include/configs/socfpga_cyclone5.h +4 -0
+#define CONFIG_HW_WATCHDOG
+#define CONFIG_HW_WATCHDOG_TIMEOUT_MS	2000
+#define CONFIG_DESIGNWARE_WATCHDOG
+#define CONFIG_DW_WDT_BASE		SOCFPGA_L4WD0_ADDRESS

Why not just use SOCFPGA_L4WD0_ADDRESS directly?

Quoted 3 lines
Quoted 1 line

Nope, cause this driver might be used by other platform.

ok It means that SOCFPGA_L4WD0_ADDRESS is system controller right?

Its the base address for watchdog registers.

Thanks
Chin Liang

Quoted 4 lines

Thanks,
Michal