[PATCH 3/4] clk/qcom: add driver for sm8250 GCC

Caleb Connolly caleb.connolly at linaro.org
Wed Apr 10 14:12:37 CEST 2024


Hi Sumit,

>> +static const struct gate_clk sm8250_clks[] = {
>> +       GATE_CLK(GCC_AGGRE_UFS_CARD_AXI_CLK, 0x750cc, 0x00000001),
>> +       GATE_CLK(GCC_AGGRE_UFS_PHY_AXI_CLK, 0x770cc, 0x00000001),
>> +       GATE_CLK(GCC_AGGRE_USB3_PRIM_AXI_CLK, 0x0f080, 0x00000001),
>> +       GATE_CLK(GCC_AGGRE_USB3_SEC_AXI_CLK, 0x10080, 0x00000001),
>> +       GATE_CLK(GCC_CFG_NOC_USB3_PRIM_AXI_CLK, 0x0f07c, 0x00000001),
>> +       GATE_CLK(GCC_CFG_NOC_USB3_SEC_AXI_CLK, 0x1007c, 0x00000001),
>> +       GATE_CLK(GCC_QMIP_CAMERA_NRT_AHB_CLK, 0x0b018, 0x00000001),
>> +       GATE_CLK(GCC_QMIP_CAMERA_RT_AHB_CLK, 0x0b01c, 0x00000001),
>> +       GATE_CLK(GCC_QMIP_DISP_AHB_CLK, 0x0b020, 0x00000001),
>> +       GATE_CLK(GCC_QMIP_VIDEO_CVP_AHB_CLK, 0x0b010, 0x00000001),
>> +       GATE_CLK(GCC_QMIP_VIDEO_VCODEC_AHB_CLK, 0x0b014, 0x00000001),
> 
> This series has similar unused gates, resets etc. as in Neil's series.
> Let me leave it upto you folks to decide if we really need untested
> (without any relevant driver code) code paths to be added for Qcom
> platforms.

I don't see this as an issue for a few reasons:

1. it's useful documentation, if someone wants to do some bare metal 
hacking on Qualcomm platforms, these drivers are much simpler and easier 
to port than the Linux ones.
2. it's useful for debugging, I plan to upstream support for Qualcomm 
clock debugging facilities eventually, this makes it possible to dump 
all the clock states. While for now this is only useful inside of 
U-Boot, in the future we might look into ideas like installing U-Boot as 
the crashdump handler (so rather than dropping to the EDL crashdump mode 
we could launch U-Boot and interactively debug the board). Or maybe we 
investigate a mode where we make this code available via the EFI runtime 
to simplify kernel debugging (in which case we'd want to dump all 
clocks), or if we ever get a hypervisor stub in U-Boot we might want to 
do a similar thing.

I think calling this "untested" is a bit reductive, there's no negative 
impact on stability or readability by including these.

I hope this makes sense, even if we don't align on this fully.

Kind regards,

> 
> -Sumit
> 
-- 
// Caleb (they/them)


More information about the U-Boot mailing list