diff options
author | Josh Boyer <jwboyer@infradead.org> | 2004-08-10 18:13:52 +0100 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2004-08-10 18:13:52 +0100 |
commit | be3a60978fdb757ff8fab31b8c43a09a156b092c (patch) | |
tree | 91a2f828c59227340ae67e39717c002da67df01f /drivers | |
parent | 938cfd03d82977272c69b14035bb20eac6e0999b (diff) | |
download | history-be3a60978fdb757ff8fab31b8c43a09a156b092c.tar.gz |
Restore physmap configure-time settings according to user requests.
Patch from Jun Sun.
Signed-Off-By: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/maps/Kconfig | 15 | ||||
-rw-r--r-- | drivers/mtd/maps/physmap.c | 9 |
2 files changed, 18 insertions, 6 deletions
diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig index b1ad6567b73547..cdc5bbd166a314 100644 --- a/drivers/mtd/maps/Kconfig +++ b/drivers/mtd/maps/Kconfig @@ -1,5 +1,5 @@ # 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" diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c index 8dfd0b233616fb..5822ba99c19584 100644 --- a/drivers/mtd/maps/physmap.c +++ b/drivers/mtd/maps/physmap.c @@ -1,5 +1,5 @@ /* - * $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; |