Message ID | cover.1669213027.git.geert+renesas@glider.be |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2834141wrr; Wed, 23 Nov 2022 06:48:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf6NjZEk3VPGqPKfIuB4fIWZjsdKz0pynRhmFpdFp4QSRCDwo+FOXzThpSrnhVB6zNUkV5lm X-Received: by 2002:a17:902:7087:b0:189:4de4:e71b with SMTP id z7-20020a170902708700b001894de4e71bmr1741472plk.159.1669214916316; Wed, 23 Nov 2022 06:48:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669214916; cv=none; d=google.com; s=arc-20160816; b=is6nG7MazHqmnLEOvfRhM8C2UD3uT9ag0RFLHZQ+ja38cxevPEjNNQw3DmWhBcRxdd Q7C+5ImqBiXZanOYQf5ywOCtthKuhkZQgYjXIcDU1P0KpdwpGXGUIUhzixrH1Doztx3V kvKw1dNmxRk34eK3GCawBDrnjkefr4URJO3CcB6JiDdZyjZ07AGdijjzkh0ma3Hum/zs BWWi709MjJnj+CVgeqdhrdqVENc1LUURdZrqEsG9eMlApQs5Cm8DMcRya6zKhh45nJKE bB3Gn1oGW6e0bmDG4mNrw7aQ4C9E1W6LNTBg9jso2SHmvtErefzmP8mhh02TyBtB2ybn UE/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=YLrvW81FULiQ6NJDceqhvYd50Bb/osaXC/wEjrgFD0s=; b=ok+kmasjok3KObm0Gy+sYx6ZPI822j3sGj6hsdSj4fj/Lc0pZRUTiZfOCASe18T/B/ 1uAT3q+ysr6H5Nr60J9M7IhXBWq7WzPI+15npvqcRv95DRhtlu3Ct+jojOmed+DvQnbN lr9T9rNQHmmyo7r+nGVYZe1BOr4A2iY/O59J04MBnYofnDhpwy60QBHqS57pZRYQZEoj cdLYSxSAjVpFEtxmIsExZ/go1VQH3vG8akQWXAp+1wpgVkgTi/tglNPTE0NeMeZLgtv1 dumTrBkSAv2ZIPtewtxTCwoh6pp1ulghX1DKiHIyQv/4/u9BWyuRQmSdCvSEOvfM3j2h kWRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b17-20020a170902ed1100b00186c3aface9si16244690pld.179.2022.11.23.06.48.21; Wed, 23 Nov 2022 06:48:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238839AbiKWOl4 (ORCPT <rfc822;fengqi706@gmail.com> + 99 others); Wed, 23 Nov 2022 09:41:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238034AbiKWOli (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 23 Nov 2022 09:41:38 -0500 Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 542EC5916F for <linux-kernel@vger.kernel.org>; Wed, 23 Nov 2022 06:41:33 -0800 (PST) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed10:881b:815b:474d:c3fd]) by albert.telenet-ops.be with bizsmtp id nqhS2800949U0Rd06qhSTc; Wed, 23 Nov 2022 15:41:30 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from <geert@linux-m68k.org>) id 1oxqwH-001Rqf-F7; Wed, 23 Nov 2022 15:41:25 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from <geert@linux-m68k.org>) id 1oxqwH-0012HA-00; Wed, 23 Nov 2022 15:41:25 +0100 From: Geert Uytterhoeven <geert+renesas@glider.be> To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Vignesh Raghavendra <vigneshr@ti.com>, Miquel Raynal <miquel.raynal@bootlin.com>, Richard Weinberger <richard@nod.at>, Mark Brown <broonie@kernel.org> Cc: Philipp Zabel <p.zabel@pengutronix.de>, Sergey Shtylyov <s.shtylyov@omp.ru>, Wolfram Sang <wsa+renesas@sang-engineering.com>, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-spi@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven <geert+renesas@glider.be> Subject: [PATCH v2 0/6] memory: renesas-rpc-if: Rebind fixes and misc cleanups Date: Wed, 23 Nov 2022 15:41:16 +0100 Message-Id: <cover.1669213027.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750298700125224901?= X-GMAIL-MSGID: =?utf-8?q?1750298700125224901?= |
Series |
memory: renesas-rpc-if: Rebind fixes and misc cleanups
|
|
Message
Geert Uytterhoeven
Nov. 23, 2022, 2:41 p.m. UTC
Hi all, The Renesas RPC-IF provides either HyperFlash or SPI host access. To handle this, three drivers are used: 1. The RPC-IF core diver, 2. An HyperFlash child driver, 3. An SPI child driver. Currently this driver collection suffers from a sub-optimal division of roles and reponsibilities, leading to (un)bind issues: after manually unbinding the child driver, rebinding the child driver fails with -EBUSY. This patch series aims to fix this, by splitting off private data and making the RPC-IF core driver responsible for resource acquisition. After that, a few customary cleanups are provided. This has been tested on the Salvator-X(S) and Ebisu-4D (HyperFlash) and White-Hawk (QSPI FLASH) development boards. Changes compared to v1[1]: - Move the two fixes forward and add Fixes-tags to ease backporting, as requested by Krzysztof, - Add Acked-by, - Rebased cleanups, - Remove Runtime PM wrappers, - Drop patch to add system suspend/resume support to the RPC-IF core driver, as this is apparently not needed on R-Car M3-N and R-Car E3, nor fixes the issue on R-Car H3 ES2.0. I will reply to the original patch with my latest investigation results. Thanks for your comments! [1] [PATCH 0/7] memory: renesas-rpc-if: Rebind and s2ram fixes https://lore.kernel.org/r/cover.1656341824.git.geert+renesas@glider.be Geert Uytterhoeven (6): memory: renesas-rpc-if: Split-off private data from struct rpcif memory: renesas-rpc-if: Move resource acquisition to .probe() memory: renesas-rpc-if: Always use dev in rpcif_probe() memory: renesas-rpc-if: Improve Runtime PM handling memory: renesas-rpc-if: Pass device instead of rpcif to rpcif_*() memory: renesas-rpc-if: Remove Runtime PM wrappers drivers/memory/renesas-rpc-if.c | 152 ++++++++++++++++++++------------ drivers/mtd/hyperbus/rpc-if.c | 18 ++-- drivers/spi/spi-rpc-if.c | 14 +-- include/memory/renesas-rpc-if.h | 34 +------ 4 files changed, 118 insertions(+), 100 deletions(-)
Comments
On 23/11/2022 15:41, Geert Uytterhoeven wrote: > Hi all, > > The Renesas RPC-IF provides either HyperFlash or SPI host access. > To handle this, three drivers are used: > 1. The RPC-IF core diver, > 2. An HyperFlash child driver, > 3. An SPI child driver. > Thank you for the patch. It is too late in the cycle for me to pick it up. I will take it after the merge window. Best regards, Krzysztof
On 27/11/2022 22:31, Krzysztof Kozlowski wrote: > On 23/11/2022 15:41, Geert Uytterhoeven wrote: >> Hi all, >> >> The Renesas RPC-IF provides either HyperFlash or SPI host access. >> To handle this, three drivers are used: >> 1. The RPC-IF core diver, >> 2. An HyperFlash child driver, >> 3. An SPI child driver. >> > > Thank you for the patch. > It is too late in the cycle for me to pick it up. I will take it after > the merge window. Optionally, if you want to push it via Renesas SoC tree and there are no conflicts with existing two patches, then these look good: Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Otherwise, I'll pick them up after the merge window. Best regards, Krzysztof
Hi Krzysztof, On Sun, Nov 27, 2022 at 10:34 PM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > On 27/11/2022 22:31, Krzysztof Kozlowski wrote: > > On 23/11/2022 15:41, Geert Uytterhoeven wrote: > >> The Renesas RPC-IF provides either HyperFlash or SPI host access. > >> To handle this, three drivers are used: > >> 1. The RPC-IF core diver, > >> 2. An HyperFlash child driver, > >> 3. An SPI child driver. > > > > Thank you for the patch. > > It is too late in the cycle for me to pick it up. I will take it after > > the merge window. > > Optionally, if you want to push it via Renesas SoC tree and there are no > conflicts with existing two patches, then these look good: It's too late for the Renesas tree, too. > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > Otherwise, I'll pick them up after the merge window. Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
On Wed, Nov 23, 2022 at 03:41:16PM +0100, Geert Uytterhoeven wrote: > Hi all, > > The Renesas RPC-IF provides either HyperFlash or SPI host access. > To handle this, three drivers are used: > 1. The RPC-IF core diver, > 2. An HyperFlash child driver, > 3. An SPI child driver. > > Currently this driver collection suffers from a sub-optimal division of > roles and reponsibilities, leading to (un)bind issues: after manually > unbinding the child driver, rebinding the child driver fails with > -EBUSY. > > This patch series aims to fix this, by splitting off private data and > making the RPC-IF core driver responsible for resource acquisition. > After that, a few customary cleanups are provided. > > This has been tested on the Salvator-X(S) and Ebisu-4D (HyperFlash) and > White-Hawk (QSPI FLASH) development boards. Sadly, I don't have the bandwidth to do a full review. But from a glimpse, it all looks good. And from a high level PoV, this all makes a lot of sense. So: Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
On Wed, 23 Nov 2022 15:41:16 +0100, Geert Uytterhoeven wrote: > Hi all, > > The Renesas RPC-IF provides either HyperFlash or SPI host access. > To handle this, three drivers are used: > 1. The RPC-IF core diver, > 2. An HyperFlash child driver, > 3. An SPI child driver. > > [...] Applied, thanks! [1/6] memory: renesas-rpc-if: Split-off private data from struct rpcif https://git.kernel.org/krzk/linux-mem-ctrl/c/f8fa9cb3fb16e06514fec0bac58996015dedc453 [2/6] memory: renesas-rpc-if: Move resource acquisition to .probe() https://git.kernel.org/krzk/linux-mem-ctrl/c/9bdb35b864fb92c037b3e441ae8f3a7efc6bc679 [3/6] memory: renesas-rpc-if: Always use dev in rpcif_probe() https://git.kernel.org/krzk/linux-mem-ctrl/c/ef1eabee9d97e263e61aa32c961f8c94cb3e6e5c [4/6] memory: renesas-rpc-if: Improve Runtime PM handling https://git.kernel.org/krzk/linux-mem-ctrl/c/f63d7c4d409461aee459c21797a3d7bb6039affd [5/6] memory: renesas-rpc-if: Pass device instead of rpcif to rpcif_*() https://git.kernel.org/krzk/linux-mem-ctrl/c/eb66a9971ffddd0dc0640f282768660875445ef1 [6/6] memory: renesas-rpc-if: Remove Runtime PM wrappers https://git.kernel.org/krzk/linux-mem-ctrl/c/691f04fc5251f79c71975acf1f69ace87496738b Best regards,
On 27/12/2022 09:59, Krzysztof Kozlowski wrote: > On Wed, 23 Nov 2022 15:41:16 +0100, Geert Uytterhoeven wrote: >> Hi all, >> >> The Renesas RPC-IF provides either HyperFlash or SPI host access. >> To handle this, three drivers are used: >> 1. The RPC-IF core diver, >> 2. An HyperFlash child driver, >> 3. An SPI child driver. >> >> [...] > > Applied, thanks! > > [1/6] memory: renesas-rpc-if: Split-off private data from struct rpcif > https://git.kernel.org/krzk/linux-mem-ctrl/c/f8fa9cb3fb16e06514fec0bac58996015dedc453 Missing checkpatch. I corrected now: WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("<title line>")' - ie: 'Fixes: ca7d8b980b67 ("memory: add Renesas RPC-IF driver")' Best regards, Krzysztof
On Tue, Dec 27, 2022 at 10:06 AM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > On 27/12/2022 09:59, Krzysztof Kozlowski wrote: > > On Wed, 23 Nov 2022 15:41:16 +0100, Geert Uytterhoeven wrote: > >> The Renesas RPC-IF provides either HyperFlash or SPI host access. > >> To handle this, three drivers are used: > >> 1. The RPC-IF core diver, > >> 2. An HyperFlash child driver, > >> 3. An SPI child driver. > >> > >> [...] > > > > Applied, thanks! > > > > [1/6] memory: renesas-rpc-if: Split-off private data from struct rpcif > > https://git.kernel.org/krzk/linux-mem-ctrl/c/f8fa9cb3fb16e06514fec0bac58996015dedc453 > > Missing checkpatch. I corrected now: > WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1> > ("<title line>")' - ie: 'Fixes: ca7d8b980b67 ("memory: add Renesas > RPC-IF driver")' Oh well... Merry Xmas ;-) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds