From patchwork Wed Dec 19 20:40:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 154293 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5369480ljp; Wed, 19 Dec 2018 12:40:38 -0800 (PST) X-Google-Smtp-Source: AFSGD/VE1AMrOu6poaETYnZMY8o7Dnlq2kp1ztC1L3Vek0AQAx3rEBQ/JwZSPYQBYBo/wHLJU30C X-Received: by 2002:a63:8149:: with SMTP id t70mr21126559pgd.172.1545252038271; Wed, 19 Dec 2018 12:40:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545252038; cv=none; d=google.com; s=arc-20160816; b=pZhpYZS0i4kHW0azKbFTx+kmeUJFSCRjLh4czH9wAl4573rgsJ55cWUG9EHKaEPqxb om0hMfK5ZT7Sw8beXHyNV2xzNQXcP7SepL6O3GaSepZQ4/Qflr/SaT/Pn+zlvhZ6hRga Z9nLmQy5ICY9G2MoObswLY+E2hYjiflveQgXLATwS3NtLkoIIqVlh4JCDcD6nIcg2iHO 9NItTBReFL0TBRoxLz2ncf5zIgTkZTCgJ+HoYKbejgiJcDzo4GJw+tdPyMIbgkTwnBCg f4ryW8j7FcsEc8HuILb65eMV4PnsJ36X5/+GMUN2gEJHovAvFPC3cjDvllJbON7GKUi2 9/Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=AS12UUjjhRyMLxkFiSoyiLSO7QmYv5DFCW3Nv5Mbu6s=; b=ZtPqmfDuSKbEJf0A35QbtAgNe5ee7Mazt7qeg7+7aySQPF/jQ5+AQED27w/31rNKD8 TTy9nbS4BhAicsGWSDukfjo0ZiqSrJFNzs0kNwwqQ8u9Y9VEz+dTuJultT2QwSF9axNa kymIAvHc2SOllpUnZlH4XCspr2n+01Tu6hLebFzVRiwq5woTyn/VnYBEG4F8K59WVXqE 0Jq2nkmM8RSZpRVNad3oZSq2VH/t3u6kYZTahIyYJvk7dTeAWI9gf5uoQqENJf+VwAIT /vDf+gIpWGpa0rjEB8mXsRa7WhoDLGWzyaBQMIoymzrY8VoTeTviSDIeACVNWWueJr6V nzLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=b5ni4d+d; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id 26si17196495pgu.190.2018.12.19.12.40.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Dec 2018 12:40:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=b5ni4d+d; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 2BC14211A209D; Wed, 19 Dec 2018 12:40:37 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org 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-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: [edk2] [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: , Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel