summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/prm2xxx.c
AgeCommit message (Collapse)AuthorFilesLines
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner1-4/+1
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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>
2015-03-25ARM: OMAP2+: PRM: add generic API for clear_mod_irqsTero Kristo1-1/+3
OMAP2/3 now use generic API for the prm_clear_mod_irqs, the SoC specific implementation details are provided through prm_ll_data. 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: OMAP2+: PRM: add generic API for checking hardreset statusTero Kristo1-0/+1
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-0/+1
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-0/+1
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-07-04ARM: OMAP24xx: PRM: add API for clearing wakeup status bitsTero Kristo1-0/+18
This helps to isolate the PRM into its own driver. Signed-off-by: Tero Kristo <t-kristo@ti.com>
2014-05-15ARM: OMAP2+: PRM: remove unnecessary cpu_is_XXX calls from prm_init / exitTero Kristo1-12/+1
Done in preparation to make PRM its own driver, as the cpu_is_XXX calls are not available outside mach-omap2 folder. The init functions are called only from cpu specific init chain, and thus don't need to double check against cpu type. The exit calls check against the data provided during init-time registration and thus don't need cpu check either. Signed-off-by: Tero Kristo <t-kristo@ti.com> [paul@pwsan.com: updated to apply] Signed-off-by: Paul Walmsley <paul@pwsan.com>
2013-01-03Merge tag 'omap-fixes-a2-for-v3.8-rc' of ↵Tony Lindgren1-3/+85
git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into omap-for-v3.8-rc2/fixes Some OMAP PRCM and sparse fixes against v3.8-rc1. A basic set of test logs are available here: http://www.pwsan.com/omap/testlogs/prcm_fixes_b_3.8-rc/20130102120724/ The 3730 Beagle XM here has an intermittent failure mounting SD root, but the suspicion right now is that this is due to a failing SD card, rather than any change introduced by these patches. This second version includes a few changes requested by Tony Lindgren.
2013-01-02ARM: OMAP2/3: PRM: fix bogus OMAP2xxx powerstate return valuesPaul Walmsley1-3/+85
On OMAP2xxx chips, the register bitfields for the PM_PWSTCTRL_*.POWERSTATE and PM_PWSTST_*.LASTSTATEENTERED are different than those used on OMAP3/4. The order is reversed. So, for example, on OMAP2xxx, 0x0 indicates 'ON'; but on OMAP3/4, 0x0 indicates 'OFF'. Similarly, on OMAP2xxx, 0x3 indicates 'OFF', but on OMAP3/4, 0x3 indicates 'ON'. To fix this, we treat the OMAP3/4 values as the powerdomain API values, and create new low-level powerdomain functions for the OMAP2xxx chips which translate between the OMAP2xxx values and the OMAP3/4 values. Without this patch, the conversion of the OMAP2xxx PM code to the functional powerstate code results in a non-booting kernel. Signed-off-by: Paul Walmsley <paul@pwsan.com>
2012-12-17ARM: OMAP2+: Drop plat/cpu.h for omap2plusTony Lindgren1-2/+1
The cpu_is_omap macros are now local to arch/arm/mach-omap2 in soc.h and plat/cpu.h can finally be dropped for omap2+. Thanks everybody for help with fixing the drivers. Note that we can now also remove the unused plat/cpu.h from smartreflex.c and isp.c as they will cause compile errors with ARCH_MULTIPLATFORM enabled. Cc: Kevin Hilman <khilman@deeprootsystems.com> Acked-by: Jean Pihet <jean.pihet@newoldbits.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-11-21ARM: OMAP2+: PRM: initialize some PRM functions earlyPaul Walmsley1-2/+1
Some PRM functions will need to be called by the hwmod code early in kernel init. To handle this, split the PRM initialization code into early and late phases. The early init is handled via mach-omap2/io.c, while the late init is handled by subsys_initcall(). Signed-off-by: Paul Walmsley <paul@pwsan.com>
2012-11-08ARM: OMAP2+: PRCM: remove obsolete prcm.[ch]Paul Walmsley1-1/+0
arch/arm/mach-omap2/prcm.c and arch/arm/plat-omap/include/plat/prcm.h are now completely unused and can be removed. Signed-off-by: Paul Walmsley <paul@pwsan.com> Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
2012-11-08ARM: OMAP2/3: PRM: add SoC reset functions (using the CORE DPLL method)Paul Walmsley1-0/+14
Add SoC reset functions into the PRM code. These functions are based on code from mach-omap2/prcm.c. They reset the SoC using the CORE DPLL reset method (as opposed to one of the other two or three chip reset methods). Adding them here will facilitate their removal from arch/arm/mach-omap2/prcm.c. (prcm.c is deprecated.) Signed-off-by: Paul Walmsley <paul@pwsan.com> Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
2012-10-21ARM: OMAP2+: PRM: create PRM reset source API for the watchdog timer driverPaul Walmsley1-0/+68
The OMAP watchdog timer driver needs to determine what caused the SoC to reset for its GETBOOTSTATUS ioctl. So, define a set of standard reset sources across OMAP SoCs. For OMAP2xxx, 3xxx, and 4xxx SoCs, define mappings from the SoC-specific reset source register bits to the standardized reset source IDs. Create SoC-specific PRM functions that read the appropriate per-SoC register and use the mapping to return the standardized reset bits. Register the SoC-specific PRM functions with the common PRM code via prm_register(). Create a function in the common PRM code, prm_read_reset_sources(), that calls the SoC-specific function, registered during boot. This patch does not yet handle some SoCs, such as AM33xx. Those SoCs were not handled by the code this will replace. Signed-off-by: Paul Walmsley <paul@pwsan.com>
2012-10-21ARM: OMAP2/3: clockdomain/PRM/CM: move the low-level clockdomain functions ↵Paul Walmsley1-0/+17
into PRM/CM Move the low-level SoC-specific clockdomain control functions into cm*.c and prm*.c. For example, OMAP2xxx low-level clockdomain functions go into cm2xxx.c. Then remove the unnecessary clockdomain*xxx*.c files. The objective is to centralize low-level CM and PRM register accesses into the cm*.[ch] and 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-21ARM: OMAP2+: powerdomain/PRM: move the low-level powerdomain functions into PRMPaul Walmsley1-0/+41
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>