mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
hwspinlock updates for v6.6
Convert u8500 and omap drivers to void-returning remove. Complete the support for representing the Qualcomm TCSR mutex as a mmio device, and check the return value of devm_regmap_field_alloc() in the same. -----BEGIN PGP SIGNATURE----- iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmT1/YsVHGFuZGVyc3Nv bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FI+8QAOBhUCF7oQa94tkQn6hUck+JxMLW pZyxEpG48dqMlCDERclk/Y7H4s6aHQzVwBTticRQHHNHzK/r6vTMw7/GSJR681Yb Uii3yZKN3qclNCytEHRWStgOPOEKCEc+bOT++g025VNT4gJWzoWQEi8exyFeZwq6 00BNh8JDRp50tk6k28RorSqCmuMAsVeLukc35Y90hVmJSHnxCcvyxKzmlRldQkWN BAP3EUUsObjBquHEMk9VtTSoBYwPS3DgJ31QMgh13vg23wtmvTKRouCuPMAPXnaE KMBXousaL4NgBqHlGmyNiKfsPf50v0QuYeNVSYa1jIgqHXAtRGrGu0ZBvij8Lb0Z LzpS/Dcp6FC1H6gJH7ASFCVB9C5IYR2Gcjl0ei9q3AkbJdi2BBTbzUKopDOnCr0B EcdjTcDMS7Q4Mg/nSi1SXLEp4xBMzreg0xsz79cQsqvk1G0zHfk3XULCW9VL5Y5L 3crJRrPNwqPPKAtK+BH52XfBrm4zl9E53BXY+7Yf7GWLdtNn6lp3Wi35thruU7P4 2r8d1Z7xdxC7AYFHIyxrLReq4MVjO2A70PcbIsQo78y83lqnV9Wd7SmPY7TExP2B EeXDTmpoa3yhkaFsdQVlC7OBXo+xQTSsFO834C/uEUESKIRZ2GLviJOD5YlvzJrb Vo+wewsR6MQj8fvg =IAf9 -----END PGP SIGNATURE----- Merge tag 'hwlock-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull hwspinlock updates from Bjorn Andersson: "Convert u8500 and omap drivers to void-returning remove. Complete the support for representing the Qualcomm TCSR mutex as a mmio device, and check the return value of devm_regmap_field_alloc() in the same" * tag 'hwlock-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: hwspinlock: qcom: add missing regmap config for SFPB MMIO implementation hwspinlock: u8500: Convert to platform remove callback returning void hwspinlock: omap: Convert to platform remove callback returning void hwspinlock: omap: Emit only one error message for errors in .remove() hwspinlock: add a check of devm_regmap_field_alloc in qcom_hwspinlock_probe
This commit is contained in:
commit
e3a6fa001d
3 changed files with 16 additions and 9 deletions
|
@ -145,7 +145,7 @@ runtime_err:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int omap_hwspinlock_remove(struct platform_device *pdev)
|
||||
static void omap_hwspinlock_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct hwspinlock_device *bank = platform_get_drvdata(pdev);
|
||||
int ret;
|
||||
|
@ -153,12 +153,10 @@ static int omap_hwspinlock_remove(struct platform_device *pdev)
|
|||
ret = hwspin_lock_unregister(bank);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "%s failed: %d\n", __func__, ret);
|
||||
return ret;
|
||||
return;
|
||||
}
|
||||
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id omap_hwspinlock_of_match[] = {
|
||||
|
@ -171,7 +169,7 @@ MODULE_DEVICE_TABLE(of, omap_hwspinlock_of_match);
|
|||
|
||||
static struct platform_driver omap_hwspinlock_driver = {
|
||||
.probe = omap_hwspinlock_probe,
|
||||
.remove = omap_hwspinlock_remove,
|
||||
.remove_new = omap_hwspinlock_remove,
|
||||
.driver = {
|
||||
.name = "omap_hwspinlock",
|
||||
.of_match_table = omap_hwspinlock_of_match,
|
||||
|
|
|
@ -69,9 +69,18 @@ static const struct hwspinlock_ops qcom_hwspinlock_ops = {
|
|||
.unlock = qcom_hwspinlock_unlock,
|
||||
};
|
||||
|
||||
static const struct regmap_config sfpb_mutex_config = {
|
||||
.reg_bits = 32,
|
||||
.reg_stride = 4,
|
||||
.val_bits = 32,
|
||||
.max_register = 0x100,
|
||||
.fast_io = true,
|
||||
};
|
||||
|
||||
static const struct qcom_hwspinlock_of_data of_sfpb_mutex = {
|
||||
.offset = 0x4,
|
||||
.stride = 0x4,
|
||||
.regmap_config = &sfpb_mutex_config,
|
||||
};
|
||||
|
||||
static const struct regmap_config tcsr_msm8226_mutex_config = {
|
||||
|
@ -197,6 +206,8 @@ static int qcom_hwspinlock_probe(struct platform_device *pdev)
|
|||
|
||||
bank->lock[i].priv = devm_regmap_field_alloc(&pdev->dev,
|
||||
regmap, field);
|
||||
if (IS_ERR(bank->lock[i].priv))
|
||||
return PTR_ERR(bank->lock[i].priv);
|
||||
}
|
||||
|
||||
return devm_hwspin_lock_register(&pdev->dev, bank, &qcom_hwspinlock_ops,
|
||||
|
|
|
@ -120,20 +120,18 @@ static int u8500_hsem_probe(struct platform_device *pdev)
|
|||
pdata->base_id, num_locks);
|
||||
}
|
||||
|
||||
static int u8500_hsem_remove(struct platform_device *pdev)
|
||||
static void u8500_hsem_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct hwspinlock_device *bank = platform_get_drvdata(pdev);
|
||||
void __iomem *io_base = bank->lock[0].priv - HSEM_REGISTER_OFFSET;
|
||||
|
||||
/* clear all interrupts */
|
||||
writel(0xFFFF, io_base + HSEM_ICRALL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver u8500_hsem_driver = {
|
||||
.probe = u8500_hsem_probe,
|
||||
.remove = u8500_hsem_remove,
|
||||
.remove_new = u8500_hsem_remove,
|
||||
.driver = {
|
||||
.name = "u8500_hsem",
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue