一是告诉底层的CLOCK Driver,需把可能引起睡眠的操作,放到Prepare()/Unprepare()中实现,一定不能放到Enable()/Disable()中; 二是提醒上层使用CLOCK的Driver,调用Prepare/Unprepare 接口时可能会睡眠,千万不能在Atomic上下文(例如内部包含Mutex 锁、中断关闭、Spinlock 锁保护的区域)调用,而调用Enable()/Disable()接口则...
CLK子系统的核心数据结构包括`struct clk_notifier`、`struct clk_core`、`struct clk_ops`等,这些结构共同描述了时钟节点、核心操作和回调函数。它们提供了时钟设备的描述和控制机制,如分频、倍频、多路复用和组合时钟。为了调试CLK子系统,开发者可以利用debugfs文件系统,通过命令查看系统中的时钟树结构。
这一类clock具有固定的频率,不能开关、不能调整频率、不能选择parent、不需要提供任何的clk_ops回调函数,是最简单的一类clock。可以直接通过DTS配置的方式支持,clock framework core能直接从DTS中解出clock信息,并自动注册到kernel,不需要任何driver支持。例如24MHz晶振和32.768K的晶振。 (2)fixed factor clock 这一类c...
struct clk_core *core; //clk是访问clk_core的实例。每当consumer通过clk_get对CCF中的clock device(也就是clk_core)发起访问的时候都需要获取一个句柄,也就是clk struct clk *clk; //clock provider driver初始化时的数据,数据被用来初始化clk_hw对应的clk_core数据结构。 const struct clk_init_data *init...
/* Disable HIRC if HIRC is disabled before setting core clock */ if(u32HIRCSTB == 0)CLK->...
struct clk_core { const char *name; const struct clk_ops *ops; struct clk_hw *hw; struct module *owner; struct clk_core *parent; const char **parent_names; struct clk_core **parents; u8 num_parents; u8 new_parent_index; ... ...
.enable= &clk_foo_enable; .disable= &clk_foo_disable; }; Implement the above functionsusingcontainer_of::#defineto_clk_foo(_hw) container_of(_hw, struct clk_foo, hw)intclk_foo_enable(structclk_hw *hw) {structclk_foo *foo;
Fixup rt_clk_array_prepare_enable and rt_clk_array_disable_unprepare. Support import SoC CLK config Depends on: #9576 BSP: qemu-virt64-aarch64 rockchip/rk3568 ] 当前拉取/合并请求的状态 Intent for your PR 必须选择一项 Choose one (Mandatory): 本拉取/合并请求是一个草稿版本 This PR is ...
() clk: hisilicon: Remove unnecessary local variable clk: use clk_core_unlink_consumer() helper clk: Use of_property_present() clk: at91: Use of_property_count_u32_elems() to get property length da8xx-cfgchip.c: replace of_node_put with __free improves cleanup * clk-bindings: dt...
#defineGPUCORE_CLKgpucore #defineGPUMEM_CLKgpumem #defineGPUHYD_CLKgpuhyd #defineDMA_CLKdma #defineGMAC_CLKgmac #defineHSTMR_CLKhstmr #defineMSBBOX_CLKmsbbox #defineSPINLOCK_CLKspinlock #defineLVDS_CLKlvds #definePIO_CLKpio #defineTWI0_CLKtwi0 #defineTWI1_CLKtwi1 #defineTWI2_CLKtwi2 #...