From: Reinhard Meyer Date: Wed, 25 Aug 2010 04:10:03 +0200 Subject: [U-Boot] [PATCH v2] AT91: add RTT and GPBR based RTC In-Reply-To: <0F5F73E36031FD46AD3F2E6948F0C0A00439ADB9@frimb01.corp.atmel.com> References: <4C6E8A59.9040707@emk-elektronik.de> <0F5F73E36031FD46AD3F2E6948F0C0A00439ADB9@frimb01.corp.atmel.com> Message-ID: <4C747B7B.3020800@emk-elektronik.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Xu, Hong, >> adds kernel compatible RTC handling to u-boot using the RTT >> and one GPBRegister >> ... >> arch/arm/include/asm/arch-at91/at91_gpbr.h | 45 +++++++++++++ >> arch/arm/include/asm/arch-at91/at91_rtt.h | 36 ++++++++++ >> drivers/rtc/Makefile | 1 + >> drivers/rtc/at91sam9.c | 100 > > Some of Atmel's ARM926EJS chips have builtin RTC, for example, SAM9G45 SAM9M10 SAM9RL and new X5 serials. > May we take this into account at this stage? > > We can use big #ifdef to add real RTC support in drivers/rtc/at91sam9.c I don't think that makes sense, assuming the "real rtc" uses registers that count like HHMMSS DDMMYY. It would be completely different code. > - or - > > We can rename drivers/rtc/at91sam9.c to , for example, drivers/rtc/at91sam9_rtt.c, and let drivers/rtc/at91sam9.c for the real RTC support. I'd go with that, and even suggest naming the maybe upcoming "real rtc" driver at91sam9_rtc.c to give a clearer indication of the different approaches. Besides, for LinuX the rtt makes more sense since it directly counts in seconds since epoch. Thanks Reinhard