Commit be3a6097 authored by Josh Boyer's avatar Josh Boyer Committed by David Woodhouse

Restore physmap configure-time settings according to user requests.

Patch from Jun Sun.
Signed-Off-By: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent 938cfd03
# drivers/mtd/maps/Kconfig
# $Id: Kconfig,v 1.29 2004/07/15 15:29:17 dwmw2 Exp $
# $Id: Kconfig,v 1.30 2004/07/21 00:16:14 jwboyer Exp $
menu "Mapping drivers for chip access"
depends on MTD!=n
......@@ -19,7 +19,8 @@ config MTD_PHYSMAP
command set driver code to communicate with flash chips which
are mapped physically into the CPU's memory. You will need to
configure the physical address and size of the flash chips on
your particular board as well as the bus width.
your particular board as well as the bus width, either statically
with config options or at run-time.
config MTD_PHYSMAP_START
hex "Physical start address of flash mapping"
......@@ -30,6 +31,8 @@ config MTD_PHYSMAP_START
are mapped on your particular target board. Refer to the
memory map which should hopefully be in the documentation for
your board.
Ignore this option if you use run-time physmap configuration
(i.e., run-time calling physmap_configure()).
config MTD_PHYSMAP_LEN
hex "Physical length of flash mapping"
......@@ -42,9 +45,11 @@ config MTD_PHYSMAP_LEN
than the total amount of flash present. Refer to the memory
map which should hopefully be in the documentation for your
board.
Ignore this option if you use run-time physmap configuration
(i.e., run-time calling physmap_configure()).
config MTD_PHYSMAP_BUSWIDTH
int "Bus width in octets"
config MTD_PHYSMAP_BANKWIDTH
int "Bank width in octets"
depends on MTD_PHYSMAP
default "2"
help
......@@ -52,6 +57,8 @@ config MTD_PHYSMAP_BUSWIDTH
in octets. For example, if you have a data bus width of 32
bits, you would set the bus width octect value to 4. This is
used internally by the CFI drivers.
Ignore this option if you use run-time physmap configuration
(i.e., run-time calling physmap_configure()).
config MTD_SUN_UFLASH
tristate "Sun Microsystems userflash support"
......
/*
* $Id: physmap.c,v 1.33 2004/07/12 14:37:24 dwmw2 Exp $
* $Id: physmap.c,v 1.34 2004/07/21 00:16:14 jwboyer Exp $
*
* Normal mappings of chips in physical memory
*
......@@ -22,7 +22,12 @@
static struct mtd_info *mymtd;
struct map_info physmap_map = {.name = "phys_mapped_flash"};
struct map_info physmap_map = {
.name = "phys_mapped_flash",
.phys = CONFIG_MTD_PHYSMAP_START,
.size = CONFIG_MTD_PHYSMAP_LEN,
.bankwidth = CONFIG_MTD_PHYSMAP_BANKWIDTH,
};
#ifdef CONFIG_MTD_PARTITIONS
static struct mtd_partition *mtd_parts;
......
......@@ -2,7 +2,7 @@
* For boards with physically mapped flash and using
* drivers/mtd/maps/physmap.c mapping driver.
*
* $Id: physmap.h,v 1.2 2004/07/14 17:48:46 dwmw2 Exp $
* $Id: physmap.h,v 1.3 2004/07/21 00:16:15 jwboyer Exp $
*
* Copyright (C) 2003 MontaVista Software Inc.
* Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
......@@ -33,11 +33,11 @@ extern struct map_info physmap_map;
/*
* Board needs to specify the exact mapping during their setup time.
*/
static inline void physmap_configure(unsigned long addr, unsigned long size, int buswidth, void (*set_vpp)(struct map_info *, int) )
static inline void physmap_configure(unsigned long addr, unsigned long size, int bankwidth, void (*set_vpp)(struct map_info *, int) )
{
physmap_map.phys = addr;
physmap_map.size = size;
physmap_map.buswidth = buswidth;
physmap_map.bankwidth = bankwidth;
physmap_map.set_vpp = set_vpp;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment