# --- T2-COPYRIGHT-BEGIN --- # t2/architecture/mips64/package/*/6000-rtc.patch # Copyright (C) 2019 - 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- The upstream driver did not power down my Sgi Octane anymore, so let's loop on rtc write like the original ip30 code from Stanislaw did. - Rene Rebe --- linux-4.18.5/drivers/rtc/rtc-ds1685.c.vanilla 2019-10-20 16:45:44.799396423 +0000 +++ linux-4.18.5/drivers/rtc/rtc-ds1685.c 2019-10-20 19:16:44.747245705 +0000 @@ -2212,12 +2212,12 @@ /* Set PAB to 1 in Control 4A to power the system down. */ dev_warn(&pdev->dev, "Powerdown.\n"); - msleep(20); - rtc->write(rtc, RTC_EXT_CTRL_4A, - (ctrl4a | RTC_CTRL_4A_PAB)); - - /* Spin ... we do not switch back to bank0. */ - while(1); + while(1) { + /* Spin ... we do not switch back to bank0. */ + rtc->write(rtc, RTC_EXT_CTRL_4A, + (ctrl4a | RTC_CTRL_4A_PAB)); + msleep(200); + }; unreachable(); } }