Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758445AbcC2XTt (ORCPT ); Tue, 29 Mar 2016 19:19:49 -0400 Received: from mail-ob0-f182.google.com ([209.85.214.182]:36762 "EHLO mail-ob0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757893AbcC2XTr (ORCPT ); Tue, 29 Mar 2016 19:19:47 -0400 Subject: Re: [PATCH v2 03/15] MIPS: PCI: Compatibility with ARM-like PCI host drivers To: Paul Burton , linux-mips@linux-mips.org, Ralf Baechle References: <1454499045-5020-1-git-send-email-paul.burton@imgtec.com> <1454499045-5020-4-git-send-email-paul.burton@imgtec.com> Cc: Joshua Kinard , Lorenzo Pieralisi , Bjorn Helgaas , Zubair Lutfullah Kakakhel , Jens Axboe , linux-kernel@vger.kernel.org, Yijing Wang , John Crispin , Yinghai Lu From: Florian Fainelli Message-ID: <56FB0D90.8000200@gmail.com> Date: Tue, 29 Mar 2016 16:19:44 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1454499045-5020-4-git-send-email-paul.burton@imgtec.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 962 Lines: 28 Le 03/02/2016 03:30, Paul Burton a écrit : > Introduce support for struct hw_pci & the associated pci_common_init_dev > function as used by the PCI drivers written for ARM platforms under > drivers/pci. This is in preparation for reusing the xilinx-pcie driver > on the MIPS Boston board. > > Platforms that make use of this more generic code will need to select > CONFIG_MIPS_GENERIC_PCI. Platforms which don't will continue to work as > they have, with the intent that PCI drivers be migrated towards struct > hw_pci & drivers/pci/ over time. > > Signed-off-by: Paul Burton > --- [snip] > + if (hw->preinit) > + hw->preinit(); > + > + ret = hw->setup(i, &ctl->sysdata); > + if (ret < 0) { This needs to be ret <= 0 to be compliant with what ARM PCI host controllers do, which is return 1 in case they could get hw->setup to finish with success, and 0 or negative if they could not, see arch/arm/kernel/bios32.c. -- Florian