public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Ladislav Michl <Ladislav.Michl@seznam.cz>
To: Vimal Singh <vimal.newwork@gmail.com>
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 14:52:09 +0100	[thread overview]
Message-ID: <20100208135209.GA11847@localhost.localdomain> (raw)
In-Reply-To: <ce9ab5791002080347q3c8a73bvf80736b125cfac1@mail.gmail.com>

> 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.


  reply	other threads:[~2010-02-08 12:52 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 [this message]
2010-02-08 12:57   ` Vimal Singh

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=20100208135209.GA11847@localhost.localdomain \
    --to=ladislav.michl@seznam.cz \
    --cc=ladis@linux-mips.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox