Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 24A5F2C0086 for ; Sat, 28 Jul 2012 07:17:30 +1000 (EST) Subject: Re: [PATCH V3 1/5] powerpc/fsl-pci: Unify pci/pcie initialization code Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Kumar Gala In-Reply-To: <5012F8FD.8030905@freescale.com> Date: Fri, 27 Jul 2012 16:17:28 -0500 Message-Id: References: <1343305827-26734-1-git-send-email-B38951@freescale.com> <412C8208B4A0464FA894C5F0C278CD5D01A289D8@039-SN1MPN1-002.039d.mgd.msft.net> <5012F8FD.8030905@freescale.com> To: Scott Wood Cc: Wood Scott-B07421 , "linuxppc-dev@lists.ozlabs.org" , Li Yang-R58472 , Jia Hongtao-B38951 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Jul 27, 2012, at 3:24 PM, Scott Wood wrote: > On 07/27/2012 05:10 AM, Jia Hongtao-B38951 wrote: >> Hi kumar, >>=20 >> I know "duplicate code from pci_process_bridge_OF_ranges()" is >> hard to accept but "refactor the code to have a shared function" >> is knotty. Actually this is the reason I didn't do the refactor. >=20 > Maybe we should keep doing the init early? We could still have a > platform device for the PM stuff, but some init would be done before = probe. >=20 > Another possibility is to try to handle swiotlb init later -- possibly > by reserving memory for it if the platform indicates it's a = possibility > that it will be needed, then freeing the memory if it's not needed. >=20 > -Scott I think the first option seems reasonable. Can we leave fsl_pci_init() = as we now have it and just have the platform driver deal with PM restore = via calling setup_pci_atmu() [probably need to update setup_pci_atmu to = handle restore case, but seems like minor changes] - k