From patchwork Sun May 10 12:54:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pratyush Anand X-Patchwork-Id: 470449 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 220EA1401DA for ; Sun, 10 May 2015 22:54:15 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=kM3TQsKT; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751374AbbEJMyN (ORCPT ); Sun, 10 May 2015 08:54:13 -0400 Received: from mail-qc0-f175.google.com ([209.85.216.175]:34500 "EHLO mail-qc0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751173AbbEJMyM (ORCPT ); Sun, 10 May 2015 08:54:12 -0400 Received: by qcyk17 with SMTP id k17so57525731qcy.1; Sun, 10 May 2015 05:54:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=VJ2xywU6yszfiKH2FhZzWeVIM6o80H2Z7JalLeeDVwI=; b=kM3TQsKTBgg1Kc/H5glkTbuRub1lFcEO5iDDUdtrgfMQmfY57NTC8NhT2q4dw518HU xc3B3bG80JDW/TBe9Zy0RQ35X0NSoXZTNg8IKUiuIEb5LEg2ho6rvvD+mlW/6A4H+g7E h4nBh0v9H6X1jw6bDvnuqmaoi6sXrWxb/aNJVJDnw3uhS2BxdwAPg+ONmwovRwqoM4ou dOAxE7vw/+4aWcCFNZezDQ81yczh0D09qiZlTue1GNfUWhAQLvwemL+qVadAgUy8LlXg Yyef0dZuNrm0uXiPt8kwxIxlTaPq3IJL0C1phCEWSbfctj0HBYONxKhgoy6uyDdIUNO+ mkLw== MIME-Version: 1.0 X-Received: by 10.55.20.136 with SMTP id 8mr12975013qku.16.1431262451426; Sun, 10 May 2015 05:54:11 -0700 (PDT) Received: by 10.140.95.229 with HTTP; Sun, 10 May 2015 05:54:11 -0700 (PDT) In-Reply-To: <553E9B9A.5090000@ti.com> References: <553E9B9A.5090000@ti.com> Date: Sun, 10 May 2015 18:24:11 +0530 Message-ID: Subject: Re: [RFC] PCI: designware: missing *config* reg space From: Pratyush Anand To: Murali Karicheri , Jingoo Han Cc: Lucas Stach , KISHON VIJAY , "linux-pci@vger.kernel.org" , "devicetree@vger.kernel.org" , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Bjorn Helgaas , Mohit ST Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Tue, Apr 28, 2015 at 1:57 AM, Murali Karicheri wrote: > All, > > I would like to take action to resolve the following print message thrown by > PCI designware core driver when kernel boots up on Keystone. > > [ 0.415778] keystone-pcie 21801000.pcie: missing *config* reg space > > As per DT documentation introduced by commit > 4dd964df36d0e548e1806ec2ec275b62d4dc46e8 "PCI: designware: Look for > configuration space in 'reg', not 'ranges' > > This is introduced to stop abusing the range property for defining resource > for config space. However if the device binding doesn't have > reg-name = "config" defined, this throws out an unnecessary log message > at boot which seems to me not right. AFAIK, reg-names is not mandatory. > config space address in Keystone case is defined using index. So for > keystone this needs to be fixed. > > I propose to add the following check in the designware code to address > this. Keystone uses an older version of the Designware IP and doesn't have > the ATU support. So va_cfg0_base and va_cfg1_base are already set up in > ks_dw_pcie_host_init() before calling dw_pcie_host_init() and points to the > remote config space address (both same for keystone). I think for other DW > drivers, these variables are NULL. So add a check and avoid this error > message for Keystone. Any comments? > or may be just following one liner should do the job for you. ~Pratyush --- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c index 2e9f84fdd9ce..4ff5308f0cc6 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c @@ -371,7 +371,7 @@ int dw_pcie_host_init(struct pcie_port *pp) addrp = of_get_address(np, index, NULL, NULL); pp->cfg0_mod_base = of_read_number(addrp, ns); pp->cfg1_mod_base = pp->cfg0_mod_base + pp->cfg0_size; - } else { + } else if (!pp->va_cfg0_base) { dev_err(pp->dev, "missing *config* reg space\n"); }