aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/prm33xx.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-06-10treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1)Thomas Gleixner1-9/+1
Based on the normalized pattern: this program is free software you can redistribute it and/or modify it under the terms of the gnu general public license as published by the free software foundation version 2 this program is distributed as is without any warranty of any kind whether express or implied without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference. Reviewed-by: Allison Randal <allison@lohutok.net> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-19ARM: OMAP2+: PRM: Replace HTTP links with HTTPS onesAlexander A. Klimov1-1/+1
Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de> Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-05-18ARM: OMAP2+: Add functions to save and restore powerdomain contextRuss Dill1-0/+31
The powerdomain control registers are stored in the WKUP powerdomain on AM33XX/AM43XX, which is lost on RTC-only suspend and also hibernate. This adds context save and restore functions for those registers. Sometimes the powerdomain state does not need to change, perhaps we only need to change memory retention states, so make sure the restored state is different from the current state before we wait for a transition. Signed-off-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Signed-off-by: Russ Dill <Russ.Dill@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-11-28ARM: AM33xx: PRM: Remove am33xx_pwrdm_read_prev_pwrst functionKeerthy1-12/+0
Referring TRM Am335X series: http://www.ti.com/lit/ug/spruh73p/spruh73p.pdf The LastPowerStateEntered bitfield is present only for PM_CEFUSE domain. This is not present in any of the other power domains. Hence remove the generic am33xx_pwrdm_read_prev_pwrst hook which wrongly reads the reserved bit fields for all the other power domains. Reading the reserved bits leads to wrongly interpreting the low power transitions for various power domains that do not have the LastPowerStateEntered field. The pm debug counters values are wrong currently as we are incrementing them based on the reserved bits. Signed-off-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-06ARM: OMAP2+: PRCM: store also physical addresses for instancesTero Kristo1-2/+2
In some cases the physical address info is needed, so store this under the existing cm*_base, prm_base and prcm_mpu_base variables. These are converted now to structs that contain both virtual and physical address base for the instance. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2015-03-31ARM: OMAP2+: PRM: move SoC specific init calls within a generic APITero Kristo1-2/+1
This gets rid of need for some exported driver APIs, and simplifies the initialization of the PRM driver. Done in preparation to make PRM a separate driver. The init data is now also passed to the SoC specific implementations, allowing future expansion to add feature flags etc. Signed-off-by: Tero Kristo <t-kristo@ti.com>
2015-03-27ARM: OMAP2+: PRM: determine PRM base address from device treeTero Kristo1-0/+1
There is no need to provide the PRM base address through a low-level API from the low-level IO init, as this information is available through DT. Re-routed the parsing function to be called from the PRM drivers also to simplify the implementation under io.c. Signed-off-by: Tero Kristo <t-kristo@ti.com>
2014-10-27ARM: OMAP2+: PRM: provide generic API for system resetTero Kristo1-1/+2
This patch combines the various prm_warm_reset calls under a common API prm_reset_system, and adds the SoC specific implementation under prm_ll_data. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Paul Walmsley <paul@pwsan.com> Tested-by: Nishanth Menon <nm@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-10-27ARM: AM33xx: PRM: make direct register access functions staticTero Kristo1-3/+3
These should not be accessed outside driver, thus removed the APIs from the header file and made the implementation static. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Paul Walmsley <paul@pwsan.com> Tested-by: Nishanth Menon <nm@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-10-27ARM: AM33xx: PRM: move global warm reset implementation to driverTero Kristo1-0/+21
Moved the implementation from am33xx-restart.c to the prm33xx.c file to isolate the PRM register accesses to be private for PRM driver. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Paul Walmsley <paul@pwsan.com> Tested-by: Nishanth Menon <nm@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-10-27ARM: OMAP2+: PRM: add generic API for checking hardreset statusTero Kristo1-3/+6
PRM driver now has a generic API for checking hardreset status. SoC specific support functions are registered through the prm_ll_data. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Paul Walmsley <paul@pwsan.com> Tested-by: Nishanth Menon <nm@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-10-27ARM: OMAP2+: PRM: add generic API for deasserting hardware resetTero Kristo1-2/+6
PRM driver now has a generic API for deasserting hardware resets. SoC specific support functions are registered through the prm_ll_data. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Paul Walmsley <paul@pwsan.com> Tested-by: Nishanth Menon <nm@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-10-27ARM: OMAP2+: PRM: add generic API for asserting hardware resetTero Kristo1-2/+6
PRM driver now has a generic API for asserting hardware resets. SoC specific support functions are registered through the prm_ll_data. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Paul Walmsley <paul@pwsan.com> Tested-by: Nishanth Menon <nm@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-10-27ARM: AM33xx: PRM: add support for prm_initTero Kristo1-0/+13
Added support for prm_init for AM33xx SoC. This is needed to register SoC specific prm_ll_data for these devices. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Paul Walmsley <paul@pwsan.com> Tested-by: Nishanth Menon <nm@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-05-16Merge tag 'for-v3.16/prcm-cleanup-a' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into omap-for-v3.16/prcmTony Lindgren1-1/+0
Some OMAP PRCM cleanup patches. These help prepare to convert the PRCM code into drivers. Basic build, boot, and PM test results are available here: http://www.pwsan.com/omap/testlogs/prcm-cleanup-v3.16/20140515213244/ Conflicts: arch/arm/mach-omap2/cm3xxx.c arch/arm/mach-omap2/cm44xx.c Also fixed up new section mismatch warnings.
2014-05-15ARM: OMAP2+: PRCM: cleanup some header includesTero Kristo1-1/+0
Some of the includes are totally unnecessary, remove some others in preparation to make the PRCM its own driver. Signed-off-by: Tero Kristo <t-kristo@ti.com> [paul@pwsan.com: updated to apply; fixed build error on OMAP2xxx-only configs] Signed-off-by: Paul Walmsley <paul@pwsan.com>
2014-05-08ARM: OMAP2+: raw read and write endian fixVictor Kamensky1-2/+2
All OMAP IP blocks expect LE data, but CPU may operate in BE mode. Need to use endian neutral functions to read/write h/w registers. I.e instead of __raw_read[lw] and __raw_write[lw] functions code need to use read[lw]_relaxed and write[lw]_relaxed functions. If the first simply reads/writes register, the second will byteswap it if host operates in BE mode. Changes are trivial sed like replacement of __raw_xxx functions with xxx_relaxed variant. Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-06-17ARM: AM33xx: Remove the unused voltagedomain dataRajendra Nayak1-0/+7
Now that there is a way to tell the powerdomain core about missing voltage domain auto-scaling control in SoCs', get rid of the dummy voltage domain data populated for AM33xx devices. Acked-by: Nishanth Menon <nm@ti.com> Acked-by: Vaibhav Hiremath <hvaibhav@ti.com> Signed-off-by: Rajendra Nayak <rnayak@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by: Afzal Mohammed <afzal@ti.com> # am335x evm Signed-off-by: Kevin Hilman <khilman@linaro.org>
2013-02-08ARM: OMAP2+: AM33XX: Update the hardreset APIVaibhav Bedia1-4/+7
WKUP-M3 has a reset status bit (RM_WKUP_STST.WKUP_M3_LRST) Update the hardreset API to ensure that the reset line properly deasserted. Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Paul Walmsley <paul@pwsan.com>
2012-11-12Merge tag 'omap-for-v3.8/cleanup-headers-prepare-multiplatform-v3-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/headersArnd Bergmann1-2/+0
From Tony Lindgren <tony@atomide.com>: These changes deal with the issues of relative includes introduced by the earlier clean-up and clean up few more things for enabling multiplatform support. The multiplatform kernel has been booted on omaps on top of this branch with the work-in-progress patches applied manually. We cannot yet enable the multiplatform support though. We still need the common clock framework patches, some solution for dma-omap.h, and serial-omap.h moved before we can enable it. * tag 'omap-for-v3.8/cleanup-headers-prepare-multiplatform-v3-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP: Remove omap_init_consistent_dma_size() ARM: OMAP: Remove NEED_MACH_GPIO_H ARM: OMAP: Remove unnecessary mach and plat includes ARM: OMAP2+: Fix relative includes for serial.h ARM: OMAP: Fix relative includes for fpga.h ARM: OMAP1: Remove relative includes ARM: OMAP: Remove cpu_is_omap usage from plat-omap/dma.c ARM: OMAP: Fix relative includes for debug-devices.h ARM: OMAP: Remove plat-omap/common.h ARM: OMAP: Move omap-pm-noop.c local to mach-omap2 ARM: OMAP: Fix relative includes for shared i2c.h file ARM: OMAP: Make plat-omap/i2c.c port checks local ARM: OMAP: Move omap2+ specific parts of sram.c to mach-omap2 ARM: OMAP: Move omap1 specific code to local sram.c ARM: OMAP: Introduce common omap_map_sram() and omap_sram_reset() ARM: OMAP: Split sram.h to local headers and minimal shared header ARM: OMAP1: usb: fix sparse warnings Conflicts: arch/arm/mach-omap2/cm33xx.c Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-10-31ARM: OMAP: Remove plat-omap/common.hTony Lindgren1-2/+0
Most of the prototypes in plat-omap/common.h are not common to omap1 and omap2+, they are local to omap2+ and should not be in plat-omap/common.h. The only shared function prototype in this file is omap_init_clocksource_32k(), let's put that into counter-32k.h. Note that the new plat/counter-32k.h must not be included from drivers, that will break omap2+ build for CONFIG_MULTIPLATFORM. Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-10-24Merge tag 'omap-cleanup-a-for-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into omap-for-v3.8/cleanup-prcmTony Lindgren1-0/+202
The first set of OMAP PRM/CM-related cleanup patches for 3.8. Prepares for the future move of the PRM/CM code to drivers/. Also includes some prcm.[ch] cleanup patches from the WDTIMER cleanup series that don't need external acks. Basic test logs for this branch on top of v3.7-rc2 are here: http://www.pwsan.com/omap/testlogs/prcm_cleanup_a_3.8/20121021123719/ But due to the number of unrelated regressions present in v3.7-rc[12], it's not particularly usable as a testing base. With reverts, fixes, and workarounds applied as documented in: http://www.pwsan.com/omap/testlogs/test_v3.7-rc2/20121020134755/README.txt the following test logs were obtained: http://www.pwsan.com/omap/testlogs/prcm_cleanup_a_3.8/20121020231757/ which indicate that the series tests cleanly. Conflicts: arch/arm/mach-omap2/Makefile arch/arm/mach-omap2/clockdomain2xxx_3xxx.c arch/arm/mach-omap2/pm24xx.c
2012-10-21ARM: OMAP2+: powerdomain/PRM: move the low-level powerdomain functions into PRMPaul Walmsley1-0/+202
Move the low-level SoC-specific powerdomain control functions into prm*.c. For example, OMAP2xxx low-level powerdomain functions go into prm2xxx.c. Then remove the unnecessary powerdomain*xxx*.c files. The objective is to centralize low-level PRM register accesses into the prm*.[ch] files, and then to export an OMAP SoC-independent API to higher-level OMAP power management code. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Rajendra Nayak <rnayak@ti.com> Cc: Vaibhav Hiremath <hvaibhav@ti.com> Acked-by: Rajendra Nayak <rnayak@ti.com> Reviewed-by: Russ Dill <Russ.Dill@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
2012-10-17ARM: OMAP: Make plat/common.h local to mach-omap1 and mach-omap2Tony Lindgren1-1/+1
We cannot keep this in plat/common.h for common zImage support. Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-06-18ARM: OMAP AM33xx: PRM: add PRM supportVaibhav Hiremath1-0/+135
As far as PRM/CM/PRCM modules are concerned, AM33XX device is different than OMAP3 and OMAP4 architectures; so we need to handle it separately. This patch adds support for the PRM APIs required for AM33XX device. Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> Signed-off-by: Afzal Mohammed <afzal@ti.com> Cc: Benoit Cousson <b-cousson@ti.com> Cc: Tony Lindgren <tony@atomide.com> Cc: Kevin Hilman <khilman@ti.com> Cc: Paul Walmsley <paul@pwsan.com> Cc: Rajendra Nayak <rnayak@ti.com> [paul@pwsan.com: separated the PRM parts of "ARM: OMAP3+: am33xx: Add powerdomain & PRM support" into this patch; fixed Makefile prm33xx.o location; cleaned up some checkpatch violations; updated for 3.5] Signed-off-by: Paul Walmsley <paul@pwsan.com>