linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: dedekind1@gmail.com (Artem Bityutskiy)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] mtd: msm_nand: Add initial msm nand driver support.
Date: Sat, 16 Apr 2011 11:31:52 +0300	[thread overview]
Message-ID: <1302942712.2308.3.camel@koala> (raw)
In-Reply-To: <1302942029.2308.1.camel@koala>

On Sat, 2011-04-16 at 11:20 +0300, Artem Bityutskiy wrote:
> > > +#define MSM_NAND_REG(off) (msm_nand_phys + (off))
> > > +
> > > +#define MSM_NAND_FLASH_CMD            MSM_NAND_REG(0x0000)
> > > +#define MSM_NAND_ADDR0                MSM_NAND_REG(0x0004)
> > >
> > > Could you please make the macros to take the "struct msm_nand_chip
> > > *chip" argument instead, and store the pase address there. Do not hide
> > > the fact that those macros are actually functions, not constant - this
> > > is error prone.
> > >
> > > Besides, I'm do not know your HW, but if you have several controllers
> > > with various base addresses - your driver won't work.
> > 
> > you are correct, we have multiple controllers, which breaks this logic 
> > in future.
> 
> So then make your macros to accept the base address as an argument
> instead please.

Or better make macros to be constants, and always use something like
base + MSM_NAND_FLASH_CMD - this is the standard approach.
-- 
Best Regards,
Artem Bityutskiy (???????? ?????)

  reply	other threads:[~2011-04-16  8:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-01  0:47 [PATCH 1/2] mtd: nand: Allow NAND chip ids to be included standalone Murali Nalajala
2011-03-07  8:53 ` Artem Bityutskiy
2011-07-08 18:23 ` [PATCH 2/2] mtd: msm_nand: Add initial msm nand driver support Murali Nalajala
2011-07-08 16:03   ` Artem Bityutskiy
2011-04-15 14:50     ` Murali Nalajala
2011-04-16  8:20       ` Artem Bityutskiy
2011-04-16  8:31         ` Artem Bityutskiy [this message]
2011-04-16 10:15           ` Murali Nalajala
2011-04-16  9:59         ` Murali Nalajala
2011-04-16 14:19           ` Artem Bityutskiy

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=1302942712.2308.3.camel@koala \
    --to=dedekind1@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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 NNTP newsgroup(s).