Attention is currently required from: Bora Guvendik, Anil Kumar K, Selma Bensaid, Tim Wawrzynczak, Paul Menzel, Thejaswani Putta, Patrick Rudolph.

Cliff Huang uploaded patch set #6 to this change.

View Change

soc/intel/common/block/pcie/rtd3: Add optional _OFF and _ON skip control

- Optional feature to provide mechanism to skip _OFF and _On execution.
- It is used for the device to skip _OFF and _ON during device driver
reload.
- OFSK is used to skip _OFF Method at the end of device driver removal.
- ONSK is used to skip _ON Method at the beginning of driver loading.
- General flow use case:
1. Device driver is removed by 'rmmod' command.
2. Device _RST is called. _RST perform reset.
3. Device increments OFSK in _RST to skip the following _OFF invoked by
OSPM.
4. OSPM invokes _OFF at the end of driver removal.
5. _OFF sees OFSK and skips current execution and decrements OFSK so that
_OFF will be executed normally next time.
6. _OFF increments ONSK to skip the following _ON invoked by OSPM.
7. Device driver is reloaded by 'insmod/modprobe' command.
8. OSPM invokes _ON at the beginning of driver loading.
9. _ON sees ONSK and skip current execution and decrements ONSK so that
_ON will be executed normally next time.

- In normal case:
When suspend, OSPM invokes _OFF. Since OFSK is zero, the device goes
to deeper state as expected.

When resume, OSPM invokes _ON. Sinc ONSK is zero, the device goes
to active state as expected.

- Generated changes:

PowerResource (RTD3, 0x00, 0x0000)
Name (ONSK, Zero)
Name (OFSK, Zero)
...

Method (_ON, 0, Serialized) // _ON_: Power On
{
If ((ONSK == Zero))
{
...
}
Else
{
ONSK--
}
}

Method (_OFF, 0, Serialized) // _OFF: Power Off
{
If ((OFSK == Zero))
{
...
}
Else
{
OFSK--
ONSK++
}
}

Test:
Enable and verify OFSK and ONSK Name objects and the if-condition logic
inside _OFF and _ON metheds is added.

Signed-off-by: Cliff Huang <cliff.huang@intel.com>
Change-Id: Ic32d151d65107bfc220258c383a575e40a496b6f
---
M src/soc/intel/common/block/pcie/rtd3/chip.h
M src/soc/intel/common/block/pcie/rtd3/rtd3.c
2 files changed, 62 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/53/61353/6

To view, visit change 61353. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ic32d151d65107bfc220258c383a575e40a496b6f
Gerrit-Change-Number: 61353
Gerrit-PatchSet: 6
Gerrit-Owner: Cliff Huang <cliff.huang@intel.com>
Gerrit-Reviewer: Anil Kumar K <anil.kumar.k@intel.com>
Gerrit-Reviewer: Bora Guvendik <bora.guvendik@intel.com>
Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org>
Gerrit-Reviewer: Selma Bensaid <selma.bensaid@intel.com>
Gerrit-Reviewer: Thejaswani Putta <thejaswani.putta@intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak@chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@mailbox.org>
Gerrit-Attention: Bora Guvendik <bora.guvendik@intel.com>
Gerrit-Attention: Anil Kumar K <anil.kumar.k@intel.com>
Gerrit-Attention: Selma Bensaid <selma.bensaid@intel.com>
Gerrit-Attention: Tim Wawrzynczak <twawrzynczak@chromium.org>
Gerrit-Attention: Paul Menzel <paulepanter@mailbox.org>
Gerrit-Attention: Thejaswani Putta <thejaswani.putta@intel.com>
Gerrit-Attention: Patrick Rudolph <siro@das-labor.org>
Gerrit-MessageType: newpatchset