All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH V3 1/6] watchdog: bcm6345: switch to raw I/O functions
@ 2019-01-28 14:37 Philippe Reynes
  2019-01-28 14:37 ` [U-Boot] [PATCH V3 2/6] watchdog: bcm6345: allow to use this driver on arm bcm6858 Philippe Reynes
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Philippe Reynes @ 2019-01-28 14:37 UTC (permalink / raw)
  To: u-boot

This driver is used on several big endian mips board.
So we could use raw I/O function instead of forcing
big endian access.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
---
 drivers/watchdog/bcm6345_wdt.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Changelog:
v2:
- add a commit message (thanks Marek)
v3:
- no change

diff --git a/drivers/watchdog/bcm6345_wdt.c b/drivers/watchdog/bcm6345_wdt.c
index e1bd73d..44f5662 100644
--- a/drivers/watchdog/bcm6345_wdt.c
+++ b/drivers/watchdog/bcm6345_wdt.c
@@ -32,8 +32,8 @@ static int bcm6345_wdt_reset(struct udevice *dev)
 {
 	struct bcm6345_wdt_priv *priv = dev_get_priv(dev);
 
-	writel_be(WDT_CTL_START1_MASK, priv->regs + WDT_CTL_REG);
-	writel_be(WDT_CTL_START2_MASK, priv->regs + WDT_CTL_REG);
+	writel(WDT_CTL_START1_MASK, priv->regs + WDT_CTL_REG);
+	writel(WDT_CTL_START2_MASK, priv->regs + WDT_CTL_REG);
 
 	return 0;
 }
@@ -50,7 +50,7 @@ static int bcm6345_wdt_start(struct udevice *dev, u64 timeout, ulong flags)
 		timeout = WDT_VAL_MAX;
 	}
 
-	writel_be(timeout, priv->regs + WDT_VAL_REG);
+	writel(timeout, priv->regs + WDT_VAL_REG);
 
 	return bcm6345_wdt_reset(dev);
 }
@@ -64,8 +64,8 @@ static int bcm6345_wdt_stop(struct udevice *dev)
 {
 	struct bcm6345_wdt_priv *priv = dev_get_priv(dev);
 
-	writel_be(WDT_CTL_STOP1_MASK, priv->regs + WDT_CTL_REG);
-	writel_be(WDT_CTL_STOP2_MASK, priv->regs + WDT_CTL_REG);
+	writel(WDT_CTL_STOP1_MASK, priv->regs + WDT_CTL_REG);
+	writel(WDT_CTL_STOP2_MASK, priv->regs + WDT_CTL_REG);
 
 	return 0;
 }
-- 
2.7.4

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

* [U-Boot] [PATCH V3 2/6] watchdog: bcm6345: allow to use this driver on arm bcm6858
  2019-01-28 14:37 [U-Boot] [PATCH V3 1/6] watchdog: bcm6345: switch to raw I/O functions Philippe Reynes
@ 2019-01-28 14:37 ` Philippe Reynes
  2019-02-10 13:06   ` [U-Boot] [U-Boot, V3, " Tom Rini
  2019-01-28 14:37 ` [U-Boot] [PATCH V3 3/6] dt: bcm6838: add watchdog Philippe Reynes
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Philippe Reynes @ 2019-01-28 14:37 UTC (permalink / raw)
  To: u-boot

This IP is also used on some arm SoC, so we allow to
use it on arm bcm6858 too.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
---
 drivers/watchdog/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Changelog:
v2:
- add a commit message (thanks Marek)
v3:
- only enable this driver on bcm6858 (thanks Daniel)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 10fd303..9456abd 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -88,7 +88,7 @@ config WDT_ASPEED
 
 config WDT_BCM6345
 	bool "BCM6345 watchdog timer support"
-	depends on WDT && ARCH_BMIPS
+	depends on WDT && (ARCH_BMIPS || ARCH_BCM6858)
 	help
 	  Select this to enable watchdog timer for BCM6345 SoCs.
 	  The watchdog timer is stopped when initialized.
-- 
2.7.4

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

* [U-Boot] [PATCH V3 3/6] dt: bcm6838: add watchdog
  2019-01-28 14:37 [U-Boot] [PATCH V3 1/6] watchdog: bcm6345: switch to raw I/O functions Philippe Reynes
  2019-01-28 14:37 ` [U-Boot] [PATCH V3 2/6] watchdog: bcm6345: allow to use this driver on arm bcm6858 Philippe Reynes
@ 2019-01-28 14:37 ` Philippe Reynes
  2019-02-10 13:07   ` [U-Boot] [U-Boot,V3,3/6] " Tom Rini
  2019-01-28 14:37 ` [U-Boot] [PATCH V3 4/6] dt: bcm6858: " Philippe Reynes
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Philippe Reynes @ 2019-01-28 14:37 UTC (permalink / raw)
  To: u-boot

