[U-Boot] [PATCH 12/22] x86: Add an early CMOS access library

Bin Meng bmeng.cn at gmail.com
Tue Apr 18 09:46:32 UTC 2017


Hi Simon,

On Wed, Mar 22, 2017 at 4:06 AM, Simon Glass <sjg at chromium.org> wrote:
> Hi Bin,
>
> On 16 March 2017 at 08:26, Bin Meng <bmeng.cn at gmail.com> wrote:
>> This adds a library that provides CMOS (inside RTC SRAM) access
>> at a very early stage when driver model is not available yet.
>>
>> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
>> ---
>>
>>  arch/x86/include/asm/early_cmos.h | 43 +++++++++++++++++++++++++++++++++
>>  arch/x86/lib/Makefile             |  1 +
>>  arch/x86/lib/early_cmos.c         | 51 +++++++++++++++++++++++++++++++++++++++
>>  3 files changed, 95 insertions(+)
>>  create mode 100644 arch/x86/include/asm/early_cmos.h
>>  create mode 100644 arch/x86/lib/early_cmos.c
>
> Is it possible to share code with the existing driver, like we do with
> DEBUG_UART?

DEBUG_UART requires every serial driver provides APIs like
_debug_uart_putc(), while this early cmos library wants to share codes
with rtc-uclass.c. Looks not possible to get rid of the udevice
parameter.

Regards,
Bin


More information about the U-Boot mailing list