Received: by 10.213.65.68 with SMTP id h4csp1977336imn; Thu, 5 Apr 2018 07:03:28 -0700 (PDT) X-Google-Smtp-Source: AIpwx49pIuzC2REA+mtmbv3WluaXjfmzT5wS7MORh38k4c1/VFzgQ1RzQLiTVSqQNHAKDAQjyEJZ X-Received: by 2002:a17:902:a981:: with SMTP id bh1-v6mr23590165plb.255.1522937008567; Thu, 05 Apr 2018 07:03:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522937008; cv=none; d=google.com; s=arc-20160816; b=RTGKvIb0hRkToglhGux+fFMvowWTC4esaQmlQ9M01CVzDaUi7No5P4B5uRmi8nxGix q7GShW8lPMnyhCvPwXUm/Ucf4roar8agTk06eX1irgBu9BnQ6Grjg/ROKGUqnJsgBX4F rNG8hWIDC20fey2xJqwcsLi12E0qEsBIMe5JAEJyxV5e2W3PkoURn4+8P5IcI5zriV2c jMLFAicak755cInIaej5hR5iayIMRrxiJcQTt8SJrBa53UFvU/urdld1NkvgukgAEYfU zQKUubdEr51qkoJg/Gf3yB6kxOCBiIlqR/TLwykDQUvH9UqH3MWZCO5kNkUazaMejxBQ 8YdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:user-agent:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from:arc-authentication-results; bh=lTsAlRuPPCuwrl4OLKyXmJdnIDgziL//+o+G++9Lvx4=; b=UgvwpA5qkTrbZ4+QSO3bcLgHMYIIHeP6gf10h76gPtHRSsLw8g67odj6hAd1x/IG03 NTkWfuEwY1KLF04EuFywM/3zymC8CDP1uVa8PVABV6NhWFlhLV/G1rROEJhCRHo4Nzw8 A66mxwOssGvUHrJ+yZS3tWVRI4P+3NuC1X9EejJBeCYV9eS2ooOlVUJIDj8zPMRdP2ie zp9hXjcUVTQPrM9l8a+4wrpjgD4gAMYEtdUvr9VHIGuEeOaWuN/Btwb/EWDdSP4I3Y+A 20Gmv441Qh+nQzrKLd/zzC+ucjvH0N4VaCL4VQWcEVKGNegvKWA3tdN02XZfj2FdoZlb 5zmg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 8si6110520pfv.115.2018.04.05.07.03.14; Thu, 05 Apr 2018 07:03:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751492AbeDEOA7 convert rfc822-to-8bit (ORCPT + 99 others); Thu, 5 Apr 2018 10:00:59 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:62519 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751312AbeDEOA4 (ORCPT ); Thu, 5 Apr 2018 10:00:56 -0400 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w35Drw1g030642; Thu, 5 Apr 2018 16:00:25 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2h1ysxgfm1-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 05 Apr 2018 16:00:25 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DAE0534; Thu, 5 Apr 2018 14:00:24 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag6node2.st.com [10.75.127.17]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 89F8C5054; Thu, 5 Apr 2018 14:00:24 +0000 (GMT) Received: from SFHDAG6NODE3.st.com (10.75.127.18) by SFHDAG6NODE2.st.com (10.75.127.17) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 5 Apr 2018 16:00:23 +0200 Received: from SFHDAG6NODE3.st.com ([fe80::d04:5337:ab17:b6f6]) by SFHDAG6NODE3.st.com ([fe80::d04:5337:ab17:b6f6%20]) with mapi id 15.00.1347.000; Thu, 5 Apr 2018 16:00:23 +0200 From: Patrice CHOTARD To: Hans de Goede , Thierry Reding , Kunihiko Hayashi , Tejun Heo , Matthias Brugger CC: Rob Herring , Mark Rutland , "linux-ide@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mediatek@lists.infradead.org" Subject: Re: [PATCH] ata: ahci-platform: add reset control support Thread-Topic: [PATCH] ata: ahci-platform: add reset control support Thread-Index: AQHTzMQZUjD7lVbUeEu8qjF8anGqFaPyBeiAgAACmoCAAAlQgA== Date: Thu, 5 Apr 2018 14:00:23 +0000 Message-ID: References: <1521768653-11824-1-git-send-email-hayashi.kunihiko@socionext.com> <20180405095429.GA7506@ulmo> <1f7d0738-1963-21c5-c293-e46fb0214ecf@redhat.com> In-Reply-To: <1f7d0738-1963-21c5-c293-e46fb0214ecf@redhat.com> Accept-Language: fr-FR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.75.127.46] Content-Type: text/plain; charset="Windows-1252" Content-ID: <6345CBF3E10ACD43A7A3A801FDDD0447@st.com> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-04-05_07:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Hans On 04/05/2018 03:27 PM, Hans de Goede wrote: > Hi, > > On 05-04-18 15:17, Patrice CHOTARD wrote: >> Hi Thierry >> >> On 04/05/2018 11:54 AM, Thierry Reding wrote: >>> On Fri, Mar 23, 2018 at 10:30:53AM +0900, Kunihiko Hayashi wrote: >>>> Add support to get and control a list of resets for the device >>>> as optional and shared. These resets must be kept de-asserted until >>>> the device is enabled. >>>> >>>> This is specified as shared because some SoCs like UniPhier series >>>> have common reset controls with all ahci controller instances. >>>> >>>> Signed-off-by: Kunihiko Hayashi >>>> --- >>>> ?? .../devicetree/bindings/ata/ahci-platform.txt????? |? 1 + >>>> ?? drivers/ata/ahci.h???????????????????????????????? |? 1 + >>>> ?? drivers/ata/libahci_platform.c???????????????????? | 24 >>>> +++++++++++++++++++--- >>>> ?? 3 files changed, 23 insertions(+), 3 deletions(-) >>> >>> This causes a regression on Tegra because we explicitly request the >>> resets after the call to ahci_platform_get_resources(). >> >> I confirm, we got exactly the same behavior on STi platform. >> >>> >>> ? From a quick look, ahci_mtk and ahci_st are in the same boat, >>> adding the >>> corresponding maintainers to Cc. >>> >>> Patrice, Matthias: does SATA still work for you after this patch? This >>> has been in linux-next since next-20180327. >> >> SATA is still working after this patch, but a kernel warning is >> triggered due to the fact that resets are both requested by >> libahci_platform and by ahci_st driver. > > So in your case you might be able to remove the reset handling > from the ahci_st driver and rely on the new libahci_platform > handling instead? If that works that seems like a win to me. Yes, I did a quick test, the reset handling can be removed from our driver. Patrice > > As said elsewhere in this thread I think it makes sense to keep (or re-add > after a revert) the libahci_platform reset code, but make it conditional > on a flag passed to ahci_platform_get_resources(). This way we get > the shared code for most cases and platforms which need special handling > can opt-out. > > Regards, > > Hans > > >> >> Patrice >> >>> >>> Given how this is one of the more hardware-specific bits, perhaps a >>> better way to do this is to move reset handling into a Uniphier driver >>> much like Tegra, Mediatek and ST? >>> >>> That said, I don't see SATA support for any of the Socionext hardware >>> either in the DT bindings or drivers/ata, so perhaps it'd be best to >>> back this out again until we have something that's more well tested? >>> >>> Thierry