Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755315Ab2KUQdU (ORCPT ); Wed, 21 Nov 2012 11:33:20 -0500 Received: from mga02.intel.com ([134.134.136.20]:54407 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755005Ab2KUQdT (ORCPT ); Wed, 21 Nov 2012 11:33:19 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.83,293,1352102400"; d="scan'208";a="222699844" Date: Wed, 21 Nov 2012 17:33:01 +0100 From: Samuel Ortiz To: Peter Hurley Cc: Peter Tyser , linux-kernel@vger.kernel.org, Aaron Sierra Subject: Re: [PATCH v3] mfd: lpc_ich: Fix resource request for [mem 0x00000000] Message-ID: <20121121163301.GA18738@sortiz-mobl> References: <1352462129.8352.2.camel@thor> <20121119174615.GG18738@sortiz-mobl> <1353349733.2630.9.camel@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1353349733.2630.9.camel@thor> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3174 Lines: 80 Hi Peter, On Mon, Nov 19, 2012 at 01:28:53PM -0500, Peter Hurley wrote: > On Mon, 2012-11-19 at 18:46 +0100, Samuel Ortiz wrote: > > Hi Peter, > > > > On Fri, Nov 09, 2012 at 06:55:29AM -0500, Peter Hurley wrote: > > > The older southbridges supported by the lpc_ich driver do not > > > provide memory-mapped space of the root complex. The driver > > > correctly avoids computing the iomem address in this case, yet > > > submits a zeroed resource request anyway (via mfd_add_devices()). > > > > > > Remove the iomem resource from the resource array submitted to the > > > mfd core for the older southbridges. > > > > > > Acked-by: Aaron Sierra > > > Cc: Peter Tyser > > > Cc: Samuel Ortiz > > > Signed-off-by: Peter Hurley > > > --- > > > > > > v2: post-decrement to match existing style > > > retitle patch subject > > > v3: respin as standalone patch > > > > > > drivers/mfd/lpc_ich.c | 3 +++ > > > 1 file changed, 3 insertions(+) > > > > > > diff --git a/drivers/mfd/lpc_ich.c b/drivers/mfd/lpc_ich.c > > > index a22544f..f507c09 100644 > > > --- a/drivers/mfd/lpc_ich.c > > > +++ b/drivers/mfd/lpc_ich.c > > > @@ -842,6 +842,9 @@ static int __devinit lpc_ich_init_wdt(struct pci_dev *dev, > > > res = wdt_mem_res(ICH_RES_MEM_GCS); > > > res->start = base_addr + ACPIBASE_GCS_OFF; > > > res->end = base_addr + ACPIBASE_GCS_END; > > > + } else { > > So I suppose there is no v3 for the iTCO ? If we're expecting all versions > > after 1 to have a memory mapped region, we should have something like: > > > > --- a/drivers/mfd/lpc_ich.c > > +++ b/drivers/mfd/lpc_ich.c > > @@ -830,7 +830,10 @@ static int __devinit lpc_ich_init_wdt(struct pci_dev > > *dev, > > * we have to read RCBA from PCI Config space 0xf0 and use > > * it as base. GCS = RCBA + ICH6_GCS(0x3410). > > */ > > - if (lpc_chipset_info[id->driver_data].iTCO_version == 2) { > > + if (lpc_chipset_info[id->driver_data].iTCO_version == 1) { > > + /* Don't register iomem for TCO ver 1 */ > > + lpc_ich_cells[LPC_WDT].num_resources--; > > + } else { > > pci_read_config_dword(dev, RCBABASE, &base_addr_cfg); > > base_addr = base_addr_cfg & 0xffffc000; > > if (!(base_addr_cfg & 1)) { > > Hi Samuel, > > I have no objection to your version. I applied and pushed it to my for-next branch. > FWIW, the iTCO_version field is exclusively a driver construct used to > differentiate southbridges that support memory-mapped I/O to the TCO > registers from those that only support port-based I/O. IOW, there's no > intrinsic meaning to the values and could be represented with a bool > type instead. Right, that sounds like follow up patch material. Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/