From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161134AbcBDRCq (ORCPT ); Thu, 4 Feb 2016 12:02:46 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:62878 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161051AbcBDRCk (ORCPT ); Thu, 4 Feb 2016 12:02:40 -0500 From: Arnd Bergmann To: Gabriele Paoloni Cc: "Guohanjun (Hanjun Guo)" , "Wangzhou (B)" , "liudongdong (C)" , Linuxarm , qiujiang , "bhelgaas@google.com" , "Lorenzo.Pieralisi@arm.com" , "tn@semihalf.com" , zhangjukuo , "xuwei (O)" , "Liguozhu (Kenneth)" , "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "jcm@redhat.com" Subject: Re: [RFC PATCH 0/4] Add ACPI support for HiSilicon PCIe Host Controllers Date: Thu, 04 Feb 2016 18:01:51 +0100 Message-ID: <1930535.mkCdtpUWq7@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1454585860-60709-1-git-send-email-gabriele.paoloni@huawei.com> <76564455.dlc1WHiVY2@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:96YaVQb8CYb9Id1k8icqGUvQvOxAqSMj+FAjzIQIEOOKZXvaZIC Opw7/BtCDVB3sL5Sjl1qNJa3qT22RaKmlSSiXW+Pm9NM8HNvQvpqbEvCofcr+muep9JKK4/ uAYzVmZdqZ0taHRf3jM6vKM94jGTar9o5ViUjIjfogbrTbyKWpnfETRBYU8+xd0ClFIQEfa FK+KBt4bj+aSGa16I5qZw== X-UI-Out-Filterresults: notjunk:1;V01:K0:VanJOCJs6lg=:zvVHzo5so4PPVdga5gfWDp 7kuMnbTaKjd6uZrrdqw1/QpVEsS+8Knq3F0V8RtmEhrmFbiF6XFD4svrCGhknMLcTxdg6vQdL fNiwL/3o9GaU+uKTWSJztBhuBfzwFEj8oAYKFYBUQFppgqiO1Opxq0H+zN/ZIWiM+y3zP9UGV LCkJ3j7NtJieckXJg6dgl2X71S1W3OQywyUDROTXB3Kp7ZitE4XW6kV1vjOIymeyesBWQqWBf //3l2mOwTcF+pFThHHVWQL6WEOGvm4bc6EGpx7Me5Isizunt/p+OV8vGy/Jc08A2Vw0Tkcxrd LCCsTOMXQSGFeRd365STU/iFpYBsID9n3znwHgQAwdD/bYfbXwKJzKDHRRQmWdoVbdDw7o0Vn 9xRvdUOSYOXGc1j4uZp08Vm/TTm8ug3UBjEyMYhmTiUmqrYaRbxqgqy1x+Dxl8GPRolvT6oiu vH1AsJe3aVoIbxsH8l70VZ1euI6ZVySwt16ThHFlieVW/1qCK4JJgq3RP0VFM59sKSu8cfvbk 2LdnvaexgaF4SGoiUiNX04QONzdjywfi1qwQv9FwNwYdc59YVkeUUy+8w7zOInELIs6AOIXac LUzW9nUibxjkNiCr+1IkZJ6nS3kyQrQIWqatBK984sAiivmD5M2Tcou5LrCDr9Vwya7T9aOao fBG347XKrBVlzTjiq7Ecm1FeQK9E95IiDaO9Pw4rGoy26pv1f3xbbuL80Ts79qaVJO1/wSm6z OUYbwqrlAaZFUvmt Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 04 February 2016 16:44:12 Gabriele Paoloni wrote: > Effectively the ACPI version of the HiSilicon driver does not rely on > Designware as much as the DT version (that calls dw_pcie_host_init()); > however in order to do what you suggest I'd need to copy and paste and > modify dw_pcie_rd_conf and dw_pcie_wr_conf. > Also I'd need to declare duplicate version of the functions in > pcie-hisi-common.c (if I do not want to split the object across > different paths "drivers/pci/host" and "drivers/acpi/") > > Now I can do it but I thought it was more correct to pass &dw_pcie_ops > as input pointer in DECLARE_ACPI_MCFG_FIXUP(); this is also because maybe in > future other Designware based controllers may need to support ACPI and it > would be easier for them to reuse their DT based driver functions > > Honestly I am a bit confused... > I don't think you can use the dw_pcie_ops as-is anyway, as they in turn rely on the device driver structure, and you also don't need those as they seem to be written for the generic case of a 32-bit architecture that does not have enough space to map the entire config space into MMIO. Just set up all those mapping registers from the firmware and pass the config space base address as you'd normally do on ACPI. Arnd