# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: architecture/mips64/package/.../6000-rtc.patch # Copyright (C) 2019 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-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(); } }