public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Ladislav Michl <ladis@linux-mips.org>
Cc: linux-omap@vger.kernel.org, Imre Deak <imre.deak@nokia.com>,
	Brian Swetland <swetland@google.com>,
	Kevin Hilman <kjh@hilman.org>,
	"Syed Mohammed, Khasim" <khasim@ti.com>,
	Paul Mundt <lethal@linux-sh.org>,
	Dirk Behme <dirk.behme@gmail.com>,
	Marek Vasut <marek.vasut@gmail.com>
Subject: Re: [RFC] use physmap-flash
Date: Mon, 7 Dec 2009 10:02:00 -0800	[thread overview]
Message-ID: <20091207180200.GC24013@atomide.com> (raw)
In-Reply-To: <20091206003527.GA13977@localhost.localdomain>

* Ladislav Michl <Ladislav.Michl@seznam.cz> [091205 15:34]:
> Hi!
> 
> and sorry for touching ancient stuff again... Also sorry for long Cc list,
> which is not even complete, because some projects seem to be dead now.
> 
> So, are there any objections to remove drivers/mtd/maps/omap_nor.c entirely
> in favour of physmap-flash?

Absolutely no objections from me!

Regards,

Tony
 
> $ rgrep omapflash arch/arm | sed "s/:.*//" | sort | uniq
> arch/arm/mach-omap1/board-fsample.c
> arch/arm/mach-omap1/board-h2.c
> arch/arm/mach-omap1/board-h3.c
> arch/arm/mach-omap1/board-innovator.c
> arch/arm/mach-omap1/board-osk.c
> arch/arm/mach-omap1/board-palmte.c
> arch/arm/mach-omap1/board-palmtt.c
> arch/arm/mach-omap1/board-palmz71.c
> arch/arm/mach-omap1/board-perseus2.c
> arch/arm/mach-omap1/board-sx1.c
> arch/arm/mach-omap2/board-2430sdp.c
> arch/arm/mach-omap2/board-h4.c
> 
> Note that list is missing board-voiceblue.c, which is converted by patch bellow.
> Function omap_set_vpp should be probably moved somewhere to plat-omap.
> Suggestions?
> 
> diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
> index 35c75c1..30e6d0d 100644
> --- a/arch/arm/mach-omap1/board-voiceblue.c
> +++ b/arch/arm/mach-omap1/board-voiceblue.c
> @@ -22,11 +22,11 @@
>  #include <linux/reboot.h>
>  #include <linux/serial_8250.h>
>  #include <linux/serial_reg.h>
> +#include <linux/mtd/physmap.h>
>  
>  #include <mach/hardware.h>
>  #include <asm/mach-types.h>
>  #include <asm/mach/arch.h>
> -#include <asm/mach/flash.h>
>  #include <asm/mach/map.h>
>  
>  #include <plat/common.h>
> @@ -85,9 +85,31 @@ static int __init ext_uart_init(void)
>  }
>  arch_initcall(ext_uart_init);
>  
> -static struct flash_platform_data voiceblue_flash_data = {
> -	.map_name	= "cfi_probe",
> +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);
> +			}
> +		}
> +	}
> +}
> +
> +static struct physmap_flash_data voiceblue_flash_data = {
>  	.width		= 2,
> +	.set_vpp	= omap_set_vpp,
>  };
>  
>  static struct resource voiceblue_flash_resource = {
> @@ -97,7 +119,7 @@ static struct resource voiceblue_flash_resource = {
>  };
>  
>  static struct platform_device voiceblue_flash_device = {
> -	.name		= "omapflash",
> +	.name		= "physmap-flash",
>  	.id		= 0,
>  	.dev		= {
>  		.platform_data	= &voiceblue_flash_data,
> --
> 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-07 18:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-06  0:35 [RFC] use physmap-flash Ladislav Michl
2009-12-07 18:02 ` Tony Lindgren [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=20091207180200.GC24013@atomide.com \
    --to=tony@atomide.com \
    --cc=dirk.behme@gmail.com \
    --cc=imre.deak@nokia.com \
    --cc=khasim@ti.com \
    --cc=kjh@hilman.org \
    --cc=ladis@linux-mips.org \
    --cc=lethal@linux-sh.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=marek.vasut@gmail.com \
    --cc=swetland@google.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