All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Vimal Singh <vimal.newwork@gmail.com>
Cc: "Govindraj.R" <govindraj.raja@ti.com>, linux-omap@vger.kernel.org
Subject: Re: [PATCH 2/2]: Introducing 'gpmc-nand.c' for GPMC specific NAND init
Date: Tue, 8 Dec 2009 15:57:25 -0800	[thread overview]
Message-ID: <20091208235725.GA24013@atomide.com> (raw)
In-Reply-To: <20091207175644.GA24013@atomide.com>

* Tony Lindgren <tony@atomide.com> [091207 09:56]:
> * Vimal Singh <vimal.newwork@gmail.com> [091207 05:28]:
> > On Mon, Dec 7, 2009 at 11:59 AM, Vimal Singh <vimal.newwork@gmail.com> wrote:
> > > On Sat, Dec 5, 2009 at 3:31 AM, Tony Lindgren <tony@atomide.com> wrote:
> > >> Hi,
> > >>
> > >> Looks good, just one comment below.
> > >>
> > >> * Govindraj.R <govindraj.raja@ti.com> [091204 05:37]:
> > >>> From: Vimal Singh <vimalsingh@ti.com>
> > >>> Date: Wed, 25 Nov 2009 18:23:15 +0530
> > >>> Subject: [PATCH] Introducing 'gpmc-nand.c' for GPMC specific NAND init
> > >>>
> > >>> Introducing 'gpmc-nand.c' for GPMC specific NAND init.
> > >>> For example: GPMC timing parameters and all.
> > >>> This patch also migrates gpmc related calls from 'nand/omap2.c'
> > >>> to 'gpmc-nand.c'.
> > >>>
> > >>> Signed-off-by: Vimal Singh <vimalsingh@ti.com>
> > >>> ---
> > >>>  arch/arm/mach-omap2/Makefile           |    3 +
> > >>>  arch/arm/mach-omap2/gpmc-nand.c        |  141 ++++++++++++++++++++++++++++++++
> > >>>  arch/arm/plat-omap/include/plat/nand.h |    6 ++
> > >>>  drivers/mtd/nand/omap2.c               |   26 +-----
> > >>>  4 files changed, 153 insertions(+), 23 deletions(-)
> > >>>  create mode 100644 arch/arm/mach-omap2/gpmc-nand.c
> > >>
> > >> <snip>
> > >>
> > >>> --- /dev/null
> > >>> +++ b/arch/arm/mach-omap2/gpmc-nand.c
> > >>
> > >> <snip>
> > >>
> > >>> +int __init gpmc_nand_init(struct omap_nand_platform_data *_nand_data)
> > >>> +{
> > >>> +     unsigned int val;
> > >>> +     int err = 0;
> > >>> +     struct device *dev = &gpmc_nand_device.dev;
> > >>> +
> > >>> +     gpmc_nand_data = _nand_data;
> > >>> +     gpmc_nand_data->nand_setup = gpmc_nand_setup;
> > >>> +     gpmc_nand_device.dev.platform_data = gpmc_nand_data;
> > >>> +
> > >>> +     err = gpmc_nand_setup(gpmc_nand_data->gpmc_cs_baseaddr);
> > >>> +     if (err < 0) {
> > >>> +             dev_err(dev, "NAND platform setup failed: %d\n", err);
> > >>> +             return err;
> > >>> +     }
> > >>> +
> > >>> +     /* Enable RD PIN Monitoring Reg */
> > >>> +     if (gpmc_nand_data->dev_ready) {
> > >>> +             val  = gpmc_cs_read_reg(gpmc_nand_data->cs,
> > >>> +                                              GPMC_CS_CONFIG1);
> > >>> +             val |= WR_RD_PIN_MONITORING;
> > >>> +             gpmc_cs_write_reg(gpmc_nand_data->cs,
> > >>> +                                             GPMC_CS_CONFIG1, val);
> > >>> +     }
> > >>
> > >> Above looks OK..
> > >>
> > >>> +     val  = gpmc_cs_read_reg(gpmc_nand_data->cs, GPMC_CS_CONFIG7);
> > >>> +     val &= ~(0xf << 8);
> > >>> +     val |=  (0xc & 0xf) << 8;
> > >>> +     gpmc_cs_write_reg(gpmc_nand_data->cs, GPMC_CS_CONFIG7, val);
> > >>
> > >> ..but this looks messy. Maybe use some GPMC defines for the
> > >> 0xf << 8 mask?
> > >>
> > >> Then the 0xc & 0xf part looks a bit redundant, what's the 0xf
> > >> there for?
> > >>
> > >> I know it's all from the old code, but might as well clean it up
> > >> while at it :)
> > >
> > > Ok, I'll drop next version of this patch for this.
> > >
> > 
> > In fact this peace of code is not required too. This will be taken
> > care in 'gpmc_cs_request'.
> > I will remove it.
> 
> OK, cool.

Any news on posting the updated version of this? Would be nice to
get it in this merge window, so time's running out :)

When re-posting, please also cc linux-arm-kernel@lists.infradead.org
in addition to linux-omap list. That way we can have it quickly
reviewed there too.

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-12-08 23:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-04 13:38 [PATCH 2/2]: Introducing 'gpmc-nand.c' for GPMC specific NAND init Govindraj.R
2009-12-04 22:01 ` Tony Lindgren
2009-12-07  6:29   ` Vimal Singh
2009-12-07 13:29     ` Vimal Singh
2009-12-07 17:56       ` Tony Lindgren
2009-12-08 23:57         ` Tony Lindgren [this message]
2009-12-14  6:26           ` Vimal Singh
2009-12-14  9:47             ` [PATCH v2 " Vimal Singh
2009-12-14 10:41               ` Vimal Singh
2009-12-14 10:41                 ` Vimal Singh
2010-01-06 14:34               ` Artem Bityutskiy
2010-01-06 14:34                 ` Artem Bityutskiy
2010-01-07  5:17                 ` Vimal Singh
2010-01-07  5:17                   ` Vimal Singh
  -- strict thread matches above, loose matches on Subject: below --
2009-12-03 14:06 [PATCH " Vimal Singh
2009-12-04 13:04 ` Vimal Singh
2009-12-04 13:14   ` Vimal Singh
2009-12-04 13:14     ` Vimal Singh
2009-12-04 13:30     ` Govindraj
2009-12-04 13:30       ` Govindraj

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=20091208235725.GA24013@atomide.com \
    --to=tony@atomide.com \
    --cc=govindraj.raja@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=vimal.newwork@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.