mbox series

[v2,0/6] memory: renesas-rpc-if: Rebind fixes and misc cleanups

Message ID cover.1669213027.git.geert+renesas@glider.be
Headers show
Series memory: renesas-rpc-if: Rebind fixes and misc cleanups | expand

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

Krzysztof Kozlowski Nov. 27, 2022, 9:31 p.m. UTC | #1
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
Wolfram Sang Dec. 5, 2022, 8:56 a.m. UTC | #2
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>
Krzysztof Kozlowski Dec. 27, 2022, 8:59 a.m. UTC | #3
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,
Krzysztof Kozlowski Dec. 27, 2022, 9:06 a.m. UTC | #4
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
Geert Uytterhoeven Dec. 27, 2022, 9:09 a.m. UTC | #5
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