From patchwork Wed Jul 30 04:21:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zheng, Lv" X-Patchwork-Id: 34497 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 555CE20DCC for ; Wed, 30 Jul 2014 04:22:43 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id i7sf3654259oag.4 for ; Tue, 29 Jul 2014 21:22:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=d8K4w8CpGz92KTKAOiMNVGUMp/15R7/3Ty/fauQ7uRM=; b=E8ZDVBxQshWvw+IPlIzo2ePOueiQqVcP8kVklb0D/N7GoPSqDSRZvujPCfMPXkYzzk O1KC+Z/gl0sb6J65F+2SAIpDwa3TbwNySoTAR6nzIRCPjtDCiQ7TXkT4xal8KMT/V6At Ke4JlE0MUYsR6jSCTQM9XRVFOyQPKS3T+Aft/b8NLoPOyT6i+nC/OXui3jxFz9wuNGh2 HSNADSMV3C6U/lSqXm7GDMNhScblmaewKKWmlwIDpGSF8qd1dB/4W/aKcrfvyX+4BEj9 2Jl0UJfKnJoalCo9pAfBIUedOQdpoZA/Nmk2g8J2+CoqkpiEnjC2C4LKjzOUgnIH8D7p AHMQ== X-Gm-Message-State: ALoCoQlmavMvjZvNrkFF8I0W47PVGYRV/G8MAGXomDQ6liR8Y7Tt1oWgm55qsQCx+OhJnlY0okfK X-Received: by 10.50.73.5 with SMTP id h5mr1206176igv.2.1406694162944; Tue, 29 Jul 2014 21:22:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.87.37 with SMTP id q34ls419210qgd.5.gmail; Tue, 29 Jul 2014 21:22:42 -0700 (PDT) X-Received: by 10.52.137.2 with SMTP id qe2mr558880vdb.11.1406694162864; Tue, 29 Jul 2014 21:22:42 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id fw8si761292vdc.60.2014.07.29.21.22.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Jul 2014 21:22:42 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id la4so989213vcb.33 for ; Tue, 29 Jul 2014 21:22:42 -0700 (PDT) X-Received: by 10.220.116.196 with SMTP id n4mr1393842vcq.6.1406694162785; Tue, 29 Jul 2014 21:22:42 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp293566vcb; Tue, 29 Jul 2014 21:22:42 -0700 (PDT) X-Received: by 10.66.253.170 with SMTP id ab10mr1545258pad.53.1406694161957; Tue, 29 Jul 2014 21:22:41 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gl10si967909pbd.139.2014.07.29.21.22.40 for ; Tue, 29 Jul 2014 21:22:41 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932106AbaG3EWQ (ORCPT + 26 others); Wed, 30 Jul 2014 00:22:16 -0400 Received: from mga03.intel.com ([143.182.124.21]:60792 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750728AbaG3EWM (ORCPT ); Wed, 30 Jul 2014 00:22:12 -0400 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 29 Jul 2014 21:22:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,762,1400050800"; d="scan'208";a="462977312" Received: from lvzheng-z530.sh.intel.com ([10.239.37.16]) by azsmga001.ch.intel.com with ESMTP; 29 Jul 2014 21:22:08 -0700 From: Lv Zheng To: "Rafael J. Wysocki" , Len Brown Cc: Lv Zheng , Lv Zheng , , linux-acpi@vger.kernel.org, Tomasz Nowicki , Hanjun Guo , Bob Moore Subject: [PATCH 15/17] ACPICA/ARM: ACPI 5.1: Update for GTDT table changes. Date: Wed, 30 Jul 2014 12:21:58 +0800 Message-Id: X-Mailer: git-send-email 1.7.10 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lv.zheng@intel.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Tomasz Nowicki New fields and new subtables. Tomasz Nowicki. tomasz.nowicki@linaro.org Signed-off-by: Tomasz Nowicki Signed-off-by: Hanjun Guo Signed-off-by: Bob Moore Signed-off-by: Lv Zheng --- include/acpi/actbl3.h | 93 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 78 insertions(+), 15 deletions(-) diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h index c2295cc..41ad964 100644 --- a/include/acpi/actbl3.h +++ b/include/acpi/actbl3.h @@ -241,33 +241,96 @@ struct acpi_s3pt_suspend { /******************************************************************************* * - * GTDT - Generic Timer Description Table (ACPI 5.0) - * Version 1 + * GTDT - Generic Timer Description Table (ACPI 5.1) + * Version 2 * ******************************************************************************/ struct acpi_table_gtdt { struct acpi_table_header header; /* Common ACPI table header */ - u64 address; - u32 flags; - u32 secure_pl1_interrupt; - u32 secure_pl1_flags; - u32 non_secure_pl1_interrupt; - u32 non_secure_pl1_flags; + u64 counter_block_addresss; + u32 reserved; + u32 secure_el1_interrupt; + u32 secure_el1_flags; + u32 non_secure_el1_interrupt; + u32 non_secure_el1_flags; u32 virtual_timer_interrupt; u32 virtual_timer_flags; - u32 non_secure_pl2_interrupt; - u32 non_secure_pl2_flags; + u32 non_secure_el2_interrupt; + u32 non_secure_el2_flags; + u64 counter_read_block_address; + u32 platform_timer_count; + u32 platform_timer_offset; }; -/* Values for Flags field above */ +/* Flag Definitions: Timer Block Physical Timers and Virtual timers */ + +#define ACPI_GTDT_INTERRUPT_MODE (1) +#define ACPI_GTDT_INTERRUPT_POLARITY (1<<1) +#define ACPI_GTDT_ALWAYS_ON (1<<2) + +/* Common GTDT subtable header */ + +struct acpi_gtdt_header { + u8 type; + u16 length; +}; + +/* Values for GTDT subtable type above */ + +enum acpi_gtdt_type { + ACPI_GTDT_TYPE_TIMER_BLOCK = 0, + ACPI_GTDT_TYPE_WATCHDOG = 1, + ACPI_GTDT_TYPE_RESERVED = 2 /* 2 and greater are reserved */ +}; -#define ACPI_GTDT_MAPPED_BLOCK_PRESENT 1 +/* GTDT Subtables, correspond to Type in struct acpi_gtdt_header */ + +/* 0: Generic Timer Block */ + +struct acpi_gtdt_timer_block { + struct acpi_gtdt_header header; + u8 reserved; + u64 block_address; + u32 timer_count; + u32 timer_offset; +}; + +/* Timer Sub-Structure, one per timer */ + +struct acpi_gtdt_timer_entry { + u8 frame_number; + u8 reserved[3]; + u64 base_address; + u64 el0_base_address; + u32 timer_interrupt; + u32 timer_flags; + u32 virtual_timer_interrupt; + u32 virtual_timer_flags; + u32 common_flags; +}; + +/* Flag Definitions: common_flags above */ + +#define ACPI_GTDT_GT_IS_SECURE_TIMER (1) +#define ACPI_GTDT_GT_ALWAYS_ON (1<<1) + +/* 1: SBSA Generic Watchdog Structure */ + +struct acpi_gtdt_watchdog { + struct acpi_gtdt_header header; + u8 reserved; + u64 refresh_frame_address; + u64 control_frame_address; + u32 timer_interrupt; + u32 timer_flags; +}; -/* Values for all "TimerFlags" fields above */ +/* Flag Definitions: timer_flags above */ -#define ACPI_GTDT_INTERRUPT_MODE 1 -#define ACPI_GTDT_INTERRUPT_POLARITY 2 +#define ACPI_GTDT_WATCHDOG_IRQ_MODE (1) +#define ACPI_GTDT_WATCHDOG_IRQ_POLARITY (1<<1) +#define ACPI_GTDT_WATCHDOG_SECURE (1<<2) /******************************************************************************* *