Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752158AbaGUBoe (ORCPT ); Sun, 20 Jul 2014 21:44:34 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:32996 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751738AbaGUBob (ORCPT ); Sun, 20 Jul 2014 21:44:31 -0400 X-AuditID: cbfee68e-b7fb96d000004bfc-03-53cc707cde96 From: Jingoo Han To: "'Murali Karicheri'" , "'Rob Herring'" Cc: linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, "'Russell King'" , "'Grant Likely'" , "'Rob Herring'" , "'Mohit Kumar'" , "'Bjorn Helgaas'" , "'Pratyush Anand'" , "'Richard Zhu'" , "'Kishon Vijay Abraham I'" , "'Marek Vasut'" , "'Arnd Bergmann'" , "'Pawel Moll'" , "'Mark Rutland'" , "'Ian Campbell'" , "'Kumar Gala'" , "'Randy Dunlap'" , "'Jingoo Han'" References: <1405696469-7172-1-git-send-email-m-karicheri2@ti.com> <1405696469-7172-5-git-send-email-m-karicheri2@ti.com> <53C9839C.5090604@ti.com> In-reply-to: <53C9839C.5090604@ti.com> Subject: Re: [PATCH v6 4/5] PCI: add PCI controller for keystone PCIe h/w Date: Mon, 21 Jul 2014 10:44:28 +0900 Message-id: <006001cfa485$4f4fcff0$edef6fd0$%han@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac+ixyFs0Br5ziMPQJmpASfft7CzZgBviTgg Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrLKsWRmVeSWpSXmKPExsVy+t8zQ92agjPBBj07rSz+TjrGbrGkKcPi 5SFNi/43C1ktDvzZwWhx7tVKRovLCy+xWlx42sNmsenxNVaLy7vmsFmcnXeczeL2ZV6Lvt4D bBZv2hoZLZZev8hksXHqL0aLC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u7pkCD3rRMkeljaTKJnbhnKO1xPor792QCd7XwsQleLBgHKL74oRgfax6MeRxj6 8LxYjPbdbZSib/395IIx2FnqBHjvnlwSDw0WAuzOOyzCpY4WMf5574gI33R0S3FZdSauPOcl cc35KFxddZDEzzvuCFP5Lpx3rQrg1wN3CdzcdUOUGLrODuYaODaNsyk4s86SZjTr45llydqF 2pjYaJVSNRvFMQoza+LimUXLE5VLjOnCFzCKLDY9U7ASWZ5nZs77vyE1ZYkS/QHXKFekJP1l 1NH/nI2XgKGj02gdGL31jLuftIPKkBwQREFaA7NfdUoDegxs81wmc0AwJadPA/i91SUNDEMA fi7vJXwpkp4Evd57fiKcToW9Tef8BEF7JLD51fBv3APg+5JPpC8VJBD9bU/9dBi9FHrLrot9 WkxPhFeeNAuaomR0PKwoQz5bRofCgaMef4SgJ8PC0tNEQI+DNc4PhC8OBf/lD2XgDmr41F4r CUTCYV3vR5AP5I4RTY4RTY4RTY4RSBkQV4EIzqqz8pv0JtUMnjXxmWb9DJ3FVA38m/gmshZU 2pEL0BRgQmQYPEiWS9gsfpvJBSBFMOGyFoNgydLYbds5m0Vry0zneBeIEd5ZQERG6CzCXpsz tKpZmlj1bHUsUmvi4pixsvp9c1bJaT2bwW3mOCtn+8OJqKBIOyg+rteYh0q8m+5svz+25uTn JMuGC5M2xjCHtmqXH7TD/K5jpDe1a96EAmNDI3E7a7A1ryhBVzf/SgIIq2AXh2LdSvrr+t3D TWsb6zviWrqdc9pDEt62Fs+MmpbkUVAlnKYA7njzZUqPIntUH1uxfmj6/S2rrzO7Rqes6SYn 5jQ4GTFvYFVRhI1nfwEWQf1KnwMAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday, July 19, 2014 5:29 AM, Murali Karicheri wrote: > On 07/18/2014 03:31 PM, Rob Herring wrote: > > On Fri, Jul 18, 2014 at 10:14 AM, Murali Karicheri wrote: > --- Cut --- > >> + > >> +Optional properties:- > >> + phys: phandle to Generic Keystone SerDes phy for PCI > >> + phy-names: name of the Generic Keystine SerDes phy for PCI > >> + - If boot loader already does PCI link establishment, then phys and > >> + phy-names shouldn't be present. > >> + ti,enable-linktrain - Enable Link training. > >> + - If boot loader already does PCI link establishment, then this > >> + shouldn't be present. > > > > Can't you read from the h/w if the link is trained? I agree with Rob Herring's suggestion. > > Yes. > > There are customers who use this driver with PCI Link setup done in the > boot loader. This property tells the driver to bypass Link setup > procedure in that case. Is this undesirable and if so. how other > platforms handle it? Check first if link is trained or start the link > setup procedure? Let me know. If this is fine, please provide your Ack. Please, check the following code of Exynos PCIe diver. ./drivers/pci/host/pci-exynos.c static int exynos_pcie_establish_link(struct pcie_port *pp) { struct exynos_pcie *exynos_pcie = to_exynos_pcie(pp); void __iomem *elbi_base = exynos_pcie->elbi_base; void __iomem *pmu_base = exynos_pcie->pmu_base; if (dw_pcie_link_up(pp)) { dev_err(pp->dev, "Link already up\n"); return 0; } ..... In the case of Exynos PCIe, the Exynos PCIe driver checks the h/w bit such as PCIE_ELBI_LTSSM_ENABLE bit of PCIE_ELBI_RDLH_LINKUP offset register. If the link is already set up by the boot loader or other reasons, the driver will skip some initialization codes. The first step is that you find such h/w bit for checking link up. If so, please add the code for skipping, when the link is already set up. Best regards, Jingoo Han -- 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/