diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-23 16:52:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-23 16:52:46 -0400 |
commit | f3ea496213819c80ce9c49a9b65f9261da713d11 (patch) | |
tree | 1c8fad9c5c609504c2916ad3844494093f89f8f1 /drivers/memory | |
parent | 9e259f9352d52053058a234f7c062c4e4f56dc85 (diff) | |
parent | 29ed45fff05899f6f39d05fe1c32b1bc51f8926b (diff) |
Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC driver updates from Olof Johansson:
"Some of the larger changes this merge window:
- Removal of drivers for Exynos5440, a Samsung SoC that never saw
widespread use.
- Uniphier support for USB3 and SPI reset handling
- Syste control and SRAM drivers and bindings for Allwinner platforms
- Qualcomm AOSS (Always-on subsystem) reset controller drivers
- Raspberry Pi hwmon driver for voltage
- Mediatek pwrap (pmic) support for MT6797 SoC"
* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (52 commits)
drivers/firmware: psci_checker: stash and use topology_core_cpumask for hotplug tests
soc: fsl: cleanup Kconfig menu
soc: fsl: dpio: Convert DPIO documentation to .rst
staging: fsl-mc: Remove remaining files
staging: fsl-mc: Move DPIO from staging to drivers/soc/fsl
staging: fsl-dpaa2: eth: move generic FD defines to DPIO
soc: fsl: qe: gpio: Add qe_gpio_set_multiple
usb: host: exynos: Remove support for Exynos5440
clk: samsung: Remove support for Exynos5440
soc: sunxi: Add the A13, A23 and H3 system control compatibles
reset: uniphier: add reset control support for SPI
cpufreq: exynos: Remove support for Exynos5440
ata: ahci-platform: Remove support for Exynos5440
soc: imx6qp: Use GENPD_FLAG_ALWAYS_ON for PU errata
soc: mediatek: pwrap: add mt6351 driver for mt6797 SoCs
soc: mediatek: pwrap: add pwrap driver for mt6797 SoCs
soc: mediatek: pwrap: fix cipher init setting error
dt-bindings: pwrap: mediatek: add pwrap support for MT6797
reset: uniphier: add USB3 core reset control
dt-bindings: reset: uniphier: add USB3 core reset support
...
Diffstat (limited to 'drivers/memory')
-rw-r--r-- | drivers/memory/tegra/mc.c | 16 | ||||
-rw-r--r-- | drivers/memory/ti-emif-pm.c | 33 |
2 files changed, 39 insertions, 10 deletions
diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c index bb93cc53554e..bd25faf6d13d 100644 --- a/drivers/memory/tegra/mc.c +++ b/drivers/memory/tegra/mc.c | |||
@@ -672,13 +672,6 @@ static int tegra_mc_probe(struct platform_device *pdev) | |||
672 | return err; | 672 | return err; |
673 | } | 673 | } |
674 | 674 | ||
675 | err = tegra_mc_reset_setup(mc); | ||
676 | if (err < 0) { | ||
677 | dev_err(&pdev->dev, "failed to register reset controller: %d\n", | ||
678 | err); | ||
679 | return err; | ||
680 | } | ||
681 | |||
682 | mc->irq = platform_get_irq(pdev, 0); | 675 | mc->irq = platform_get_irq(pdev, 0); |
683 | if (mc->irq < 0) { | 676 | if (mc->irq < 0) { |
684 | dev_err(&pdev->dev, "interrupt not specified\n"); | 677 | dev_err(&pdev->dev, "interrupt not specified\n"); |
@@ -697,13 +690,16 @@ static int tegra_mc_probe(struct platform_device *pdev) | |||
697 | return err; | 690 | return err; |
698 | } | 691 | } |
699 | 692 | ||
693 | err = tegra_mc_reset_setup(mc); | ||
694 | if (err < 0) | ||
695 | dev_err(&pdev->dev, "failed to register reset controller: %d\n", | ||
696 | err); | ||
697 | |||
700 | if (IS_ENABLED(CONFIG_TEGRA_IOMMU_SMMU)) { | 698 | if (IS_ENABLED(CONFIG_TEGRA_IOMMU_SMMU)) { |
701 | mc->smmu = tegra_smmu_probe(&pdev->dev, mc->soc->smmu, mc); | 699 | mc->smmu = tegra_smmu_probe(&pdev->dev, mc->soc->smmu, mc); |
702 | if (IS_ERR(mc->smmu)) { | 700 | if (IS_ERR(mc->smmu)) |
703 | dev_err(&pdev->dev, "failed to probe SMMU: %ld\n", | 701 | dev_err(&pdev->dev, "failed to probe SMMU: %ld\n", |
704 | PTR_ERR(mc->smmu)); | 702 | PTR_ERR(mc->smmu)); |
705 | return PTR_ERR(mc->smmu); | ||
706 | } | ||
707 | } | 703 | } |
708 | 704 | ||
709 | return 0; | 705 | return 0; |
diff --git a/drivers/memory/ti-emif-pm.c b/drivers/memory/ti-emif-pm.c index 632651f4b6e8..2250d03ea17f 100644 --- a/drivers/memory/ti-emif-pm.c +++ b/drivers/memory/ti-emif-pm.c | |||
@@ -249,6 +249,34 @@ static const struct of_device_id ti_emif_of_match[] = { | |||
249 | }; | 249 | }; |
250 | MODULE_DEVICE_TABLE(of, ti_emif_of_match); | 250 | MODULE_DEVICE_TABLE(of, ti_emif_of_match); |
251 | 251 | ||
252 | #ifdef CONFIG_PM_SLEEP | ||
253 | static int ti_emif_resume(struct device *dev) | ||
254 | { | ||
255 | unsigned long tmp = | ||
256 | __raw_readl((void *)emif_instance->ti_emif_sram_virt); | ||
257 | |||
258 | /* | ||
259 | * Check to see if what we are copying is already present in the | ||
260 | * first byte at the destination, only copy if it is not which | ||
261 | * indicates we have lost context and sram no longer contains | ||
262 | * the PM code | ||
263 | */ | ||
264 | if (tmp != ti_emif_sram) | ||
265 | ti_emif_push_sram(dev, emif_instance); | ||
266 | |||
267 | return 0; | ||
268 | } | ||
269 | |||
270 | static int ti_emif_suspend(struct device *dev) | ||
271 | { | ||
272 | /* | ||
273 | * The contents will be present in DDR hence no need to | ||
274 | * explicitly save | ||
275 | */ | ||
276 | return 0; | ||
277 | } | ||
278 | #endif /* CONFIG_PM_SLEEP */ | ||
279 | |||
252 | static int ti_emif_probe(struct platform_device *pdev) | 280 | static int ti_emif_probe(struct platform_device *pdev) |
253 | { | 281 | { |
254 | int ret; | 282 | int ret; |
@@ -308,12 +336,17 @@ static int ti_emif_remove(struct platform_device *pdev) | |||
308 | return 0; | 336 | return 0; |
309 | } | 337 | } |
310 | 338 | ||
339 | static const struct dev_pm_ops ti_emif_pm_ops = { | ||
340 | SET_SYSTEM_SLEEP_PM_OPS(ti_emif_suspend, ti_emif_resume) | ||
341 | }; | ||
342 | |||
311 | static struct platform_driver ti_emif_driver = { | 343 | static struct platform_driver ti_emif_driver = { |
312 | .probe = ti_emif_probe, | 344 | .probe = ti_emif_probe, |
313 | .remove = ti_emif_remove, | 345 | .remove = ti_emif_remove, |
314 | .driver = { | 346 | .driver = { |
315 | .name = KBUILD_MODNAME, | 347 | .name = KBUILD_MODNAME, |
316 | .of_match_table = of_match_ptr(ti_emif_of_match), | 348 | .of_match_table = of_match_ptr(ti_emif_of_match), |
349 | .pm = &ti_emif_pm_ops, | ||
317 | }, | 350 | }, |
318 | }; | 351 | }; |
319 | module_platform_driver(ti_emif_driver); | 352 | module_platform_driver(ti_emif_driver); |