Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7602866rwl; Thu, 23 Mar 2023 06:34:45 -0700 (PDT) X-Google-Smtp-Source: AK7set86bg12r2yJRxF8ZlcTpN3cjh54U8iu9vrdzoJsMDSVoUMnz2TkpYevw71yCTz2BISF6Hj0 X-Received: by 2002:a05:6402:502:b0:4fb:999:e052 with SMTP id m2-20020a056402050200b004fb0999e052mr9293711edv.33.1679578485597; Thu, 23 Mar 2023 06:34:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679578485; cv=none; d=google.com; s=arc-20160816; b=zf9wct/uhKwAl/6F2bd+GBB5hg+gGpvWeOEtk1MBeSKLBjYAEIDxGyHKt1ZHoSe9Vr zMo20DDzLP273bPCR8skvxpVSo8+pILPKMICSHMpBqHBGfGQMryPjeIKlE+scmf/zeFh Z2n3z03ycnpnhkr92Ssq/6W1iGwVwhGtSvK9FiALT13jT9VSlyYWnKzW9t3MthtUhR36 IaHAoC5gKEd8ZQo/xvapRKMfmwC46DbSvcvuvPixHuKT44Z/2MtcvELx7U6kQfeKD20H ft8FHcWlUb7yQBJEWB9FqGI4Eq89NJZaxs5D7x31hnr8peDy6bIMJI0SsBNHwOGmrUJs ntVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Zj7m9+UG5hq7T6sPktuwm1aqcdWu739P0rKFYwpCTas=; b=e0kaTdBhkuoPrZCb3gk/cr2pnl+ow29jFNMbF6sWQousJj01zCfSt0wrUU1KSQ0ZoX xIiOBhq9HMMWDBRNCP9W/gY3U4OsLe5JZnfmwLIG8hCgPjCkdGUNPy6QYqzMkq40b2Rh eSCOl78ZV9dHvZvzVbnqyU1ckacPq5rzCgwfopYK/tkAit6DpkCd17KKAaPxZfUI2JAd aXZlAxQJWyvPlr7BSAlvXHS5ZH+BNpZnYUqroEruqoDiwB6vyCf2CJLhZ9AYZQqD5ToQ OaqJqtQfNSYRNUP+WoYZo3LwcUpLIK0ty52n7p3RUbjPqzVnObAIv/mzL8cj038FP6e3 ua8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QfqmPLp6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d2-20020a17090648c200b0093a15738c2bsi7099961ejt.25.2023.03.23.06.34.21; Thu, 23 Mar 2023 06:34:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QfqmPLp6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231162AbjCWNKn (ORCPT + 99 others); Thu, 23 Mar 2023 09:10:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230366AbjCWNKl (ORCPT ); Thu, 23 Mar 2023 09:10:41 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFB54E7; Thu, 23 Mar 2023 06:10:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679577040; x=1711113040; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=SEiWb4Q6KJdpzyl0PbGH3F5TMxuxW2ELHAWHnMyMCNI=; b=QfqmPLp6anZ1smpOe6hbl4Z7fJxW+1RQY0oTVGbwYx1z+hO7hwaXuqNn ywLPb+L1yVZ/XcjqtH4zmSMesa4TR6n4QfQO4Q4Q/Npu8BNgznKChkLHR C/XI+M7QhspVO5OBnhZ/gKhhmEvT+YxEPFNumizmWPvR84odhd+oAQP+Z VTNNdnXsjpsaFNPKUMoShNHfdMbMh/UiU8BJP9xhkmXNCSfO0BhxrCPUW smKCfEMKyVCCxkA9lH/VOR8AK2HGIrNdCygDZrVnNSToTBQ+K5czItQc2 IEGnTz68DR7a5WZTBdHjOOoC2CQIIU4Oh8ucKUZU7/A4Iybu4yfCEi7cj g==; X-IronPort-AV: E=McAfee;i="6600,9927,10657"; a="341020180" X-IronPort-AV: E=Sophos;i="5.98,283,1673942400"; d="scan'208";a="341020180" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2023 06:06:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10657"; a="746706038" X-IronPort-AV: E=Sophos;i="5.98,283,1673942400"; d="scan'208";a="746706038" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga008.fm.intel.com with ESMTP; 23 Mar 2023 06:06:11 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pfKdu-007W8w-0h; Thu, 23 Mar 2023 15:06:10 +0200 Date: Thu, 23 Mar 2023 15:06:09 +0200 From: Andy Shevchenko To: Mario Limonciello Cc: Jan =?utf-8?B?RMSFYnJvxZs=?= , Grzegorz Bernacki , Mark Hasemeyer , Jarkko Nikula , Mika Westerberg , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 4/4] i2c: designware: Add doorbell support for Mendocino Message-ID: References: <20230322210227.464-1-mario.limonciello@amd.com> <20230322210227.464-5-mario.limonciello@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230322210227.464-5-mario.limonciello@amd.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 22, 2023 at 04:02:26PM -0500, Mario Limonciello wrote: > Mendocino and later platform don't use the platform feature mailbox for > communication for I2C arbitration, they rely upon ringing a doorbell. > > Detect the platform by the device ID of the root port and choose the > appropriate method. ... > - ret = read_poll_timeout(psp_send_i2c_req_cezanne, status, > + ret = read_poll_timeout(_psp_send_i2c_req, status, > (status != -EBUSY), You can place it now in the above line, but up to you. > PSP_I2C_REQ_RETRY_DELAY_US, > PSP_I2C_REQ_RETRY_CNT * PSP_I2C_REQ_RETRY_DELAY_US, ... > + /* Cezanne uses platform mailbox, Mendocino and later use doorbell */ > + rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0)); > + if (rdev->device == 0x1630) > + _psp_send_i2c_req = psp_send_i2c_req_cezanne; > + else > + _psp_send_i2c_req = psp_send_i2c_req_mendocino; Where is pci_dev_put()? -- With Best Regards, Andy Shevchenko