public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Vimal Singh <vimal.newwork@gmail.com>
To: Ladislav Michl <ladis@linux-mips.org>
Cc: linux-omap@vger.kernel.org, Tony Lindgren <tony@atomide.com>
Subject: Re: [PATCH v2 2/3] OMAP: SDP: Introducing 'board-sdp-flash.c' for flash init
Date: Mon, 8 Feb 2010 18:27:19 +0530	[thread overview]
Message-ID: <ce9ab5791002080457ye599b57t4c61fe273e82e072@mail.gmail.com> (raw)
In-Reply-To: <20100208135209.GA11847@localhost.localdomain>

On Mon, Feb 8, 2010 at 7:22 PM, Ladislav Michl <Ladislav.Michl@seznam.cz> wrote:
>> diff --git a/arch/arm/mach-omap2/board-sdp-flash.c
>> b/arch/arm/mach-omap2/board-sdp-flash.c
>> new file mode 100644
>> index 0000000..54ef19f
>> --- /dev/null
>> +++ b/arch/arm/mach-omap2/board-sdp-flash.c
> [snip]
>> +static void omap_set_vpp(struct map_info *map, int enable)
>> +{
>> +     static int      count;
>> +     u32 l;
>> +
>> +     if (cpu_class_is_omap1()) {
>> +             if (enable) {
>> +                     if (count++ == 0) {
>> +                             l = omap_readl(EMIFS_CONFIG);
>> +                             l |= OMAP_EMIFS_CONFIG_WP;
>> +                             omap_writel(l, EMIFS_CONFIG);
>> +                     }
>> +             } else {
>> +                     if (count && (--count == 0)) {
>> +                             l = omap_readl(EMIFS_CONFIG);
>> +                             l &= ~OMAP_EMIFS_CONFIG_WP;
>> +                             omap_writel(l, EMIFS_CONFIG);
>> +                     }
>> +             }
>> +     }
>> +}
>
> Hmm, as you are adding files into arch/arm/mach-omap2 directory, is there
> a chance cpu_class_is_omap1() ever returns non-zero?
>
>> +static struct physmap_flash_data sdp_nor_data = {
>> +     .width          = 2,
>> +     .set_vpp        = omap_set_vpp,
>> +};
>
> ... and in case there is not, just leave set_vpp set to NULL and delete this
> incarnation of omap_set_vpp.
>

My bad. I just did not look into that.
I'll fix it as per your suggestion.

-- 
Regards,
Vimal Singh
--
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:[~2010-02-08 12:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-08 11:47 [PATCH v2 2/3] OMAP: SDP: Introducing 'board-sdp-flash.c' for flash init Vimal Singh
2010-02-08 13:52 ` Ladislav Michl
2010-02-08 12:57   ` Vimal Singh [this message]

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=ce9ab5791002080457ye599b57t4c61fe273e82e072@mail.gmail.com \
    --to=vimal.newwork@gmail.com \
    --cc=ladis@linux-mips.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox