[U-Boot] [PATCH 4/6] EEYNOS: Add SMDK5250 board support

Wolfgang Denk wd at denx.de
Thu Jan 5 12:32:08 CET 2012


Dear Chander Kashyap,

In message <CANuQgHHY8_6M1RivA6RawRY0pVrX5nnykxd_P+u340A0D4jRFA at mail.gmail.com> you wrote:
>
> > No need to reuse the code, if SoCs are different.
> > If need, please separate the functions.
> 
> Yes, though SoC's are different, the functionality in clock.c is
> similar. The only difference is the clock name in the clock structure
> for Exynos4 and Exynos5 but the functionality is exactly same in
> clock.c. To accommodate this change in clock name #ifdef is used.

If this is the only difference, then I suggest just to rename the
field in thesta structure.  Although it makes sense to follow the names
in the documentation, it is sometimes better tochose a more suitable
name - a comment in the header file should be sufficient to explain
the rename (and to provide an anchor in case something greps for the
name as used in the docs).

Maybe we can avoid both #ifdef's and code duplication this way?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
What was sliced bread the greatest thing since?


More information about the U-Boot mailing list