memory: renesas-rpc-if: Add regmap to struct rpcif_info
The RZ/G3E XSPI has different regmap compared to RPC-IF. Add regmap to struct rpcif_info in order to support RZ/G3E XSPI. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20250424090000.136804-5-biju.das.jz@bp.renesas.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
This commit is contained in:
parent
c66fce831d
commit
198158a8f6
|
|
@ -32,6 +32,7 @@ static const struct regmap_access_table rpcif_volatile_table = {
|
|||
};
|
||||
|
||||
struct rpcif_info {
|
||||
const struct regmap_config *regmap_config;
|
||||
enum rpcif_type type;
|
||||
u8 strtim;
|
||||
};
|
||||
|
|
@ -588,8 +589,8 @@ static int rpcif_probe(struct platform_device *pdev)
|
|||
rpc->base = devm_platform_ioremap_resource_byname(pdev, "regs");
|
||||
if (IS_ERR(rpc->base))
|
||||
return PTR_ERR(rpc->base);
|
||||
|
||||
rpc->regmap = devm_regmap_init(dev, NULL, rpc, &rpcif_regmap_config);
|
||||
rpc->info = of_device_get_match_data(dev);
|
||||
rpc->regmap = devm_regmap_init(dev, NULL, rpc, rpc->info->regmap_config);
|
||||
if (IS_ERR(rpc->regmap)) {
|
||||
dev_err(dev, "failed to init regmap for rpcif, error %ld\n",
|
||||
PTR_ERR(rpc->regmap));
|
||||
|
|
@ -602,7 +603,6 @@ static int rpcif_probe(struct platform_device *pdev)
|
|||
return PTR_ERR(rpc->dirmap);
|
||||
|
||||
rpc->size = resource_size(res);
|
||||
rpc->info = of_device_get_match_data(dev);
|
||||
rpc->rstc = devm_reset_control_array_get_exclusive(dev);
|
||||
if (IS_ERR(rpc->rstc))
|
||||
return PTR_ERR(rpc->rstc);
|
||||
|
|
@ -633,21 +633,25 @@ static void rpcif_remove(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
static const struct rpcif_info rpcif_info_r8a7796 = {
|
||||
.regmap_config = &rpcif_regmap_config,
|
||||
.type = RPCIF_RCAR_GEN3,
|
||||
.strtim = 6,
|
||||
};
|
||||
|
||||
static const struct rpcif_info rpcif_info_gen3 = {
|
||||
.regmap_config = &rpcif_regmap_config,
|
||||
.type = RPCIF_RCAR_GEN3,
|
||||
.strtim = 7,
|
||||
};
|
||||
|
||||
static const struct rpcif_info rpcif_info_rz_g2l = {
|
||||
.regmap_config = &rpcif_regmap_config,
|
||||
.type = RPCIF_RZ_G2L,
|
||||
.strtim = 7,
|
||||
};
|
||||
|
||||
static const struct rpcif_info rpcif_info_gen4 = {
|
||||
.regmap_config = &rpcif_regmap_config,
|
||||
.type = RPCIF_RCAR_GEN4,
|
||||
.strtim = 15,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue