From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::343; helo=mail-wm1-x343.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1C1DC211A2098 for ; Wed, 19 Dec 2018 12:40:34 -0800 (PST) Received: by mail-wm1-x343.google.com with SMTP id d15so7392941wmb.3 for ; Wed, 19 Dec 2018 12:40:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3aqYi1iyoj1j4IcyPFucPZ3n6aOcGOnGAFfGgKVI7c0=; b=b5ni4d+dxH5573/RD6iwfkflxqM6kr8rJ1Rkl5Eqb+xZHyc0gvziTfIr7rtzUcSf4G mUATcRO4tcAqQCbzIP70NoddmyS5iEA0xsodUA2PnWQLTOUzJkxjTV9Vs8BFKCwrfa07 V5NaSZV2gwij+U1Hxh8fm6QvIscQ7j/fAVlnI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3aqYi1iyoj1j4IcyPFucPZ3n6aOcGOnGAFfGgKVI7c0=; b=RQ7az/VKai09mQgXApFHoctD1Vp7bcFa9kXDoxTZPXQkOBD1bB0o5tFGerOxRMrcEE cMHB22mJHQdM37k6seqW6p20qsxDn8hw5fUDew7ov2tTI2qdKXaybg8ljBJXCC6zH5hQ R9PEgTyZpaZrCWj8SS8hOmPQ/kgk+8vwxlOOUSvAwyqc9eV0vM74V988c5rGaxHNRrwP dn3sqNMRoRUvwNoAay+iBXCUqtbLi4YjdDm8mQX71tWOBaZwjmPqYluS5uPMLMXi4AVw 24oho3FmMEvyidy3tG1WWHJtGQGA/8xmQQDgw/mYCyo+Z70YkRvAMXWKBACvYbnJUf1p UzyA== X-Gm-Message-State: AA+aEWb46+7Ku7AtfTj+wb5jGilisEONQx7iTeq8YQmW/1XJc4HheeS+ nVsHRav5AJNFyt0KYD04gNxIA+HINZYt/w== X-Google-Smtp-Source: AFSGD/WJPI9DfO2xIB/vUZsJK+7qXQzSy2gs536A3taDbgwVnvA0OR660VipQHOa/1rdy4Dp7TN17Q== X-Received: by 2002:a1c:c10f:: with SMTP id r15mr8542513wmf.27.1545252032497; Wed, 19 Dec 2018 12:40:32 -0800 (PST) Received: from harold.home ([2a01:cb1d:112:6f00:e5c9:6e00:25cb:e32e]) by smtp.gmail.com with ESMTPSA id h16sm13738439wrb.62.2018.12.19.12.40.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Dec 2018 12:40:31 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Wed, 19 Dec 2018 21:40:19 +0100 Message-Id: <20181219204023.6317-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Subject: [PATCH v2 0/4] ArmPkg, ArmPlatformPkg: watchdog driver cleanup X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2018 20:40:35 -0000 Content-Transfer-Encoding: 8bit This series cleans up the code of the two watchdog drivers we have for ARM systems, and brings them in compliance with the PI spec, which specifies that the default action of the watchdog can be overridden by registering a handler. Note that the TC2 code in edk2-platforms will have to be brought up to date. The SP805 on the FVP model seems terminally broken (it is 'wired' to the 24 MHz APB clock instead of the 32 kHz WDOG clock, so I'll switch that one over to use the SBSA watchdog instead) Changes since v1: - always fall back to calling gRT_>ResetSystem() if the registered handler returns - WARN() if running the SP805 driver with interrupt handling disabled - add some R-bs Cc: Leif Lindholm Cc: Sami Mujawar Cc: Thomas Panakamattam Abraham Cc: Meenakshi Aggarwal Cc: Udit Kumar Cc: Matteo Carlini Cc: Nariman Poushin Ard Biesheuvel (4): ArmPlatformPkg/SP805WatchdogDxe: cosmetic cleanup ArmPlatformPkg/SP805WatchdogDxe: switch to interrupt mode ArmPkg/GenericWatchdogDxe: clean up the code ArmPkg/GenericWatchdogDxe: implement RegisterHandler() method ArmPlatformPkg/ArmPlatformPkg.dec | 1 + .../GenericWatchdogDxe/GenericWatchdogDxe.inf | 9 +- .../SP805WatchdogDxe/SP805WatchdogDxe.inf | 15 +- .../GenericWatchdogDxe/GenericWatchdogDxe.c | 143 ++++++++------ .../Drivers/SP805WatchdogDxe/SP805Watchdog.c | 187 +++++++++++------- 5 files changed, 213 insertions(+), 142 deletions(-) -- 2.19.2