linux-mips
[Top] [All Lists]

Re: [PATCH 2/3] time: replace board_time_init() by plat_clk_setup()

To: vagabon.xyz@gmail.com
Subject: Re: [PATCH 2/3] time: replace board_time_init() by plat_clk_setup()
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Sun, 06 May 2007 01:03:13 +0900 (JST)
Cc: ralf@linux-mips.org, linux-mips@linux-mips.org
In-reply-to: <11782930063123-git-send-email-fbuihuu@gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1178293006633-git-send-email-fbuihuu@gmail.com> <11782930063123-git-send-email-fbuihuu@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
On Fri,  4 May 2007 17:36:45 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> 
wrote:
> This patch introduces plat_clk_setup() which is a hook that platforms
> can implement to setup clock and mips_hpt_frequency.
> 
> This was done by board_time_init function pointer previously.
> 
> There are 3 reasons why we should prefer plat_clk_setup() over
> board_time_init:
> 
>     1/ There's no need for platforms to initialize a function
>     pointer anymore.
> 
>     2/ board_time_init was previously initialized in plat_mem_setup()
>     which is normally used to setup platform's *memories*.
> 
>     3/ plat_clk_setup() is called earlier in boot process. Therefore
>     others subsystems can get the time during their initialisation,
>     timekeeping subsystem is an example.

Though providing plat_clk_setup() for timekeeping code might be a good
idea, I think your patch break at least those two platforms:

MOMENCO_JAGUAR_ATX: momenco_time_init() assumes tlb_init() was already
called.  (wire_stupidity_into_tlb() calls local_flush_tlb_all())

MOMENCO_OCELOT_G: gt64240_time_init() assumes IRQ subsystem are
already initialized.

How about keeping board_time_init pointer as is and adding
plat_clk_setup only for simple platforms?

---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>