[PATCH v2 1/7] clk/qcom: add initial clock driver for sc7280
Caleb Connolly
caleb.connolly at linaro.org
Wed Aug 21 16:49:16 CEST 2024
On 21/08/2024 16:37, Simon Glass wrote:
> Hi Caleb,
>
> On Wed, 21 Aug 2024 at 08:11, Caleb Connolly <caleb.connolly at linaro.org> wrote:
>>
>> Hi Simon,
>>>> +U_BOOT_DRIVER(gcc_sc7280) = {
>>>> + .name = "gcc_sc7280",
>>>> + .id = UCLASS_NOP,
>>>> + .of_match = gcc_sc7280_of_match,
>>>> + .bind = qcom_cc_bind,
>>>> + .flags = DM_FLAG_PRE_RELOC | DM_FLAG_DEFAULT_PD_CTRL_OFF,
>>>> +};
>>>
>>> This should use driver model, with a UCLASS_CLK and UCLASS_RESET
>>
>> Please refer to qcom_cc_bind() which binds the clock, reset, and power
>> domain drivers.
>
> Gosh, why? Are these devices not in the devicetree?
They are, the gcc block contains clock, reset, and pd parts. On Linux
this is not an issue because a single device can be multiple different
classes (e..g when you register a reset you do it for a device) whereas
U-Boot requires a device per class.
e.g. see devm_reset_controller_register() in Linux, it populates a
struct reset_controller_dev which references the struct device created
for the node. In U-Boot you have to create a new device which _is_ the
reset controller.
>
> Regards,
> Simon
--
// Caleb (they/them)
More information about the U-Boot
mailing list