bsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget)/translations/zh_CN/arch/arm/omap/omap_pmmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/zh_TW/arch/arm/omap/omap_pmmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/it_IT/arch/arm/omap/omap_pmmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/ja_JP/arch/arm/omap/omap_pmmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/ko_KR/arch/arm/omap/omap_pmmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/sp_SP/arch/arm/omap/omap_pmmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hThe OMAP PM interfaceh]hThe OMAP PM interface}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhC/var/lib/git/docbuild/linux/Documentation/arch/arm/omap/omap_pm.rsthKubh paragraph)}(hXThis document describes the temporary OMAP PM interface. Driver authors use these functions to communicate minimum latency or throughput constraints to the kernel power management code. Over time, the intention is to merge features from the OMAP PM interface into the Linux PM QoS code.h]hXThis document describes the temporary OMAP PM interface. Driver authors use these functions to communicate minimum latency or throughput constraints to the kernel power management code. Over time, the intention is to merge features from the OMAP PM interface into the Linux PM QoS code.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h,Drivers need to express PM parameters which:h]h,Drivers need to express PM parameters which:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh bullet_list)}(hhh](h list_item)}(hHsupport the range of power management parameters present in the TI SRF; h]h)}(hGsupport the range of power management parameters present in the TI SRF;h]hGsupport the range of power management parameters present in the TI SRF;}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hseparate the drivers from the underlying PM parameter implementation, whether it is the TI SRF or Linux PM QoS or Linux latency framework or something else; h]h)}(hseparate the drivers from the underlying PM parameter implementation, whether it is the TI SRF or Linux PM QoS or Linux latency framework or something else;h]hseparate the drivers from the underlying PM parameter implementation, whether it is the TI SRF or Linux PM QoS or Linux latency framework or something else;}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hspecify PM parameters in terms of fundamental units, such as latency and throughput, rather than units which are specific to OMAP or to particular OMAP variants; h]h)}(hspecify PM parameters in terms of fundamental units, such as latency and throughput, rather than units which are specific to OMAP or to particular OMAP variants;h]hspecify PM parameters in terms of fundamental units, such as latency and throughput, rather than units which are specific to OMAP or to particular OMAP variants;}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hallow drivers which are shared with other architectures (e.g., DaVinci) to add these constraints in a way which won't affect non-OMAP systems, h]h)}(hallow drivers which are shared with other architectures (e.g., DaVinci) to add these constraints in a way which won't affect non-OMAP systems,h]hallow drivers which are shared with other architectures (e.g., DaVinci) to add these constraints in a way which won’t affect non-OMAP systems,}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj$ubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hPcan be implemented immediately with minimal disruption of other architectures. h]h)}(hNcan be implemented immediately with minimal disruption of other architectures.h]hNcan be implemented immediately with minimal disruption of other architectures.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj<ubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubeh}(h]h ]h"]h$]h&]bullet-uh1hhhhK hhhhubh)}(hvThis document proposes the OMAP PM interface, including the following five power management functions for driver code:h]hvThis document proposes the OMAP PM interface, including the following five power management functions for driver code:}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhenumerated_list)}(hhh](h)}(hlSet the maximum MPU wakeup latency:: (*pdata->set_max_mpu_wakeup_lat)(struct device *dev, unsigned long t) h](h)}(h$Set the maximum MPU wakeup latency::h]h#Set the maximum MPU wakeup latency:}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hjoubh literal_block)}(hE(*pdata->set_max_mpu_wakeup_lat)(struct device *dev, unsigned long t)h]hE(*pdata->set_max_mpu_wakeup_lat)(struct device *dev, unsigned long t)}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jhhhK$hjoubeh}(h]h ]h"]h$]h&]uh1hhjlhhhhhNubh)}(hoSet the maximum device wakeup latency:: (*pdata->set_max_dev_wakeup_lat)(struct device *dev, unsigned long t) h](h)}(h'Set the maximum device wakeup latency::h]h&Set the maximum device wakeup latency:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hjubj)}(hE(*pdata->set_max_dev_wakeup_lat)(struct device *dev, unsigned long t)h]hE(*pdata->set_max_dev_wakeup_lat)(struct device *dev, unsigned long t)}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhK(hjubeh}(h]h ]h"]h$]h&]uh1hhjlhhhhhNubh)}(hySet the maximum system DMA transfer start latency (CORE pwrdm):: (*pdata->set_max_sdma_lat)(struct device *dev, long t) h](h)}(h@Set the maximum system DMA transfer start latency (CORE pwrdm)::h]h?Set the maximum system DMA transfer start latency (CORE pwrdm):}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjubj)}(h6(*pdata->set_max_sdma_lat)(struct device *dev, long t)h]h6(*pdata->set_max_sdma_lat)(struct device *dev, long t)}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhK,hjubeh}(h]h ]h"]h$]h&]uh1hhjlhhhhhNubh)}(hSet the minimum bus throughput needed by a device:: (*pdata->set_min_bus_tput)(struct device *dev, u8 agent_id, unsigned long r) h](h)}(h3Set the minimum bus throughput needed by a device::h]h2Set the minimum bus throughput needed by a device:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hjubj)}(hL(*pdata->set_min_bus_tput)(struct device *dev, u8 agent_id, unsigned long r)h]hL(*pdata->set_min_bus_tput)(struct device *dev, u8 agent_id, unsigned long r)}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhK0hjubeh}(h]h ]h"]h$]h&]uh1hhjlhhhhhNubh)}(htReturn the number of times the device has lost context:: (*pdata->get_dev_context_loss_count)(struct device *dev) h](h)}(h8Return the number of times the device has lost context::h]h7Return the number of times the device has lost context:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK2hj ubj)}(h8(*pdata->get_dev_context_loss_count)(struct device *dev)h]h8(*pdata->get_dev_context_loss_count)(struct device *dev)}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhK4hj ubeh}(h]h ]h"]h$]h&]uh1hhjlhhhhhNubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1jjhhhhhhhK"ubh)}(htFurther documentation for all OMAP PM interface functions can be found in arch/arm/plat-omap/include/mach/omap-pm.h.h]htFurther documentation for all OMAP PM interface functions can be found in arch/arm/plat-omap/include/mach/omap-pm.h.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hhhhubh)}(hhh](h)}(h-The OMAP PM layer is intended to be temporaryh]h-The OMAP PM layer is intended to be temporary}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhhhhhKhjJhhubeh}(h]-the-omap-pm-layer-is-intended-to-be-temporaryah ]h"]-the omap pm layer is intended to be temporaryah$]h&]uh1hhhhhhhhKset_max_dev_wakeup_lat) (*pdata->set_max_dev_wakeup_lat)(dev, t); h](h)}(hset_max_dev_wakeup_lat will point to omap_pm_set_max_dev_wakeup_lat(), etc. Other architectures which do not support these functions should leave these function pointers set to NULL. Drivers should use the following idiom::h]hset_max_dev_wakeup_lat will point to omap_pm_set_max_dev_wakeup_lat(), etc. Other architectures which do not support these functions should leave these function pointers set to NULL. Drivers should use the following idiom:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKLhjubj)}(hPif (pdata->set_max_dev_wakeup_lat) (*pdata->set_max_dev_wakeup_lat)(dev, t);h]hPif (pdata->set_max_dev_wakeup_lat) (*pdata->set_max_dev_wakeup_lat)(dev, t);}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKQhjubeh}(h]h ]h"]h$]h&]uh1hhjhhhhhNubah}(h]h ]h"]h$]h&]jZj[uh1hhhhKLhjqhhubh)}(hXThe most common usage of these functions will probably be to specify the maximum time from when an interrupt occurs, to when the device becomes accessible. To accomplish this, driver writers should use the set_max_mpu_wakeup_lat() function to constrain the MPU wakeup latency, and the set_max_dev_wakeup_lat() function to constrain the device wakeup latency (from clk_enable() to accessibility). For example::h]hXThe most common usage of these functions will probably be to specify the maximum time from when an interrupt occurs, to when the device becomes accessible. To accomplish this, driver writers should use the set_max_mpu_wakeup_lat() function to constrain the MPU wakeup latency, and the set_max_dev_wakeup_lat() function to constrain the device wakeup latency (from clk_enable() to accessibility). For example:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThjqhhubj)}(hX(/* Limit MPU wakeup latency */ if (pdata->set_max_mpu_wakeup_lat) (*pdata->set_max_mpu_wakeup_lat)(dev, tc); /* Limit device powerdomain wakeup latency */ if (pdata->set_max_dev_wakeup_lat) (*pdata->set_max_dev_wakeup_lat)(dev, td); /* total wakeup latency in this example: (tc + td) */h]hX(/* Limit MPU wakeup latency */ if (pdata->set_max_mpu_wakeup_lat) (*pdata->set_max_mpu_wakeup_lat)(dev, tc); /* Limit device powerdomain wakeup latency */ if (pdata->set_max_dev_wakeup_lat) (*pdata->set_max_dev_wakeup_lat)(dev, td); /* total wakeup latency in this example: (tc + td) */}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhK\hjqhhubh)}(hThe PM parameters can be overwritten by calling the function again with the new value. The settings can be removed by calling the function with a t argument of -1 (except in the case of set_max_bus_tput(), which should be called with an r argument of 0).h]hThe PM parameters can be overwritten by calling the function again with the new value. The settings can be removed by calling the function with a t argument of -1 (except in the case of set_max_bus_tput(), which should be called with an r argument of 0).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKfhjqhhubh)}(hX The fifth function above, omap_pm_get_dev_context_loss_count(), is intended as an optimization to allow drivers to determine whether the device has lost its internal context. If context has been lost, the driver must restore its internal context before proceeding.h]hX The fifth function above, omap_pm_get_dev_context_loss_count(), is intended as an optimization to allow drivers to determine whether the device has lost its internal context. If context has been lost, the driver must restore its internal context before proceeding.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKkhjqhhubeh}(h]%driver-usage-of-the-omap-pm-functionsah ]h"]%driver usage of the omap pm functionsah$]h&]uh1hhhhhhhhKEubh)}(hhh](h)}(h%Other specialized interface functionsh]h%Other specialized interface functions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKrubh)}(hXThe five functions listed above are intended to be usable by any device driver. DSPBridge and CPUFreq have a few special requirements. DSPBridge expresses target DSP performance levels in terms of OPP IDs. CPUFreq expresses target MPU performance levels in terms of MPU frequency. The OMAP PM interface contains functions for these specialized cases to convert that input information (OPPs/MPU frequency) into the form that the underlying power management implementation needs:h]hXThe five functions listed above are intended to be usable by any device driver. DSPBridge and CPUFreq have a few special requirements. DSPBridge expresses target DSP performance levels in terms of OPP IDs. CPUFreq expresses target MPU performance levels in terms of MPU frequency. The OMAP PM interface contains functions for these specialized cases to convert that input information (OPPs/MPU frequency) into the form that the underlying power management implementation needs:}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKthjhhubjk)}(hhh](h)}(h$`(*pdata->dsp_get_opp_table)(void)` h]h)}(h#`(*pdata->dsp_get_opp_table)(void)`h]j)}(hj;h]h!(*pdata->dsp_get_opp_table)(void)}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1hhhhK}hj5ubah}(h]h ]h"]h$]h&]uh1hhj2hhhhhNubh)}(h'`(*pdata->dsp_set_min_opp)(u8 opp_id)` h]h)}(h&`(*pdata->dsp_set_min_opp)(u8 opp_id)`h]j)}(hj\h]h$(*pdata->dsp_set_min_opp)(u8 opp_id)}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1hhhhKhjVubah}(h]h ]h"]h$]h&]uh1hhj2hhhhhNubh)}(h`(*pdata->dsp_get_opp)(void)` h]h)}(h`(*pdata->dsp_get_opp)(void)`h]j)}(hj}h]h(*pdata->dsp_get_opp)(void)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubah}(h]h ]h"]h$]h&]uh1hhhhKhjwubah}(h]h ]h"]h$]h&]uh1hhj2hhhhhNubh)}(h%`(*pdata->cpu_get_freq_table)(void)` h]h)}(h$`(*pdata->cpu_get_freq_table)(void)`h]j)}(hjh]h"(*pdata->cpu_get_freq_table)(void)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhj2hhhhhNubh)}(h*`(*pdata->cpu_set_freq)(unsigned long f)` h]h)}(h)`(*pdata->cpu_set_freq)(unsigned long f)`h]j)}(hjh]h'(*pdata->cpu_set_freq)(unsigned long f)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhj2hhhhhNubh)}(h`(*pdata->cpu_get_freq)(void)` h]h)}(h`(*pdata->cpu_get_freq)(void)`h]j)}(hjh]h(*pdata->cpu_get_freq)(void)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhj2hhhhhNubeh}(h]h ]h"]h$]h&]j7j8j9hj:j;startKuh1jjhjhhhhhK}ubh)}(hhh](h)}(hCustomizing OPP for platformh]hCustomizing OPP for platform}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hDefining CONFIG_PM should enable OPP layer for the silicon and the registration of OPP table should take place automatically. However, in special cases, the default OPP table may need to be tweaked, for e.g.:h]hDefining CONFIG_PM should enable OPP layer for the silicon and the registration of OPP table should take place automatically. However, in special cases, the default OPP table may need to be tweaked, for e.g.:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh block_quote)}(hX* enable default OPPs which are disabled by default, but which could be enabled on a platform * Disable an unsupported OPP on the platform * Define and add a custom opp table entry in these cases, the board file needs to do additional steps as follows: h]h)}(hhh](h)}(h[enable default OPPs which are disabled by default, but which could be enabled on a platformh]h)}(h[enable default OPPs which are disabled by default, but which could be enabled on a platformh]h[enable default OPPs which are disabled by default, but which could be enabled on a platform}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj*ubah}(h]h ]h"]h$]h&]uh1hhj'ubh)}(h*Disable an unsupported OPP on the platformh]h)}(hjDh]h*Disable an unsupported OPP on the platform}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjBubah}(h]h ]h"]h$]h&]uh1hhj'ubh)}(hpDefine and add a custom opp table entry in these cases, the board file needs to do additional steps as follows: h]h)}(hoDefine and add a custom opp table entry in these cases, the board file needs to do additional steps as follows:h]hoDefine and add a custom opp table entry in these cases, the board file needs to do additional steps as follows:}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjYubah}(h]h ]h"]h$]h&]uh1hhj'ubeh}(h]h ]h"]h$]h&]jZ*uh1hhhhKhj#ubah}(h]h ]h"]h$]h&]uh1j!hhhKhjhhubh)}(h!arch/arm/mach-omapx/board-xyz.c::h]h arch/arm/mach-omapx/board-xyz.c:}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(h#include "pm.h" .... static void __init omap_xyz_init_irq(void) { .... /* Initialize the default table */ omapx_opp_init(); /* Do customization to the defaults */ .... }h]h#include "pm.h" .... static void __init omap_xyz_init_irq(void) { .... /* Initialize the default table */ omapx_opp_init(); /* Do customization to the defaults */ .... }}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubhdefinition_list)}(hhh]hdefinition_list_item)}(hTNOTE: omapx_opp_init will be omap3_opp_init or as required based on the omap family.h](hterm)}(hNOTE:h]hNOTE:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubh definition)}(hhh]h)}(hNomapx_opp_init will be omap3_opp_init or as required based on the omap family.h]hNomapx_opp_init will be omap3_opp_init or as required based on the omap family.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]customizing-opp-for-platformah ]h"]customizing opp for platformah$]h&]uh1hhjhhhhhKubeh}(h]%other-specialized-interface-functionsah ]h"]%other specialized interface functionsah$]h&]uh1hhhhhhhhKrubeh}(h]the-omap-pm-interfaceah ]h"]the omap pm interfaceah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjnjkjj jjjju nametypes}(jjnjjjuh}(jhjkjJj jqjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]hsystem_message)}(hhh]h)}(h:Enumerated list start value not ordinal-1: "6" (ordinal 6)h]h>Enumerated list start value not ordinal-1: “6” (ordinal 6)}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjyubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1jwhjhhhhhK}ubatransform_messages] transformerN include_log] decorationNhhub.