Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752662AbbH0Rsl (ORCPT ); Thu, 27 Aug 2015 13:48:41 -0400 Received: from mail-vk0-f68.google.com ([209.85.213.68]:36381 "EHLO mail-vk0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751667AbbH0Rsj (ORCPT ); Thu, 27 Aug 2015 13:48:39 -0400 X-Greylist: delayed 1041 seconds by postgrey-1.27 at vger.kernel.org; Thu, 27 Aug 2015 13:48:38 EDT MIME-Version: 1.0 In-Reply-To: <1440678857-27118-4-git-send-email-gabriel.fernandez@linaro.org> References: <1440678857-27118-1-git-send-email-gabriel.fernandez@linaro.org> <1440678857-27118-4-git-send-email-gabriel.fernandez@linaro.org> Date: Thu, 27 Aug 2015 23:01:16 +0530 Message-ID: Subject: Re: [PATCH v4 3/4] PCI: st: Provide support for the sti PCIe controller From: Pratyush Anand To: Gabriel Fernandez Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Srinivas Kandagatla , Maxime Coquelin , Patrice Chotard , Russell King , Bjorn Helgaas , Jingoo Han , Lucas Stach , Fabrice Gasnier , Kishon Vijay Abraham I , Andrew Morton , "David S. Miller" , Greg KH , Mauro Carvalho Chehab , Joe Perches , Tejun Heo , Arnd Bergmann , Viresh Kumar , Thierry Reding , Phil Edworthy , Minghuan Lian , Tanmay Inamdar , Murali Karicheri , Sachin Kamat , Andrew Lunn , Liviu Dudau , Zhou Wang , "devicetree@vger.kernel.org" , linux-kernel@vger.kernel.org, "linux-arm-kernel@lists.infradead.org" , kernel@stlinux.com, "linux-pci@vger.kernel.org" , Lee Jones Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1656 Lines: 56 Hi Gabriel, Looks good to me. On Thu, Aug 27, 2015 at 6:04 PM, Gabriel Fernandez wrote: > sti pcie is built around a Synopsis Designware PCIe IP. > > Signed-off-by: Fabrice Gasnier > Signed-off-by: Gabriel Fernandez > +static int st_pcie_link_up(struct pcie_port *pp) > +{ > + u32 status; > + int link_up; nit: why not bool > + int count = 0; [...] > +static void st_pcie_board_reset(struct pcie_port *pp) > +{ > + struct st_pcie *pcie = to_st_pcie(pp); > + > + if (!gpio_is_valid(pcie->reset_gpio)) > + return; > + > + if (gpio_direction_output(pcie->reset_gpio, 0)) { > + dev_err(pp->dev, "Cannot set PERST# (gpio %u) to output\n", > + pcie->reset_gpio); > + return; > + } > + > + /* From PCIe spec */ > + msleep(2); > + gpio_direction_output(pcie->reset_gpio, 1); > + > + /* > + * PCIe specification states that you should not issue any config > + * requests until 100ms after asserting reset, so we enforce that here > + */ > + msleep(100); IIRC, specification says to wait after link training completes. So shouldn't it be after st_pcie_enable_ltssm. Moreover, I wonder why others do not need it. Reviewed-by: Pratyush Anand -- 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/