当前位置:网站首页>Introduction to UFS CLK gate
Introduction to UFS CLK gate
2022-07-26 03:50:00 【Bottom line of fruit juice】
One . UFS Clk Gate summary
1. What is? UFS Clk Gate
UFS Clk Gate yes UFS Host Controller Driver A function of , refer to UFS System In my spare time , take UFS Clock close , And let UFS MPHY Link Get into Hibernate state , Reduce the overhead of system resources .
2. What is? UFS Clock
Host Memory(DDR Memory ) and UFS Host Controller Data communication is through AIX Bus transmission , among UFS Clock refer to AXI Clock on bus , at present Soc It's usually used 300MHz Of UFS Clock.

3. UFS Clk Gate Support for
at present Qcom The platform and MTK Platform support UFS Clk Gate function ,Hisilicon970 Platform does not support Clk Gate.
according to ARM And the energy-saving strategy of the kernel , I hope more and more platforms support Clk Gate function , This can also prove ARM And the low power consumption of the kernel .
Two . UFS Clk Gate Detail
1. UFS CLK Gate Init Initialization flow

(1). Set up related worker Used to close UFS CLK And on UFS CLK Function of .
(2). Set high accuracy Timer, Call at the right time ufs clk gate work and ufs clk ungate work The timing of .
gate_work: worker to turn off clocks
ungate_work: worker to turn on clocks that will be used in case of interrupt context
(3). Set the delay time in power saving mode and performance mode ,
(4). register CLK Gate relevant sysfs Interface
#define UFSHCD_CLK_GATING_DELAY_MS_PWR_SAVE 10 #define UFSHCD_CLK_GATING_DELAY_MS_PERF 50
2 . UFS CLK Gate Work technological process

Gate Work technological process :
(1). UFS When command processing is complete ,UFS Device Returns the Response UPIU to UFS Host, UFS Host Create an interrupt ,CPU Enter the interrupt processing function to process .
(2). What the interrupt handler mainly does : Will check Doorbell Whether to clear ,Response UPIU Are there any mistakes , Check Doorbell It's cleared ,Reponse UPIU There are no mistakes , Then release relevant resources , close UFS CLK.
(3). The present state is : Check Doorbell It's cleared ,Reponse UPIU There are no mistakes , You can call __ufshcd_release close UFS CLK.
(4). close CLK I'll check it before UFS Host Controllert Do you support CLK Gate, If not, exit directly , If you support it, keep going .
(5). Reduce clk gating active request Count . Note: Only when clk gating active request Count as 0 When , To shut down UFS CLK.
(6). Check Block CLK Gating Enter The location of : active_reqs/lrb_in_use/outstanding_tasks/active_uic_cmd/uic_async_done
active_reqs: number of requests that are pending and should be waited for completion before gating clocks
lrb_in_use: lrb in use
outstanding_tasks: Bits representing outstanding task requests
active_uic_cmd: handle of active UIC command
uic_async_done: uic cmd complete flag
(7). (re)start an hrtimer, start-up hrtimer, Then interval clk gating delay_ms after , call gating->gate_hrtimer.function = ufshcd_clkgate_hrtimer_handler;
(8). handler What we mainly do is drive queue clk_gating.gate_work, Get into ufs clk gate work Interface processing .
(9). take UFS adjoining course (Unipro/MPHY) Put it in Hibernate state , Then close it UFS CLK .
3.UFS CLK UnGate Work technological process

Gate Work technological process :
(1). When you need to access UFS When , Need assurance UFS Host Driver yes Resume The state of , adjoining course (UniPro/MPHY) yes Active The state of ,UFS Clock The state to be opened .
(2).ufshcd_hold The thing to do is Enable UFS Clock and exit from hibern8 mode and set the link as active.
(3) . Turn on CLK I'll check it before UFS Host Controllert Do you support CLK Gate, If not, exit directly , If you support it, keep going .
(4). increase clk gating active request Count . Note: Only when clk gating active request Count as 0 When , To shut down UFS CLK.
(5). Check clk_gating state: CLKS_ON/REQ_CLKS_OFF/CLKS_OFF/REQ_CLKS_ON CLKS_ON: If it is in this state , Would call UFS clk ungate work REQ_CLKS_OFF: If it is in this state , Will CLK Gate The status is set to REQ_CLKS_ON, And then call UFS clk ungate work CLKS_OFF: If it is in this state , Will try to cancel UFS CLK gate work REQ_CLKS_ON: If this state , Satisfy Link yes Hibernate Status and support Hibern8 during gating when , Would call UFS clk ungate work.
(6). UFS clk ungate work The thing to do is to open it first UFS CLK., And then UFS adjoining course (Unipro/MPHY) Hibernate State exit , Make the connection layer become Active state .
3、 ... and , Reference material
1. UFS Driver code
2. UFS agreement
边栏推荐
- Asemi rectifier bridge gbu1510 parameters, gbu1510 specifications, gbu1510 package
- Tactile intelligent sharing-rk3568 application in scenic spot navigation robot
- 【Unity3d Shader】角色投影与倒影
- MySQL index failure scenarios and Solutions
- Bing(必应)搜索,为什么用户越来越多?
- Chinese database oceanbase was selected into the Forrester translational data platform report
- [virtualization] view the log files of vCenter and esxi hosts
- IDEA2020.3.1不能打开(双击不能打开),但可以通过idea.bat打开。
- [MCU simulation project] external interrupt 0 controls 8 LED flashes
- 深度学习之DAT
猜你喜欢

Six years of automated testing from scratch, I don't regret turning development to testing

开源许可证的传染性问题浅析

基于Caffe ResNet-50网络实现图片分类(仅推理)的实验复现

Failed to install the hcmon driver

Visio:甘特图如何合并单元格?解决方案:覆盖单元格

加班一周开发了报表系统,这个低代码免费IT报表神器太好用了

Can't the container run? The Internet doesn't have to carry the blame

Bracket nesting problem (recommended Collection)
![[mathematical modeling - Summary of planning model] | matlab solution](/img/b0/a4d33d7d7b605b7cc6149b59b55fb8.png)
[mathematical modeling - Summary of planning model] | matlab solution

Save the image with gaussdb (for redis), and the recommended business can easily reduce the cost by 60%
随机推荐
WAF details
sersync/lsync实时同步
让百度收录,爬虫自己网站
Uncaught TypeError: $(...). Onmousenter is not a function JS error, solution:
Tf.constant usage
微信小程序实现音乐播放器(4)(使用pubsubjs实现页面间通信)
Leetcode: 102. Sequence traversal of binary tree
Failed to install the hcmon driver
Asemi rectifier bridge gbu1510 parameters, gbu1510 specifications, gbu1510 package
6年从零开始的自动化测试之路,开发转测试我不后悔...
【云原生之kubernetes】kubernetes集群下ConfigMap使用方法
booking.com缤客上海面经
Aike AI frontier promotion (7.18)
Multi merchant mall system function disassembly lecture 15 - platform side member label
day03_ 1_ Idea tutorial
容器跑不动?网络可不背锅
Three solutions: when clicking the user to exit the login, press the back button of the browser, and you can still see the previous login page.
[create interactive dice roller application]
zk-SNARK:关于私钥、环签名、ZKKSP
leetcode: 102. 二叉树的层序遍历