From patchwork Wed Nov 23 14:41:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 628529 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CC97C433FE for ; Wed, 23 Nov 2022 14:41:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238587AbiKWOli (ORCPT ); Wed, 23 Nov 2022 09:41:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238468AbiKWOlg (ORCPT ); Wed, 23 Nov 2022 09:41:36 -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 53CCF42F57 for ; 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 ) 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 ) id 1oxqwH-0012HA-00; Wed, 23 Nov 2022 15:41:25 +0100 From: Geert Uytterhoeven To: Krzysztof Kozlowski , Vignesh Raghavendra , Miquel Raynal , Richard Weinberger , Mark Brown Cc: Philipp Zabel , Sergey Shtylyov , Wolfram Sang , linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-spi@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven 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: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org 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(-) Acked-by: Wolfram Sang