mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
Reset controller fixes for v5.15
Fix the status bit polarity in the brcmstb-rescal driver, re-enable pistachio driver selection after MACH_PISTACHIO removal, add transfer error handling in the tegra-bpmp driver, and fix probing of the reset-socfpga driver after recent device link changes. -----BEGIN PGP SIGNATURE----- iI0EABYIADUWIQRRO6F6WdpH1R0vGibVhaclGDdiwAUCYW7f4RcccC56YWJlbEBw ZW5ndXRyb25peC5kZQAKCRDVhaclGDdiwHbBAQC60RYdccw5jg82QaySxbFkkBT9 3ULxXp/Tr/s36VV6NQEA6kdiyfvHJi8YrkJS3rBd5sWvCjaqLCb0xl7wjCibhg0= =kZov -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFwKs0ACgkQmmx57+YA GNkdYg//YJsCoovbeGeL7E4V7eKTHACUZWWzenQqsH2A3RA9h79EbUWfcEV2GVq7 DbEdEVxC36DBM+MgjQMQIOTmUfv+YS3wXycwpC1INuXPB6uKsc1v/jJzQ2h2eGR8 MxiH68Uw6wopS6iFCToebXCLU+AXQW1Vd9WbYfz3su+1uQEY/SROzeaf9saPElKR TJUI4sSy0cU6VWJ0r44g2jGNpBdFnV9q7Fi3UW58FXd43/ms1PelND5ECijiMDPo ytbnxBEmBSFkI0oSsmRNty9zU5qd+4PDXXgtoLJzakYvIDMF47SuKqrKJyR4fceO j3u7sRPVFeE56f3Gz4qIo1w2vxIPilQwa6Zj0NEcAxOwKQLHFMchU3yhlFd1cs7C vm29WawT0A4xRx3y62nfz4YjO2N584c5Th4fbZXCbZpJaKygOBth+5nKd8IQXVSg Dzn+KRigrw3qbCiiTmHwowwgXTOxR/DzV3yYY/bCA8K2ddv0r3MgNOp8eviEPidh 9NlYriSPUbRNrZCcMd0YRxDygCVy9vkndirX3MrBmvxqJVH6h8Q7htPKlcCoYcIE aRJE/m4rNOazGkH6ePWRQ46zd1qlUYCPefIWfsFFAskMUOxXRiW1sd+NKwMkqJBN LCyvOLB/yd5OO9EHoyOin+sSQNL8R+ddSiKIpN7MLAieAzk5i7M= =GNV4 -----END PGP SIGNATURE----- Merge tag 'reset-fixes-for-v5.15' of git://git.pengutronix.de/pza/linux into arm/fixes Reset controller fixes for v5.15 Fix the status bit polarity in the brcmstb-rescal driver, re-enable pistachio driver selection after MACH_PISTACHIO removal, add transfer error handling in the tegra-bpmp driver, and fix probing of the reset-socfpga driver after recent device link changes. * tag 'reset-fixes-for-v5.15' of git://git.pengutronix.de/pza/linux: reset: socfpga: add empty driver allowing consumers to probe reset: tegra-bpmp: Handle errors in BPMP response reset: pistachio: Re-enable driver selection reset: brcmstb-rescal: fix incorrect polarity of status bit Link: https://lore.kernel.org/r/b378f2aae54538db6a13c98561b4cbcacbef937c.camel@pengutronix.de Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
36b6dcbc12
4 changed files with 37 additions and 4 deletions
|
@ -147,8 +147,8 @@ config RESET_OXNAS
|
|||
bool
|
||||
|
||||
config RESET_PISTACHIO
|
||||
bool "Pistachio Reset Driver" if COMPILE_TEST
|
||||
default MACH_PISTACHIO
|
||||
bool "Pistachio Reset Driver"
|
||||
depends on MIPS || COMPILE_TEST
|
||||
help
|
||||
This enables the reset driver for ImgTec Pistachio SoCs.
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ static int brcm_rescal_reset_set(struct reset_controller_dev *rcdev,
|
|||
}
|
||||
|
||||
ret = readl_poll_timeout(base + BRCM_RESCAL_STATUS, reg,
|
||||
!(reg & BRCM_RESCAL_STATUS_BIT), 100, 1000);
|
||||
(reg & BRCM_RESCAL_STATUS_BIT), 100, 1000);
|
||||
if (ret) {
|
||||
dev_err(data->dev, "time out on SATA/PCIe rescal\n");
|
||||
return ret;
|
||||
|
|
|
@ -92,3 +92,29 @@ void __init socfpga_reset_init(void)
|
|||
for_each_matching_node(np, socfpga_early_reset_dt_ids)
|
||||
a10_reset_init(np);
|
||||
}
|
||||
|
||||
/*
|
||||
* The early driver is problematic, because it doesn't register
|
||||
* itself as a driver. This causes certain device links to prevent
|
||||
* consumer devices from probing. The hacky solution is to register
|
||||
* an empty driver, whose only job is to attach itself to the reset
|
||||
* manager and call probe.
|
||||
*/
|
||||
static const struct of_device_id socfpga_reset_dt_ids[] = {
|
||||
{ .compatible = "altr,rst-mgr", },
|
||||
{ /* sentinel */ },
|
||||
};
|
||||
|
||||
static int reset_simple_probe(struct platform_device *pdev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver reset_socfpga_driver = {
|
||||
.probe = reset_simple_probe,
|
||||
.driver = {
|
||||
.name = "socfpga-reset",
|
||||
.of_match_table = socfpga_reset_dt_ids,
|
||||
},
|
||||
};
|
||||
builtin_platform_driver(reset_socfpga_driver);
|
||||
|
|
|
@ -20,6 +20,7 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc,
|
|||
struct tegra_bpmp *bpmp = to_tegra_bpmp(rstc);
|
||||
struct mrq_reset_request request;
|
||||
struct tegra_bpmp_message msg;
|
||||
int err;
|
||||
|
||||
memset(&request, 0, sizeof(request));
|
||||
request.cmd = command;
|
||||
|
@ -30,7 +31,13 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc,
|
|||
msg.tx.data = &request;
|
||||
msg.tx.size = sizeof(request);
|
||||
|
||||
return tegra_bpmp_transfer(bpmp, &msg);
|
||||
err = tegra_bpmp_transfer(bpmp, &msg);
|
||||
if (err)
|
||||
return err;
|
||||
if (msg.rx.ret)
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra_bpmp_reset_module(struct reset_controller_dev *rstc,
|
||||
|
|
Loading…
Add table
Reference in a new issue