Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp723236pxf; Thu, 1 Apr 2021 11:49:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwklHsR4f6j3MvdI46PdtuPm2AiWmQFYfIZjw/xY+LdH2fDdJBB2Ogm7iFtnTgKXAw2YASZ X-Received: by 2002:a17:906:a51:: with SMTP id x17mr10752643ejf.25.1617302989151; Thu, 01 Apr 2021 11:49:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617302989; cv=none; d=google.com; s=arc-20160816; b=BhryikudHIvFK/xRQ+R57LE2s0Lwd2EvHYhpBCf2drKHugGHCruC2l884qxT/g3Im8 LghzYUKaZ1ZR+GSBaxTbRlVGjt6KQF8WLKpA6yGj9k7nrukDzBA+S0bqd1DBUMH8nvrq coTAdfbc40oDonF8+VqDiQIzRTbvJnCGwREV8po4eb1EizrNy3UXH3ZYWMPz0lbW1gx6 Ce2y2mp4sKcqNiM5J/xHUJ/Oi4hEjI6CYCXDtXQUeAYF5Ickjh+4IyGDGLLRAjkcrgqx w/Mh9Fxdd/jTkBHRmLUowJJkWhxxfAvRr6Fi8G1VRhJtewAxkdP/WNoMyR5OtkIDY2KZ dOsg== 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 :ironport-sdr:ironport-sdr; bh=PDqf81vWUGRnhtJFjJz+wvITf92PJwe0L57ZudQfgl0=; b=NrL62QLs1AhBmtEIfpUqfYNkFOXASMTFQ4vpDrM6n7RrDMe5taxPXG66TYF8H/H92K eaIfHDQdc8mcp++2DTxWsusjKzw+tgwKaO0PuCPhOD2QD/BUoD8SUAnXeNAPnUS2EjNR DRDVhJYjuo0GfGFrZwt4xsQb2IwYkItLOeLHRl/pA7MOrUDZx86wss9ESYrqec0GADfb cELReLAjNooP7pHdry0nksriwZGRK+GJaD1jGhCo9Mkj+sZ8/rymsezlOoM246uSIDHc Buz+TImncAzrhP0iS4OxqI5hf3d7HLUoIrSjWM3I6HaY9+LItaJuwYNg5AKYGFPz/+Tl EVTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id y25si4926759ejb.622.2021.04.01.11.49.26; Thu, 01 Apr 2021 11:49:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S234442AbhDASqs (ORCPT + 99 others); Thu, 1 Apr 2021 14:46:48 -0400 Received: from mga11.intel.com ([192.55.52.93]:15518 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238262AbhDASYd (ORCPT ); Thu, 1 Apr 2021 14:24:33 -0400 IronPort-SDR: pqTmkUH8LH7BCZzv9+dsL6EhI7++BVMLWPWjlEgjeR+HVvHfydR7wHJ/YDGCUOkLj6BLxP8Lv2 9wm6+3CTKx4Q== X-IronPort-AV: E=McAfee;i="6000,8403,9941"; a="189049281" X-IronPort-AV: E=Sophos;i="5.81,296,1610438400"; d="scan'208";a="189049281" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2021 11:22:18 -0700 IronPort-SDR: iTS/4UfVWmg/0+sjwUsP0cTflWUNTNI4X36H8517uusL8UdxUhqGgrXax8+w4gqgKhJO6rNTtl 6ZhwBnUJvbsw== X-IronPort-AV: E=Sophos;i="5.81,296,1610438400"; d="scan'208";a="517445221" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2021 11:22:09 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lS1xC-000KFb-9g; Thu, 01 Apr 2021 21:22:02 +0300 Date: Thu, 1 Apr 2021 21:22:02 +0300 From: Andy Shevchenko To: Mika Westerberg Cc: Henning Schild , Wolfram Sang , Jean Delvare , Lee Jones , Tan Jui Nee , Jim Quinlan , Jonathan Yong , Bjorn Helgaas , linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-pci@vger.kernel.org, Jean Delvare , Peter Tyser , hdegoede@redhat.com Subject: Re: [PATCH v1 3/7] PCI: New Primary to Sideband (P2SB) bridge support library Message-ID: References: <20210308122020.57071-1-andriy.shevchenko@linux.intel.com> <20210308122020.57071-4-andriy.shevchenko@linux.intel.com> <20210313104557.321de08e@md1za8fc.ad001.siemens.net> <20210401180617.GL2542@lahna.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210401180617.GL2542@lahna.fi.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 01, 2021 at 09:06:17PM +0300, Mika Westerberg wrote: > On Thu, Apr 01, 2021 at 06:43:11PM +0300, Andy Shevchenko wrote: > > On Sat, Mar 13, 2021 at 10:45:57AM +0100, Henning Schild wrote: > > > Am Mon, 8 Mar 2021 14:20:16 +0200 > > > schrieb Andy Shevchenko : > > > > ... > > > > > > + * pci_p2sb_bar - Get Primary to Sideband bridge (P2SB) device BAR > > > > + * @pdev: PCI device to get a PCI bus to communicate with > > > > + * @devfn: PCI slot and function to communicate with > > > > + * @mem: memory resource to be filled in > > > > > > Do we really need that many arguments to it? > > > > > > Before i had, in a platform driver that never had its own pci_dev or bus > > > > > > res->start = simatic_ipc_get_membase0(PCI_DEVFN(13, 0)); > > > if (res-start == 0) > > > return -ENODEV; > > > > > > So helper only asked for the devfn, returned base and no dedicated > > > error code. > > > > > > With this i need > > > > > > struct pci_bus *bus = pci_find_bus(0, 0); > > > struct pci_dev *pci_dev = bus->self; > > > unsigned int magic_i_do_not_want = PCI_DEVFN(13, 0); > > > > What confuses me is the use for SPI NOR controller on Broxton. And I think > > we actually can indeed hide all this under the hood by exposing P2SB to the OS. > > > > Mika, what do you think? > > Not sure I follow. Do you mean we force unhide P2SB and then bind (MFD) > driver to that? Not MFD, SPI NOR (if I understood correctly the code in MFD driver for SPI NOR in regards to P2SB case). -- With Best Regards, Andy Shevchenko