I was trying to configure the clock for a new device included to the Kernel. I have an older version of the Kernel, in which the device already included.
So I tried to make similar changes to the Kernel for the clock. But in the older version of the Kernel there was a C file for configuring the clock for almost all Devices, but I couldn't find any similar file in the newer Kernel.
After my investigation I found that, in newer versions of the Kernel the parameters for configuring the clocks are passed to the Kernel through the Device Tree. So I tried to change the DT to include the clock for new device , but I couldn't succeed completely. So my questions are:
1)How the Kernel get parameters and register addresses for configuring the clock for a particular device
2)Can we access this information(like register adders ) in Kernel or Driver?
3)Is there any other way , that we can use the registers directly in the driver or Kernel to set the clock (like frequency )