memory: renesas-rpc-if: Split-off private data from struct rpcif
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 23 Nov 2022 14:41:17 +0000 (15:41 +0100)
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 23 Jan 2023 10:47:59 +0000 (11:47 +0100)
commit51de3fc9a84d8e99dd3f02536a623f9fb95d0c0a
tree7cb1accea8b6d951cd61c4eef284c1cfc09f93b9
parent1b929c02afd37871d5afb9d498426f83432e71c2
memory: renesas-rpc-if: Split-off private data from struct rpcif

The rpcif structure is used as a common data structure, shared by the
RPC-IF core driver and by the HyperBus and SPI child drivers.
This poses several problems:
  - Most structure members describe private core driver state, which
    should not be accessible by the child drivers,
  - The structure's lifetime is controlled by the child drivers,
    complicating use by the core driver.

Fix this by moving the private core driver state to its own structure,
managed by the RPC-IF core driver, and store it in the core driver's
private data field.  This requires absorbing the child's platform
device, as that was stored in the driver's private data field before.

Fixes: ca7d8b980b67 ("memory: add Renesas RPC-IF driver")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/09fbb6fa67d5a8cd48a08808c9afa2f6a499aa42.1669213027.git.geert+renesas@glider.be
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
drivers/memory/renesas-rpc-if.c
include/memory/renesas-rpc-if.h