[U-Boot] [PATCH 2/9] rtc: mc146818: Use probe() to set up the device
Simon Glass
sjg at chromium.org
Mon Oct 19 04:38:50 CEST 2015
Hi Bin,
On 18 October 2015 at 20:32, Bin Meng <bmeng.cn at gmail.com> wrote:
> Hi Simon,
>
> On Mon, Oct 19, 2015 at 10:26 AM, Simon Glass <sjg at chromium.org> wrote:
>> Hi Bin,
>>
>> On 18 October 2015 at 20:22, Bin Meng <bmeng.cn at gmail.com> wrote:
>>> Hi Simon,
>>>
>>> On Mon, Oct 19, 2015 at 5:55 AM, Simon Glass <sjg at chromium.org> wrote:
>>>> At present this driver uses bind() to set up the device. The bind() method
>>>> should not touch the hardware, so move the init code to probe().
>>>>
>>>
>>> I think RTC should be initialized anyway. If moving it to probe, it
>>> may not be initialized by U-Boot before jumping to kernel.
>>
>> That's fine, but the correct way to do this is to probe the device,
>> not put the init code into the bind() method.
>
> Yes, I agree. So maybe we explicitly trigger the probe somewhere in
> the initialization path?
>
Or maybe just before jumping to the OS - e.g. in boot_prep_linux()?
[snip]
Regards,
Simon
More information about the U-Boot
mailing list