diff options
Diffstat (limited to 'drivers/memory')
-rw-r--r-- | drivers/memory/brcmstb_dpfe.c | 6 | ||||
-rw-r--r-- | drivers/memory/brcmstb_memc.c | 6 | ||||
-rw-r--r-- | drivers/memory/emif.c | 6 | ||||
-rw-r--r-- | drivers/memory/fsl-corenet-cf.c | 6 | ||||
-rw-r--r-- | drivers/memory/fsl_ifc.c | 6 | ||||
-rw-r--r-- | drivers/memory/jz4780-nemc.c | 5 | ||||
-rw-r--r-- | drivers/memory/mtk-smi.c | 10 | ||||
-rw-r--r-- | drivers/memory/omap-gpmc.c | 6 | ||||
-rw-r--r-- | drivers/memory/renesas-rpc-if.c | 6 | ||||
-rw-r--r-- | drivers/memory/samsung/exynos5422-dmc.c | 6 | ||||
-rw-r--r-- | drivers/memory/stm32-fmc2-ebi.c | 6 | ||||
-rw-r--r-- | drivers/memory/tegra/tegra186-emc.c | 6 | ||||
-rw-r--r-- | drivers/memory/tegra/tegra186.c | 33 | ||||
-rw-r--r-- | drivers/memory/tegra/tegra210-emc-core.c | 6 | ||||
-rw-r--r-- | drivers/memory/ti-aemif.c | 5 | ||||
-rw-r--r-- | drivers/memory/ti-emif-pm.c | 6 |
16 files changed, 59 insertions, 66 deletions
diff --git a/drivers/memory/brcmstb_dpfe.c b/drivers/memory/brcmstb_dpfe.c index a7ab3d3772..5028467b2d 100644 --- a/drivers/memory/brcmstb_dpfe.c +++ b/drivers/memory/brcmstb_dpfe.c @@ -909,13 +909,11 @@ static int brcmstb_dpfe_probe(struct platform_device *pdev) return ret; } -static int brcmstb_dpfe_remove(struct platform_device *pdev) +static void brcmstb_dpfe_remove(struct platform_device *pdev) { struct brcmstb_dpfe_priv *priv = dev_get_drvdata(&pdev->dev); sysfs_remove_groups(&pdev->dev.kobj, priv->dpfe_api->sysfs_attrs); - - return 0; } static const struct of_device_id brcmstb_dpfe_of_match[] = { @@ -936,7 +934,7 @@ static struct platform_driver brcmstb_dpfe_driver = { .of_match_table = brcmstb_dpfe_of_match, }, .probe = brcmstb_dpfe_probe, - .remove = brcmstb_dpfe_remove, + .remove_new = brcmstb_dpfe_remove, .resume = brcmstb_dpfe_resume, }; diff --git a/drivers/memory/brcmstb_memc.c b/drivers/memory/brcmstb_memc.c index a6ea519965..ea9213f715 100644 --- a/drivers/memory/brcmstb_memc.c +++ b/drivers/memory/brcmstb_memc.c @@ -152,13 +152,11 @@ static int brcmstb_memc_probe(struct platform_device *pdev) return 0; } -static int brcmstb_memc_remove(struct platform_device *pdev) +static void brcmstb_memc_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; sysfs_remove_group(&dev->kobj, &dev_attr_group); - - return 0; } enum brcmstb_memc_hwtype { @@ -284,7 +282,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(brcmstb_memc_pm_ops, brcmstb_memc_suspend, static struct platform_driver brcmstb_memc_driver = { .probe = brcmstb_memc_probe, - .remove = brcmstb_memc_remove, + .remove_new = brcmstb_memc_remove, .driver = { .name = "brcmstb_memc", .of_match_table = brcmstb_memc_of_match, diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c index f305643209..434982545b 100644 --- a/drivers/memory/emif.c +++ b/drivers/memory/emif.c @@ -1159,13 +1159,11 @@ error: return -ENODEV; } -static int __exit emif_remove(struct platform_device *pdev) +static void __exit emif_remove(struct platform_device *pdev) { struct emif_data *emif = platform_get_drvdata(pdev); emif_debugfs_exit(emif); - - return 0; } static void emif_shutdown(struct platform_device *pdev) @@ -1185,7 +1183,7 @@ MODULE_DEVICE_TABLE(of, emif_of_match); #endif static struct platform_driver emif_driver = { - .remove = __exit_p(emif_remove), + .remove_new = __exit_p(emif_remove), .shutdown = emif_shutdown, .driver = { .name = "emif", diff --git a/drivers/memory/fsl-corenet-cf.c b/drivers/memory/fsl-corenet-cf.c index 8096c4f333..f47d05f7c5 100644 --- a/drivers/memory/fsl-corenet-cf.c +++ b/drivers/memory/fsl-corenet-cf.c @@ -223,7 +223,7 @@ static int ccf_probe(struct platform_device *pdev) return 0; } -static int ccf_remove(struct platform_device *pdev) +static void ccf_remove(struct platform_device *pdev) { struct ccf_private *ccf = dev_get_drvdata(&pdev->dev); @@ -241,8 +241,6 @@ static int ccf_remove(struct platform_device *pdev) iowrite32be(0, &ccf->err_regs->errinten); break; } - - return 0; } static struct platform_driver ccf_driver = { @@ -251,7 +249,7 @@ static struct platform_driver ccf_driver = { .of_match_table = ccf_matches, }, .probe = ccf_probe, - .remove = ccf_remove, + .remove_new = ccf_remove, }; module_platform_driver(ccf_driver); diff --git a/drivers/memory/fsl_ifc.c b/drivers/memory/fsl_ifc.c index 2509e51520..15e919c24f 100644 --- a/drivers/memory/fsl_ifc.c +++ b/drivers/memory/fsl_ifc.c @@ -84,7 +84,7 @@ static int fsl_ifc_ctrl_init(struct fsl_ifc_ctrl *ctrl) return 0; } -static int fsl_ifc_ctrl_remove(struct platform_device *dev) +static void fsl_ifc_ctrl_remove(struct platform_device *dev) { struct fsl_ifc_ctrl *ctrl = dev_get_drvdata(&dev->dev); @@ -98,8 +98,6 @@ static int fsl_ifc_ctrl_remove(struct platform_device *dev) iounmap(ctrl->gregs); dev_set_drvdata(&dev->dev, NULL); - - return 0; } /* @@ -318,7 +316,7 @@ static struct platform_driver fsl_ifc_ctrl_driver = { .of_match_table = fsl_ifc_match, }, .probe = fsl_ifc_ctrl_probe, - .remove = fsl_ifc_ctrl_remove, + .remove_new = fsl_ifc_ctrl_remove, }; static int __init fsl_ifc_init(void) diff --git a/drivers/memory/jz4780-nemc.c b/drivers/memory/jz4780-nemc.c index e5a93e7da1..fb6db2ffe7 100644 --- a/drivers/memory/jz4780-nemc.c +++ b/drivers/memory/jz4780-nemc.c @@ -384,12 +384,11 @@ static int jz4780_nemc_probe(struct platform_device *pdev) return 0; } -static int jz4780_nemc_remove(struct platform_device *pdev) +static void jz4780_nemc_remove(struct platform_device *pdev) { struct jz4780_nemc *nemc = platform_get_drvdata(pdev); clk_disable_unprepare(nemc->clk); - return 0; } static const struct jz_soc_info jz4740_soc_info = { @@ -408,7 +407,7 @@ static const struct of_device_id jz4780_nemc_dt_match[] = { static struct platform_driver jz4780_nemc_driver = { .probe = jz4780_nemc_probe, - .remove = jz4780_nemc_remove, + .remove_new = jz4780_nemc_remove, .driver = { .name = "jz4780-nemc", .of_match_table = of_match_ptr(jz4780_nemc_dt_match), diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c index 6523cb5105..572c7fbdcf 100644 --- a/drivers/memory/mtk-smi.c +++ b/drivers/memory/mtk-smi.c @@ -566,14 +566,13 @@ err_pm_disable: return ret; } -static int mtk_smi_larb_remove(struct platform_device *pdev) +static void mtk_smi_larb_remove(struct platform_device *pdev) { struct mtk_smi_larb *larb = platform_get_drvdata(pdev); device_link_remove(&pdev->dev, larb->smi_common_dev); pm_runtime_disable(&pdev->dev); component_del(&pdev->dev, &mtk_smi_larb_component_ops); - return 0; } static int __maybe_unused mtk_smi_larb_resume(struct device *dev) @@ -616,7 +615,7 @@ static const struct dev_pm_ops smi_larb_pm_ops = { static struct platform_driver mtk_smi_larb_driver = { .probe = mtk_smi_larb_probe, - .remove = mtk_smi_larb_remove, + .remove_new = mtk_smi_larb_remove, .driver = { .name = "mtk-smi-larb", .of_match_table = mtk_smi_larb_of_ids, @@ -795,14 +794,13 @@ static int mtk_smi_common_probe(struct platform_device *pdev) return 0; } -static int mtk_smi_common_remove(struct platform_device *pdev) +static void mtk_smi_common_remove(struct platform_device *pdev) { struct mtk_smi *common = dev_get_drvdata(&pdev->dev); if (common->plat->type == MTK_SMI_GEN2_SUB_COMM) device_link_remove(&pdev->dev, common->smi_common_dev); pm_runtime_disable(&pdev->dev); - return 0; } static int __maybe_unused mtk_smi_common_resume(struct device *dev) @@ -842,7 +840,7 @@ static const struct dev_pm_ops smi_common_pm_ops = { static struct platform_driver mtk_smi_common_driver = { .probe = mtk_smi_common_probe, - .remove = mtk_smi_common_remove, + .remove_new = mtk_smi_common_remove, .driver = { .name = "mtk-smi-common", .of_match_table = mtk_smi_common_of_ids, diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c index d78f73db37..80d0388842 100644 --- a/drivers/memory/omap-gpmc.c +++ b/drivers/memory/omap-gpmc.c @@ -2690,7 +2690,7 @@ gpio_init_failed: return rc; } -static int gpmc_remove(struct platform_device *pdev) +static void gpmc_remove(struct platform_device *pdev) { int i; struct gpmc_device *gpmc = platform_get_drvdata(pdev); @@ -2702,8 +2702,6 @@ static int gpmc_remove(struct platform_device *pdev) gpmc_mem_exit(); pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -2747,7 +2745,7 @@ MODULE_DEVICE_TABLE(of, gpmc_dt_ids); static struct platform_driver gpmc_driver = { .probe = gpmc_probe, - .remove = gpmc_remove, + .remove_new = gpmc_remove, .driver = { .name = DEVICE_NAME, .of_match_table = of_match_ptr(gpmc_dt_ids), diff --git a/drivers/memory/renesas-rpc-if.c b/drivers/memory/renesas-rpc-if.c index 9695b2d3ae..3167826b23 100644 --- a/drivers/memory/renesas-rpc-if.c +++ b/drivers/memory/renesas-rpc-if.c @@ -777,13 +777,11 @@ static int rpcif_probe(struct platform_device *pdev) return 0; } -static int rpcif_remove(struct platform_device *pdev) +static void rpcif_remove(struct platform_device *pdev) { struct rpcif_priv *rpc = platform_get_drvdata(pdev); platform_device_unregister(rpc->vdev); - - return 0; } static const struct of_device_id rpcif_of_match[] = { @@ -797,7 +795,7 @@ MODULE_DEVICE_TABLE(of, rpcif_of_match); static struct platform_driver rpcif_driver = { .probe = rpcif_probe, - .remove = rpcif_remove, + .remove_new = rpcif_remove, .driver = { .name = "rpc-if", .of_match_table = rpcif_of_match, diff --git a/drivers/memory/samsung/exynos5422-dmc.c b/drivers/memory/samsung/exynos5422-dmc.c index 6d019dbd72..da7ecd921c 100644 --- a/drivers/memory/samsung/exynos5422-dmc.c +++ b/drivers/memory/samsung/exynos5422-dmc.c @@ -1558,7 +1558,7 @@ remove_clocks: * clean the device's resources. It just calls explicitly disable function for * the performance counters. */ -static int exynos5_dmc_remove(struct platform_device *pdev) +static void exynos5_dmc_remove(struct platform_device *pdev) { struct exynos5_dmc *dmc = dev_get_drvdata(&pdev->dev); @@ -1569,8 +1569,6 @@ static int exynos5_dmc_remove(struct platform_device *pdev) clk_disable_unprepare(dmc->mout_bpll); clk_disable_unprepare(dmc->fout_bpll); - - return 0; } static const struct of_device_id exynos5_dmc_of_match[] = { @@ -1581,7 +1579,7 @@ MODULE_DEVICE_TABLE(of, exynos5_dmc_of_match); static struct platform_driver exynos5_dmc_platdrv = { .probe = exynos5_dmc_probe, - .remove = exynos5_dmc_remove, + .remove_new = exynos5_dmc_remove, .driver = { .name = "exynos5-dmc", .of_match_table = exynos5_dmc_of_match, diff --git a/drivers/memory/stm32-fmc2-ebi.c b/drivers/memory/stm32-fmc2-ebi.c index 9015e8277d..47d0ea5f16 100644 --- a/drivers/memory/stm32-fmc2-ebi.c +++ b/drivers/memory/stm32-fmc2-ebi.c @@ -1146,7 +1146,7 @@ err_release: return ret; } -static int stm32_fmc2_ebi_remove(struct platform_device *pdev) +static void stm32_fmc2_ebi_remove(struct platform_device *pdev) { struct stm32_fmc2_ebi *ebi = platform_get_drvdata(pdev); @@ -1154,8 +1154,6 @@ static int stm32_fmc2_ebi_remove(struct platform_device *pdev) stm32_fmc2_ebi_disable_banks(ebi); stm32_fmc2_ebi_disable(ebi); clk_disable_unprepare(ebi->clk); - - return 0; } static int __maybe_unused stm32_fmc2_ebi_suspend(struct device *dev) @@ -1197,7 +1195,7 @@ MODULE_DEVICE_TABLE(of, stm32_fmc2_ebi_match); static struct platform_driver stm32_fmc2_ebi_driver = { .probe = stm32_fmc2_ebi_probe, - .remove = stm32_fmc2_ebi_remove, + .remove_new = stm32_fmc2_ebi_remove, .driver = { .name = "stm32_fmc2_ebi", .of_match_table = stm32_fmc2_ebi_match, diff --git a/drivers/memory/tegra/tegra186-emc.c b/drivers/memory/tegra/tegra186-emc.c index 4007f4e16d..fcd4aea48b 100644 --- a/drivers/memory/tegra/tegra186-emc.c +++ b/drivers/memory/tegra/tegra186-emc.c @@ -378,7 +378,7 @@ put_bpmp: return err; } -static int tegra186_emc_remove(struct platform_device *pdev) +static void tegra186_emc_remove(struct platform_device *pdev) { struct tegra_mc *mc = dev_get_drvdata(pdev->dev.parent); struct tegra186_emc *emc = platform_get_drvdata(pdev); @@ -387,8 +387,6 @@ static int tegra186_emc_remove(struct platform_device *pdev) mc->bpmp = NULL; tegra_bpmp_put(emc->bpmp); - - return 0; } static const struct of_device_id tegra186_emc_of_match[] = { @@ -413,7 +411,7 @@ static struct platform_driver tegra186_emc_driver = { .sync_state = icc_sync_state, }, .probe = tegra186_emc_probe, - .remove = tegra186_emc_remove, + .remove_new = tegra186_emc_remove, }; module_platform_driver(tegra186_emc_driver); diff --git a/drivers/memory/tegra/tegra186.c b/drivers/memory/tegra/tegra186.c index 533f85a4b2..1b3183951b 100644 --- a/drivers/memory/tegra/tegra186.c +++ b/drivers/memory/tegra/tegra186.c @@ -75,6 +75,9 @@ static void tegra186_mc_client_sid_override(struct tegra_mc *mc, { u32 value, old; + if (client->regs.sid.security == 0 && client->regs.sid.override == 0) + return; + value = readl(mc->regs + client->regs.sid.security); if ((value & MC_SID_STREAMID_SECURITY_OVERRIDE) == 0) { /* @@ -111,9 +114,12 @@ static void tegra186_mc_client_sid_override(struct tegra_mc *mc, static int tegra186_mc_probe_device(struct tegra_mc *mc, struct device *dev) { #if IS_ENABLED(CONFIG_IOMMU_API) - struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev); struct of_phandle_args args; unsigned int i, index = 0; + u32 sid; + + if (!tegra_dev_iommu_get_stream_id(dev, &sid)) + return 0; while (!of_parse_phandle_with_args(dev->of_node, "interconnects", "#interconnect-cells", index, &args)) { @@ -121,11 +127,10 @@ static int tegra186_mc_probe_device(struct tegra_mc *mc, struct device *dev) for (i = 0; i < mc->soc->num_clients; i++) { const struct tegra_mc_client *client = &mc->soc->clients[i]; - if (client->id == args.args[0]) { - u32 sid = fwspec->ids[0] & MC_SID_STREAMID_OVERRIDE_MASK; - - tegra186_mc_client_sid_override(mc, client, sid); - } + if (client->id == args.args[0]) + tegra186_mc_client_sid_override( + mc, client, + sid & MC_SID_STREAMID_OVERRIDE_MASK); } } @@ -136,9 +141,25 @@ static int tegra186_mc_probe_device(struct tegra_mc *mc, struct device *dev) return 0; } +static int tegra186_mc_resume(struct tegra_mc *mc) +{ +#if IS_ENABLED(CONFIG_IOMMU_API) + unsigned int i; + + for (i = 0; i < mc->soc->num_clients; i++) { + const struct tegra_mc_client *client = &mc->soc->clients[i]; + + tegra186_mc_client_sid_override(mc, client, client->sid); + } +#endif + + return 0; +} + const struct tegra_mc_ops tegra186_mc_ops = { .probe = tegra186_mc_probe, .remove = tegra186_mc_remove, + .resume = tegra186_mc_resume, .probe_device = tegra186_mc_probe_device, .handle_irq = tegra30_mc_handle_irq, }; diff --git a/drivers/memory/tegra/tegra210-emc-core.c b/drivers/memory/tegra/tegra210-emc-core.c index 3300bde47c..78ca1d6c09 100644 --- a/drivers/memory/tegra/tegra210-emc-core.c +++ b/drivers/memory/tegra/tegra210-emc-core.c @@ -1985,15 +1985,13 @@ release: return err; } -static int tegra210_emc_remove(struct platform_device *pdev) +static void tegra210_emc_remove(struct platform_device *pdev) { struct tegra210_emc *emc = platform_get_drvdata(pdev); debugfs_remove_recursive(emc->debugfs.root); tegra210_clk_emc_detach(emc->clk); of_reserved_mem_device_release(emc->dev); - - return 0; } static int __maybe_unused tegra210_emc_suspend(struct device *dev) @@ -2053,7 +2051,7 @@ static struct platform_driver tegra210_emc_driver = { .pm = &tegra210_emc_pm_ops, }, .probe = tegra210_emc_probe, - .remove = tegra210_emc_remove, + .remove_new = tegra210_emc_remove, }; module_platform_driver(tegra210_emc_driver); diff --git a/drivers/memory/ti-aemif.c b/drivers/memory/ti-aemif.c index f81e7df879..e192db9e0e 100644 --- a/drivers/memory/ti-aemif.c +++ b/drivers/memory/ti-aemif.c @@ -427,17 +427,16 @@ error: return ret; } -static int aemif_remove(struct platform_device *pdev) +static void aemif_remove(struct platform_device *pdev) { struct aemif_device *aemif = platform_get_drvdata(pdev); clk_disable_unprepare(aemif->clk); - return 0; } static struct platform_driver aemif_driver = { .probe = aemif_probe, - .remove = aemif_remove, + .remove_new = aemif_remove, .driver = { .name = "ti-aemif", .of_match_table = of_match_ptr(aemif_of_match), diff --git a/drivers/memory/ti-emif-pm.c b/drivers/memory/ti-emif-pm.c index cef0d3beb6..592f70e9c8 100644 --- a/drivers/memory/ti-emif-pm.c +++ b/drivers/memory/ti-emif-pm.c @@ -315,15 +315,13 @@ fail_free_sram: return ret; } -static int ti_emif_remove(struct platform_device *pdev) +static void ti_emif_remove(struct platform_device *pdev) { struct ti_emif_data *emif_data = emif_instance; emif_instance = NULL; ti_emif_free_sram(emif_data); - - return 0; } static const struct dev_pm_ops ti_emif_pm_ops = { @@ -332,7 +330,7 @@ static const struct dev_pm_ops ti_emif_pm_ops = { static struct platform_driver ti_emif_driver = { .probe = ti_emif_probe, - .remove = ti_emif_remove, + .remove_new = ti_emif_remove, .driver = { .name = KBUILD_MODNAME, .of_match_table = ti_emif_of_match, |