linux-stable/arch/arm/mach-at91
Claudiu Beznea d8d667ee02 ARM: at91: pm: preload base address of controllers in tlb
In suspend/resume procedure for AT91 architecture different controllers
(PMC, SHDWC, RAM, RAM PHY, SFRBU) are accessed to do the proper settings
for power saving. Commit f0bbf17958 ("ARM: at91: pm: add self-refresh
support for sama7g5") introduced the access to RAMC PHY controller for
SAMA7G5. The access to this controller is done after RAMC ports are
closed, thus any TLB walk necessary for RAMC PHY virtual address will
fail. In the development branch this was not encountered. However, on
current kernel the issue is reproducible.

To solve the issue the previous mechanism of pre-loading the TLB with
the RAMC PHY virtual address has been used. However, only the addition
of this new pre-load breaks the functionality for ARMv5 based
devices (SAM9X60). This behavior has been encountered previously
while debugging this code and using the same mechanism for pre-loading
address for different controllers (e.g. pin controller, the assumption
being that other requested translations are replaced from TLB).

To solve this new issue the TLB flush + the extension of pre-loading
the rest of controllers to TLB (e.g. PMC, RAMC) has been added. The
rest of the controllers should have been pre-loaded previously, anyway.

Fixes: f0bbf17958 ("ARM: at91: pm: add self-refresh support for sama7g5")
Depends-on: e42cbbe5c9 ("ARM: at91: pm: group constants and addresses loading")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20210930154219.2214051-4-claudiu.beznea@microchip.com
2021-10-04 12:08:34 +02:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Kconfig ARM: at91: add new SoC sama7g5 2021-07-19 14:32:11 +02:00
Makefile ARM: at91: sama7: introduce sama7 SoC family 2021-07-19 14:32:13 +02:00
Makefile.boot ARM: at91: Replace HTTP links with HTTPS ones 2020-07-18 00:59:26 +02:00
at91rm9200.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 4 2019-05-21 11:28:40 +02:00
at91sam9.c ARM: at91: pm: move SAM9X60's PM under its own SoC config flag 2019-12-10 00:44:53 +01:00
generic.h ARM: at91: pm: add pm support for SAMA7G5 2021-07-19 14:32:13 +02:00
pm.c ARM: at91: pm: switch backup area to vbat in backup mode 2021-09-14 17:05:40 +02:00
pm.h ARM: at91: pm: add support for 2.5V LDO regulator control 2021-07-19 14:32:12 +02:00
pm_data-offsets.c ARM: at91: pm: add self-refresh support for sama7g5 2021-07-19 14:32:12 +02:00
pm_suspend.S ARM: at91: pm: preload base address of controllers in tlb 2021-10-04 12:08:34 +02:00
sam9x60.c ARM: at91: pm: move SAM9X60's PM under its own SoC config flag 2019-12-10 00:44:53 +01:00
sama5.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 4 2019-05-21 11:28:40 +02:00
sama7.c ARM: at91: pm: add pm support for SAMA7G5 2021-07-19 14:32:13 +02:00
samv7.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 4 2019-05-21 11:28:40 +02:00