Commit graph

24 commits

Author SHA1 Message Date
Mirela Simonovic
cda9f6d0a2 PMUFW: PM: callbacks: Added remembering and sending acknowledge for req suspend
-Added structure PmSuspendRequest for tracking suspend request
 related informations: which master is allowed to request whose
 suspend, has the request been made, etc.
-Added functions in pm_master for handling requests
-Added calls in pm_proc for triggering acknowledge once primary
 processor goes to sleep
-Added sending acknowledge if target master aborts suspend
-Timeouts to be implemented

Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Jyotheeswar Reddy Mutthareddyvari <jyothee@xilinx.com>
2015-07-31 16:55:22 +05:30
Mirela Simonovic
416151da7e PMUFW: PM: slave: Changed code related to updating state to fix USB bug
-Changed code in PmUpdateSlave to first determine the state to be
 entered
-Added function for finding the state with required capabilities
-Removed function which was finding and changing state of a slave
 (not used anymore)
-Major reason for changing this code is the bug: in USB case,
 when USB is already in right state and upon the set requirement
 request which should be resolved to the same state (nothing to
 configure, state is already configured as requested) PM
 acknowledged an error, although there was no error

Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
2015-07-31 16:55:20 +05:30
Davorin Mista
a25049cb0d PMUFW: PM: Adjusting PM function return values to use XStatus type
-Using int type for returns
-Error statuses are common Xilinx XST_* codes
-Additional power management status errors are defined in pm_defs.h

Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Signed-off-by: Davorin Mista <davorin.mista@aggios.com>
Acked-by: Jyotheeswar Reddy Mutthareddyvari <jyothee@xilinx.com>
Signed-off-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
2015-07-31 16:55:19 +05:30
Mirela Simonovic
8703e57a32 PMUFW: PM: pm_proc: added RPU0..1 processor's sleep (reset assert)
Added reset assert for RPU0..1 processor's sleep functions.
Reset assert is done by directly writing into crl_apb registers,
becase pmu-rom does not expose function for only asserting reset.
Reset assert is a must in order to stop processor from executing
instructions once it's sleep handler gets executed.

Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
2015-07-31 16:55:17 +05:30
Mirela Simonovic
13e22f9eb0 PMUFW: PM: pm_master: Added default requirements, set upon entering active state
-Added default requirements field in PmRequirements structure
-Added notification of master when primary processor switches from
 forced powerdown to active state. Master has to make sure that all
 default requirements gets set before primary processor enters active
 state.
-In PmMasterNotify, changed behavior when wake event is received:
 if primary processor is in sleep state, everything works as before,
 if primary processor is in forced powerdown, default requirements
 are requested and configured
-In PmRequirementReleaseAll added a check is master using slave and
 if yes, usage flag and requirements are cleared
-Added PmRequirementRequestDefault function called before primary
 processor switches from forced powerdown to active. Function
 automatically requests all default requirements which are later
 configured by PmRequirementUpdateScheduled
-In PmRequirementUpdateScheduled when swapping requirements added
 a check whether master has default requirements. If yes, default
 reqs are saved as next reqs instead of current. Default requirements
 have priority over current requirement. Example: RPU0 keeps boot code
 in one TCM bank and when booted, during the runtime, it keeps that
 bank in retention. For this bank RPU0 should have default requirements
 = on state, and when it boots up it can request retention. If default
 requirements wouldn't exist, it would have to request for boot bank to
 switch from retention to on before calling self suspend, just to get
 on state in scheduled reqs

Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Jyotheeswar Reddy Mutthareddyvari <jyothee@xilinx.com>
2015-07-31 16:55:16 +05:30
Mirela Simonovic
2ff64bf7a9 PMUFW: PM: pm_slave: added debug prints when slave state changes
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Jyotheeswar Reddy Mutthareddyvari <jyothee@xilinx.com>
2015-07-31 16:55:15 +05:30
Mirela Simonovic
85705895d7 PMUFW: PM: pm_slave: PmUpdateSlave rewritten to always try to update slave state.
Before, there was a check at the very beginning to see if current state
is having exact required capabilities. However, state should be checked
for having all required capabilities and not for having exact required
caps. Also, even when state have all required capabilities, there could
be state with lower power that still has all required capabilities.
Code is changed to implement above claims.

Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Jyotheeswar Reddy Mutthareddyvari <jyothee@xilinx.com>
2015-07-31 16:55:14 +05:30
Davorin Mista
e3bb1821b7 PMUFW: PM: Removed action arrays, added one enterState for slave FSM
-Removed action arrays and instId pointers used in PmSlaveFsm
-Removed unused macros and typedefs
-Removed redundant functions for Sram retention entry/exit
-Added enterState function in PmSlaveFsm. Slave state is entered
 based on arguments (slave pointer and next state).
-Added xpbr function pointers in PmSlave derived objects (usb and sram)

Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Reviewed-by: Jyotheeswar Reddy <jyothee@xilinx.com>
2015-07-31 16:55:13 +05:30
Soren Brinkmann
b24bb9228d PMUFW: PM: Remove _g suffix from static variables
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Jyotheeswar Reddy Mutthareddyvari <jyothee@xilinx.com>
2015-07-31 16:55:11 +05:30
Davorin Mista
34df243f1d PMUFW: PM: EnableProxyWake: Check first whether proc is sleeping
We should only enable the scheduled wake-up sources in the GIC Proxy
if the processor is sleeping.

