Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ dpi_16bit_gpio2: &rp1_dpi_16bit_gpio2 { };
vmmc-supply = <&wl_on_reg>;
sd-uhs-ddr50;
non-removable;
cap-power-off-card;
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ dpi_16bit_gpio2: &rp1_dpi_16bit_gpio2 { };
vmmc-supply = <&wl_on_reg>;
sd-uhs-ddr50;
non-removable;
cap-power-off-card;
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/configs/bcm2712_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ CONFIG_CP15_BARRIER_EMULATION=y
CONFIG_SETEND_EMULATION=y
CONFIG_RANDOMIZE_BASE=y
CONFIG_CMDLINE="console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
# CONFIG_SUSPEND is not set
CONFIG_SUSPEND=y
CONFIG_PM=y
CONFIG_PM_DEBUG=y
CONFIG_CPU_IDLE=y
Expand Down
20 changes: 20 additions & 0 deletions drivers/watchdog/bcm2835_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,31 @@ static void bcm2835_wdt_remove(struct platform_device *pdev)
pm_power_off = NULL;
}

static int bcm2835_wdt_suspend(struct device *dev)
{
if (watchdog_active(&bcm2835_wdt_wdd))
bcm2835_wdt_stop(&bcm2835_wdt_wdd);

return 0;
}

static int bcm2835_wdt_resume(struct device *dev)
{
if (watchdog_active(&bcm2835_wdt_wdd))
bcm2835_wdt_start(&bcm2835_wdt_wdd);

return 0;
}

static DEFINE_SIMPLE_DEV_PM_OPS(bcm2835_wdt_pm_ops,
bcm2835_wdt_suspend, bcm2835_wdt_resume);

static struct platform_driver bcm2835_wdt_driver = {
.probe = bcm2835_wdt_probe,
.remove = bcm2835_wdt_remove,
.driver = {
.name = "bcm2835-wdt",
.pm = pm_sleep_ptr(&bcm2835_wdt_pm_ops),
},
};
module_platform_driver(bcm2835_wdt_driver);
Expand Down