[U-Boot] [PATCH] inka4x0: board specific RTC support.

Detlev Zundel dzu at denx.de
Thu Dec 11 16:25:02 CET 2008


Hi Wolfgang,

> Dear ap at denx.de,
>
> In message <1227214731-19542-3-git-send-email-ap at denx.de> you wrote:
>> From: Andreas Pfefferle <ap at denx.de>
>> 
>> This patch adds the board specific communication routines needed
>> by the external 4543 RTC.
>
> No, that's broken by design. An RTC is  not  board-dependent,  but  a
> generic  piece  of  hardware.  Code  for  it does not belong into any
> board-specific file, but into drivers/rtc/

Did you actually check what he does?  

He does exactly what you request, he puts all the 4543 code into
drivers/rtc, but this cannot globally encode on how to access the chip
from a specific hardware.  So he factored that out of the rtc driver
(correctly in my opinion) and has only this glue code in the board
files.

What *exactly* is broken by design in this approach?

Cheers
  Detlev

-- 
FORTRAN's tragic fate has been its wide acceptance, mentally chaining thousands
and thousands of programmers to our past mistakes. I pray daily that more of my
fellow-programmers  may find the means of  freeing themselves from the curse of
compatibility.                          -- Edsger W. Dijkstra
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de


More information about the U-Boot mailing list