Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
CLK:
  Method(GCLK, ...) // Get Clock Rate
  Method(SCLK, ...) // Set Clock Rate
 
DEV:

  _PRS:
    ClockInput(FREQ_1, 1, MHz, Variable, CLK,)
    ClockInput(FREQ_2, 1, MHz, Variable, CLK, )
    ClockInput(FREQ_3, 1, MHz, Variable, CLK, )
       
  _CRS:
    freq_num, freq_div = CLK.GCLK(...)
    ClockInput(freq_num, freq_div, ... , Variable, "//SB.CLK", )

  _SRS:
    ...
    local0 = decode(Arg0)
    CLK.SCLK(local0)

Challenges

...

ClockInput resource doesn't have resource names so we cannot index them for modification.

...

Linux Design

...

Option 1: Devices directly use the ACPI resources to get the list of possible clock rates and select.

Option 2: Add an ACPI-clk device to the clock framework that uses the clock resources to get and set rates.

ACPICA

Patch to add ClockInput resource support in ACPICA

https://github.com/nsait-linaro/acpica/commit/c9ca60aa5a5ccd9fe4e71124101744d8ed12a64e