public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH 2/5] mxs: prefix register acessor macros with 'mxs' prefix
Date: Sun, 29 Jul 2012 15:10:41 +0200	[thread overview]
Message-ID: <201207291510.41329.marex@denx.de> (raw)
In-Reply-To: <CAP9ODKp=LdiFNnA8JQgbKAJqLPdyWACSFPqAHE=1TSFE=sWEHw@mail.gmail.com>

Dear Otavio Salvador,

> On Sun, Jul 29, 2012 at 9:55 AM, Marek Vasut <marex@denx.de> wrote:
> > Dear Otavio Salvador,
> > 
> >> On Sun, Jul 29, 2012 at 4:00 AM, Stefano Babic <sbabic@denx.de> wrote:
> >> > Personally I prefer that the function names are the same and the
> >> > implementation itself of the function hides the SOC details. In this
> >> > way, we provide the same interface API to the user (=the board
> >> > maintainer) and to the drivers that are surely shared between the MX28
> >> > and MX23.
> >> 
> >> Sure but the accessing structure is the same for MX233 and MX28 so
> >> makes sense to have it with SOC name. If we have some divertion here a
> >> ifdef will be need to handle.
> > 
> > And fill the files with gazilions of ifdefs, making them unreadable.
> 
> No; if we have too much difference we can move the structs to another
> header and keep one to "include the right" providing the layer and
> hidding it.

That's it

> Am I missing something?
> 
> >> I also think we ought to try to split function implementation when it
> >> diverts much (as code of spl_mem_init does
> > 
> > spl_mem_init() does not. How?
> 
> The are code there would need many ifdefs to get working fine for
> both;

What code? You can split that into functions (if you mean those few writes after 
programming the memory registers). I didn't notice much else.

Ah yes, programming the mem power rail.

> this could be split on spl_mem_mx233.c and spl_mem_mx28.c and
> spl_mem.c doing the generic part and calling the specifics.

No, it's not that different.

Best regards,
Marek Vasut

  reply	other threads:[~2012-07-29 13:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-28 22:50 [U-Boot] [RFC PATCH 0/5] Rework for mxs SoC family support Otavio Salvador
2012-07-28 22:50 ` [U-Boot] [RFC PATCH 1/5] mxs: reorganize source directory for easy sharing of code in i.MXS SoCs Otavio Salvador
2012-08-04 22:33   ` Otavio Salvador
2012-08-04 22:40   ` Marek Vasut
2012-07-28 22:50 ` [U-Boot] [RFC PATCH 2/5] mxs: prefix register acessor macros with 'mxs' prefix Otavio Salvador
2012-07-29  1:33   ` Marek Vasut
2012-07-29  7:00     ` Stefano Babic
2012-07-29  7:06       ` Marek Vasut
2012-07-29 12:43       ` Otavio Salvador
2012-07-29 12:55         ` Marek Vasut
2012-07-29 13:01           ` Otavio Salvador
2012-07-29 13:10             ` Marek Vasut [this message]
2012-07-28 22:50 ` [U-Boot] [RFC PATCH 3/5] mxs: prefix register structs " Otavio Salvador
2012-08-04 22:34   ` Otavio Salvador
2012-08-04 22:40   ` Marek Vasut
2012-08-04 22:44     ` Otavio Salvador
2012-08-04 22:46       ` Marek Vasut
2012-08-05  6:46         ` Stefano Babic
2012-07-28 22:50 ` [U-Boot] [RFC PATCH 4/5] mxs: Reowork SPL to use 'mxs' prefix for methods Otavio Salvador
2012-08-04 22:35   ` Otavio Salvador
2012-07-28 22:50 ` [U-Boot] [RFC PATCH 5/5] mxs: rename mx28.c to mxs.c as it is common to i.MX233 and i.MX28 SoCs Otavio Salvador

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=201207291510.41329.marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /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