watchdog: bcm6345: switch to raw I/O functions
PATCH 1/6 watchdog: bcm6345: switch to raw I/O functions
Signed-off-by Philippe Reynes <[email protected]>
--- drivers/watchdog/bcm6345_wdt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/watchdog/bcm6345_wdt.c +5 -5
@@ -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 ; }
Signature · 1 line
2.7.4
PATCH 2/6 watchdog: bcm6345: allow to use this driver on arm
Signed-off-by Philippe Reynes <[email protected]>
--- drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/Kconfig +1 -1
@@ -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 || ARM) help Select this to enable watchdog timer for BCM6345 SoCs. The watchdog timer is stopped when initialized.
Signature · 1 line
2.7.4
PATCH 3/6 dt: bcm6838: add watchdog
In reply to Philippe ReynesSigned-off-by Philippe Reynes <[email protected]>
--- arch/mips/dts/brcm,bcm6838.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/mips/dts/brcm,bcm6838.dtsi +17 -0
@@ -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>;
Signature · 1 line
2.7.4
PATCH 4/6 dt: bcm6858: add watchdog
In reply to Philippe ReynesSigned-off-by Philippe Reynes <[email protected]>
--- arch/arm/dts/bcm6858.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/arm/dts/bcm6858.dtsi +17 -0
@@ -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>; + }; }; };
Signature · 1 line
2.7.4
PATCH 5/6 bcm968380gerg_ram_defconfig: enable watchdog and reboot with watchdog
In reply to Philippe ReynesSigned-off-by Philippe Reynes <[email protected]>
--- configs/bcm968380gerg_ram_defconfig | 2 ++ 1 file changed, 2 insertions(+)
configs/bcm968380gerg_ram_defconfig +2 -0
@@ -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
Signature · 1 line
2.7.4
PATCH 6/6 bcm968580_ram_defconfig: enable watchdog and reboot with watchdog
In reply to Philippe ReynesSigned-off-by Philippe Reynes <[email protected]>
--- configs/bcm968580_ram_defconfig | 2 ++ 1 file changed, 2 insertions(+)
configs/bcm968580_ram_defconfig +2 -0
@@ -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
Signature · 1 line
2.7.4
PATCH 1/6 watchdog: bcm6345: switch to raw I/O functions
In reply to Philippe ReynesHi,
You have to add some commit message, even if it is only one line, describing why are you doing these changes.
Marek
Quoted 40 lines · On Mon, 21 Jan 2019 18:07:28 +0100 Philippe Reynes…
Signed-off-by Philippe Reynes <[email protected]>--- drivers/watchdog/bcm6345_wdt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)(quoted diff) +0
-0
b/drivers/watchdog/bcm6345_wdt.cindex e1bd73d..44f5662 100644drivers/watchdog/bcm6345_wdt.c +5
-5@@ -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 ; }