Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6241433ybi; Wed, 31 Jul 2019 10:43:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqzsgFD7/9erFfdfx57bGB3j8PbHBNLE26PBH39G3lZRaMDgPhydPhaCiqB1KHyEXebKqhlI X-Received: by 2002:a17:90a:9505:: with SMTP id t5mr4080826pjo.96.1564595035373; Wed, 31 Jul 2019 10:43:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564595035; cv=none; d=google.com; s=arc-20160816; b=mu66tTfGhc7Uj/o6UXiET2u8TlCRsyu/K8+QRiVMm446fxNfPzZSt3lxZiE3xHdjZW N3BqRPqPBJtIDNiguKT5AV7i6v2n1qoPrGSQ/zxMtDHSlqaddDOTPPCOyanhlnaT8ZEA aKGDcZNS8MNMZNIQVJBZFaAHtLdkKrK/hkhJKsTHdilWc3U91UZMNda9VGKVFJoqw4Gl 0E5gJIzpAiLc1PXcwqKe0FiX82bBnk5Ld2MWalLTk1qTUONq5ydNwDqAxK0FnKfP/wdz YlSuemX4FMBpR1cZgh/Kv41RHawn0QtXr7o8s524erbsWB/Xu2IJgmOS+TeOOgpahF31 oicw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=vinFprpzXDRWgPSf09Cb+1rGrgNzHkl+jSZ1HN3zYfs=; b=gIMCvJ2ZHjfa44j6pD8CctUgwdLnwoyd61phSOrrUYQk8D5SF94/fjOVpCLddliUfE MCyO2I0IoPjvS/RO2bKyXb+HSzB33umEef2TN4yourvyw7Pqc61ECy7dOuNy3ZSt5YyP raSauqazXNWnqKq38LBnXDWwOQ+dUn7FT0Ag/nWqllZXgYoSvrnJ6EE2h5hMD+AgFnIH zhP1BcRIHAgSnCyNqS59J7arUv7eOcC+C33HQ7gvpYjW9jeRNBNhy74/8RANTOHu9a3I GC5iZOFwyJANlpAPpaGPAsMAtjaow6u5CpY1aDcf2ieTHmCbPq+z7bxW3vaTOx48E8Vi zjYg== 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 n9si31707505pgq.240.2019.07.31.10.43.40; Wed, 31 Jul 2019 10:43:55 -0700 (PDT) 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 S1729898AbfGaQkB (ORCPT + 99 others); Wed, 31 Jul 2019 12:40:01 -0400 Received: from mga18.intel.com ([134.134.136.126]:31397 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729466AbfGaQkB (ORCPT ); Wed, 31 Jul 2019 12:40:01 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jul 2019 09:40:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,330,1559545200"; d="scan'208";a="174219976" Received: from tthayer-hp-z620.an.intel.com ([10.122.105.146]) by fmsmga007.fm.intel.com with ESMTP; 31 Jul 2019 09:39:59 -0700 From: thor.thayer@linux.intel.com To: mdf@kernel.org, richard.gong@linux.intel.com, agust@denx.de Cc: linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org, Thor Thayer Subject: [PATCHv4 0/3] fpga: altera-cvp: Add Stratix10 Support Date: Wed, 31 Jul 2019 11:41:58 -0500 Message-Id: <1564591321-19037-1-git-send-email-thor.thayer@linux.intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thor Thayer Newer versions (V2) of Altera/Intel FPGAs CvP have different PCI Vendor Specific Capability offsets than the older (V1) Altera/FPGAs. Most of the CvP registers and their bitfields remain the same between both the older parts and the newer parts. This patchset implements changes to discover the Vendor Specific Capability offset and then add Stratix10 CvP support. V2 Changes: Remove inline designator from abstraction functions. Reverse Christmas Tree format for local variables Remove redundant mask from credit calculation Add commment for the delay(1) function in wait_for_credit() V3 Changes Return int instead of void for abstraction functions Check the return code from read in altera_cvp_chk_error() Move reset of current_credit_byte to clear_state(). Check return codes of read/writes in added functions. V4 Changes Rename delta_credit to space Simplify wait for credit do-while loop. Change from udelay() to usleep_range() Use min() to find length to send Remove NULL initialization from private structure Use #define for Version1 offsets Change current_credit_byte to u32 sent_packets. Changes to Kconfig title and description to support Stratix10. Thor Thayer (3): fpga: altera-cvp: Discover Vendor Specific offset fpga: altera-cvp: Preparation for V2 parts. fpga: altera-cvp: Add Stratix10 (V2) Support drivers/fpga/Kconfig | 6 +- drivers/fpga/altera-cvp.c | 339 ++++++++++++++++++++++++++++++++++++---------- 2 files changed, 271 insertions(+), 74 deletions(-) -- 2.7.4