From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1463C433E0 for ; Mon, 29 Mar 2021 16:51:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7A15761999 for ; Mon, 29 Mar 2021 16:51:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230052AbhC2Qul (ORCPT ); Mon, 29 Mar 2021 12:50:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230226AbhC2QuS (ORCPT ); Mon, 29 Mar 2021 12:50:18 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87D9AC061574; Mon, 29 Mar 2021 09:50:18 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id c17so10243743pfn.6; Mon, 29 Mar 2021 09:50:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=E4Uo8oC0q+k3/BuQcrCo0FLHeLVxH/nrRmm5Yh0sXuo=; b=W1d57UJnJq+zVXdWhh1fBDsFoR/Ax++MBqi9TwsiwD5HqR9kEy14TbZ+fC64mCZMO4 6LQouzK9oF43qBDPgQL5ha4dGt5ea14MkOlGxQor6bxp83W7K81/wgtsmfmpZ5CPScAA Z8soUsdfyrMoipb3c73AYkO+JFJ+T4ZrOb23L+E6+ZjyaitFFJqFjcz7Vm9S9o3rWCx5 wmBrVNaqDXC594pgCYdMC3fYTVDvhZJ4yKEctr4pm1woe8xQhHDX39r4siTNpG2s2oQu +Ry5FZ4Q7N66v2TpYRIJTmbXD57kuYTYQGNK0AaIyaAtZHOTeh5WPjE71n8dZYC8pMTn Dsaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=E4Uo8oC0q+k3/BuQcrCo0FLHeLVxH/nrRmm5Yh0sXuo=; b=p1Bzgb6vcdkzWs8iB33frE0V9QgpUm/Nz745lzul8afeZtnhmzNk9kromlhnWm/8/g /VeARzygB1kQQZUCr4pbnmWtIEvgJSGXEnXA0G+UExOToUHX0QB3Z1KLv9NQZHsM2I1i X8xPhasUpEN4VlxCQ+O3TP38SBSfDSG/3lE+fKdj9gkUFMbM8oEh8li332j1ohJ6o/Ct VoJcNFtIZZ+MXOndik3rM/n2r6vJNrUUkfcy3BMaXZ2QeWDTEPFDRS+ewHjgK6HYjN/n vTVVCm+7BPlqhfH0YpWm0xg6lyxuTaZrQSQuBd0eEBvsFI8ztSypIwGSOFCgkTCQzec4 grKg== X-Gm-Message-State: AOAM533RmCIYK04f4xRYk8IcfJSyZdS9aOBERldlcgFKUObOsalWKstg N6/+VP3XCLrL0rwKifYJRE+ym9HNJN4= X-Google-Smtp-Source: ABdhPJx1aSGZR/V4p9ArJLKexrO6w/tcuIGBi3Xug+TG0A2hl9p1z1ZDAbPksQ8QTTGYe45Mbev5GQ== X-Received: by 2002:a05:6a00:b86:b029:207:8ac9:85de with SMTP id g6-20020a056a000b86b02902078ac985demr25341671pfj.66.1617036616584; Mon, 29 Mar 2021 09:50:16 -0700 (PDT) Received: from [10.67.49.104] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id m1sm20482pjf.8.2021.03.29.09.50.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Mar 2021 09:50:15 -0700 (PDT) Subject: Re: [PATCH v5 2/2] PCI: brcmstb: Use reset/rearm instead of deassert/assert To: Lorenzo Pieralisi , Jim Quinlan Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, Nicolas Saenz Julienne , bcm-kernel-feedback-list@broadcom.com, james.quinlan@broadcom.com, Rob Herring , Bjorn Helgaas , Florian Fainelli , Philipp Zabel , Jim Quinlan , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , open list References: <20210312204556.5387-1-jim2101024@gmail.com> <20210312204556.5387-3-jim2101024@gmail.com> <20210329161040.GB9677@lpieralisi> From: Florian Fainelli Message-ID: <71903454-c20c-31f7-aaee-0d05eb22db7f@gmail.com> Date: Mon, 29 Mar 2021 09:50:13 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210329161040.GB9677@lpieralisi> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/29/21 9:10 AM, Lorenzo Pieralisi wrote: > On Fri, Mar 12, 2021 at 03:45:55PM -0500, Jim Quinlan wrote: >> The Broadcom STB PCIe RC uses a reset control "rescal" for certain chips. >> The "rescal" implements a "pulse reset" so using assert/deassert is wrong >> for this device. Instead, we use reset/rearm. We need to use rearm so >> that we can reset it after a suspend/resume cycle; w/o using "rearm", the >> "rescal" device will only ever fire once. >> >> Of course for suspend/resume to work we also need to put the reset/rearm >> calls in the suspend and resume routines. > > Actually - I am sorry but it looks like you will have to split the patch > in two since this is two logical changes. I do not believe this can be easily split, since there is currently a misused of the reset controller API and this patch fixes all call sites at once. It would not really make sense to fix probe/remove and then leave suspend/resume broken in the same manner. -- Florian From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04D27C433DB for ; Mon, 29 Mar 2021 23:33:48 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9290F60C3E for ; Mon, 29 Mar 2021 23:33:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9290F60C3E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=R9ZqVbR2o2VvWRqD3pXxjzdF72BUYsvLPrwtxx7bza0=; b=pGTxMpbdN43GDYq2v2UE99fbM NGcn2QYvXhx0gbZxvx8a+XIP2oZeSw4PxfxmnWsSTUlytNzLM/1Yax7ssum9FT1T8zXqmC/9zL26D zNaGZ5i2korsJb/xO8JxXkm/GExo8+NbGFefvhcPzdc1V4s4pUpv6XZHCTnP2ELubgTZAWXIKHE9m XawVD1xpP3zAF+hO48oaGc6tAbmlTsvF6li6BFtI2boY6pq9imqtqUHpZi8Gv+Qd7Aha2/6uNQTZA gsjHDpobCLAxwqfcU3YTnelf1x2GeIufUaF6Gclv3QYFXMeKkMxiT5Su5bK6CHOlK7jRe5FpHGiE5 S73FO2PYA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lR1Kz-001wrY-Bx; Mon, 29 Mar 2021 23:30:27 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lQv5n-000n3N-Ap; Mon, 29 Mar 2021 16:50:31 +0000 Received: by mail-pf1-x434.google.com with SMTP id c204so10260589pfc.4; Mon, 29 Mar 2021 09:50:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=E4Uo8oC0q+k3/BuQcrCo0FLHeLVxH/nrRmm5Yh0sXuo=; b=W1d57UJnJq+zVXdWhh1fBDsFoR/Ax++MBqi9TwsiwD5HqR9kEy14TbZ+fC64mCZMO4 6LQouzK9oF43qBDPgQL5ha4dGt5ea14MkOlGxQor6bxp83W7K81/wgtsmfmpZ5CPScAA Z8soUsdfyrMoipb3c73AYkO+JFJ+T4ZrOb23L+E6+ZjyaitFFJqFjcz7Vm9S9o3rWCx5 wmBrVNaqDXC594pgCYdMC3fYTVDvhZJ4yKEctr4pm1woe8xQhHDX39r4siTNpG2s2oQu +Ry5FZ4Q7N66v2TpYRIJTmbXD57kuYTYQGNK0AaIyaAtZHOTeh5WPjE71n8dZYC8pMTn Dsaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=E4Uo8oC0q+k3/BuQcrCo0FLHeLVxH/nrRmm5Yh0sXuo=; b=LK9spvQ792VFMlDt+rgRWSwrXwd2KnnUrZgtFFZZ7QkKWHsNwKvxV5zQx0JQYBda+D rHH+kqivAqFxaHCkztsUlmi2qQV4W3XQ28BeUXtER+CCNAdO2MK12PnQC5qN1CUN6724 OtpqG1mJ65wAwcO1j0pygROSgrly+zaWPvvRItgEhiY0TKXYRQw0VVdJwT0emcEaJQ5U z8jEEVBalctmxbq/GY/c/hk3mblAaD04MR0dVoo9vJPE0eLKuED0OzSFdfMQqArpA/hr dKjWa6xUly6oFPJOiCbbyTjMGRHee1Ad/J/fwXt5V2VFukOT2yiAFXH/aeA7FDjJIQHk C9Aw== X-Gm-Message-State: AOAM5322FAhAkkKEWtyvYBvItR6vYXjgzz9SYxFDSHzIA9ynViFY20X2 jNoZy6uzbF8NZUBBdj2XqCw= X-Google-Smtp-Source: ABdhPJx1aSGZR/V4p9ArJLKexrO6w/tcuIGBi3Xug+TG0A2hl9p1z1ZDAbPksQ8QTTGYe45Mbev5GQ== X-Received: by 2002:a05:6a00:b86:b029:207:8ac9:85de with SMTP id g6-20020a056a000b86b02902078ac985demr25341671pfj.66.1617036616584; Mon, 29 Mar 2021 09:50:16 -0700 (PDT) Received: from [10.67.49.104] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id m1sm20482pjf.8.2021.03.29.09.50.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Mar 2021 09:50:15 -0700 (PDT) Subject: Re: [PATCH v5 2/2] PCI: brcmstb: Use reset/rearm instead of deassert/assert To: Lorenzo Pieralisi , Jim Quinlan Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, Nicolas Saenz Julienne , bcm-kernel-feedback-list@broadcom.com, james.quinlan@broadcom.com, Rob Herring , Bjorn Helgaas , Florian Fainelli , Philipp Zabel , Jim Quinlan , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , open list References: <20210312204556.5387-1-jim2101024@gmail.com> <20210312204556.5387-3-jim2101024@gmail.com> <20210329161040.GB9677@lpieralisi> From: Florian Fainelli Message-ID: <71903454-c20c-31f7-aaee-0d05eb22db7f@gmail.com> Date: Mon, 29 Mar 2021 09:50:13 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210329161040.GB9677@lpieralisi> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210329_175029_583170_25F21488 X-CRM114-Status: GOOD ( 14.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 3/29/21 9:10 AM, Lorenzo Pieralisi wrote: > On Fri, Mar 12, 2021 at 03:45:55PM -0500, Jim Quinlan wrote: >> The Broadcom STB PCIe RC uses a reset control "rescal" for certain chips. >> The "rescal" implements a "pulse reset" so using assert/deassert is wrong >> for this device. Instead, we use reset/rearm. We need to use rearm so >> that we can reset it after a suspend/resume cycle; w/o using "rearm", the >> "rescal" device will only ever fire once. >> >> Of course for suspend/resume to work we also need to put the reset/rearm >> calls in the suspend and resume routines. > > Actually - I am sorry but it looks like you will have to split the patch > in two since this is two logical changes. I do not believe this can be easily split, since there is currently a misused of the reset controller API and this patch fixes all call sites at once. It would not really make sense to fix probe/remove and then leave suspend/resume broken in the same manner. -- Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel