From patchwork Mon Mar 12 08:16:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gary guo X-Patchwork-Id: 131370 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp456604ljb; Mon, 12 Mar 2018 01:17:18 -0700 (PDT) X-Google-Smtp-Source: AG47ELuWFX33Eawrjvl3PcjWW6UB5u1fl8gt4qA0fwgM4EiLbxb+qqy5kgSlO0tBIPKuCyX/JIgJ X-Received: by 2002:a17:902:8484:: with SMTP id c4-v6mr7244751plo.271.1520842637882; Mon, 12 Mar 2018 01:17:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520842637; cv=none; d=google.com; s=arc-20160816; b=lfXhjWoutpVQcAzIoPbyhz4eHj2+ZU/3sVS6OQkFRFMyMQWdGzTinae9GoYMnsYy4B agwJDLwZm80dc4bn8YnJyiSxRmzKs9SiR8da/lQY3+BMoZe2DbJaaH8gl+q5cPM0nWn7 +ruwhjH/reOSteOfRWHfRUbNTm6q//O3WP7Ssjygeu5zesBbqkQS2Xhy3jv5eWYa/vrE KiKKs5i46rliKM+6CwZ1wGdrThLNyyKzFAJoVqN9jgquYNuLn5/2kdU8KOF/lbuwEzkF mgO9v0Tk0rBH7T8yDxILjKznI8iqlEfRWdHNYJ+2kcWAopDvgNnFkK30WH8aY2WzLDai 9fJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=vH8Hz19t7nFYZldb6cSe9MRTiZjOwdrNe83/Q+NHu0c=; b=EZdetMzKp5ZdF1gGu+L2kxTzsgbD6hXfCTp8thS+BQjEa8b2TFZlGnQQnSbtOpv/MM YoaGx8plF5TdHv2iuymBqN3gQ3sCodAsNI7v1fxCA+VWCG0xFC1gqgOBU/LWe72HkvIw ksBZIUDu7QvdlrU/utUadXMA7LzDH1wDEQ8csI65bwSXLWs6ByGNPjsBxPcrrcBTvUtg WkVetAXjf5jCbfoRh6+BJKSLelqGEIapnp/Dj/2nYdA52BeppaNY8vhtjOr6ClngdN/F k4dYn74/X7IbOL0gBRg6iy7dBG0FW1dDFL7UyN3kax5VOuJ3la2TPMmoJXNF0Jt4xypS tj6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=bQ9K242B; 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 e127si1667938pgc.170.2018.03.12.01.17.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Mar 2018 01:17:17 -0700 (PDT) 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=bQ9K242B; 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 D59B622631464; Mon, 12 Mar 2018 01:10:56 -0700 (PDT) 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=2607:f8b0:400e:c01::243; helo=mail-pl0-x243.google.com; envelope-from=heyi.guo@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pl0-x243.google.com (mail-pl0-x243.google.com [IPv6:2607:f8b0:400e:c01::243]) (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 11248223DB100 for ; Mon, 12 Mar 2018 01:10:55 -0700 (PDT) Received: by mail-pl0-x243.google.com with SMTP id 61-v6so8916035plf.3 for ; Mon, 12 Mar 2018 01:17:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4Uys4lrtLy0k1BUWH/73abDysI7SHOky+Q2GcpQ2Hu0=; b=bQ9K242BI+CrarZNMU+uXQvFWdm2VbMNqBbiGq+JjTXmn5/eSeMlcedVYKNVMp+fl2 8O27OaOURkvcam7+TXJy5nRfp7O8L9WUEmVYR7/bqsP23E8B4QpnRZVHHQupOIGCjSLc gix2goU0HOgMzpK5qdczk57miVcqokzDPvBJM= 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:in-reply-to :references; bh=4Uys4lrtLy0k1BUWH/73abDysI7SHOky+Q2GcpQ2Hu0=; b=aV4iybHLpZKQ/S3wayWkrO3600YYNhBsq8C+U8vNPiD9X4TnToEDAeR6MnOfk8JMpa VErf3YjM/ppU7nOrGduRrNmpo8R4FKzWLR0YWv1sdjUnbEkWAwC9cHU+ZWAU11wYS1zQ zohtLxSN7aLB4Qy/Rc01WRV7p+h+IHB18nmxHxS8rQpWByHAy8sIz8vOgYGnccS/GaPu 40FvOo5/jL3JHZyL591MuNlMJdXgvIVlEApYUJbyQG58jMLv+A5XlBEoO2fhUkZFNCJk RoQIT7aDu/GC95x33BarLIiOjFYOYQI1diHY3qsHRvccABpeYbphugvbsc9GQTj+S8xF k1Ew== X-Gm-Message-State: AElRT7HYzb+q2lC2QKMWYFBETKnwaVI9reZERTXla+ncZ69eat2tgpQA 2yxLwWzSotv/im9aFbRxWoWR95t1WN4= X-Received: by 2002:a17:902:9a08:: with SMTP id v8-v6mr7360933plp.252.1520842635216; Mon, 12 Mar 2018 01:17:15 -0700 (PDT) Received: from localhost.localdomain ([45.56.152.76]) by smtp.gmail.com with ESMTPSA id q81sm16560512pfl.188.2018.03.12.01.17.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Mar 2018 01:17:14 -0700 (PDT) From: Heyi Guo To: edk2-devel@lists.01.org Date: Mon, 12 Mar 2018 16:16:18 +0800 Message-Id: <1520842578-95453-4-git-send-email-heyi.guo@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520842578-95453-1-git-send-email-heyi.guo@linaro.org> References: <1520842578-95453-1-git-send-email-heyi.guo@linaro.org> Subject: [edk2] [edk2-platforms PATCH v2 3/3] Hisilicon/D05: Support SBSA watchdog X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heyi Guo , Chenhui Sun , Leif Lindholm , Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" From: Chenhui Sun Add description of SBSA watchdogs to ACPI GTDT on D05. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chenhui Sun Signed-off-by: Heyi Guo Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Graeme Gregory --- Notes: v2: - Use local defines instead of PCD+define for watchdog base address [Ard] Silicon/Hisilicon/Hi1616/D05AcpiTables/Gtdt.aslc | 25 ++++++++++---------- 1 file changed, 13 insertions(+), 12 deletions(-) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/Silicon/Hisilicon/Hi1616/D05AcpiTables/Gtdt.aslc b/Silicon/Hisilicon/Hi1616/D05AcpiTables/Gtdt.aslc index 2a9d209c00f0..9f27696cf022 100644 --- a/Silicon/Hisilicon/Hi1616/D05AcpiTables/Gtdt.aslc +++ b/Silicon/Hisilicon/Hi1616/D05AcpiTables/Gtdt.aslc @@ -30,6 +30,14 @@ #define GTDT_GTIMER_FLAGS (GTDT_TIMER_ALWAYS_ON_CAPABILITY | GTDT_TIMER_ACTIVE_LOW | GTDT_TIMER_LEVEL_TRIGGERED) +// Generic watchdog address for SCCL (Super CPU cluster) A and SCCL B on Hi1616. +// Watchdogs on socket 1 are not mapped to SPI interrupts so we can't describe +// them in GTDT. +#define GENERIC_WATCHDOG_CONTROL_BASE_SCCL_A 0x40500000 +#define GENERIC_WATCHDOG_REFRESH_BASE_SCCL_A 0x40600000 +#define GENERIC_WATCHDOG_CONTROL_BASE_SCCL_B 0x60500000 +#define GENERIC_WATCHDOG_REFRESH_BASE_SCCL_B 0x60600000 + #pragma pack (1) typedef struct { @@ -57,22 +65,15 @@ EFI_ACPI_6_1_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt = { FixedPcdGet32 (PcdArmArchTimerHypIntrNum), // UINT32 NonSecurePL2TimerGSIV GTDT_GTIMER_FLAGS, // UINT32 NonSecurePL2TimerFlags 0xFFFFFFFFFFFFFFFF, // UINT64 CntReadBasePhysicalAddress -#ifdef notyet - PV660_WATCHDOG_COUNT, // UINT32 PlatformTimerCount + HI1616_WATCHDOG_COUNT, // UINT32 PlatformTimerCount sizeof (EFI_ACPI_6_1_GENERIC_TIMER_DESCRIPTION_TABLE) // UINT32 PlatfromTimerOffset }, { - EFI_ACPI_6_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT( - //FixedPcdGet32 (PcdGenericWatchdogRefreshBase), FixedPcdGet32 (PcdGenericWatchdogControlBase), 93, 0), - 0, 0, 0, 0), - EFI_ACPI_6_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT( - //FixedPcdGet32 (PcdGenericWatchdogRefreshBase), FixedPcdGet32 (PcdGenericWatchdogControlBase), 94, EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER) - 0, 0, 0, 0) + EFI_ACPI_5_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT( + GENERIC_WATCHDOG_REFRESH_BASE_SCCL_A, GENERIC_WATCHDOG_CONTROL_BASE_SCCL_A, 400, 0), + EFI_ACPI_5_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT( + GENERIC_WATCHDOG_REFRESH_BASE_SCCL_B, GENERIC_WATCHDOG_CONTROL_BASE_SCCL_B, 496, 0) } -#else /* !notyet */ - 0, 0 - } -#endif }; //