path: root/arch/arm/mach-omap2/prm3xxx.c
AgeCommit message (Collapse)AuthorFilesLines
2014-09-16ARM: OMAP3: Fix I/O chain clock line assertion timed out errorTony Lindgren1-4/+35
We are getting "PRM: I/O chain clock line assertion timed out" errors on early omaps for device tree based booting. This is because we are unconditionally calling reconfigure_io_chain while legacy booting has omap3_has_io_chain_ctrl() checks in place in omap_hwmod.c. For device tree based booting, we are calling reconfigure_io_chain unconditionally from pinctrl framework. So we need to add a check for omap3_has_io_chain_ctrl() to avoid the errors for trying to access a register that does not exist. For es3.0, the documentation in "4.11.2 Device Off-Mode Configuration" just mentions PM_WKEN_WKUP[8] bit. For es3.1, there's a new chapter in documentation for " I/O Wake-Up Mechanism" that describes the PM_WKEN_WKUP[16] ST_IO_CHAIN bit. So PM_WKEN_WKUP[16] bit did not get added until in es3.1 probaly to fix issues with flakey wake-up events. We are doing proper checks for ST_IO_CHAIN already in id.c and with omap3_has_io_chain_ctrl(). For more information, see also commit b02b917211d5 ("ARM: OMAP3: PM: fix I/O wakeup and I/O chain clock control detection"). Let's fix the issue by selecting the right function during init for reconfigure_io_chain depending on the omap revision. For es3.0 and earlier we need to just toggle EN_IO. By doing this, we can move the check for omap3_has_io_chain_ctrl() from omap_hwmod.c to the init code in prm_3xxx.c. And then we can unconditionally call reconfigure_io_chain. Thanks to Paul Walmsley and Nishanth Menon for help with debugging the issue. Fixes: 30a69ef785e8 ("ARM: OMAP: Move DT wake-up event handling over to use pinctrl-single-omap") Cc: Kevin Hilman <> Cc: Paul Walmsley <> Cc: Tero Kristo <> Reviewed-by: Nishanth Menon <> Signed-off-by: Tony Lindgren <>
2014-07-04ARM: OMAP3: control: isolate control module init to its own functionTero Kristo1-6/+0
Control module related PM initializations are now moved within control module driver. Done in preparation to isolate the code to its own driver. Signed-off-by: Tero Kristo <>
2014-07-04ARM: OMAP3: PRM: move modem reset and iva2 idle to PRM driverTero Kristo1-0/+7
Done in preparation to move PRM into its own driver. Signed-off-by: Tero Kristo <>
2014-07-04ARM: OMAP3: PRM: move PRM init code from PM core to the driverTero Kristo1-0/+90
Helps to isolate the PRM driver. Signed-off-by: Tero Kristo <>
2014-07-04ARM: OMAP3: PRM: add API for saving PRM scratchpad contentsTero Kristo1-0/+9
This isolates the PRM register access within the PRM driver. Signed-off-by: Tero Kristo <>
2014-07-04ARM: OMAP3: PRM: add API for checking and clearing cold reset statusTero Kristo1-0/+20
This isolates the PRM register access within the PRM driver. Signed-off-by: Tero Kristo <>
2014-07-04ARM: OMAP3: PRM: move modem reset to PRM driverTero Kristo1-0/+15
This is a more proper isolation of the code. Done in preparation of making PRM an individual driver. Signed-off-by: Tero Kristo <>
2014-07-04ARM: OMAP3: PRM: move iva reset to PRM driverTero Kristo1-0/+45
This is a more proper isolation of the code. Done in preparation of making PRM an individual driver. Signed-off-by: Tero Kristo <>
2014-07-04ARM: OMAP3: PRM: move prcm wakeup helper to prm driverTero Kristo1-0/+53
Done in preparation to make the prm an individual driver. Signed-off-by: Tero Kristo <>
2014-05-16Merge tag 'for-v3.16/prcm-cleanup-a' of ↵Tony Lindgren1-12/+10
git:// into omap-for-v3.16/prcm 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: Conflicts: arch/arm/mach-omap2/cm3xxx.c arch/arm/mach-omap2/cm44xx.c Also fixed up new section mismatch warnings.
2014-05-15ARM: OMAP3/4: PRM: add support of late_init call to prm_ll_opsTero Kristo1-4/+3
SoC specific late_init call is now registered during PRM init, and will be called automatically by PRM core. This helps to get rid of some redundant initcalls and cpu_is_X checks from the PRM code. Signed-off-by: Tero Kristo <> Signed-off-by: Paul Walmsley <>
2014-05-15ARM: OMAP3/OMAP4: PRM: add prm_features flags and add IO wakeup under itTero Kristo1-1/+7
prm_features flag will contain SoC specific feature enabler flags. Initially IO wakeup is added under this. Helps to get rid of runtime cpu_is_X checks. Signed-off-by: Tero Kristo <> Signed-off-by: Paul Walmsley <>
2014-05-15ARM: OMAP3/4: PRM: provide io chain reconfig function through irq setupTero Kristo1-0/+1
This helps to make the PRM registration modular, and also gets rid of a cpu type check done later. Signed-off-by: Tero Kristo <> Signed-off-by: Paul Walmsley <>
2014-05-15ARM: OMAP2+: PRM: remove unnecessary cpu_is_XXX calls from prm_init / exitTero Kristo1-9/+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 <> [ updated to apply] Signed-off-by: Paul Walmsley <>
2013-01-11ARM: OMAP2+: Use omap initcallsTony Lindgren1-1/+1
This way the initcalls don't run on other SoCs on multiplatform kernels. Otherwise we'll get something like this when booting on vexpress: omap_hwmod: _ensure_mpu_hwmod_is_setup: MPU initiator hwmod mpu not yet registered ... WARNING: at arch/arm/mach-omap2/pm.c:82 _init_omap_device+0x74/0x94() _init_omap_device: could not find omap_hwmod for mpu ... omap-dma-engine omap-dma-engine: OMAP DMA engine driver ... Tested-by: Ezequiel Garcia <> Signed-off-by: Tony Lindgren <>
2013-01-03Merge tag 'omap-fixes-a2-for-v3.8-rc' of ↵Tony Lindgren1-3/+25
git:// 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: 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/+25
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 <>
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 <> Acked-by: Jean Pihet <> Acked-by: Laurent Pinchart <> Acked-by: Mauro Carvalho Chehab <> Signed-off-by: Tony Lindgren <>
2012-11-21ARM: OMAP2+: PRM: initialize some PRM functions earlyPaul Walmsley1-7/+10
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 <>
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 <> Tested-by: Vaibhav Hiremath <>
2012-11-08ARM: OMAP2/3: PRM: add SoC reset functions (using the CORE DPLL method)Paul Walmsley1-0/+15
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 <> Tested-by: Vaibhav Hiremath <>
2012-10-21ARM: OMAP2+: PRM: create PRM reset source API for the watchdog timer driverPaul Walmsley1-0/+65
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 <>
2012-10-21ARM: OMAP2+: powerdomain/PRM: move the low-level powerdomain functions into PRMPaul Walmsley1-1/+106
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 <> Cc: Rajendra Nayak <> Cc: Vaibhav Hiremath <> Acked-by: Rajendra Nayak <> Reviewed-by: Russ Dill <> Acked-by: Santosh Shilimkar <>
2012-10-21ARM: OMAP2+: PRM: split PRM functions into OMAP2, OMAP3-specific filesPaul Walmsley1-0/+233
Move OMAP3xxx-specific PRM functions & macros into prm3xxx.[ch] and OMAP2xxx-specific macros into prm2xxx.h. (prm2xxx.c will be created by a subsequent patch when it's needed.) Move basic PRM register access functions into static inline functions in prm2xxx_3xxx.h, leaving only OMAP2/3 hardreset functions in prm2xxx_3xxx.c. Also clarify the initcall function naming to reinforce that this code is specifically for the PRM IP block. This is in preparation for the upcoming powerdomain series and the upcoming move of this code to drivers/. Signed-off-by: Paul Walmsley <> Reviewed-by: Russ Dill <> Acked-by: Santosh Shilimkar <>