public inbox for ecos-patches@sourceware.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugs.ecos.sourceware.org
To: ecos-patches@ecos.sourceware.org
Subject: [Bug 1001114] New port: NXP LPC17XX Variant, Olimex LPC-1766-STK platform
Date: Mon, 17 Jan 2011 12:59:00 -0000	[thread overview]
Message-ID: <20110117125909.05C4B2F78004@mail.ecoscentric.com> (raw)
In-Reply-To: <bug-1001114-104@http.bugs.ecos.sourceware.org/>

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001114

Sergei Gavrikov <sergei.gavrikov@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sergei.gavrikov@gmail.com

--- Comment #6 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-01-17 12:59:05 GMT ---
Hi,

First, Ilija, thank you for your contribution.

[RFC to reviewers]

As NXP does "copy and paste" own "PrimeCell" registers from a design
to design (what is generally speaking is good for programmers) we can
observe the same interference the device drivers  in a code each other
(e.g. lpc2xxx, lpc24xx and now lpc17xx). New Ilija's port for lpc17xx is
a good example such an interference and how the hackers would deal with
"PrimeCell" registers to reuse the code.

Now, if you untar attachment 1184 please, look around

% egrep -R '_LPC(24XX|2XXX)' lpc17xx/

I wonder get comments about such fragments, for example, from lpc17xx
var_io.h:

#define CYGARC_HAL_LPC24XX_REG_UART0_BASE \
    CYGHWR_HAL_LPC17XX_REG_UART0_BASE

#define CYGARC_HAL_LPC2XXX_REG_RTC_BASE  CYGHWR_HAL_LPC17XX_REG_RTC_BASE

etc.

So, the above definitions let us to utilize some generic LPC2XXX,
LPC24XX drivers (see  bug 1001115).

Pros: code reuse, code reuse, code reuse.

Cons: code interference, "difficult" to understand HAL, the bloches of
"foreigners" in the target definition (see attachment 1078).

What do you think, can we be happy with such an interference? What will
be happen if anyone will change some of the lpc2xxx, lpc24xx device
drivers, and vice versa (someone will adopt its code for lpc17xx)? Well,
this can be managed by a forest from the ifdefs, but may be we can just
duplicate the Uwe's drivers code and put such lpc17xx drivers under
devs/{eth,serial,wallclock}/cortextm/lpc17xx?

Well, I see new "Cons" in my proposal: code duplication, code duplication,
code duplication :-) Maybe someone found a better solution? And maybe
my fears are baseless at all? Then forget it, please.

Thanks.

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

  parent reply	other threads:[~2011-01-17 12:59 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-1001114-104@http.bugs.ecos.sourceware.org/>
2011-01-16  8:52 ` bugzilla-daemon
2011-01-16 17:20 ` bugzilla-daemon
2011-01-17  9:47 ` bugzilla-daemon
2011-01-17 12:59 ` bugzilla-daemon [this message]
2011-01-18  0:56 ` bugzilla-daemon
2011-01-18  1:43 ` bugzilla-daemon
2011-01-18  1:48 ` bugzilla-daemon
2011-01-18  2:00 ` bugzilla-daemon
2011-01-18 10:06 ` bugzilla-daemon
2011-01-18 10:45 ` bugzilla-daemon
2011-01-18 11:04 ` bugzilla-daemon
2011-01-18 11:48 ` bugzilla-daemon
2011-01-19 19:02 ` bugzilla-daemon
2011-01-22 21:22 ` bugzilla-daemon
2011-01-25 14:48 ` bugzilla-daemon
2011-01-26 20:15 ` bugzilla-daemon
2011-01-31 21:57 ` bugzilla-daemon
2011-02-01  9:54 ` bugzilla-daemon
2011-02-01 10:48 ` bugzilla-daemon
2011-02-01 11:52 ` bugzilla-daemon
2011-02-03 17:01 ` bugzilla-daemon
2011-02-03 17:02 ` bugzilla-daemon
2011-02-03 17:08 ` bugzilla-daemon
2011-02-08 21:09 ` bugzilla-daemon
2011-02-17 14:19 ` bugzilla-daemon
2011-02-21 18:11 ` bugzilla-daemon
2011-02-27 16:21 ` bugzilla-daemon
2011-02-27 16:56 ` bugzilla-daemon
2011-02-28 12:46 ` bugzilla-daemon
2011-02-28 13:40 ` bugzilla-daemon
2011-02-28 20:47 ` bugzilla-daemon
2011-03-05 12:34 ` bugzilla-daemon
2011-03-06 18:29 ` bugzilla-daemon
2011-03-06 20:54 ` bugzilla-daemon
2011-03-07 12:20 ` bugzilla-daemon
2011-03-07 12:23 ` bugzilla-daemon
2011-03-07 12:43 ` bugzilla-daemon
2011-03-07 19:04 ` bugzilla-daemon
2011-03-07 19:14 ` bugzilla-daemon
2011-03-10 22:06 ` bugzilla-daemon
2011-03-10 22:41 ` bugzilla-daemon
2011-03-11  7:58 ` bugzilla-daemon
2011-03-11  9:40 ` bugzilla-daemon
2011-03-11 11:19 ` bugzilla-daemon
2011-03-13 14:24 ` bugzilla-daemon
2011-03-13 15:34 ` bugzilla-daemon
2011-03-13 16:45 ` bugzilla-daemon
2011-03-14 11:02 ` bugzilla-daemon
2011-03-14 11:33 ` bugzilla-daemon
2011-03-14 12:15 ` bugzilla-daemon
2011-04-15  6:44 ` bugzilla-daemon
2011-05-12 10:56 ` bugzilla-daemon
2011-05-12 12:53 ` bugzilla-daemon
2011-05-12 13:00 ` bugzilla-daemon
2011-05-12 13:15 ` bugzilla-daemon
2011-05-13  7:05 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110117125909.05C4B2F78004@mail.ecoscentric.com \
    --to=bugzilla-daemon@bugs.ecos.sourceware.org \
    --cc=ecos-patches@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).