[U-Boot] [PATCH v2] DW SPI: Get clock value from Device Tree

Marek Vasut marex at denx.de
Tue Oct 17 15:03:59 UTC 2017


On 10/17/2017 04:57 PM, Alexey Brodkin wrote:
> Hi Jagan,
> 
>> -----Original Message-----
>> From: Eugeniy Paltsev [mailto:paltsev at synopsys.com]
>> Sent: Tuesday, October 17, 2017 4:33 PM
>> To: jagannadh.teki at gmail.com
>> Cc: u-boot at lists.denx.de; uboot-snps-arc at synopsys.com
>> Subject: [uboot-snps-arc] Re: [PATCH v2] DW SPI: Get clock value from Device Tree
>>>
>>> How hard it is to make others to use clock manager? do you have any list?
>>
>> clock_manager.h is an old (and non-generic) way to deal with different clocks.
>> For example in SOCFPGA_GEN5 and SOCFPGA_ARRIA10 clock_manager.h provides
>> cm_get_spi_controller_clk_hz function to deal with spi controller clock.
>>
>> But today we have another, linux-like alternative: to bind clocks via device tree
>> and manipulate with clocks via generic functions provided by clk.h
>>
>> In this patch I added option to get clock via device tree using standard bindings
>> and restrict clock_manager.h functions usage only to targets which still use it,
>> so new targets can simply bind clock via device tree and they do not need to
>> implement/define something in clock_manager.h
>>
>> So we don't need to make others to use clock manager :)
> 
> Maybe it worth trying the other way around and think about switching SOCFPGA platforms to
> generic clk framework?

That'd be real neat.

> Marek, any plans for that?

Patches welcome, +CC Dinh.

> -Alexey
> 


-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list