Signed-off-by: Davorin Mista <davorin.mista@aggios.com>
Reviewed-by: Jyotheeswar Reddy <jyothee@xilinx.com>
2015-07-31 16:55:10 +05:30
Davorin Mista
0e9de73072 PMUFW: PM: Cleanup
improve comments and messages; remove unused code/structures

Signed-off-by: Davorin Mista <davorin.mista@aggios.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Jyotheeswar Reddy Mutthareddyvari <jyothee@xilinx.com>
2015-07-31 16:55:08 +05:30
Davorin Mista
b8db439393 PMUFW: PM: Minor MISRA compliance fixes
Signed-off-by: Davorin Mista <davorin.mista@aggios.com>
Reviewed-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Jyotheeswar Reddy Mutthareddyvari <jyothee@xilinx.com>
2015-07-31 16:55:06 +05:30
Davorin Mista
b380c07463 PMUFW: PM: Prefix PmDbg prints with function name
Signed-off-by: Davorin Mista <davorin.mista@aggios.com>
Signed-off-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Jyotheeswar Reddy Mutthareddyvari <jyothee@xilinx.com>
2015-07-31 16:55:05 +05:30
Soren Brinkmann
20c80ed9ad PMUFW: scheduler: Fix print format string
A print format string had a typo in the conversion specifier.

Fixes: ae1b22f628eeae491136205dd99cac745bad5b54 "Scheduler: Add Scheduler files"
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Reviewed-by: Jyotheeswar Reddy <jyothee@xilinx.com>
2015-07-31 16:55:03 +05:30
Soren Brinkmann
6941dfdcdc PMUFW: ROM interface: Add ROM hook table
Reserve the area in RAM that the ROM expects the extension hook table to
be in. Also provide a definition for the table in a header so FW can insert
entries easily, if needed.

Cc: Kristopher Bechamp <kristop@xilinx.com>
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Reviewed-by: Jyotheeswar Reddy <jyothee@xilinx.com>
2015-07-31 16:55:03 +05:30
Soren Brinkmann
c4df8f0dd2 PMUFW: lscript: Add section for ROM extension table
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
2015-06-17 14:24:09 +05:30
Soren Brinkmann
d185a3a6d1 PMUFW: lscript: Sync memory definition with PMUFW repo
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
2015-06-17 14:24:08 +05:30
Soren Brinkmann
368c173e5d PMUFW: lscript: Remove redundant blank lines
Sync with PMUFW sources.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
2015-06-17 14:24:08 +05:30
Nava kishore Manne
1726f14574 lib:sw_apps:standalone drivers license changes
Signed-off-by: Nava kishore Manne <navam@xilinx.com>
2015-05-16 14:37:24 +05:30
Jyotheeswar Reddy
4350a1fa00 sw_apps:zynqmp_pmufw: Clear IPI0 status register during core init
swbeta2 commit 1b173007d1cc009bffeb2969a5a5bacc533647db

IPI0 is used by PMUFW for PM requests and the mask is used for determining
 the Master. There are chances of IPIs being triggered before FW Init but
un-handled or even bits that are not cleared by ROM, causing a corruption
of the ISR mask. So PMUFW should cleanup these bits during startup

Signed-off-by: Jyotheeswar Reddy <jyothee@xilinx.com>
2015-04-24 11:57:10 +05:30
Soren Brinkmann
12c2e29937 PMUFW: Release RPU island reset on power up
swbeta2 commit 572db0eb0f48b4f7f5684abea721c6fac92ccdee

When powering up the RPU island the individual RPU core resets as well
as the reset for the whole island are asserted. To ensure proper resume,
the island reset needs to be released when the island is powered up.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
2015-04-24 11:57:09 +05:30
Jyotheeswar Reddy
6fcdc41593 sw_apps:zynqmp_pmufw: Syncup PMUFW App with PMUFW Git Repo
swbeta2 commit ae6d9a98edb99ce4c51c85bce4872a9f11c7eb74

PMU Firmware is being updated to the latest code base available
in the pmufw git repo. Major changes are:
	-Error Management is enabled by default
	-PM Module bug fixes
	-Code formatting changes
	-PMU ROM handlers use ROM Table instead of
	 individual handler addresses
	-Bug fixes in scheduler
	-FW_IS_PRESENT bit is set if PM is enabled

Signed-off-by: Jyotheeswar Reddy <jyothee@xilinx.com>
2015-04-24 11:57:09 +05:30
Jyotheeswar Reddy
66409812e8 sw_apps:zynqmp_pmufw: Adding initial set of files with PM
This is the first functional set of files with
-Power Management
-Error Handlers
-Basic Timer based Scheduler

Signed-off-by: Jyotheeswar Reddy <jyothee@xilinx.com>
2015-03-13 10:45:54 +05:30
Jyotheeswar Reddy
39f60018d1 sw_apps:pmufw: Adding initial set of files for PMU Firmware App
This initial version has the basic set of files required to
build a basic firmware for PMU Microblaze in ZynqMP

Signed-off-by: Jyotheeswar Reddy <jyothee@xilinx.com>
2015-02-18 17:32:33 +05:30