mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-29 09:13:38 +00:00
Memory controller drivers for v6.12, part two
1. Renesas RPC-IF: adjust default setting for pins to accommodate different flash devices, which should fix 4-bit flash writes with Renesas AT25QL128A flash. 2. Simplify a bit probe() in PL172 and PL353-SMC. -----BEGIN PGP SIGNATURE----- iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmbbDM8QHGtyemtAa2Vy bmVsLm9yZwAKCRDBN2bmhouD11m9D/9+4rfYAIKRuJcLZdqjJiXCy8cdFdQsICg9 QuHvkJ8MLRio/Ep3k/8htslQAsNQJjBfsaWDjALwPGA1322/drkYo8TnVj1JLR3p N8lfoPTXaPgpe885bH2hQhAsnZqZY1QCg3i5QqWZESuOx3EuGmhn0Uh8YNC/XGvu GSxiO1o8KpHFCzHvwxSJ8thjq0nS8dKJ9FrS8wQywoEEQW08s+Srz22S7jxlvYrc HgY2c1bm7XZeXJDDSI7wIK3sgZ7n07bl3S/T5JQ0HElXZ71SvHsbqtHA/4xd6CQE P2dEfFZq8YNLC7396DzhYI1YAOc+xAW8VPwxGQ3umpwvSU9CTNM9UrZveDCmg+QF EdGzo9sjUwTJhsImgBjXvZY9Dhr+jXXkyZsBfIN5XCEwItsJHgUlsms4nBkIXHiI 5Du3qC+sHi/1j1KJzRf94YpbX/ldTKyJ7CJWaJRftoTWWR2o5KOKPOGG1iEJHZ/v UXr+ZX5z2E5Li05g0JnzIP72jpDPyRP1lDI7xHX2BWHLxN1zcSxXGBibBP4KTdnT 0zIjIDiVyq1ync1ZZ634zM5JS1bm9MRHDxR6efOcEhp4mC5q3U0DuDqGay6508ha fZbSGUfSjOi0rGk3qhyMO0T20Qmi/TibZ5QhWPCjLYYUpLnj0AA68t+cSGFfphFW vnoQZCHvrQ== =rd39 -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbhZvcACgkQYKtH/8kJ Uie+4BAA2oB5HfnM0ofBXvKLaeSWJQpuFa0SR0ttFn4bKYGN+zCPD3ymo34rzJql ICCFwwtYWVzLQZHHtcbf+PiYSA9W65n0/ClfMMfI57DX2DoOqlqqUDNa4GQvMpdf Tc54gGms7InjpY+kXTjA162LUODRPNpnYFaOfpY3Mi3ghcocXM5No8GsDFViH3mD Lsg3Vwkw7XbxsQbSdewdWtlPr79o9ZuJfaIauBmskeG45gio2+504GdwjS952CV0 W0mScZ4BaZoPFTjIQ8bwD1kytdAHUtEC3fwZCFAT3n5ssg4N1ztV/UBkwyRSLnk6 As/20D1DLn8wS8Jgen2P+iETjr9q1Md8A7hfN9+BOJd7N7giriFCNT6uitLWnIzo qpSJciIAmbHBsI93pHDIbTBZ/AHSrXHUYXNXsiwq7xsd1oui+lbC739EwNRv/B3B gQzLCm4OWEMIIM5Hun9TVOSESbkxjIj9/nRTJqqJGzAXCoSS68CgKba5LtX2tReD hcqrWyglpDb4FxP6BVrnqWxFwE+b3rVSWsWvLv30Bo0kDgq9M5SgmvGYyTVdRolF 9wJUjUCz0sxkDOgwKJ2NG/7XUly5YnNIUszvCI+wCWTvgXYue9DsFztl7v5vz1kX NKJATOApBGtDnxESY1yXQscP73mHE6d//NPsvxsu8jrxzehPL5w= =71qO -----END PGP SIGNATURE----- Merge tag 'memory-controller-drv-6.12-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers Memory controller drivers for v6.12, part two 1. Renesas RPC-IF: adjust default setting for pins to accommodate different flash devices, which should fix 4-bit flash writes with Renesas AT25QL128A flash. 2. Simplify a bit probe() in PL172 and PL353-SMC. * tag 'memory-controller-drv-6.12-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: pl353-smc: simplify with scoped for each OF child loop memory: pl172: simplify releasing AMBA regions with devm memory: renesas-rpc-if: Use Hi-Z state as the default setting for IOVF pins Link: https://lore.kernel.org/r/20240906140859.71712-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
b62800736f
@ -187,6 +187,13 @@ static int pl172_parse_cs_config(struct amba_device *adev,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static void pl172_amba_release_regions(void *data)
|
||||
{
|
||||
struct amba_device *adev = data;
|
||||
|
||||
amba_release_regions(adev);
|
||||
}
|
||||
|
||||
static const char * const pl172_revisions[] = {"r1", "r2", "r2p3", "r2p4"};
|
||||
static const char * const pl175_revisions[] = {"r1"};
|
||||
static const char * const pl176_revisions[] = {"r0"};
|
||||
@ -232,13 +239,14 @@ static int pl172_probe(struct amba_device *adev, const struct amba_id *id)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = devm_add_action_or_reset(dev, pl172_amba_release_regions, adev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
pl172->base = devm_ioremap(dev, adev->res.start,
|
||||
resource_size(&adev->res));
|
||||
if (!pl172->base) {
|
||||
dev_err(dev, "ioremap failed\n");
|
||||
ret = -ENOMEM;
|
||||
goto err_no_ioremap;
|
||||
}
|
||||
if (!pl172->base)
|
||||
return dev_err_probe(dev, -ENOMEM, "ioremap failed\n");
|
||||
|
||||
amba_set_drvdata(adev, pl172);
|
||||
|
||||
@ -256,15 +264,6 @@ static int pl172_probe(struct amba_device *adev, const struct amba_id *id)
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_no_ioremap:
|
||||
amba_release_regions(adev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void pl172_remove(struct amba_device *adev)
|
||||
{
|
||||
amba_release_regions(adev);
|
||||
}
|
||||
|
||||
static const struct amba_id pl172_ids[] = {
|
||||
@ -292,7 +291,6 @@ static struct amba_driver pl172_driver = {
|
||||
.name = "memory-pl172",
|
||||
},
|
||||
.probe = pl172_probe,
|
||||
.remove = pl172_remove,
|
||||
.id_table = pl172_ids,
|
||||
};
|
||||
module_amba_driver(pl172_driver);
|
||||
|
@ -74,7 +74,6 @@ static int pl353_smc_probe(struct amba_device *adev, const struct amba_id *id)
|
||||
struct device_node *of_node = adev->dev.of_node;
|
||||
const struct of_device_id *match = NULL;
|
||||
struct pl353_smc_data *pl353_smc;
|
||||
struct device_node *child;
|
||||
|
||||
pl353_smc = devm_kzalloc(&adev->dev, sizeof(*pl353_smc), GFP_KERNEL);
|
||||
if (!pl353_smc)
|
||||
@ -93,12 +92,13 @@ static int pl353_smc_probe(struct amba_device *adev, const struct amba_id *id)
|
||||
amba_set_drvdata(adev, pl353_smc);
|
||||
|
||||
/* Find compatible children. Only a single child is supported */
|
||||
for_each_available_child_of_node(of_node, child) {
|
||||
for_each_available_child_of_node_scoped(of_node, child) {
|
||||
match = of_match_node(pl353_smc_supported_children, child);
|
||||
if (!match) {
|
||||
dev_warn(&adev->dev, "unsupported child node\n");
|
||||
continue;
|
||||
}
|
||||
of_platform_device_create(child, NULL, &adev->dev);
|
||||
break;
|
||||
}
|
||||
if (!match) {
|
||||
@ -106,9 +106,6 @@ static int pl353_smc_probe(struct amba_device *adev, const struct amba_id *id)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
of_platform_device_create(child, NULL, &adev->dev);
|
||||
of_node_put(child);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -367,7 +367,7 @@ int rpcif_hw_init(struct device *dev, bool hyperflash)
|
||||
regmap_update_bits(rpc->regmap, RPCIF_CMNCR,
|
||||
RPCIF_CMNCR_MOIIO(3) | RPCIF_CMNCR_IOFV(3) |
|
||||
RPCIF_CMNCR_BSZ(3),
|
||||
RPCIF_CMNCR_MOIIO(1) | RPCIF_CMNCR_IOFV(2) |
|
||||
RPCIF_CMNCR_MOIIO(1) | RPCIF_CMNCR_IOFV(3) |
|
||||
RPCIF_CMNCR_BSZ(hyperflash ? 1 : 0));
|
||||
else
|
||||
regmap_update_bits(rpc->regmap, RPCIF_CMNCR,
|
||||
|
Loading…
Reference in New Issue
Block a user