This commit add watchdog and sysreset watchdog
in the bcm6838 device tree.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
---
 arch/mips/dts/brcm,bcm6838.dtsi | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Changelog:
v2:
- add a commit message (thanks Marek)
v3:
- no change

diff --git a/arch/mips/dts/brcm,bcm6838.dtsi b/arch/mips/dts/brcm,bcm6838.dtsi
index 77d6a8e..b6f9559 100644
--- a/arch/mips/dts/brcm,bcm6838.dtsi
+++ b/arch/mips/dts/brcm,bcm6838.dtsi
@@ -73,6 +73,23 @@
 			status = "disabled";
 		};
 
+		wdt0: watchdog at 14e002d0 {
+			compatible = "brcm,bcm6345-wdt";
+			reg = <0x14e002d0 0xc>;
+			clocks = <&periph_osc>;
+		};
+
+		wdt1: watchdog at 14e002dc {
+			compatible = "brcm,bcm6345-wdt";
+			reg = <0x14e002dc 0xc>;
+			clocks = <&periph_osc>;
+		};
+
+		wdt-reboot {
+			compatible = "wdt-reboot";
+			wdt = <&wdt0>;
+		};
+
 		leds: led-controller at 14e00f00 {
 			compatible = "brcm,bcm6328-leds";
 			reg = <0x14e00f00 0x28>;
-- 
2.7.4

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

* [U-Boot] [PATCH V3 4/6] dt: bcm6858: add watchdog
  2019-01-28 14:37 [U-Boot] [PATCH V3 1/6] watchdog: bcm6345: switch to raw I/O functions Philippe Reynes
  2019-01-28 14:37 ` [U-Boot] [PATCH V3 2/6] watchdog: bcm6345: allow to use this driver on arm bcm6858 Philippe Reynes
  2019-01-28 14:37 ` [U-Boot] [PATCH V3 3/6] dt: bcm6838: add watchdog Philippe Reynes
@ 2019-01-28 14:37 ` Philippe Reynes
  2019-02-10 13:07   ` [U-Boot] [U-Boot,V3,4/6] " Tom Rini
  2019-01-28 14:37 ` [U-Boot] [PATCH V3 5/6] bcm968380gerg: enable watchdog and reboot with watchdog Philippe Reynes
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Philippe Reynes @ 2019-01-28 14:37 UTC (permalink / raw)
  To: u-boot

This commit add watchdog and sysreset watchdog
in the bcm6858 device tree.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
---
 arch/arm/dts/bcm6858.dtsi | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Changelog:
v2:
- add a commit message (thanks Marek)
v3:
- no change

diff --git a/arch/arm/dts/bcm6858.dtsi b/arch/arm/dts/bcm6858.dtsi
index d78d34d..23b80c6 100644
--- a/arch/arm/dts/bcm6858.dtsi
+++ b/arch/arm/dts/bcm6858.dtsi
@@ -81,5 +81,22 @@
 
 			status = "disabled";
 		};
+
+		wdt1: watchdog at ff802780 {
+			compatible = "brcm,bcm6345-wdt";
+			reg = <0x0 0xff802780 0x0 0x14>;
+			clocks = <&periph_osc>;
+		};
+
+		wdt2: watchdog at ff8027c0 {
+			compatible = "brcm,bcm6345-wdt";
+			reg = <0x0 0xff8027c0 0x0 0x14>;
+			clocks = <&periph_osc>;
+		};
+
+		wdt-reboot {
+			compatible = "wdt-reboot";
+			wdt = <&wdt1>;
+		};
 	};
 };
-- 
2.7.4

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

* [U-Boot] [PATCH V3 5/6] bcm968380gerg: enable watchdog and reboot with watchdog
  2019-01-28 14:37 [U-Boot] [PATCH V3 1/6] watchdog: bcm6345: switch to raw I/O functions Philippe Reynes
                   ` (2 preceding siblings ...)
  2019-01-28 14:37 ` [U-Boot] [PATCH V3 4/6] dt: bcm6858: " Philippe Reynes
@ 2019-01-28 14:37 ` Philippe Reynes
  2019-02-10 13:07   ` [U-Boot] [U-Boot, V3, " Tom Rini
  2019-01-28 14:37 ` [U-Boot] [PATCH V3 6/6] bcm968580: " Philippe Reynes
  2019-02-10 13:06 ` [U-Boot] [U-Boot, V3, 1/6] watchdog: bcm6345: switch to raw I/O functions Tom Rini
  5 siblings, 1 reply; 12+ messages in thread
From: Philippe Reynes @ 2019-01-28 14:37 UTC (permalink / raw)
  To: u-boot

Enable watchdog and reboot with watchdog in the configuration.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
---
 configs/bcm968380gerg_ram_defconfig | 2 ++
 1 file changed, 2 insertions(+)

Changelog:
v2:
- add a commit message (thanks Marek)
v3:
- no change

diff --git a/configs/bcm968380gerg_ram_defconfig b/configs/bcm968380gerg_ram_defconfig
index fdecc0f..d98fe51 100644
--- a/configs/bcm968380gerg_ram_defconfig
+++ b/configs/bcm968380gerg_ram_defconfig
@@ -46,4 +46,6 @@ CONFIG_RESET_BCM6345=y
 # CONFIG_SPL_SERIAL_PRESENT is not set
 CONFIG_DM_SERIAL=y
 CONFIG_BCM6345_SERIAL=y
+CONFIG_SYSRESET_WATCHDOG=y
+CONFIG_WDT_BCM6345=y
 CONFIG_LZO=y
-- 
2.7.4

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

* [U-Boot] [PATCH V3 6/6] bcm968580: enable watchdog and reboot with watchdog
  2019-01-28 14:37 [U-Boot] [PATCH V3 1/6] watchdog: bcm6345: switch to raw I/O functions Philippe Reynes
                   ` (3 preceding siblings ...)
  2019-01-28 14:37 ` [U-Boot] [PATCH V3 5/6] bcm968380gerg: enable watchdog and reboot with watchdog Philippe Reynes
@ 2019-01-28 14:37 ` Philippe Reynes
  2019-02-10 13:07   ` [U-Boot] [U-Boot, V3, " Tom Rini
  2019-02-10 13:06 ` [U-Boot] [U-Boot, V3, 1/6] watchdog: bcm6345: switch to raw I/O functions Tom Rini
  5 siblings, 1 reply; 12+ messages in thread
From: Philippe Reynes @ 2019-01-28 14:37 UTC (permalink / raw)
  To: u-boot

Enable watchdog and reboot with watchdog in the configuration.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
---
 configs/bcm968580_ram_defconfig | 2 ++
 1 file changed, 2 insertions(+)

Changelog:
v2:
- add a commit message (thanks Marek)
v3:
- no change

diff --git a/configs/bcm968580_ram_defconfig b/configs/bcm968580_ram_defconfig
index 56e0a56..b23f960 100644
--- a/configs/bcm968580_ram_defconfig
+++ b/configs/bcm968580_ram_defconfig
@@ -31,5 +31,7 @@ CONFIG_DM_SERIAL=y
 CONFIG_SERIAL_SEARCH_ALL=y
 CONFIG_BCM6345_SERIAL=y
 CONFIG_SYSRESET=y
+CONFIG_SYSRESET_WATCHDOG=y
+CONFIG_WDT_BCM6345=y
 CONFIG_REGEX=y
 # CONFIG_GENERATE_SMBIOS_TABLE is not set
-- 
2.7.4

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

* [U-Boot] [U-Boot, V3, 1/6] watchdog: bcm6345: switch to raw I/O functions
  2019-01-28 14:37 [U-Boot] [PATCH V3 1/6] watchdog: bcm6345: switch to raw I/O functions Philippe Reynes
                   ` (4 preceding siblings ...)
  2019-01-28 14:37 ` [U-Boot] [PATCH V3 6/6] bcm968580: " Philippe Reynes
@ 2019-02-10 13:06 ` Tom Rini
  5 siblings, 0 replies; 12+ messages in thread
From: Tom Rini @ 2019-02-10 13:06 UTC (permalink / raw)
  To: u-boot

On Mon, Jan 28, 2019 at 03:37:27PM +0100, Philippe Reynes wrote:

> This driver is used on several big endian mips board.
> So we could use raw I/O function instead of forcing
> big endian access.
> 
> Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190210/5977e383/attachment.sig>

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

* [U-Boot] [U-Boot, V3, 2/6] watchdog: bcm6345: allow to use this driver on arm bcm6858
  2019-01-28 14:37 ` [U-Boot] [PATCH V3 2/6] watchdog: bcm6345: allow to use this driver on arm bcm6858 Philippe Reynes
@ 2019-02-10 13:06   ` Tom Rini
  0 siblings, 0 replies; 12+ messages in thread
From: Tom Rini @ 2019-02-10 13:06 UTC (permalink / raw)
  To: u-boot

On Mon, Jan 28, 2019 at 03:37:28PM +0100, Philippe Reynes wrote:

> This IP is also used on some arm SoC, so we allow to
> use it on arm bcm6858 too.
> 
> Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190210/f992a319/attachment.sig>

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

* [U-Boot] [U-Boot,V3,3/6] dt: bcm6838: add watchdog
  2019-01-28 14:37 ` [U-Boot] [PATCH V3 3/6] dt: bcm6838: add watchdog Philippe Reynes
@ 2019-02-10 13:07   ` Tom Rini
  0 siblings, 0 replies; 12+ messages in thread
From: Tom Rini @ 2019-02-10 13:07 UTC (permalink / raw)
  To: u-boot

On Mon, Jan 28, 2019 at 03:37:29PM +0100, Philippe Reynes wrote:

> This commit add watchdog and sysreset watchdog
> in the bcm6838 device tree.
> 
> Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190210/18761ea6/attachment.sig>

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

* [U-Boot] [U-Boot,V3,4/6] dt: bcm6858: add watchdog
  2019-01-28 14:37 ` [U-Boot] [PATCH V3 4/6] dt: bcm6858: " Philippe Reynes
@ 2019-02-10 13:07   ` Tom Rini
  0 siblings, 0 replies; 12+ messages in thread
From: Tom Rini @ 2019-02-10 13:07 UTC (permalink / raw)
  To: u-boot

On Mon, Jan 28, 2019 at 03:37:30PM +0100, Philippe Reynes wrote:

> This commit add watchdog and sysreset watchdog
> in the bcm6858 device tree.
> 
> Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190210/340ab12e/attachment.sig>

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

* [U-Boot] [U-Boot, V3, 5/6] bcm968380gerg: enable watchdog and reboot with watchdog
  2019-01-28 14:37 ` [U-Boot] [PATCH V3 5/6] bcm968380gerg: enable watchdog and reboot with watchdog Philippe Reynes
@ 2019-02-10 13:07   ` Tom Rini
  0 siblings, 0 replies; 12+ messages in thread
From: Tom Rini @ 2019-02-10 13:07 UTC (permalink / raw)
  To: u-boot

On Mon, Jan 28, 2019 at 03:37:31PM +0100, Philippe Reynes wrote:

> Enable watchdog and reboot with watchdog in the configuration.
> 
> Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190210/63f2ce2d/attachment.sig>

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

* [U-Boot] [U-Boot, V3, 6/6] bcm968580: enable watchdog and reboot with watchdog
  2019-01-28 14:37 ` [U-Boot] [PATCH V3 6/6] bcm968580: " Philippe Reynes
@ 2019-02-10 13:07   ` Tom Rini
  0 siblings, 0 replies; 12+ messages in thread
From: Tom Rini @ 2019-02-10 13:07 UTC (permalink / raw)
  To: u-boot

On Mon, Jan 28, 2019 at 03:37:32PM +0100, Philippe Reynes wrote:

> Enable watchdog and reboot with watchdog in the configuration.
> 
> Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190210/65a95777/attachment.sig>

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

end of thread, other threads:[~2019-02-10 13:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-28 14:37 [U-Boot] [PATCH V3 1/6] watchdog: bcm6345: switch to raw I/O functions Philippe Reynes
2019-01-28 14:37 ` [U-Boot] [PATCH V3 2/6] watchdog: bcm6345: allow to use this driver on arm bcm6858 Philippe Reynes
2019-02-10 13:06   ` [U-Boot] [U-Boot, V3, " Tom Rini
2019-01-28 14:37 ` [U-Boot] [PATCH V3 3/6] dt: bcm6838: add watchdog Philippe Reynes
2019-02-10 13:07   ` [U-Boot] [U-Boot,V3,3/6] " Tom Rini
2019-01-28 14:37 ` [U-Boot] [PATCH V3 4/6] dt: bcm6858: " Philippe Reynes
2019-02-10 13:07   ` [U-Boot] [U-Boot,V3,4/6] " Tom Rini
2019-01-28 14:37 ` [U-Boot] [PATCH V3 5/6] bcm968380gerg: enable watchdog and reboot with watchdog Philippe Reynes
2019-02-10 13:07   ` [U-Boot] [U-Boot, V3, " Tom Rini
2019-01-28 14:37 ` [U-Boot] [PATCH V3 6/6] bcm968580: " Philippe Reynes
2019-02-10 13:07   ` [U-Boot] [U-Boot, V3, " Tom Rini
2019-02-10 13:06 ` [U-Boot] [U-Boot, V3, 1/6] watchdog: bcm6345: switch to raw I/O functions Tom Rini

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.