[U-Boot] [PATCH 3/9] clk: fixed_rate: allow driver usage prior to relocation

Simon Glass
2016-04-20T14:40:54Z

Hi Thomas,

On 13 April 2016 at 04:43, Thomas Abraham <ta.omasab@gmail.com> wrote:
> From: Thomas Abraham <thomas.ab@samsung.com>
>
> The fixed rate clock driver could be used to represent oscillator
> clocks. Platforms that need to determine the rate of the oscillator
> clock frequency would require that the fixed rate clock driver
> be available for use prior to relocation. So add the
> DM_FLAG_PRE_RELOC property to the driver flags.
>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Simon Glass <sjg@chromium.org>
> Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
> ---
> drivers/clk/clk_fixed_rate.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)

Can you instead use the u-boot,dm-pre-reloc property in the DT? This
change will affect everyone.

>
> diff --git a/drivers/clk/clk_fixed_rate.c b/drivers/clk/clk_fixed_rate.c
> index 8beda9c..070e568 100644
> --- a/drivers/clk/clk_fixed_rate.c
> +++ b/drivers/clk/clk_fixed_rate.c
> @@ -54,4 +54,5 @@ U_BOOT_DRIVER(clk_fixed_rate) = {
> .ofdata_to_platdata = clk_fixed_rate_ofdata_to_platdata,
> .platdata_auto_alloc_size = sizeof(struct clk_fixed_rate),
> .ops = &clk_fixed_rate_ops,
> + .flags = DM_FLAG_PRE_RELOC,
> };
> --
> 1.6.6.rc2
>

Regards,
Simon