Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp303772ybl; Thu, 30 Jan 2020 22:41:46 -0800 (PST) X-Google-Smtp-Source: APXvYqxgsgO+zoh1xNy4yJIORi9h05jw/u1Wm0NHPCcMOCDvx/tEeOom1w7t8aGIsuqbt4Q1UoqU X-Received: by 2002:a54:450f:: with SMTP id l15mr5565914oil.126.1580452906072; Thu, 30 Jan 2020 22:41:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580452906; cv=none; d=google.com; s=arc-20160816; b=ICqs8+C/qGLk0lEAFXF7z+smBEfl6fSqm+Pj3Rioa1pu/gDZ1HPTteCA2CCD/ukKK9 eaCPjhbwrlM2TBhPnkZ5HFtWRmwwAK6vWffQBs2IL/WHJNQ+RBewdSaIK3I9rS8fxNW/ qayDOg9xWmAQ1MhKjZ5YWDqHfwyMbeLGerIDzbuIIqVfMdHqJeEyxTR+PBQZPAVcPkLv OF/h1tMZRLKB6M5gSdmEAW9f2f0WHyDH1xhOc7gH0wHTvgBwrO5JPYs+uG4PoP+flhAB 7uLMbNhkLCLxgR8+g1bWwWCqVzFO3NFM+zDjPxrnuuVak8TNgiRSegpiO36z93BIwj5t vsqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=6SFaJw1IekrP7ocp5DnlvZDs+avSKynh8NCa6EpZCk8=; b=BOC3S+rVroIPtC44QNOLC+2qamZ8t+k++VC3LEzq2F2BZlBiQ6y5FEHyOXaZVtAo/T 0xmZJXZ8g8l4k0Vnjj9iIZj7DbGOoEcAGqdyXMBIeGM8N5pCaXHbmfShl5KMEOJYc/cR agsibPxm216oJkkTk/7RQiezuvluVa/dj8tByhY8rm5i+WcxrsVv2U/X6EYotE46h5m+ 5s0/JYlib5Hv5tvkycn6i7Wpt9Ktrpm8GZ6udS0VEy2gy0Ng/oNqaJxt4OVNEOPsaBbT oCgbejnmV8he2e7n3NVSUJOdLRVaLhNA1j9W6nc9UDcUQlZ7XE1NrQSxCoVyjRPjFPhM WgFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d8si4404608oti.306.2020.01.30.22.41.33; Thu, 30 Jan 2020 22:41:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727987AbgAaGkl (ORCPT + 99 others); Fri, 31 Jan 2020 01:40:41 -0500 Received: from mga02.intel.com ([134.134.136.20]:64027 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725815AbgAaGkk (ORCPT ); Fri, 31 Jan 2020 01:40:40 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jan 2020 22:40:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,384,1574150400"; d="scan'208";a="309925480" Received: from wtczc53028gn.jf.intel.com (HELO localhost.localdomain) ([10.54.87.17]) by orsmga001.jf.intel.com with ESMTP; 30 Jan 2020 22:40:40 -0800 From: christopher.s.hall@intel.com To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, hpa@zytor.com, mingo@redhat.com, x86@kernel.org, jacob.e.keller@intel.com, richardcochran@gmail.com, davem@davemloft.net, sean.v.kelley@intel.com Cc: Christopher Hall Subject: [Intel PMC TGPIO Driver 0/5] Add support for Intel PMC Time GPIO Driver with PHC interface changes to support additional H/W Features Date: Wed, 11 Dec 2019 13:48:47 -0800 Message-Id: <20191211214852.26317-1-christopher.s.hall@intel.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christopher Hall Upcoming Intel platforms will have Time-Aware GPIO (TGPIO) hardware. The TGPIO logic is driven by the Always Running Timer (ART) that's related to TSC using CPUID[15H] (See Intel SDM Invariant Time-Keeping). The ART frequency is not adjustable. In order, to implement output adjustments an additional edge-timestamp API is added, as well, as a periodic output frequency adjustment API. Togther, these implement equivalent functionality to the existing SYS_OFFSET_* and frequency adjustment APIs. The TGPIO hardware doesn't implement interrupts. For TGPIO input, the output edge-timestamp API is re-used to implement a user-space polling interface. For periodic input (e.g. PPS) this is fairly efficient, requiring only a marginally faster poll rate than the input event frequency. Acknowledgment: Portions of the driver code were authored by Felipe Balbi ======================================================================= Christopher Hall (5): drivers/ptp: Add Enhanced handling of reserve fields drivers/ptp: Add PEROUT2 ioctl frequency adjustment interface drivers/ptp: Add user-space input polling interface x86/tsc: Add TSC support functions to support ART driven Time-Aware GPIO drivers/ptp: Add PMC Time-Aware GPIO Driver arch/x86/include/asm/tsc.h | 6 + arch/x86/kernel/tsc.c | 116 +++- drivers/ptp/Kconfig | 13 + drivers/ptp/Makefile | 1 + drivers/ptp/ptp-intel-pmc-tgpio.c | 867 ++++++++++++++++++++++++++++++ drivers/ptp/ptp_chardev.c | 86 ++- drivers/ptp/ptp_clock.c | 13 + include/linux/ptp_clock_kernel.h | 2 + include/uapi/linux/ptp_clock.h | 26 +- 9 files changed, 1099 insertions(+), 31 deletions(-) create mode 100644 drivers/ptp/ptp-intel-pmc-tgpio.c -- 2.21.0